![]() |
![]() |
00001 #ifndef EgammaCandidates_PhotonCore_h 00002 #define EgammaCandidates_PhotonCore_h 00003 00016 #include "DataFormats/EgammaCandidates/interface/ConversionFwd.h" 00017 #include "DataFormats/EgammaCandidates/interface/PhotonCoreFwd.h" 00018 #include "DataFormats/EgammaReco/interface/SuperCluster.h" 00019 #include "DataFormats/EgammaReco/interface/SuperClusterFwd.h" 00020 #include "DataFormats/EgammaReco/interface/ElectronSeed.h" 00021 #include "DataFormats/EgammaReco/interface/ElectronSeedFwd.h" 00022 00023 00024 namespace reco { 00025 00026 class PhotonCore { 00027 public: 00029 // PhotonCore() { } 00030 00033 PhotonCore(const reco::SuperClusterRef & scl ): superCluster_(scl), isPFlowPhoton_(false), isStandardPhoton_(true) { } 00034 00035 // while for building photons from pf I would use the default constructor 00036 PhotonCore(): isPFlowPhoton_(false), isStandardPhoton_(false) { } 00037 // followed by the setters of the provenance and of the Ref to the wanted supercluster 00038 // at that point if in PF you have found a photon which correspond to a standard SC yuo can 00039 // set both supercluster and the two flags to true 00040 // if you have found an object which does not have a standard SC associated you set only the 00041 // one from pflow. 00042 // How does this sound ? 00043 00044 00046 virtual ~PhotonCore() { } 00047 00048 PhotonCore* clone() const { return new PhotonCore( * this ); } 00049 00051 void setSuperCluster( const reco::SuperClusterRef & r ) { superCluster_ = r; } 00053 void setPflowSuperCluster( const reco::SuperClusterRef & r ) { pfSuperCluster_ = r; } 00055 void addConversion( const reco::ConversionRef & r ) { conversions_.push_back(r); } 00057 void addElectronPixelSeed( const reco::ElectronSeedRef & r ) { electronSeed_.push_back(r) ; } 00059 void setPFlowPhoton( const bool prov) { isPFlowPhoton_ = prov; } 00060 void setStandardPhoton( const bool prov) { isStandardPhoton_ = prov; } 00061 00062 00064 reco::SuperClusterRef superCluster() const { return superCluster_;} 00066 reco::SuperClusterRef pfSuperCluster() const { return pfSuperCluster_;} 00067 00069 // which returns the pfSuperCluster only if the standard supeclsuter is not null 00070 // But I had udnerstood from you when we spke last time that we wish to be free 00071 // to have both SCs available. Or not ? 00072 00074 reco::ConversionRefVector conversions() const {return conversions_;} 00076 reco::ElectronSeedRefVector electronPixelSeeds() const {return electronSeed_;} 00077 bool isPFlowPhoton() const {return isPFlowPhoton_;} 00078 bool isStandardPhoton() const {return isStandardPhoton_;} 00079 00080 private: 00081 00083 reco::SuperClusterRef superCluster_; 00084 // vector of references to Conversions 00085 reco::ConversionRefVector conversions_; 00086 // vector of references to ElectronPixelSeeds 00087 reco::ElectronSeedRefVector electronSeed_; 00089 reco::SuperClusterRef pfSuperCluster_; 00090 bool isPFlowPhoton_; 00091 bool isStandardPhoton_; 00092 00093 }; 00094 00095 00096 } 00097 00098 #endif