CMS 3D CMS Logo

PhotonProducer.cc
Go to the documentation of this file.
1 #include <vector>
2 #include <memory>
3 
4 // Framework
7 
9 
14 
22 
25 
28 
32 
33 PhotonProducer::PhotonProducer(const edm::ParameterSet& config) : photonEnergyCorrector_(config, consumesCollector()) {
34  // use onfiguration file to setup input/output collection names
35 
36  photonCoreProducer_ = consumes<reco::PhotonCoreCollection>(config.getParameter<edm::InputTag>("photonCoreProducer"));
37  barrelEcalHits_ = consumes<EcalRecHitCollection>(config.getParameter<edm::InputTag>("barrelEcalHits"));
38  endcapEcalHits_ = consumes<EcalRecHitCollection>(config.getParameter<edm::InputTag>("endcapEcalHits"));
39  vertexProducer_ = consumes<reco::VertexCollection>(config.getParameter<edm::InputTag>("primaryVertexProducer"));
40  hcalTowers_ = consumes<CaloTowerCollection>(config.getParameter<edm::InputTag>("hcalTowers"));
41  hOverEConeSize_ = config.getParameter<double>("hOverEConeSize");
42  highEt_ = config.getParameter<double>("highEt");
43  // R9 value to decide converted/unconverted
44  minR9Barrel_ = config.getParameter<double>("minR9Barrel");
45  minR9Endcap_ = config.getParameter<double>("minR9Endcap");
46  usePrimaryVertex_ = config.getParameter<bool>("usePrimaryVertex");
47  runMIPTagger_ = config.getParameter<bool>("runMIPTagger");
48 
49  candidateP4type_ = config.getParameter<std::string>("candidateP4type");
50 
52  posCalculator_ = PositionCalc(posCalcParameters);
53 
54  //AA
55  //Flags and Severities to be excluded from photon calculations
56  const std::vector<std::string> flagnamesEB =
57  config.getParameter<std::vector<std::string> >("RecHitFlagToBeExcludedEB");
58 
59  const std::vector<std::string> flagnamesEE =
60  config.getParameter<std::vector<std::string> >("RecHitFlagToBeExcludedEE");
61 
62  flagsexclEB_ = StringToEnumValue<EcalRecHit::Flags>(flagnamesEB);
63 
64  flagsexclEE_ = StringToEnumValue<EcalRecHit::Flags>(flagnamesEE);
65 
66  const std::vector<std::string> severitynamesEB =
67  config.getParameter<std::vector<std::string> >("RecHitSeverityToBeExcludedEB");
68 
69  severitiesexclEB_ = StringToEnumValue<EcalSeverityLevel::SeverityLevel>(severitynamesEB);
70 
71  const std::vector<std::string> severitynamesEE =
72  config.getParameter<std::vector<std::string> >("RecHitSeverityToBeExcludedEE");
73 
74  severitiesexclEE_ = StringToEnumValue<EcalSeverityLevel::SeverityLevel>(severitynamesEE);
75 
76  //AA
77 
78  //
79 
80  // Parameters for the position calculation:
81  // std::map<std::string,double> providedParameters;
82  // providedParameters.insert(std::make_pair("LogWeighted",config.getParameter<bool>("posCalc_logweight")));
83  //providedParameters.insert(std::make_pair("T0_barl",config.getParameter<double>("posCalc_t0_barl")));
84  //providedParameters.insert(std::make_pair("T0_endc",config.getParameter<double>("posCalc_t0_endc")));
85  //providedParameters.insert(std::make_pair("T0_endcPresh",config.getParameter<double>("posCalc_t0_endcPresh")));
86  //providedParameters.insert(std::make_pair("W0",config.getParameter<double>("posCalc_w0")));
87  //providedParameters.insert(std::make_pair("X0",config.getParameter<double>("posCalc_x0")));
88  //posCalculator_ = PositionCalc(providedParameters);
89  // cut values for pre-selection
90  preselCutValuesBarrel_.push_back(config.getParameter<double>("minSCEtBarrel"));
91  preselCutValuesBarrel_.push_back(config.getParameter<double>("maxHoverEBarrel"));
92  preselCutValuesBarrel_.push_back(config.getParameter<double>("ecalRecHitSumEtOffsetBarrel"));
93  preselCutValuesBarrel_.push_back(config.getParameter<double>("ecalRecHitSumEtSlopeBarrel"));
94  preselCutValuesBarrel_.push_back(config.getParameter<double>("hcalTowerSumEtOffsetBarrel"));
95  preselCutValuesBarrel_.push_back(config.getParameter<double>("hcalTowerSumEtSlopeBarrel"));
96  preselCutValuesBarrel_.push_back(config.getParameter<double>("nTrackSolidConeBarrel"));
97  preselCutValuesBarrel_.push_back(config.getParameter<double>("nTrackHollowConeBarrel"));
98  preselCutValuesBarrel_.push_back(config.getParameter<double>("trackPtSumSolidConeBarrel"));
99  preselCutValuesBarrel_.push_back(config.getParameter<double>("trackPtSumHollowConeBarrel"));
100  preselCutValuesBarrel_.push_back(config.getParameter<double>("sigmaIetaIetaCutBarrel"));
101  //
102  preselCutValuesEndcap_.push_back(config.getParameter<double>("minSCEtEndcap"));
103  preselCutValuesEndcap_.push_back(config.getParameter<double>("maxHoverEEndcap"));
104  preselCutValuesEndcap_.push_back(config.getParameter<double>("ecalRecHitSumEtOffsetEndcap"));
105  preselCutValuesEndcap_.push_back(config.getParameter<double>("ecalRecHitSumEtSlopeEndcap"));
106  preselCutValuesEndcap_.push_back(config.getParameter<double>("hcalTowerSumEtOffsetEndcap"));
107  preselCutValuesEndcap_.push_back(config.getParameter<double>("hcalTowerSumEtSlopeEndcap"));
108  preselCutValuesEndcap_.push_back(config.getParameter<double>("nTrackSolidConeEndcap"));
109  preselCutValuesEndcap_.push_back(config.getParameter<double>("nTrackHollowConeEndcap"));
110  preselCutValuesEndcap_.push_back(config.getParameter<double>("trackPtSumSolidConeEndcap"));
111  preselCutValuesEndcap_.push_back(config.getParameter<double>("trackPtSumHollowConeEndcap"));
112  preselCutValuesEndcap_.push_back(config.getParameter<double>("sigmaIetaIetaCutEndcap"));
113  //
114 
115  edm::ParameterSet isolationSumsCalculatorSet = config.getParameter<edm::ParameterSet>("isolationSumsCalculatorSet");
117  isolationSumsCalculatorSet, flagsexclEB_, flagsexclEE_, severitiesexclEB_, severitiesexclEE_, consumesCollector());
118 
120  photonMIPHaloTagger_.setup(mipVariableSet, consumesCollector());
121 
122  // Register the product
123  produces<reco::PhotonCollection>(PhotonCollection_);
124 }
125 
126 void PhotonProducer::produce(edm::Event& theEvent, const edm::EventSetup& theEventSetup) {
127  using namespace edm;
128  // nEvt_++;
129 
131  auto outputPhotonCollection_p = std::make_unique<reco::PhotonCollection>();
132 
133  // Get the PhotonCore collection
134  bool validPhotonCoreHandle = true;
135  Handle<reco::PhotonCoreCollection> photonCoreHandle;
136  theEvent.getByToken(photonCoreProducer_, photonCoreHandle);
137  if (!photonCoreHandle.isValid()) {
138  edm::LogError("PhotonProducer") << "Error! Can't get the photonCoreProducer";
139  validPhotonCoreHandle = false;
140  }
141 
142  // Get EcalRecHits
143  bool validEcalRecHits = true;
144  Handle<EcalRecHitCollection> barrelHitHandle;
146  theEvent.getByToken(barrelEcalHits_, barrelHitHandle);
147  if (!barrelHitHandle.isValid()) {
148  edm::LogError("PhotonProducer") << "Error! Can't get the barrelEcalHits";
149  validEcalRecHits = false;
150  }
151  if (validEcalRecHits)
152  barrelRecHits = *(barrelHitHandle.product());
153 
154  Handle<EcalRecHitCollection> endcapHitHandle;
155  theEvent.getByToken(endcapEcalHits_, endcapHitHandle);
157  if (!endcapHitHandle.isValid()) {
158  edm::LogError("PhotonProducer") << "Error! Can't get the endcapEcalHits";
159  validEcalRecHits = false;
160  }
161  if (validEcalRecHits)
162  endcapRecHits = *(endcapHitHandle.product());
163 
164  //AA
165  //Get the severity level object
167  theEventSetup.get<EcalSeverityLevelAlgoRcd>().get(sevLv);
168  //
169 
170  // get Hcal towers collection
171  Handle<CaloTowerCollection> hcalTowersHandle;
172  theEvent.getByToken(hcalTowers_, hcalTowersHandle);
173 
174  edm::ESHandle<CaloTopology> pTopology;
175  theEventSetup.get<CaloTopologyRecord>().get(pTopology);
176  const CaloTopology* topology = pTopology.product();
177 
178  // Get the primary event vertex
179  Handle<reco::VertexCollection> vertexHandle;
181  bool validVertex = true;
182  if (usePrimaryVertex_) {
183  theEvent.getByToken(vertexProducer_, vertexHandle);
184  if (!vertexHandle.isValid()) {
185  edm::LogWarning("PhotonProducer") << "Error! Can't get the product primary Vertex Collection "
186  << "\n";
187  validVertex = false;
188  }
189  if (validVertex)
190  vertexCollection = *(vertexHandle.product());
191  }
192 
193  int iSC = 0; // index in photon collection
194  // Loop over barrel and endcap SC collections and fill the photon collection
195  if (validPhotonCoreHandle)
196  fillPhotonCollection(theEvent,
197  theEventSetup,
198  photonCoreHandle,
199  topology,
200  &barrelRecHits,
201  &endcapRecHits,
202  hcalTowersHandle,
203  vertexCollection,
204  outputPhotonCollection,
205  iSC,
206  sevLv.product());
207 
208  // put the product in the event
209  edm::LogInfo("PhotonProducer") << " Put in the event " << iSC << " Photon Candidates \n";
210  outputPhotonCollection_p->assign(outputPhotonCollection.begin(), outputPhotonCollection.end());
211  theEvent.put(std::move(outputPhotonCollection_p), PhotonCollection_);
212 }
213 
215  edm::EventSetup const& es,
216  const edm::Handle<reco::PhotonCoreCollection>& photonCoreHandle,
217  const CaloTopology* topology,
218  const EcalRecHitCollection* ecalBarrelHits,
219  const EcalRecHitCollection* ecalEndcapHits,
220  const edm::Handle<CaloTowerCollection>& hcalTowersHandle,
223  int& iSC,
224  const EcalSeverityLevelAlgo* sevLv) {
225  // get the geometry from the event setup:
226  edm::ESHandle<CaloGeometry> caloGeomHandle;
227  es.get<CaloGeometryRecord>().get(caloGeomHandle);
228 
229  const CaloGeometry* geometry = caloGeomHandle.product();
230  const CaloSubdetectorGeometry* subDetGeometry = nullptr;
231  const CaloSubdetectorGeometry* geometryES = caloGeomHandle->getSubdetectorGeometry(DetId::Ecal, EcalPreshower);
232  const EcalRecHitCollection* hits = nullptr;
233  std::vector<double> preselCutValues;
234  float minR9 = 0;
235 
237 
238  std::vector<int> flags_, severitiesexcl_;
239 
240  for (unsigned int lSC = 0; lSC < photonCoreHandle->size(); lSC++) {
241  reco::PhotonCoreRef coreRef(reco::PhotonCoreRef(photonCoreHandle, lSC));
242  reco::SuperClusterRef scRef = coreRef->superCluster();
243  iSC++;
244 
245  int subdet = scRef->seed()->hitsAndFractions()[0].first.subdetId();
246  subDetGeometry = caloGeomHandle->getSubdetectorGeometry(DetId::Ecal, subdet);
247 
248  if (subdet == EcalBarrel) {
249  preselCutValues = preselCutValuesBarrel_;
250  minR9 = minR9Barrel_;
251  hits = ecalBarrelHits;
252  flags_ = flagsexclEB_;
253  severitiesexcl_ = severitiesexclEB_;
254  } else if (subdet == EcalEndcap) {
255  preselCutValues = preselCutValuesEndcap_;
256  minR9 = minR9Endcap_;
257  hits = ecalEndcapHits;
258  flags_ = flagsexclEE_;
259  severitiesexcl_ = severitiesexclEE_;
260  } else {
261  edm::LogWarning("") << "PhotonProducer: do not know if it is a barrel or endcap SuperCluster";
262  }
263  if (hits == nullptr)
264  continue;
265 
266  // SC energy preselection
267  if (scRef->energy() / cosh(scRef->eta()) <= preselCutValues[0])
268  continue;
269  // calculate HoE
270 
271  const CaloTowerCollection* hcalTowersColl = hcalTowersHandle.product();
272  EgammaTowerIsolation towerIso1(hOverEConeSize_, 0., 0., 1, hcalTowersColl);
273  EgammaTowerIsolation towerIso2(hOverEConeSize_, 0., 0., 2, hcalTowersColl);
274  double HoE1 = towerIso1.getTowerESum(&(*scRef)) / scRef->energy();
275  double HoE2 = towerIso2.getTowerESum(&(*scRef)) / scRef->energy();
276 
277  EgammaHadTower towerIsoBehindClus(es);
278  towerIsoBehindClus.setTowerCollection(hcalTowersHandle.product());
279  std::vector<CaloTowerDetId> TowersBehindClus = towerIsoBehindClus.towersOf(*scRef);
280  float hcalDepth1OverEcalBc = towerIsoBehindClus.getDepth1HcalESum(TowersBehindClus) / scRef->energy();
281  float hcalDepth2OverEcalBc = towerIsoBehindClus.getDepth2HcalESum(TowersBehindClus) / scRef->energy();
282 
283  // recalculate position of seed BasicCluster taking shower depth for unconverted photon
284  math::XYZPoint unconvPos =
285  posCalculator_.Calculate_Location(scRef->seed()->hitsAndFractions(), hits, subDetGeometry, geometryES);
286 
287  float maxXtal = EcalClusterTools::eMax(*(scRef->seed()), &(*hits));
288  //AA
289  //Change these to consider severity level of hits
290  float e1x5 = EcalClusterTools::e1x5(*(scRef->seed()), &(*hits), &(*topology));
291  float e2x5 = EcalClusterTools::e2x5Max(*(scRef->seed()), &(*hits), &(*topology));
292  float e3x3 = EcalClusterTools::e3x3(*(scRef->seed()), &(*hits), &(*topology));
293  float e5x5 = EcalClusterTools::e5x5(*(scRef->seed()), &(*hits), &(*topology));
294  std::vector<float> cov = EcalClusterTools::covariances(*(scRef->seed()), &(*hits), &(*topology), geometry);
295  std::vector<float> locCov = EcalClusterTools::localCovariances(*(scRef->seed()), &(*hits), &(*topology));
296 
297  float sigmaEtaEta = sqrt(cov[0]);
298  float sigmaIetaIeta = sqrt(locCov[0]);
299  float r9 = e3x3 / (scRef->rawEnergy());
300 
301  float full5x5_maxXtal = noZS::EcalClusterTools::eMax(*(scRef->seed()), &(*hits));
302  //AA
303  //Change these to consider severity level of hits
304  float full5x5_e1x5 = noZS::EcalClusterTools::e1x5(*(scRef->seed()), &(*hits), &(*topology));
305  float full5x5_e2x5 = noZS::EcalClusterTools::e2x5Max(*(scRef->seed()), &(*hits), &(*topology));
306  float full5x5_e3x3 = noZS::EcalClusterTools::e3x3(*(scRef->seed()), &(*hits), &(*topology));
307  float full5x5_e5x5 = noZS::EcalClusterTools::e5x5(*(scRef->seed()), &(*hits), &(*topology));
308  std::vector<float> full5x5_cov =
309  noZS::EcalClusterTools::covariances(*(scRef->seed()), &(*hits), &(*topology), geometry);
310  std::vector<float> full5x5_locCov =
311  noZS::EcalClusterTools::localCovariances(*(scRef->seed()), &(*hits), &(*topology));
312 
313  float full5x5_sigmaEtaEta = sqrt(full5x5_cov[0]);
314  float full5x5_sigmaIetaIeta = sqrt(full5x5_locCov[0]);
315 
316  // compute position of ECAL shower
317  math::XYZPoint caloPosition;
318  if (r9 > minR9) {
319  caloPosition = unconvPos;
320  } else {
321  caloPosition = scRef->position();
322  }
323 
325  double photonEnergy = 1.;
326  math::XYZPoint vtx(0., 0., 0.);
327  if (!vertexCollection.empty())
328  vtx = vertexCollection.begin()->position();
329  // compute momentum vector of photon from primary vertex and cluster position
330  math::XYZVector direction = caloPosition - vtx;
331  math::XYZVector momentum = direction.unit();
332 
333  // Create dummy candidate with unit momentum and zero energy to allow setting of all variables. The energy is set for last.
334  math::XYZTLorentzVectorD p4(momentum.x(), momentum.y(), momentum.z(), photonEnergy);
335  reco::Photon newCandidate(p4, caloPosition, coreRef, vtx);
336 
337  // Calculate fiducial flags and isolation variable. Blocked are filled from the isolationCalculator
338  reco::Photon::FiducialFlags fiducialFlags;
339  reco::Photon::IsolationVariables isolVarR03, isolVarR04;
340  photonIsolationCalculator_.calculate(&newCandidate, evt, es, fiducialFlags, isolVarR04, isolVarR03);
341  newCandidate.setFiducialVolumeFlags(fiducialFlags);
342  newCandidate.setIsolationVariables(isolVarR04, isolVarR03);
343 
345  reco::Photon::ShowerShape showerShape;
346  showerShape.e1x5 = e1x5;
347  showerShape.e2x5 = e2x5;
348  showerShape.e3x3 = e3x3;
349  showerShape.e5x5 = e5x5;
350  showerShape.maxEnergyXtal = maxXtal;
351  showerShape.sigmaEtaEta = sigmaEtaEta;
352  showerShape.sigmaIetaIeta = sigmaIetaIeta;
353  showerShape.hcalDepth1OverEcal = HoE1;
354  showerShape.hcalDepth2OverEcal = HoE2;
355  showerShape.hcalDepth1OverEcalBc = hcalDepth1OverEcalBc;
356  showerShape.hcalDepth2OverEcalBc = hcalDepth2OverEcalBc;
357  showerShape.hcalTowersBehindClusters = TowersBehindClus;
358  newCandidate.setShowerShapeVariables(showerShape);
359 
361  reco::Photon::ShowerShape full5x5_showerShape;
362  full5x5_showerShape.e1x5 = full5x5_e1x5;
363  full5x5_showerShape.e2x5 = full5x5_e2x5;
364  full5x5_showerShape.e3x3 = full5x5_e3x3;
365  full5x5_showerShape.e5x5 = full5x5_e5x5;
366  full5x5_showerShape.maxEnergyXtal = full5x5_maxXtal;
367  full5x5_showerShape.sigmaEtaEta = full5x5_sigmaEtaEta;
368  full5x5_showerShape.sigmaIetaIeta = full5x5_sigmaIetaIeta;
369  newCandidate.full5x5_setShowerShapeVariables(full5x5_showerShape);
370 
373  // Photon candidate takes by default (set in photons_cfi.py) a 4-momentum derived from the ecal photon-specific corrections.
374  photonEnergyCorrector_.calculate(evt, newCandidate, subdet, vertexCollection, es);
375  if (candidateP4type_ == "fromEcalEnergy") {
376  newCandidate.setP4(newCandidate.p4(reco::Photon::ecal_photons));
377  newCandidate.setCandidateP4type(reco::Photon::ecal_photons);
378  } else if (candidateP4type_ == "fromRegression") {
379  newCandidate.setP4(newCandidate.p4(reco::Photon::regression1));
380  newCandidate.setCandidateP4type(reco::Photon::regression1);
381  }
382 
383  // fill MIP Vairables for Halo: Block for MIP are filled from PhotonMIPHaloTagger
385  if (subdet == EcalBarrel && runMIPTagger_) {
386  photonMIPHaloTagger_.MIPcalculate(&newCandidate, evt, es, mipVar);
387  newCandidate.setMIPVariables(mipVar);
388  }
389 
391  bool isLooseEM = true;
392  if (newCandidate.pt() < highEt_) {
393  if (newCandidate.hadronicOverEm() >= preselCutValues[1])
394  isLooseEM = false;
395  if (newCandidate.ecalRecHitSumEtConeDR04() > preselCutValues[2] + preselCutValues[3] * newCandidate.pt())
396  isLooseEM = false;
397  if (newCandidate.hcalTowerSumEtConeDR04() > preselCutValues[4] + preselCutValues[5] * newCandidate.pt())
398  isLooseEM = false;
399  if (newCandidate.nTrkSolidConeDR04() > int(preselCutValues[6]))
400  isLooseEM = false;
401  if (newCandidate.nTrkHollowConeDR04() > int(preselCutValues[7]))
402  isLooseEM = false;
403  if (newCandidate.trkSumPtSolidConeDR04() > preselCutValues[8])
404  isLooseEM = false;
405  if (newCandidate.trkSumPtHollowConeDR04() > preselCutValues[9])
406  isLooseEM = false;
407  if (newCandidate.sigmaIetaIeta() > preselCutValues[10])
408  isLooseEM = false;
409  }
410 
411  if (isLooseEM)
412  outputPhotonCollection.push_back(newCandidate);
413  }
414 }
T getParameter(std::string const &) const
const CaloSubdetectorGeometry * getSubdetectorGeometry(const DetId &id) const
access the subdetector geometry for the given subdetector directly
Definition: CaloGeometry.cc:34
edm::EDGetTokenT< reco::VertexCollection > vertexProducer_
edm::EDGetTokenT< CaloTowerCollection > hcalTowers_
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:131
void calculate(const reco::Photon *, const edm::Event &, const edm::EventSetup &es, reco::Photon::FiducialFlags &phofid, reco::Photon::IsolationVariables &phoisolR03, reco::Photon::IsolationVariables &phoisolR04) const
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 edm::Handle< CaloTowerCollection > &hcalTowersHandle, reco::VertexCollection &pvVertices, reco::PhotonCollection &outputCollection, int &iSC, const EcalSeverityLevelAlgo *sevLv)
std::vector< double > preselCutValuesEndcap_
std::vector< CaloTowerDetId > hcalTowersBehindClusters
Definition: Photon.h:149
ROOT::Math::LorentzVector< ROOT::Math::PxPyPzE4D< double > > XYZTLorentzVectorD
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:14
static std::vector< float > covariances(const reco::BasicCluster &cluster, const EcalRecHitCollection *recHits, const CaloTopology *topology, const CaloGeometry *geometry, float w0=4.7)
CaloTopology const * topology(0)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:525
static float eMax(const reco::BasicCluster &cluster, const EcalRecHitCollection *recHits)
void MIPcalculate(const reco::Photon *, const edm::Event &, const edm::EventSetup &es, reco::Photon::MIPVariables &mipId)
std::vector< Vertex > VertexCollection
collection of Vertex objects
Definition: VertexFwd.h:9
PositionCalc posCalculator_
Definition: config.py:1
PhotonEnergyCorrector photonEnergyCorrector_
edm::EDGetTokenT< reco::PhotonCoreCollection > photonCoreProducer_
PhotonMIPHaloTagger photonMIPHaloTagger_
double hOverEConeSize_
void setTowerCollection(const CaloTowerCollection *towercollection)
edm::EDGetTokenT< EcalRecHitCollection > endcapEcalHits_
PhotonIsolationCalculator photonIsolationCalculator_
std::vector< int > flagsexclEB_
double getDepth1HcalESum(const reco::SuperCluster &sc) const
T sqrt(T t)
Definition: SSEVec.h:19
double p4[4]
Definition: TauolaWrapper.h:92
void setup(const edm::ParameterSet &conf, std::vector< int > const &flagsEB_, std::vector< int > const &flagsEE_, std::vector< int > const &severitiesEB_, std::vector< int > const &severitiesEE_, edm::ConsumesCollector &&iC)
std::vector< int > flagsexclEE_
std::string candidateP4type_
std::vector< int > severitiesexclEE_
static float e2x5Max(const reco::BasicCluster &cluster, const EcalRecHitCollection *recHits, const CaloTopology *topology)
void init(const edm::EventSetup &theEventSetup)
void setup(const edm::ParameterSet &conf, edm::ConsumesCollector &&iC)
bool isValid() const
Definition: HandleBase.h:70
double getTowerESum(const reco::Candidate *cand, const std::vector< CaloTowerDetId > *detIdToExclude=0) const
std::vector< int > severitiesexclEB_
std::string PhotonCollection_
void calculate(edm::Event &evt, reco::Photon &, int subdet, const reco::VertexCollection &vtxcol, const edm::EventSetup &iSetup)
T const * product() const
Definition: Handle.h:69
XYZVectorD XYZVector
spatial vector with cartesian internal representation
Definition: Vector3D.h:31
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
std::vector< Photon > PhotonCollection
collectin of Photon objects
Definition: PhotonFwd.h:9
std::vector< double > preselCutValuesBarrel_
std::vector< CaloTowerDetId > towersOf(const reco::SuperCluster &sc) const
double getDepth2HcalESum(const reco::SuperCluster &sc) const
ESHandle< TrackerGeometry > geometry
HLT enums.
PhotonProducer(const edm::ParameterSet &ps)
edm::EDGetTokenT< EcalRecHitCollection > barrelEcalHits_
math::XYZPoint Calculate_Location(const HitsAndFractions &iDetIds, const edm::SortedCollection< HitType > *iRecHits, const CaloSubdetectorGeometry *iSubGeom, const CaloSubdetectorGeometry *iESGeom=0)
Definition: PositionCalc.h:65
T get() const
Definition: EventSetup.h:73
static float e3x3(const reco::BasicCluster &cluster, const EcalRecHitCollection *recHits, const CaloTopology *topology)
void produce(edm::Event &evt, const edm::EventSetup &es) override
T const * product() const
Definition: ESHandle.h:86
static std::vector< float > localCovariances(const reco::BasicCluster &cluster, const EcalRecHitCollection *recHits, const CaloTopology *topology, float w0=4.7)
static float e1x5(const reco::BasicCluster &cluster, const EcalRecHitCollection *recHits, const CaloTopology *topology)
def move(src, dest)
Definition: eostools.py:511
static float e5x5(const reco::BasicCluster &cluster, const EcalRecHitCollection *recHits, const CaloTopology *topology)