00001 // -*- C++ -*- 00002 #ifndef IMPL_RECONSTRUCTEDPARTICLEIMPL_H 00003 #define IMPL_RECONSTRUCTEDPARTICLEIMPL_H 1 00004 00005 00006 #include "EVENT/ReconstructedParticle.h" 00007 #include "AccessChecked.h" 00008 00009 00010 #define NCOVARIANCE 10 00011 00012 00013 namespace IMPL { 00014 00015 00022 class ReconstructedParticleImpl : public EVENT::ReconstructedParticle, public AccessChecked { 00023 00024 public: 00025 00028 ReconstructedParticleImpl() ; 00029 00031 ReconstructedParticleImpl(const ReconstructedParticleImpl&) = default ; 00032 00034 ReconstructedParticleImpl& operator=(const ReconstructedParticleImpl&) = default ; 00035 00037 virtual ~ReconstructedParticleImpl() ; 00038 00039 virtual int id() const { return simpleUID() ; } 00040 00041 00046 virtual int getType() const ; 00047 00050 virtual bool isCompound() const { return getParticles().size() > 0 ; } 00051 00054 virtual const double* getMomentum() const ; 00055 00058 virtual double getEnergy() const ; 00059 00062 virtual const EVENT::FloatVec & getCovMatrix() const ; 00063 00066 virtual double getMass() const ; 00067 00070 virtual float getCharge() const ; 00071 00074 virtual const float* getReferencePoint() const ; 00075 00079 virtual const EVENT::ParticleIDVec & getParticleIDs() const ; 00080 00084 virtual EVENT::ParticleID * getParticleIDUsed() const ; 00085 00086 00089 virtual float getGoodnessOfPID() const ; 00090 00093 virtual const EVENT::ReconstructedParticleVec & getParticles() const ; 00094 00097 virtual const EVENT::ClusterVec & getClusters() const ; 00098 00099 00102 virtual const EVENT::TrackVec & getTracks() const ; 00103 00106 virtual EVENT::Vertex * getStartVertex() const ; 00107 00111 virtual EVENT::Vertex * getEndVertex() const ; 00112 00113 00114 // setters 00115 void setType(int type) ; 00116 // void setPrimary(bool primary) ; 00117 // void setTypeFlag( int typeFlag) ; 00118 void setMomentum( const float* momentum ) ; 00119 void setMomentum( const double* momentum ) ; 00120 void setEnergy( float energy) ; 00121 void setCovMatrix( const float* cov ) ; 00122 void setCovMatrix( const EVENT::FloatVec& ) ; 00123 void setMass( float mass ) ; 00124 void setCharge( float charge ) ; 00125 void setReferencePoint( const float* reference ) ; 00126 void addParticleID( EVENT::ParticleID* pid ) ; 00127 void setParticleIDUsed( EVENT::ParticleID* pid ) ; 00128 void setGoodnessOfPID( float goodness ) ; 00129 void addParticle( EVENT::ReconstructedParticle* particle ) ; 00130 void addCluster( EVENT::Cluster* cluster) ; 00131 void addTrack( EVENT::Track* track) ; 00132 // void addMCParticle( EVENT::MCParticle* mcParticle , float weight = 1.0 ) ; 00133 void setStartVertex( EVENT::Vertex * sv ) ; 00134 //void setEndVertex( EVENT::Vertex * ev ) ; 00135 00136 protected: 00137 00138 int _type{0} ; 00139 double _momentum[3] = {0.,0.,0.} ; 00140 double _energy{0.} ; 00141 EVENT::FloatVec _cov{} ; 00142 double _mass{0.} ; 00143 float _charge{} ; 00144 float _reference[3] = {0.,0.,0.} ; 00145 EVENT::ParticleID* _pidUsed{ NULL} ; 00146 float _goodnessOfPID{0.} ; 00147 EVENT::ParticleIDVec _pid{} ; 00148 EVENT::ReconstructedParticleVec _particles{} ; 00149 EVENT::ClusterVec _clusters{} ; 00150 EVENT::TrackVec _tracks{} ; 00151 EVENT::Vertex* _sv{} ; 00152 00153 00154 }; // class 00155 00156 } // namespace IMPL 00157 #endif /* ifndef IMPL_RECONSTRUCTEDPARTICLEIMLP_H */