00001 // -*- C++ -*- 00002 // AID-GENERATED 00003 // ========================================================================= 00004 // This class was generated by AID - Abstract Interface Definition 00005 // DO NOT MODIFY, but use the org.freehep.aid.Aid utility to regenerate it. 00006 // ========================================================================= 00007 #ifndef EVENT_MCPARTICLE_H 00008 #define EVENT_MCPARTICLE_H 1 00009 00010 #include "EVENT/LCObject.h" 00011 #include "EVENT/MCParticle.h" 00012 #include "empty_ignore.h" 00013 00014 #include <vector> 00015 00016 namespace EVENT { 00017 00018 00019 class MCParticle ; 00020 /**Vector of (pointers to) MCParticles.*/ 00021 typedef std::vector<MCParticle*> MCParticleVec ; 00022 /** The LCIO Monte Carlo particle. 00023 * 00024 * @author gaede 00025 * @version $Id: MCParticle.aid,v 1.26 2006/08/03 16:53:34 gaede Exp $ 00026 */ 00027 class MCParticle : public LCObject { 00028 00029 public: 00030 /// Destructor. 00031 virtual ~MCParticle() { /* nop */; } 00032 00033 00034 /** Useful typedef for template programming with LCIO */ 00035 typedef MCParticle lcobject_type ; 00036 00037 /** Returns the energy of the particle (at the vertex) in [GeV] computed from 00038 * the particle's momentum and mass - only float used in files. 00039 */ 00040 virtual double getEnergy() const = 0; 00041 00042 /** Returns the parents of this particle. 00043 */ 00044 virtual const MCParticleVec & getParents() const = 0; 00045 00046 /** Returns the daughters of this particle. 00047 */ 00048 virtual const MCParticleVec & getDaughters() const = 0; 00049 00050 /** Returns the number of parents of this particle - 0 if mother. 00051 * @deprecated use getParents() 00052 */ 00053 virtual int getNumberOfParents() const = 0; 00054 00055 /** Returns the i-th parent of this particle. 00056 * @deprecated use getParents() 00057 * 00058 * @see MCParticle.getNumberOfParents() 00059 */ 00060 virtual MCParticle * getParent(int i) const = 0; 00061 00062 /** Returns the PDG code of the particle. 00063 */ 00064 virtual int getPDG() const = 0; 00065 00066 /** Returns the status for particles as defined by the generator, typically 00067 * <br> 0 empty line 00068 * <br> 1 undecayed particle, stable in the generator 00069 * <br> 2 particle decayed in the generator 00070 * <br> 3 documentation line 00071 */ 00072 virtual int getGeneratorStatus() const = 0; 00073 00074 /** Returns the status for particles from the simulation, e.g. 00075 * decayed in flight. Bits 31-16 are used to decode the information. 00076 * Use the followng boolean functions to determine the 00077 * proper simulator status:<br> 00078 * @see isCreatedInSimulation() 00079 * @see isBackscatter() 00080 * @see vertexIsNotEndpointOfParent() 00081 * @see isDecayedInTracker() 00082 * @see isDecayedInCalorimeter() 00083 * @see hasLeftDetector() 00084 * @see isStopped() 00085 */ 00086 virtual int getSimulatorStatus() const = 0; 00087 00088 // define the bit positions for the simulation flag 00089 00090 static const int BITEndpoint = 31 ; 00091 static const int BITCreatedInSimulation = 30 ; 00092 static const int BITBackscatter = 29 ; 00093 static const int BITVertexIsNotEndpointOfParent = 28 ; 00094 static const int BITDecayedInTracker = 27 ; 00095 static const int BITDecayedInCalorimeter = 26 ; 00096 static const int BITLeftDetector = 25 ; 00097 static const int BITStopped = 24 ; 00098 00099 /** True if the particle has been created by the simulation program (rather than the generator). 00100 */ 00101 virtual bool isCreatedInSimulation() const = 0; 00102 00103 /** True if the particle was created by the simulator as a result of an interaction or decay in 00104 * non-tracking region, e.g. a calorimeter. By convention, such particles are not saved. However, 00105 * if this particle creates a tracker hit, the particle is added to the MCParticle list with 00106 * this flag set, and the parent set to the particle that initially decayed or interacted in 00107 * a non-tracking region. 00108 */ 00109 virtual bool isBackscatter() const = 0; 00110 00111 /** True if the particle was created as a result of a continuous process where the parent 00112 * particle continues, i.e. hard ionization, Bremsstrahlung, elastic interactions, etc. 00113 */ 00114 virtual bool vertexIsNotEndpointOfParent() const = 0; 00115 00116 /** True if the particle decayed or interacted in a tracking region. 00117 */ 00118 virtual bool isDecayedInTracker() const = 0; 00119 00120 /** True if the particle decayed or interacted (non-continuous interaction, particle terminated) 00121 * in non-tracking region. 00122 */ 00123 virtual bool isDecayedInCalorimeter() const = 0; 00124 00125 /** True if the particle left the world volume undecayed. 00126 */ 00127 virtual bool hasLeftDetector() const = 0; 00128 00129 /** True if the particle lost all kinetic energy inside the world volume and did not decay 00130 */ 00131 virtual bool isStopped() const = 0; 00132 00133 // corresponding setters 00134 // public void setCreatedInSimulation(boolean val) ; 00135 // public void setBackscatter(boolean val) ; 00136 // public void setVertexIsNotEndpointOfParent(boolean val) ; 00137 // public void setDecayedInTracker(boolean val) ; 00138 // public void setDecayedInCalorimeter(boolean val) ; 00139 // public void setHasLeftDetector(boolean val) ; 00140 // public void setStopped(boolean val) ; 00141 /** Returns the production vertex of the particle in [mm]. 00142 */ 00143 virtual const double* getVertex() const = 0; 00144 00145 /** The creation time of the particle in [ns] wrt. the event, 00146 * e.g. for preassigned decays or decays in flight from 00147 * the simulator. 00148 */ 00149 virtual float getTime() const = 0; 00150 00151 /** Returns the endpoint of the particle in [mm] if 00152 * the endpoint has been set explicetly. 00153 * If not, the vertex of the first daughter that 00154 * has vertexIsNotEndpointOfParent==false is returned. 00155 * If no such daughter exists (0,0,0) is returned. 00156 */ 00157 virtual const double* getEndpoint() const = 0; 00158 00159 /** Returns the particle's 3-momentum at the production vertex in [GeV] 00160 * - only float used in files. 00161 */ 00162 virtual const double* getMomentum() const = 0; 00163 00164 /** Returns the mass of the particle in [GeV] - only float used in files. 00165 */ 00166 virtual double getMass() const = 0; 00167 00168 /** Returns the particle's charge. 00169 */ 00170 virtual float getCharge() const = 0; 00171 00172 /** Returns the number of daughters of this particle. 00173 * @deprecated use getDaughters() 00174 */ 00175 virtual int getNumberOfDaughters() const = 0; 00176 00177 /** Returns the i-th daughter of this particle. 00178 * @deprecated use getDaughters() 00179 */ 00180 virtual MCParticle * getDaughter(int i) const = 0; 00181 }; // class 00182 } // namespace EVENT 00183 #endif /* ifndef EVENT_MCPARTICLE_H */
1.3.9.1