Go to the documentation of this file.00001 #ifndef __PFBlockElement__
00002 #define __PFBlockElement__
00003
00004 #include "DataFormats/ParticleFlowReco/interface/PFRecTrackFwd.h"
00005 #include "DataFormats/ParticleFlowReco/interface/PFDisplacedTrackerVertex.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 "DataFormats/ParticleFlowReco/interface/PFMultilinksTC.h"
00015
00016 #include <iostream>
00017
00018
00019 namespace reco {
00020 class PFBlockElementCluster;
00021 class PFBlockElementTrack;
00022
00023
00028 class PFBlockElement {
00029 public:
00030
00033 enum Type {
00034 NONE=0,
00035 TRACK=1,
00036 PS1=2,
00037 PS2=3,
00038 ECAL=4,
00039 HCAL=5,
00040 GSF=6,
00041 BREM=7,
00042 HFEM=8,
00043 HFHAD=9,
00044 SC=10,
00045 HO=11
00046 };
00047
00048 enum TrackType {
00049 DEFAULT=0,
00050 T_FROM_DISP,
00051 T_TO_DISP,
00052 T_FROM_GAMMACONV,
00053 MUON,
00054 T_FROM_V0
00055 };
00056
00058 PFBlockElement(Type type=NONE) :
00059 type_(type),
00060 locked_(false),
00061 index_( static_cast<unsigned>(-1) ) {
00062 }
00063
00064
00066 virtual ~PFBlockElement() {}
00067
00069 virtual void Dump(std::ostream& out=std::cout,
00070 const char* tab=" " ) const;
00071
00073 virtual PFBlockElement* clone() const = 0;
00074
00076 void lock() {locked_ = true;}
00077
00079 void unLock() {locked_ = false;}
00080
00082 Type type() const { return type_; }
00083
00085 virtual bool trackType(TrackType trType) const { return false; }
00086
00088 virtual void setTrackType(TrackType trType, bool value) {
00089 std::cout << "Error in PFBlockElement::setTrackType : this base class method is not implemented" << std::endl;}
00090
00092 bool locked() const {return locked_;}
00093
00095 void setIndex(unsigned index) { index_ = index; }
00096
00098 unsigned index() const {return index_;}
00099
00100 virtual reco::TrackRef trackRef() const {return reco::TrackRef(); }
00101 virtual PFRecTrackRef trackRefPF() const {return PFRecTrackRef(); }
00102 virtual PFClusterRef clusterRef() const {return PFClusterRef(); }
00103 virtual PFDisplacedTrackerVertexRef displacedVertexRef(TrackType trType) const { return PFDisplacedTrackerVertexRef(); }
00104 virtual ConversionRef convRef() const { return ConversionRef();}
00105 virtual MuonRef muonRef() const { return MuonRef(); }
00106 virtual VertexCompositeCandidateRef V0Ref() const { return VertexCompositeCandidateRef(); }
00107 virtual void setDisplacedVertexRef(const PFDisplacedTrackerVertexRef& niref, TrackType trType) {
00108 std::cout << "Error in PFBlockElement::setDisplacedVertexRef : this base class method is not implemented" << std::endl;}
00109 virtual void setConversionRef(const ConversionRef& convRef, TrackType trType) {
00110 std::cout << "Error in PFBlockElement::setConversionRef : this base class method is not implemented" << std::endl;}
00111 virtual void setMuonRef(const MuonRef& muref) {
00112 std::cout << "Error in PFBlockElement::setMuonRef : this base class method is not implemented" << std::endl;}
00113 virtual void setV0Ref(const VertexCompositeCandidateRef& v0ref,TrackType trType) {
00114
00115 std::cout << "Error in PFBlockElement::setV0Ref : this base class method is not implemented" << std::endl;
00116 }
00117
00118
00119 virtual bool isSecondary() const { return false; }
00120 virtual bool isPrimary() const { return false; }
00121 virtual bool isLinkedToDisplacedVertex() const {return false;}
00122
00123 friend std::ostream& operator<<( std::ostream& out,
00124 const PFBlockElement& element );
00125
00126
00127 void setMultilinks(const PFMultiLinksTC& ml) {multilinks_ = ml;}
00128 void setIsValidMultilinks(bool isVal) {multilinks_.isValid = isVal;}
00129 void setMultilinksList(const PFMultilinksType& links) {multilinks_.linkedClusters = links;}
00130
00131 bool isMultilinksValide() const {return multilinks_.isValid;}
00132 const PFMultilinksType& getMultilinks() const {return multilinks_.linkedClusters;}
00133
00134
00135 protected:
00136
00139 Type type_;
00140
00144 bool locked_;
00145
00147 unsigned index_;
00148
00149
00150 PFMultiLinksTC multilinks_;
00151
00152
00153 };
00154 }
00155 #endif