CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
GEDPhotonProducer.cc
Go to the documentation of this file.
1 #include <iostream>
2 #include <vector>
3 #include <memory>
4 
5 // Framework
8 
10 
15 
16 
24 
27 
30 
37 
39 
40  conf_(config)
41 {
42 
43  // use onfiguration file to setup input/output collection names
44 
45  photonCoreProducer_ = conf_.getParameter<edm::InputTag>("photonCoreProducer");
46  barrelEcalHits_ = conf_.getParameter<edm::InputTag>("barrelEcalHits");
47  endcapEcalHits_ = conf_.getParameter<edm::InputTag>("endcapEcalHits");
48  vertexProducer_ = conf_.getParameter<std::string>("primaryVertexProducer");
50  hOverEConeSize_ = conf_.getParameter<double>("hOverEConeSize");
51  highEt_ = conf_.getParameter<double>("highEt");
52  // R9 value to decide converted/unconverted
53  minR9Barrel_ = conf_.getParameter<double>("minR9Barrel");
54  minR9Endcap_ = conf_.getParameter<double>("minR9Endcap");
55  usePrimaryVertex_ = conf_.getParameter<bool>("usePrimaryVertex");
56  runMIPTagger_ = conf_.getParameter<bool>("runMIPTagger");
57 
58  candidateP4type_ = config.getParameter<std::string>("candidateP4type") ;
59 
60  edm::ParameterSet posCalcParameters =
61  config.getParameter<edm::ParameterSet>("posCalcParameters");
62  posCalculator_ = PositionCalc(posCalcParameters);
63 
64 
65  //AA
66  //Flags and Severities to be excluded from photon calculations
67  const std::vector<std::string> flagnamesEB =
68  config.getParameter<std::vector<std::string> >("RecHitFlagToBeExcludedEB");
69 
70  const std::vector<std::string> flagnamesEE =
71  config.getParameter<std::vector<std::string> >("RecHitFlagToBeExcludedEE");
72 
73  flagsexclEB_=
74  StringToEnumValue<EcalRecHit::Flags>(flagnamesEB);
75 
77  StringToEnumValue<EcalRecHit::Flags>(flagnamesEE);
78 
79  const std::vector<std::string> severitynamesEB =
80  config.getParameter<std::vector<std::string> >("RecHitSeverityToBeExcludedEB");
81 
83  StringToEnumValue<EcalSeverityLevel::SeverityLevel>(severitynamesEB);
84 
85  const std::vector<std::string> severitynamesEE =
86  config.getParameter<std::vector<std::string> >("RecHitSeverityToBeExcludedEE");
87 
89  StringToEnumValue<EcalSeverityLevel::SeverityLevel>(severitynamesEE);
90 
91  //AA
92 
93  //
94 
95  // Parameters for the position calculation:
96  // std::map<std::string,double> providedParameters;
97  // providedParameters.insert(std::make_pair("LogWeighted",conf_.getParameter<bool>("posCalc_logweight")));
98  //providedParameters.insert(std::make_pair("T0_barl",conf_.getParameter<double>("posCalc_t0_barl")));
99  //providedParameters.insert(std::make_pair("T0_endc",conf_.getParameter<double>("posCalc_t0_endc")));
100  //providedParameters.insert(std::make_pair("T0_endcPresh",conf_.getParameter<double>("posCalc_t0_endcPresh")));
101  //providedParameters.insert(std::make_pair("W0",conf_.getParameter<double>("posCalc_w0")));
102  //providedParameters.insert(std::make_pair("X0",conf_.getParameter<double>("posCalc_x0")));
103  //posCalculator_ = PositionCalc(providedParameters);
104  // cut values for pre-selection
105  preselCutValuesBarrel_.push_back(conf_.getParameter<double>("minSCEtBarrel"));
106  preselCutValuesBarrel_.push_back(conf_.getParameter<double>("maxHoverEBarrel"));
107  preselCutValuesBarrel_.push_back(conf_.getParameter<double>("ecalRecHitSumEtOffsetBarrel"));
108  preselCutValuesBarrel_.push_back(conf_.getParameter<double>("ecalRecHitSumEtSlopeBarrel"));
109  preselCutValuesBarrel_.push_back(conf_.getParameter<double>("hcalTowerSumEtOffsetBarrel"));
110  preselCutValuesBarrel_.push_back(conf_.getParameter<double>("hcalTowerSumEtSlopeBarrel"));
111  preselCutValuesBarrel_.push_back(conf_.getParameter<double>("nTrackSolidConeBarrel"));
112  preselCutValuesBarrel_.push_back(conf_.getParameter<double>("nTrackHollowConeBarrel"));
113  preselCutValuesBarrel_.push_back(conf_.getParameter<double>("trackPtSumSolidConeBarrel"));
114  preselCutValuesBarrel_.push_back(conf_.getParameter<double>("trackPtSumHollowConeBarrel"));
115  preselCutValuesBarrel_.push_back(conf_.getParameter<double>("sigmaIetaIetaCutBarrel"));
116  //
117  preselCutValuesEndcap_.push_back(conf_.getParameter<double>("minSCEtEndcap"));
118  preselCutValuesEndcap_.push_back(conf_.getParameter<double>("maxHoverEEndcap"));
119  preselCutValuesEndcap_.push_back(conf_.getParameter<double>("ecalRecHitSumEtOffsetEndcap"));
120  preselCutValuesEndcap_.push_back(conf_.getParameter<double>("ecalRecHitSumEtSlopeEndcap"));
121  preselCutValuesEndcap_.push_back(conf_.getParameter<double>("hcalTowerSumEtOffsetEndcap"));
122  preselCutValuesEndcap_.push_back(conf_.getParameter<double>("hcalTowerSumEtSlopeEndcap"));
123  preselCutValuesEndcap_.push_back(conf_.getParameter<double>("nTrackSolidConeEndcap"));
124  preselCutValuesEndcap_.push_back(conf_.getParameter<double>("nTrackHollowConeEndcap"));
125  preselCutValuesEndcap_.push_back(conf_.getParameter<double>("trackPtSumSolidConeEndcap"));
126  preselCutValuesEndcap_.push_back(conf_.getParameter<double>("trackPtSumHollowConeEndcap"));
127  preselCutValuesEndcap_.push_back(conf_.getParameter<double>("sigmaIetaIetaCutEndcap"));
128  //
129 
130  // Register the product
131  produces< reco::PhotonCollection >(PhotonCollection_);
132 
133 }
134 
136 {
137 
138  //delete energyCorrectionF;
139 }
140 
141 
142 
143 void GEDPhotonProducer::beginRun (edm::Run const& r, edm::EventSetup const & theEventSetup) {
144 
146  edm::ParameterSet isolationSumsCalculatorSet = conf_.getParameter<edm::ParameterSet>("isolationSumsCalculatorSet");
148 
150  edm::ParameterSet mipVariableSet = conf_.getParameter<edm::ParameterSet>("mipVariableSet");
151  thePhotonMIPHaloTagger_->setup(mipVariableSet);
153  thePhotonEnergyCorrector_ -> init(theEventSetup);
154 }
155 
156 void GEDPhotonProducer::endRun (edm::Run const& r, edm::EventSetup const & theEventSetup) {
157 
161 }
162 
163 
164 void GEDPhotonProducer::produce(edm::Event& theEvent, const edm::EventSetup& theEventSetup) {
165 
166  using namespace edm;
167  // nEvt_++;
168 
169  reco::PhotonCollection outputPhotonCollection;
170  std::auto_ptr< reco::PhotonCollection > outputPhotonCollection_p(new reco::PhotonCollection);
171 
172 
173  // Get the PhotonCore collection
174  bool validPhotonCoreHandle=true;
175  Handle<reco::PhotonCoreCollection> photonCoreHandle;
176  theEvent.getByLabel(photonCoreProducer_,photonCoreHandle);
177  if (!photonCoreHandle.isValid()) {
178  edm::LogError("GEDPhotonProducer") << "Error! Can't get the product "<<photonCoreProducer_.label();
179  validPhotonCoreHandle=false;
180  }
181 
182  // Get EcalRecHits
183  bool validEcalRecHits=true;
184  Handle<EcalRecHitCollection> barrelHitHandle;
185  EcalRecHitCollection barrelRecHits;
186  theEvent.getByLabel(barrelEcalHits_, barrelHitHandle);
187  if (!barrelHitHandle.isValid()) {
188  edm::LogError("GEDPhotonProducer") << "Error! Can't get the product "<<barrelEcalHits_.label();
189  validEcalRecHits=false;
190  }
191  if ( validEcalRecHits) barrelRecHits = *(barrelHitHandle.product());
192 
193 
194  Handle<EcalRecHitCollection> endcapHitHandle;
195  theEvent.getByLabel(endcapEcalHits_, endcapHitHandle);
196  EcalRecHitCollection endcapRecHits;
197  if (!endcapHitHandle.isValid()) {
198  edm::LogError("GEDPhotonProducer") << "Error! Can't get the product "<<endcapEcalHits_.label();
199  validEcalRecHits=false;
200  }
201  if( validEcalRecHits) endcapRecHits = *(endcapHitHandle.product());
202 
203  //AA
204  //Get the severity level object
206  theEventSetup.get<EcalSeverityLevelAlgoRcd>().get(sevLv);
207  //
208 
209 
210 // get Hcal towers collection
211  Handle<CaloTowerCollection> hcalTowersHandle;
212  theEvent.getByLabel(hcalTowers_, hcalTowersHandle);
213 
214 
215  // get the geometry from the event setup:
216  theEventSetup.get<CaloGeometryRecord>().get(theCaloGeom_);
217 
218  //
219  // update energy correction function
220  // energyCorrectionF->init(theEventSetup);
221 
222  edm::ESHandle<CaloTopology> pTopology;
223  theEventSetup.get<CaloTopologyRecord>().get(theCaloTopo_);
224  const CaloTopology *topology = theCaloTopo_.product();
225 
226  // Get the primary event vertex
227  Handle<reco::VertexCollection> vertexHandle;
229  bool validVertex=true;
230  if ( usePrimaryVertex_ ) {
231  theEvent.getByLabel(vertexProducer_, vertexHandle);
232  if (!vertexHandle.isValid()) {
233  edm::LogWarning("GEDPhotonProducer") << "Error! Can't get the product primary Vertex Collection "<< "\n";
234  validVertex=false;
235  }
236  if (validVertex) vertexCollection = *(vertexHandle.product());
237  }
238  // math::XYZPoint vtx(0.,0.,0.);
239  //if (vertexCollection.size()>0) vtx = vertexCollection.begin()->position();
240 
241 
242  int iSC=0; // index in photon collection
243  // Loop over barrel and endcap SC collections and fill the photon collection
244  if ( validPhotonCoreHandle)
245  fillPhotonCollection(theEvent,
246  theEventSetup,
247  photonCoreHandle,
248  topology,
249  &barrelRecHits,
250  &endcapRecHits,
251  hcalTowersHandle,
252  //vtx,
254  outputPhotonCollection,
255  iSC,
256  sevLv.product());
257 
258 
259  // put the product in the event
260  edm::LogInfo("GEDPhotonProducer") << " Put in the event " << iSC << " Photon Candidates \n";
261  outputPhotonCollection_p->assign(outputPhotonCollection.begin(),outputPhotonCollection.end());
262  theEvent.put( outputPhotonCollection_p, PhotonCollection_);
263 
264 }
265 
267  edm::EventSetup const & es,
268  const edm::Handle<reco::PhotonCoreCollection> & photonCoreHandle,
269  const CaloTopology* topology,
270  const EcalRecHitCollection* ecalBarrelHits,
271  const EcalRecHitCollection* ecalEndcapHits,
272  const edm::Handle<CaloTowerCollection> & hcalTowersHandle,
273  // math::XYZPoint & vtx,
275  reco::PhotonCollection & outputPhotonCollection, int& iSC,
276  const EcalSeverityLevelAlgo * sevLv) {
277 
279  const EcalRecHitCollection* hits = 0 ;
280  std::vector<double> preselCutValues;
281  std::vector<int> flags_, severitiesexcl_;
282 
283  for(unsigned int lSC=0; lSC < photonCoreHandle->size(); lSC++) {
284 
285  reco::PhotonCoreRef coreRef(reco::PhotonCoreRef(photonCoreHandle, lSC));
286  reco::SuperClusterRef scRef=coreRef->superCluster();
287 
288 
289 
290  // const reco::SuperCluster* pClus=&(*scRef);
291  iSC++;
292 
293  int subdet = scRef->seed()->hitsAndFractions()[0].first.subdetId();
294  if (subdet==EcalBarrel) {
295  preselCutValues = preselCutValuesBarrel_;
296  hits = ecalBarrelHits;
297  flags_ = flagsexclEB_;
298  severitiesexcl_ = severitiesexclEB_;
299  } else if (subdet==EcalEndcap) {
300  preselCutValues = preselCutValuesEndcap_;
301  hits = ecalEndcapHits;
302  flags_ = flagsexclEE_;
303  severitiesexcl_ = severitiesexclEE_;
304  } else {
305  edm::LogWarning("")<<"GEDPhotonProducer: do not know if it is a barrel or endcap SuperCluster";
306  }
307 
308 
309  // SC energy preselection
310  if (scRef->energy()/cosh(scRef->eta()) <= preselCutValues[0] ) continue;
311  // calculate HoE
312 
313  const CaloTowerCollection* hcalTowersColl = hcalTowersHandle.product();
314  EgammaTowerIsolation towerIso1(hOverEConeSize_,0.,0.,1,hcalTowersColl) ;
315  EgammaTowerIsolation towerIso2(hOverEConeSize_,0.,0.,2,hcalTowersColl) ;
316  double HoE1=towerIso1.getTowerESum(&(*scRef))/scRef->energy();
317  double HoE2=towerIso2.getTowerESum(&(*scRef))/scRef->energy();
318 
319  EgammaHadTower towerIsoBehindClus(es);
320  towerIsoBehindClus.setTowerCollection(hcalTowersHandle.product());
321  std::vector<CaloTowerDetId> TowersBehindClus = towerIsoBehindClus.towersOf(*scRef);
322  float hcalDepth1OverEcalBc = towerIsoBehindClus.getDepth1HcalESum(TowersBehindClus)/scRef->energy();
323  float hcalDepth2OverEcalBc = towerIsoBehindClus.getDepth2HcalESum(TowersBehindClus)/scRef->energy();
324  // std::cout << " GEDPhotonProducer calculation of HoE with towers in a cone " << HoE1 << " " << HoE2 << std::endl;
325  //std::cout << " GEDPhotonProducer calcualtion of HoE with towers behind the BCs " << hcalDepth1OverEcalBc << " " << hcalDepth2OverEcalBc << std::endl;
326 
327  float maxXtal = EcalClusterTools::eMax( *(scRef->seed()), &(*hits) );
328  //AA
329  //Change these to consider severity level of hits
330  float e1x5 = EcalClusterTools::e1x5( *(scRef->seed()), &(*hits), &(*topology), flags_, severitiesexcl_, sevLv);
331  float e2x5 = EcalClusterTools::e2x5Max( *(scRef->seed()), &(*hits), &(*topology),flags_, severitiesexcl_, sevLv );
332  float e3x3 = EcalClusterTools::e3x3( *(scRef->seed()), &(*hits), &(*topology), flags_, severitiesexcl_, sevLv);
333  float e5x5 = EcalClusterTools::e5x5( *(scRef->seed()), &(*hits), &(*topology),flags_, severitiesexcl_, sevLv);
334  std::vector<float> cov = EcalClusterTools::covariances( *(scRef->seed()), &(*hits), &(*topology), geometry,flags_, severitiesexcl_, sevLv);
335  std::vector<float> locCov = EcalClusterTools::localCovariances( *(scRef->seed()), &(*hits), &(*topology),flags_, severitiesexcl_, sevLv);
336 
337  float sigmaEtaEta = sqrt(cov[0]);
338  float sigmaIetaIeta = sqrt(locCov[0]);
339  // compute position of ECAL shower
340  math::XYZPoint caloPosition = scRef->position();
341 
342 
344  double photonEnergy=1.;
345  math::XYZPoint vtx(0.,0.,0.);
346  if (vertexCollection.size()>0) vtx = vertexCollection.begin()->position();
347  // compute momentum vector of photon from primary vertex and cluster position
348  math::XYZVector direction = caloPosition - vtx;
349  //math::XYZVector momentum = direction.unit() * photonEnergy ;
350  math::XYZVector momentum = direction.unit() ;
351 
352  // Create dummy candidate with unit momentum and zero energy to allow setting of all variables. The energy is set for last.
353  math::XYZTLorentzVectorD p4(momentum.x(), momentum.y(), momentum.z(), photonEnergy );
354  reco::Photon newCandidate(p4, caloPosition, coreRef, vtx);
355 
356  //std::cout << " standard p4 before " << newCandidate.p4() << " energy " << newCandidate.energy() << std::endl;
357  //std::cout << " type " <<newCandidate.getCandidateP4type() << " standard p4 after " << newCandidate.p4() << " energy " << newCandidate.energy() << std::endl;
358 
359  // Calculate fiducial flags and isolation variable. Blocked are filled from the isolationCalculator
360  reco::Photon::FiducialFlags fiducialFlags;
361  reco::Photon::IsolationVariables isolVarR03, isolVarR04;
362  thePhotonIsolationCalculator_-> calculate ( &newCandidate,evt,es,fiducialFlags,isolVarR04, isolVarR03);
363  newCandidate.setFiducialVolumeFlags( fiducialFlags );
364  newCandidate.setIsolationVariables(isolVarR04, isolVarR03 );
365 
366  // Calculate the PF isolation and ID - for the time being there is no calculation. Only the setting
369  newCandidate.setPflowIsolationVariables(pfIso);
370  newCandidate.setPflowIDVariables(pfID);
371 
372 
374  reco::Photon::ShowerShape showerShape;
375  showerShape.e1x5= e1x5;
376  showerShape.e2x5= e2x5;
377  showerShape.e3x3= e3x3;
378  showerShape.e5x5= e5x5;
379  showerShape.maxEnergyXtal = maxXtal;
380  showerShape.sigmaEtaEta = sigmaEtaEta;
381  showerShape.sigmaIetaIeta = sigmaIetaIeta;
382  showerShape.hcalDepth1OverEcal = HoE1;
383  showerShape.hcalDepth2OverEcal = HoE2;
384  showerShape.hcalDepth1OverEcalBc = hcalDepth1OverEcalBc;
385  showerShape.hcalDepth2OverEcalBc = hcalDepth2OverEcalBc;
386  showerShape.hcalTowersBehindClusters = TowersBehindClus;
387  newCandidate.setShowerShapeVariables ( showerShape );
388 
391  // Photon candidate takes by default (set in photons_cfi.py) a 4-momentum derived from the ecal photon-specific corrections.
392  thePhotonEnergyCorrector_->calculate(evt, newCandidate, subdet, vertexCollection,es);
393  if ( candidateP4type_ == "fromEcalEnergy") {
394  newCandidate.setP4( newCandidate.p4(reco::Photon::ecal_photons) );
395  newCandidate.setCandidateP4type(reco::Photon::ecal_photons);
396  } else if ( candidateP4type_ == "fromRegression1") {
397  newCandidate.setP4( newCandidate.p4(reco::Photon::regression1) );
398  newCandidate.setCandidateP4type(reco::Photon::regression1);
399  } else if ( candidateP4type_ == "fromRegression2") {
400  newCandidate.setP4( newCandidate.p4(reco::Photon::regression2) );
401  newCandidate.setCandidateP4type(reco::Photon::regression2);
402  }
403 
404  // std::cout << " final p4 " << newCandidate.p4() << " energy " << newCandidate.energy() << std::endl;
405 
406 
407  // std::cout << " GEDPhotonProducer from candidate HoE with towers in a cone " << newCandidate.hadronicOverEm() << " " << newCandidate.hadronicDepth1OverEm() << " " << newCandidate.hadronicDepth2OverEm() << std::endl;
408  // std::cout << " GEDPhotonProducer from candidate of HoE with towers behind the BCs " << newCandidate.hadTowOverEm() << " " << newCandidate.hadTowDepth1OverEm() << " " << newCandidate.hadTowDepth2OverEm() << std::endl;
409 
410 
411  // fill MIP Vairables for Halo: Block for MIP are filled from PhotonMIPHaloTagger
413  if(subdet==EcalBarrel && runMIPTagger_ )
414  {
415 
416  thePhotonMIPHaloTagger_-> MIPcalculate( &newCandidate,evt,es,mipVar);
417  newCandidate.setMIPVariables(mipVar);
418  }
419 
420 
421 
423  bool isLooseEM=true;
424  if ( newCandidate.pt() < highEt_) {
425  if ( newCandidate.hadronicOverEm() >= preselCutValues[1] ) isLooseEM=false;
426  if ( newCandidate.ecalRecHitSumEtConeDR04() > preselCutValues[2]+ preselCutValues[3]*newCandidate.pt() ) isLooseEM=false;
427  if ( newCandidate.hcalTowerSumEtConeDR04() > preselCutValues[4]+ preselCutValues[5]*newCandidate.pt() ) isLooseEM=false;
428  if ( newCandidate.nTrkSolidConeDR04() > int(preselCutValues[6]) ) isLooseEM=false;
429  if ( newCandidate.nTrkHollowConeDR04() > int(preselCutValues[7]) ) isLooseEM=false;
430  if ( newCandidate.trkSumPtSolidConeDR04() > preselCutValues[8] ) isLooseEM=false;
431  if ( newCandidate.trkSumPtHollowConeDR04() > preselCutValues[9] ) isLooseEM=false;
432  if ( newCandidate.sigmaIetaIeta() > preselCutValues[10] ) isLooseEM=false;
433  }
434 
435 
436 
437  if ( isLooseEM)
438  outputPhotonCollection.push_back(newCandidate);
439 
440 
441  }
442 }
443 
edm::InputTag photonCoreProducer_
T getParameter(std::string const &) const
PhotonEnergyCorrector * thePhotonEnergyCorrector_
PhotonMIPHaloTagger * thePhotonMIPHaloTagger_
virtual void endRun(edm::Run const &, edm::EventSetup const &) overridefinal
edm::ESHandle< CaloGeometry > theCaloGeom_
std::string PhotonCollection_
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:15
int init
Definition: HydjetWrapper.h:63
std::vector< int > flagsexclEB_
std::vector< Vertex > VertexCollection
collection of Vertex objects
Definition: VertexFwd.h:9
std::string vertexProducer_
PhotonIsolationCalculator * thePhotonIsolationCalculator_
std::vector< int > severitiesexclEE_
tuple vertexCollection
static std::vector< float > covariances(const reco::BasicCluster &cluster, const EcalRecHitCollection *recHits, const CaloTopology *topology, const CaloGeometry *geometry, float w0=4.7)
edm::ESHandle< CaloTopology > theCaloTopo_
void setTowerCollection(const CaloTowerCollection *towercollection)
PositionCalc posCalculator_
static std::vector< float > localCovariances(const reco::BasicCluster &cluster, const EcalRecHitCollection *recHits, const CaloTopology *topology, float w0=4.7)
double getDepth1HcalESum(const reco::SuperCluster &sc) const
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:94
T sqrt(T t)
Definition: SSEVec.h:48
double p4[4]
Definition: TauolaWrapper.h:92
static float e3x3(const reco::BasicCluster &cluster, const EcalRecHitCollection *recHits, const CaloTopology *topology)
std::vector< int > flagsexclEE_
edm::InputTag endcapEcalHits_
edm::InputTag barrelEcalHits_
double getTowerESum(const reco::Candidate *cand, const std::vector< CaloTowerDetId > *detIdToExclude=0) const
std::vector< int > severitiesexclEB_
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:361
void calculate(edm::Event &evt, reco::Photon &, int subdet, const reco::VertexCollection &vtxcol, const edm::EventSetup &iSetup)
GEDPhotonProducer(const edm::ParameterSet &ps)
std::vector< double > preselCutValuesBarrel_
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_)
XYZVectorD XYZVector
spatial vector with cartesian internal representation
Definition: Vector3D.h:31
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:13
static float eMax(const reco::BasicCluster &cluster, const EcalRecHitCollection *recHits)
edm::InputTag hcalTowers_
const T & get() const
Definition: EventSetup.h:55
std::vector< double > preselCutValuesEndcap_
T const * product() const
Definition: ESHandle.h:62
std::vector< Photon > PhotonCollection
collectin of Photon objects
Definition: PhotonFwd.h:9
T const * product() const
Definition: Handle.h:74
std::string candidateP4type_
virtual void beginRun(edm::Run const &r, edm::EventSetup const &es) overridefinal
std::string const & label() const
Definition: InputTag.h:42
std::vector< CaloTowerDetId > towersOf(const reco::SuperCluster &sc) const
double getDepth2HcalESum(const reco::SuperCluster &sc) const
ESHandle< TrackerGeometry > geometry
static float e2x5Max(const reco::BasicCluster &cluster, const EcalRecHitCollection *recHits, const CaloTopology *topology)
static float e5x5(const reco::BasicCluster &cluster, const EcalRecHitCollection *recHits, const CaloTopology *topology)
edm::ParameterSet conf_
static float e1x5(const reco::BasicCluster &cluster, const EcalRecHitCollection *recHits, const CaloTopology *topology)
void setup(const edm::ParameterSet &conf)
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)
virtual void produce(edm::Event &evt, const edm::EventSetup &es)
Definition: Run.h:36