Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:14:29

0001 //==========================================================================
0002 //  AIDA Detector description implementation 
0003 //--------------------------------------------------------------------------
0004 // Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN)
0005 // All rights reserved.
0006 //
0007 // For the licensing terms see $DD4hepINSTALL/LICENSE.
0008 // For the list of contributors see $DD4hepINSTALL/doc/CREDITS.
0009 //
0010 // Author     : M.Frank
0011 //
0012 //==========================================================================
0013 
0014 // Framework include files
0015 #include <DD4hep/Printout.h>
0016 #include <DD4hep/InstanceCount.h>
0017 #include <DDG4/Geant4Vertex.h>
0018 
0019 using namespace dd4hep::sim;
0020 
0021 /// Default destructor
0022 VertexExtension::~VertexExtension() {
0023 }
0024 
0025 /// Copy constructor
0026 Geant4Vertex::Geant4Vertex(const Geant4Vertex& c)
0027   : ref(1), mask(c.mask), x(c.x), y(c.y), z(c.z), time(c.time), out(c.out), in(c.in)
0028 {
0029   InstanceCount::increment(this);
0030 }
0031 
0032 /// Default constructor
0033 Geant4Vertex::Geant4Vertex()
0034   : ref(1), mask(0), x(0), y(0), z(0), time(0)
0035 {
0036   InstanceCount::increment(this);
0037 }
0038 
0039 /// Default destructor
0040 Geant4Vertex::~Geant4Vertex()  {
0041   InstanceCount::decrement(this);
0042 }
0043 
0044 /// Assignment operator
0045 Geant4Vertex& Geant4Vertex::operator=(const Geant4Vertex& c)   {
0046   if ( this != &c )  {
0047     mask = c.mask;
0048     x = c.x;
0049     y = c.y;
0050     z = c.z;
0051     time = c.time;
0052     in = c.in;
0053     out = c.out;
0054   }
0055   return *this;
0056 }
0057 
0058 Geant4Vertex* Geant4Vertex::addRef()   {
0059   ++ref;
0060   return this;
0061 }
0062 
0063 void Geant4Vertex::release()  {
0064   if ( --ref <= 0 ) delete this;
0065 }