CMS 3D CMS Logo

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