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 
35 
38 
39 // GEDPhotonProducer inherits from EDProducer, so it can be a module:
41 public:
43  ~GEDPhotonProducer() override;
44 
45  void beginRun(edm::Run const& r, edm::EventSetup const& es) final;
46  void endRun(edm::Run const&, edm::EventSetup const&) final;
47  void produce(edm::Event& evt, const edm::EventSetup& es) override;
48 
49 private:
50  class RecoStepInfo {
51  public:
52  enum FlagBits { kOOT = 0x1, kFinal = 0x2 };
53  explicit RecoStepInfo(const std::string& recoStep);
54 
55  bool isOOT() const { return flags_ & kOOT; }
56  bool isFinal() const { return flags_ & kFinal; }
57 
58  private:
59  unsigned int flags_;
60  };
61 
63  edm::EventSetup const& es,
64  const edm::Handle<reco::PhotonCoreCollection>& photonCoreHandle,
65  const CaloTopology* topology,
66  const EcalRecHitCollection* ecalBarrelHits,
67  const EcalRecHitCollection* ecalEndcapHits,
69  const edm::Handle<CaloTowerCollection>& hcalTowersHandle,
70  const reco::VertexCollection& pvVertices,
71  reco::PhotonCollection& outputCollection,
72  int& iSC);
73 
75  edm::EventSetup const& es,
76  const edm::Handle<reco::PhotonCollection>& photonHandle,
77  const edm::Handle<reco::PFCandidateCollection> pfCandidateHandle,
78  const edm::Handle<reco::PFCandidateCollection> pfEGCandidateHandle,
79  edm::ValueMap<reco::PhotonRef> pfEGCandToPhotonMap,
81  reco::PhotonCollection& outputCollection,
82  int& iSC,
83  const edm::Handle<edm::ValueMap<float>>& chargedHadrons,
84  const edm::Handle<edm::ValueMap<float>>& neutralHadrons,
86  const edm::Handle<edm::ValueMap<float>>& chargedHadronsWorstVtx,
87  const edm::Handle<edm::ValueMap<float>>& chargedHadronsWorstVtxGeomVeto,
88  const edm::Handle<edm::ValueMap<float>>& chargedHadronsPFPV,
89  const edm::Handle<edm::ValueMap<float>>& pfEcalClusters,
90  const edm::Handle<edm::ValueMap<float>>& pfHcalClusters);
91 
92  // std::string PhotonCoreCollection_;
95 
105  //for isolation with map-based veto
107  //photon isolation sums
114 
117 
121 
123 
124  //AA
125  //Flags and severities to be excluded from calculations
126 
127  std::vector<int> flagsexclEB_;
128  std::vector<int> flagsexclEE_;
129  std::vector<int> severitiesexclEB_;
130  std::vector<int> severitiesexclEE_;
131 
133  double maxHOverE_;
134  double minSCEt_;
135  double highEt_;
136  double minR9Barrel_;
137  double minR9Endcap_;
139 
142 
146 
149 
151 
152  //MIP
154 
155  std::vector<double> preselCutValuesBarrel_;
156  std::vector<double> preselCutValuesEndcap_;
157 
161 
163 };
164 #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_
edm::EDGetTokenT< edm::ValueMap< std::vector< reco::PFCandidateRef > > > particleBasedIsolationToken
std::string conversionProducer_
std::vector< int > flagsexclEE_
edm::EDGetTokenT< reco::PhotonCoreCollection > photonCoreProducerT_
edm::EDGetTokenT< edm::ValueMap< float > > phoPFHCALClusIsolationToken_
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_