CMS 3D CMS Logo

GEDPhotonProducer.h
Go to the documentation of this file.
1 #ifndef RecoEgamma_EgammaPhotonProducers_GEDPhotonProducer_h
2 #define RecoEgamma_EgammaPhotonProducers_GEDPhotonProducer_h
3 
36 
39 
40 
41 // GEDPhotonProducer inherits from EDProducer, so it can be a module:
43 
44  public:
45 
47  ~GEDPhotonProducer() override;
48 
49  void beginRun (edm::Run const& r, edm::EventSetup const & es) final;
50  void endRun(edm::Run const&, edm::EventSetup const&) final;
51  void produce(edm::Event& evt, const edm::EventSetup& es) override;
52 
53  private:
54  class RecoStepInfo {
55  public:
56  enum FlagBits{kOOT=0x1,kFinal=0x2};
57  explicit RecoStepInfo(const std::string& recoStep);
58 
59  bool isOOT()const{return flags_&kOOT;}
60  bool isFinal()const{return flags_&kFinal;}
61  private:
62  unsigned int flags_;
63  };
64 
65 
67  edm::EventSetup const & es,
68  const edm::Handle<reco::PhotonCoreCollection> & photonCoreHandle,
69  const CaloTopology *topology,
70  const EcalRecHitCollection* ecalBarrelHits,
71  const EcalRecHitCollection* ecalEndcapHits,
73  const edm::Handle<CaloTowerCollection> & hcalTowersHandle,
74  const reco::VertexCollection& pvVertices,
75  reco::PhotonCollection & outputCollection,
76  int& iSC);
77 
78 
80  edm::EventSetup const & es,
81  const edm::Handle<reco::PhotonCollection> & photonHandle,
82  const edm::Handle<reco::PFCandidateCollection> pfCandidateHandle,
83  const edm::Handle<reco::PFCandidateCollection> pfEGCandidateHandle,
84  edm::ValueMap<reco::PhotonRef> pfEGCandToPhotonMap,
86  reco::PhotonCollection & outputCollection,
87  int& iSC,
88  const edm::Handle<edm::ValueMap<float>>& chargedHadrons,
89  const edm::Handle<edm::ValueMap<float>>& neutralHadrons,
91  const edm::Handle<edm::ValueMap<float>>& chargedHadronsWorstVtx,
92  const edm::Handle<edm::ValueMap<float>>& chargedHadronsWorstVtxGeomVeto,
93  const edm::Handle<edm::ValueMap<float>>& chargedHadronsPFPV,
94  const edm::Handle<edm::ValueMap<float>>& pfEcalClusters,
95  const edm::Handle<edm::ValueMap<float>>& pfHcalClusters);
96 
97 
98 
99 
100  // std::string PhotonCoreCollection_;
103 
113  //for isolation with map-based veto
115  //photon isolation sums
122 
125 
129 
131 
132  //AA
133  //Flags and severities to be excluded from calculations
134 
135  std::vector<int> flagsexclEB_;
136  std::vector<int> flagsexclEE_;
137  std::vector<int> severitiesexclEB_;
138  std::vector<int> severitiesexclEE_;
139 
140 
142  double maxHOverE_;
143  double minSCEt_;
144  double highEt_;
145  double minR9Barrel_;
146  double minR9Endcap_;
148 
151 
155 
158 
160 
161  //MIP
163 
164  std::vector<double> preselCutValuesBarrel_;
165  std::vector<double> preselCutValuesEndcap_;
166 
170 
172 
173 };
174 #endif
edm::InputTag photonProducer_
std::string conversionCollection_
PhotonEnergyCorrector * thePhotonEnergyCorrector_
PhotonMIPHaloTagger * thePhotonMIPHaloTagger_
edm::EDGetTokenT< reco::PFCandidateCollection > pfCandidates_
edm::ESHandle< CaloGeometry > theCaloGeom_
void beginRun(edm::Run const &r, edm::EventSetup const &es) final
edm::EDGetTokenT< CaloTowerCollection > hcalTowers_
CaloTopology const * topology(0)
void produce(edm::Event &evt, const edm::EventSetup &es) override
~GEDPhotonProducer() override
RecoStepInfo recoStep_
std::vector< int > flagsexclEB_
std::vector< Vertex > VertexCollection
collection of Vertex objects
Definition: VertexFwd.h:9
edm::EDGetTokenT< EcalRecHitCollection > endcapEcalHits_
PhotonIsolationCalculator * thePhotonIsolationCalculator_
std::vector< int > severitiesexclEE_
std::string photonCollection_
RecoStepInfo(const std::string &recoStep)
edm::ESHandle< CaloTopology > theCaloTopo_
edm::EDGetTokenT< edm::ValueMap< float > > phoChargedPFPVIsoToken_
edm::EDGetTokenT< EcalRecHitCollection > barrelEcalHits_
PositionCalc posCalculator_
edm::EDGetTokenT< edm::ValueMap< float > > phoChargedWorstVtxGeomVetoIsoToken_
edm::EDGetTokenT< edm::ValueMap< float > > phoChargedIsolationToken_
std::string conversionProducer_
std::vector< int > flagsexclEE_
edm::EDGetTokenT< reco::PhotonCoreCollection > photonCoreProducerT_
edm::EDGetTokenT< edm::ValueMap< float > > phoPFHCALClusIsolationToken_
edm::EDGetTokenT< edm::ValueMap< std::vector< reco::PFCandidateRef > > > particleBasedIsolationToken
edm::EDGetTokenT< reco::PFCandidateCollection > pfEgammaCandidates_
std::vector< int > severitiesexclEB_
edm::EDGetTokenT< edm::ValueMap< float > > phoNeutralHadronIsolationToken_
GEDPhotonProducer(const edm::ParameterSet &ps)
edm::EDGetTokenT< edm::ValueMap< float > > phoChargedWorstVtxIsoToken_
std::vector< double > preselCutValuesBarrel_
edm::EDGetTokenT< reco::PhotonCollection > photonProducerT_
std::vector< Photon > PhotonCollection
collectin of Photon objects
Definition: PhotonFwd.h:9
std::vector< double > preselCutValuesEndcap_
std::string candidateP4type_
void fillPhotonCollection(edm::Event &evt, edm::EventSetup const &es, const edm::Handle< reco::PhotonCoreCollection > &photonCoreHandle, const CaloTopology *topology, const EcalRecHitCollection *ecalBarrelHits, const EcalRecHitCollection *ecalEndcapHits, const EcalRecHitCollection *preshowerHits, const edm::Handle< CaloTowerCollection > &hcalTowersHandle, const reco::VertexCollection &pvVertices, reco::PhotonCollection &outputCollection, int &iSC)
edm::EDGetTokenT< edm::ValueMap< float > > phoPhotonIsolationToken_
void endRun(edm::Run const &, edm::EventSetup const &) final
edm::EDGetTokenT< edm::ValueMap< float > > phoPFECALClusIsolationToken_
edm::ParameterSet conf_
edm::EDGetTokenT< reco::VertexCollection > vertexProducer_
EcalClusterFunctionBaseClass * energyCorrectionF
edm::EDGetTokenT< EcalRecHitCollection > preshowerHits_
Definition: Run.h:45
std::string valueMapPFCandPhoton_