![]() |
![]() |
00001 #ifndef __PFBlockElement__ 00002 #define __PFBlockElement__ 00003 00004 #include "DataFormats/ParticleFlowReco/interface/PFRecTrackFwd.h" 00005 #include "DataFormats/ParticleFlowReco/interface/PFNuclearInteraction.h" 00006 #include "DataFormats/ParticleFlowReco/interface/PFClusterFwd.h" 00007 #include "DataFormats/TrackReco/interface/TrackFwd.h" 00008 #include "DataFormats/MuonReco/interface/MuonFwd.h" 00009 #include "DataFormats/EgammaCandidates/interface/Conversion.h" 00010 #include "DataFormats/EgammaCandidates/interface/ConversionFwd.h" 00011 #include "DataFormats/Candidate/interface/VertexCompositeCandidate.h" 00012 #include "DataFormats/Candidate/interface/VertexCompositeCandidateFwd.h" 00013 00014 #include <iostream> 00015 00016 00017 namespace reco { 00018 class PFBlockElementCluster; 00019 class PFBlockElementTrack; 00020 00021 00026 class PFBlockElement { 00027 public: 00028 00030 static const unsigned nTypes_; 00031 00033 enum Type { 00034 NONE=0, 00035 TRACK, 00036 PS1, 00037 PS2, 00038 ECAL, 00039 HCAL, 00040 GSF, 00041 BREM 00042 }; 00043 00044 enum TrackType { 00045 DEFAULT=0, 00046 T_FROM_NUCL, 00047 T_TO_NUCL, 00048 T_FROM_GAMMACONV, 00049 MUON, 00050 T_FROM_V0 00051 }; 00052 00054 PFBlockElement(Type type=NONE) : 00055 type_(type), 00056 locked_(false), 00057 index_( static_cast<unsigned>(-1) ) { 00058 } 00059 00060 00062 virtual ~PFBlockElement() {} 00063 00065 virtual void Dump(std::ostream& out=std::cout, 00066 const char* tab=" " ) const; 00067 00069 virtual PFBlockElement* clone() const = 0; 00070 00072 void lock() {locked_ = true;} 00073 00075 void unLock() {locked_ = false;} 00076 00078 Type type() const { return type_; } 00079 00081 virtual bool trackType(TrackType trType) const { return false; } 00082 00084 virtual void setTrackType(TrackType trType, bool value) { 00085 std::cout << "Error in PFBlockElement::setTrackType : this base class method is not implemented" << std::endl;} 00086 00088 bool locked() const {return locked_;} 00089 00091 void setIndex(unsigned index) { index_ = index; } 00092 00094 unsigned index() const {return index_;} 00095 00096 virtual reco::TrackRef trackRef() const {return reco::TrackRef(); } 00097 virtual PFRecTrackRef trackRefPF() const {return PFRecTrackRef(); } 00098 virtual PFClusterRef clusterRef() const {return PFClusterRef(); } 00099 virtual NuclearInteractionRef nuclearRef() const { return NuclearInteractionRef(); } 00100 virtual ConversionRef convRef() const { return ConversionRef();} 00101 virtual MuonRef muonRef() const { return MuonRef(); } 00102 virtual VertexCompositeCandidateRef V0Ref() const { return VertexCompositeCandidateRef(); } 00103 virtual void setNuclearRef(const NuclearInteractionRef& niref, TrackType trType) { 00104 std::cout << "Error in PFBlockElement::setNuclearRef : this base class method is not implemented" << std::endl;} 00105 virtual void setConversionRef(const ConversionRef& convRef, TrackType trType) { 00106 std::cout << "Error in PFBlockElement::setConversionRef : this base class method is not implemented" << std::endl;} 00107 virtual void setMuonRef(const MuonRef& muref) { 00108 std::cout << "Error in PFBlockElement::setMuonRef : this base class method is not implemented" << std::endl;} 00109 virtual void setV0Ref(const VertexCompositeCandidateRef& v0ref,TrackType trType) { 00110 00111 std::cout << "Error in PFBlockElement::setV0Ref : this base class method is not implemented" << std::endl; 00112 } 00113 00114 00115 virtual bool isSecondary() const { return false; } 00116 00117 friend std::ostream& operator<<( std::ostream& out, 00118 const PFBlockElement& element ); 00119 00120 protected: 00121 00124 Type type_; 00125 00129 bool locked_; 00130 00132 unsigned index_; 00133 00134 00135 }; 00136 } 00137 #endif