00001
00002 #ifndef IMPL_MCPARTICLEIMPL_H
00003 #define IMPL_MCPARTICLEIMPL_H 1
00004 #include <vector>
00005
00006 #include "EVENT/LCIO.h"
00007 #include "AccessChecked.h"
00008
00009 #include "EVENT/MCParticle.h"
00010 #include <bitset>
00011
00012 namespace IMPL {
00013
00014
00015
00016
00017
00018
00024 class MCParticleImpl : public EVENT::MCParticle, public AccessChecked {
00025
00026 public:
00027
00028 MCParticleImpl() ;
00029
00030
00031
00032
00034 virtual ~MCParticleImpl() ;
00035
00036 virtual int id() const { return simpleUID() ; }
00037
00040 virtual const EVENT::MCParticleVec & getParents() const ;
00041
00044 virtual const EVENT::MCParticleVec & getDaughters() const ;
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00070 virtual const double* getEndpoint() const ;
00071
00072
00073
00074
00075
00076
00079 virtual int getPDG() const ;
00080
00087 virtual int getGeneratorStatus() const ;
00088
00102 virtual int getSimulatorStatus() const ;
00103
00106 virtual bool isCreatedInSimulation() const ;
00107
00110 virtual bool isBackscatter() const ;
00111
00114 virtual bool vertexIsNotEndpointOfParent() const ;
00115
00118 virtual bool isDecayedInTracker() const ;
00119
00122 virtual bool isDecayedInCalorimeter() const ;
00123
00126 virtual bool hasLeftDetector() const ;
00127
00130 virtual bool isStopped() const ;
00131
00134 virtual bool isOverlay() const ;
00135
00138 virtual const double* getVertex() const ;
00139
00144 virtual float getTime() const ;
00145
00148 virtual const double * getMomentum() const ;
00149
00150
00153 virtual const double* getMomentumAtEndpoint() const ;
00154
00157 virtual double getMass() const ;
00158
00161 virtual float getCharge() const ;
00162
00163
00167 virtual double getEnergy() const ;
00168
00171 virtual const float* getSpin() const ;
00172
00173
00176 virtual const int* getColorFlow() const ;
00177
00178
00179
00182 void addParent( EVENT::MCParticle *mom ) ;
00183
00184
00185
00186
00187
00188
00189
00190
00191
00192
00193
00196 void setPDG(int pdg ) ;
00197
00200 void setGeneratorStatus( int status ) ;
00201
00204 void setSimulatorStatus( int status ) ;
00205
00208 void setVertex( const double vtx[3] ) ;
00209
00212 void setTime( float time) ;
00213
00217 void setEndpoint( const double pnt[3] ) ;
00218
00221 void setMomentum( const float p[3] );
00222
00225 void setMomentum( const double p[3] );
00226
00229 void setMomentumAtEndpoint( const float p[3] );
00230
00233 void setMomentumAtEndpoint( const double p[3] );
00234
00237 void setMass( float m ) ;
00238
00241 void setCharge( float c ) ;
00242
00245 void setSpin( const float spin[3] );
00246
00249 void setColorFlow( const int cflow[2] );
00250
00251
00252
00253
00254 virtual void setCreatedInSimulation(bool val) ;
00255
00256 virtual void setBackscatter(bool val) ;
00257
00258 virtual void setVertexIsNotEndpointOfParent(bool val) ;
00259
00260 virtual void setDecayedInTracker(bool val) ;
00261
00262 virtual void setDecayedInCalorimeter(bool val) ;
00263
00264 virtual void setHasLeftDetector(bool val) ;
00265
00266 virtual void setStopped(bool val) ;
00267
00268 virtual void setOverlay(bool val) ;
00269
00270 protected:
00271
00274 void addDaughter( EVENT::MCParticle* daughter) ;
00275
00276
00277
00278 int _pdg ;
00279 int _genstatus ;
00280
00281 std::bitset<32> _simstatus ;
00282 double _vertex[3] ;
00283 double _endpoint[3] ;
00284 double _pEndpoint[3] ;
00285 double _p[3] ;
00286 double _mass ;
00287 float _charge ;
00288 float _time ;
00289 EVENT::MCParticleVec _parents ;
00290 EVENT::MCParticleVec _daughters ;
00291 bool _endpointSet ;
00292 float _spin[3] ;
00293 int _colorFlow[2] ;
00294
00295 };
00296 }
00297 #endif