00001 #ifndef __PFBlockElementTrack__ 00002 #define __PFBlockElementTrack__ 00003 00004 #include <iostream> 00005 00006 #include "DataFormats/Math/interface/Point3D.h" 00007 00008 #include "DataFormats/ParticleFlowReco/interface/PFBlockElement.h" 00009 #include "DataFormats/ParticleFlowReco/interface/PFRecTrackFwd.h" 00010 #include "DataFormats/TrackReco/interface/TrackFwd.h" 00011 00012 namespace reco { 00013 00017 class PFBlockElementTrack : public PFBlockElement { 00018 public: 00019 00020 PFBlockElementTrack() {} 00021 00022 PFBlockElementTrack(const PFRecTrackRef& ref); 00023 00024 PFBlockElement* clone() const { return new PFBlockElementTrack(*this); } 00025 00026 void Dump(std::ostream& out = std::cout, 00027 const char* tab = " " ) const; 00028 00030 virtual bool trackType(TrackType trType) const { 00031 return (trackType_>>trType) & 1; 00032 } 00033 00035 virtual void setTrackType(TrackType trType, bool value) { 00036 if(value) trackType_ = trackType_ | (1<<trType); 00037 else trackType_ = trackType_ ^ (1<<trType); 00038 } 00039 00040 00042 void setPositionAtECALEntrance(float x, float y, float z) { 00043 positionAtECALEntrance_.SetCoordinates(x, y, z); 00044 } 00045 00046 00048 const math::XYZPointF& positionAtECALEntrance() const { 00049 return positionAtECALEntrance_; 00050 } 00051 00054 PFRecTrackRef trackRefPF() const { return trackRefPF_; } 00055 00057 reco::TrackRef trackRef() const { return trackRef_; } 00058 00060 bool isSecondary() const { 00061 return trackType(T_FROM_NUCL) || trackType(T_FROM_GAMMACONV); 00062 } 00063 00065 NuclearInteractionRef nuclearRef() const { return nuclInterRef_; } 00066 00068 void setNuclearRef(const NuclearInteractionRef& niref, TrackType trType) { 00069 nuclInterRef_ = niref; setTrackType(trType,true); 00070 } 00071 00073 reco::MuonRef muonRef() const { return muonRef_; } 00074 00076 void setMuonRef(const MuonRef& muref) { 00077 muonRef_=muref; setTrackType(MUON,true); 00078 } 00079 00081 ConversionRef convRef() const {return convRef_;} 00082 00084 void setConversionRef(const ConversionRef& convRef, TrackType trType) { 00085 convRef_ = convRef; setTrackType(trType,true); 00086 } 00087 00089 VertexCompositeCandidateRef V0Ref() const {return v0Ref_;} 00090 00092 void setV0Ref(const VertexCompositeCandidateRef& V0Ref, TrackType trType) { 00093 v0Ref_ = V0Ref; setTrackType(trType,true); 00094 } 00095 00096 00097 00098 private: 00099 00101 PFRecTrackRef trackRefPF_; 00102 00104 reco::TrackRef trackRef_; 00105 00106 unsigned int trackType_; 00107 00109 math::XYZPointF positionAtECALEntrance_; 00110 00112 NuclearInteractionRef nuclInterRef_; 00113 00115 reco::MuonRef muonRef_; 00116 00118 ConversionRef convRef_; 00119 00121 VertexCompositeCandidateRef v0Ref_; 00122 }; 00123 } 00124 00125 #endif 00126