CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
EgHLTOffHelper.cc
Go to the documentation of this file.
2 
3 
8 
10 
13 
19 
23 
24 #include <iostream>
25 
26 using namespace egHLT;
27 
28 
29 
31 {
34 }
35 
37 {
38 
39  ecalRecHitsEBTag_ = conf.getParameter<edm::InputTag>("BarrelRecHitCollection");
40  ecalRecHitsEETag_ = conf.getParameter<edm::InputTag>("EndcapRecHitCollection");
41  caloJetsTag_ = conf.getParameter<edm::InputTag>("CaloJetCollection");
42  isolTrkTag_ = conf.getParameter<edm::InputTag>("IsolTrackCollection");
43  hbheHitsTag_ = conf.getParameter<edm::InputTag>("HBHERecHitCollection");
44  hfHitsTag_ = conf.getParameter<edm::InputTag>("HFRecHitCollection");
45  electronsTag_ = conf.getParameter<edm::InputTag>("ElectronCollection");
46  photonsTag_ = conf.getParameter<edm::InputTag>("PhotonCollection");
47  triggerSummaryLabel_ = conf.getParameter<edm::InputTag>("triggerSummaryLabel");
48  hltTag_ = conf.getParameter<std::string>("hltTag");
49  beamSpotTag_ = conf.getParameter<edm::InputTag>("BeamSpotProducer");
50  caloTowersTag_ = conf.getParameter<edm::InputTag>("CaloTowers");
51  trigResultsTag_ = conf.getParameter<edm::InputTag>("TrigResults");
52  vertexTag_ = conf.getParameter<edm::InputTag>("VertexCollection");
53 
54  eleCuts_.setup(conf.getParameter<edm::ParameterSet>("eleCuts"));
55  eleLooseCuts_.setup(conf.getParameter<edm::ParameterSet>("eleLooseCuts"));
56  phoCuts_.setup(conf.getParameter<edm::ParameterSet>("phoCuts"));
57  phoLooseCuts_.setup(conf.getParameter<edm::ParameterSet>("phoLooseCuts"));
58 
59  //now we have the isolations completely configurable via python
60  hltEMIsolOuterCone_ = conf.getParameter<double>("hltEMIsolOuterCone");
61  hltEMIsolInnerConeEB_ = conf.getParameter<double>("hltEMIsolInnerConeEB");
62  hltEMIsolEtaSliceEB_ = conf.getParameter<double>("hltEMIsolEtaSliceEB");
63  hltEMIsolEtMinEB_ = conf.getParameter<double>("hltEMIsolEtMinEB");
64  hltEMIsolEMinEB_ = conf.getParameter<double>("hltEMIsolEMinEB");
65  hltEMIsolInnerConeEE_ = conf.getParameter<double>("hltEMIsolInnerConeEE");
66  hltEMIsolEtaSliceEE_ = conf.getParameter<double>("hltEMIsolEtaSliceEE");
67  hltEMIsolEtMinEE_ = conf.getParameter<double>("hltEMIsolEtMinEE");
68  hltEMIsolEMinEE_ = conf.getParameter<double>("hltEMIsolEMinEE");
69 
70  hltPhoTrkIsolPtMin_ = conf.getParameter<double>("hltPhoTrkIsolPtMin");
71  hltPhoTrkIsolOuterCone_ = conf.getParameter<double>("hltPhoTrkIsolOuterCone");
72  hltPhoTrkIsolInnerCone_ = conf.getParameter<double>("hltPhoTrkIsolInnerCone");
73  hltPhoTrkIsolZSpan_ = conf.getParameter<double>("hltPhoTrkIsolZSpan");
74  hltPhoTrkIsolRSpan_ = conf.getParameter<double>("hltPhoTrkIsolZSpan");
75  hltPhoTrkIsolCountTrks_ = conf.getParameter<bool>("hltPhoTrkIsolCountTrks");
76 
77  hltEleTrkIsolPtMin_ = conf.getParameter<double>("hltEleTrkIsolPtMin");
78  hltEleTrkIsolOuterCone_ = conf.getParameter<double>("hltEleTrkIsolOuterCone");
79  hltEleTrkIsolInnerCone_ = conf.getParameter<double>("hltEleTrkIsolInnerCone");
80  hltEleTrkIsolZSpan_ = conf.getParameter<double>("hltEleTrkIsolZSpan");
81  hltEleTrkIsolRSpan_ = conf.getParameter<double>("hltEleTrkIsolZSpan");
82 
83  hltHadIsolOuterCone_ = conf.getParameter<double>("hltHadIsolOuterCone");
84  hltHadIsolInnerCone_ = conf.getParameter<double>("hltHadIsolInnerCone");
85  hltHadIsolEtMin_ = conf.getParameter<double>("hltHadIsolEtMin");
86  hltHadIsolDepth_ = conf.getParameter<int>("hltHadIsolDepth");
87 
88  calHLTHcalIsol_ = conf.getParameter<bool>("calHLTHcalIsol");
89  calHLTEmIsol_ = conf.getParameter<bool>("calHLTEmIsol");
90  calHLTEleTrkIsol_ = conf.getParameter<bool>("calHLTEleTrkIsol");
91  calHLTPhoTrkIsol_ = conf.getParameter<bool>("calHLTPhoTrkIsol");
92 
93  trigCutParams_ = conf.getParameter<std::vector<edm::ParameterSet> >("triggerCuts"); //setupTriggers used to be in this function but had to be moved due to HLTConfigChanges (has to be called beginRun) so we have to save this for later.
94 
95  hltEleTrkIsolAlgo_ = new EgammaHLTTrackIsolation(hltEleTrkIsolPtMin_,hltEleTrkIsolOuterCone_,hltEleTrkIsolZSpan_,hltEleTrkIsolRSpan_,hltEleTrkIsolInnerCone_);
96  hltPhoTrkIsolAlgo_ = new EgammaHLTTrackIsolation(hltPhoTrkIsolPtMin_,hltPhoTrkIsolOuterCone_,hltPhoTrkIsolZSpan_,hltPhoTrkIsolRSpan_,hltPhoTrkIsolInnerCone_);
97 
98 
99 }
100 
101 //this code was taken out of OffHelper::setup due to HLTConfigProvider changes
102 //it still assumes that this is called only once
103 void OffHelper::setupTriggers(const HLTConfigProvider& hltConfig,const std::vector<std::string>& hltFiltersUsed)
104 {
105  hltFiltersUsed_ = hltFiltersUsed; //expensive but only do this once and faster ways could make things less clear
106  //now work out how many objects are requires to pass filter for it to accept
108  for(size_t filterNr=0;filterNr<hltFiltersUsed_.size();filterNr++){
110  }
111 
112  //now loading the cuts for every trigger into our vector which stores them
113  //only load cuts for triggers that are in hltFiltersUsed
114 
115  for(size_t trigNr=0;trigNr<trigCutParams_.size();trigNr++) {
116  std::string trigName = trigCutParams_[trigNr].getParameter<std::string>("trigName");
117  if(std::find(hltFiltersUsed_.begin(),hltFiltersUsed_.end(),trigName)!=hltFiltersUsed_.end()){ //perhaps I should sort hltFiltersUsed_....
118  trigCuts_.push_back(std::make_pair(TrigCodes::getCode(trigName),OffEgSel(trigCutParams_[trigNr])));
119  // std::cout<<trigName<<std::endl<<"between"<<std::endl<<trigCutParams_[trigNr]<<std::endl<<"after"<<std::endl;
120  }
121  }
122  trigCutParams_.clear();//dont need it any more, get rid of it
123 
124  //to make my life difficult, the scaled l1 paths are special
125  //and arent stored in trigger event
126  //to I have to figure out the path, see if it passes
127  //and then hunt down the l1 seed filter and use that to match to the pho/ele
128  //matching on l1 seed filter is not enough as that will be passed for normal
129  //electron triggers even if pre-scale hasnt fired
130  l1PreScaledFilters_.clear();
131  l1PreScaledPaths_.clear();
132  l1PreAndSeedFilters_.clear();
133  for(size_t filterNr=0;filterNr<hltFiltersUsed_.size();filterNr++){
134  if(hltFiltersUsed_[filterNr].find("hltPreL1")==0){ //l1 prescaled path
135  l1PreScaledFilters_.push_back(hltFiltersUsed_[filterNr]);
136  }
137  }
138 
140  if(l1PreScaledPaths_.size()==l1PreScaledFilters_.size()){
141  for(size_t pathNr=0;pathNr<l1PreScaledPaths_.size();pathNr++){
142 
143  std::string l1SeedFilter =egHLT::trigTools::getL1SeedFilterOfPath(hltConfig,l1PreScaledPaths_[pathNr]);
144  //---Morse====
145  //std::cout<<l1PreScaledFilters_[pathNr]<<" "<<l1PreScaledPaths_[pathNr]<<" "<<l1SeedFilter<<std::endl;
146  //------------
147  l1PreAndSeedFilters_.push_back(std::make_pair(l1PreScaledFilters_[pathNr],l1SeedFilter));
148  }
149  }
150 }
151 
153 {
154  offEvent.clear();
155  int errCode=0; //excution stops as soon as an error is flagged
156  if(errCode==0) errCode = getHandles(edmEvent,setup);
157  if(errCode==0) errCode = fillOffEleVec(offEvent.eles());
158  if(errCode==0) errCode = fillOffPhoVec(offEvent.phos());
159  if(errCode==0) errCode = setTrigInfo(edmEvent, offEvent);
160  if(errCode==0) offEvent.setJets(recoJets_);
161  return errCode;
162 }
163 
164 
166 {
167  try {
168  setup.get<CaloGeometryRecord>().get(caloGeom_);
169  setup.get<CaloTopologyRecord>().get(caloTopology_);
170  //setup.get<EcalSeverityLevelAlgoRcd>().get(ecalSeverityLevel_);
171  }catch(...){
172  return errCodes::Geom;
173  }
174  try {
175  setup.get<IdealMagneticFieldRecord>().get(magField_);
176  }catch(...){
177  return errCodes::MagField;
178  }
179 
180  //get objects
181  if(!getHandle(event,triggerSummaryLabel_,trigEvt_)) return errCodes::TrigEvent; //must have this, otherwise skip event
182  if(!getHandle(event,trigResultsTag_,trigResults_)) return errCodes::TrigEvent; //re using bit to minimise bug fix code changes
183  if(!getHandle(event,electronsTag_,recoEles_)) return errCodes::OffEle; //need for electrons
184  if(!getHandle(event,photonsTag_, recoPhos_)) return errCodes::OffPho; //need for photons
185  if(!getHandle(event,caloJetsTag_,recoJets_)) return errCodes::OffJet; //need for electrons and photons
186  if(!getHandle(event,vertexTag_,recoVertices_)) return errCodes::OffVertex; //need for eff vs nVertex
187 
188  //need for HLT isolations (rec hits also need for sigmaIPhiIPhi (ele/pho) and r9 pho)
192  if(!getHandle(event,hbheHitsTag_, hbheHits_)) return errCodes::HBHERecHits; //I dont think we need hbhe rec-hits any more
193  if(!getHandle(event,hfHitsTag_, hfHits_)) return errCodes::HFRecHits;//I dont think we need hf rec-hits any more
196 
197 
198  return 0;
199 }
200 
201 //this function coverts GsfElectrons to a format which is actually useful to me
202 int OffHelper::fillOffEleVec(std::vector<OffEle>& egHLTOffEles)
203 {
204  egHLTOffEles.clear();
205  egHLTOffEles.reserve(recoEles_->size());
206  for(reco::GsfElectronCollection::const_iterator gsfIter=recoEles_->begin(); gsfIter!=recoEles_->end();++gsfIter){
207  if(!gsfIter->ecalDrivenSeed()) continue; //avoid PF electrons (this is Eg HLT validation and HLT is ecal driven)
208 
209  int nVertex=0;
210  for(reco::VertexCollection::const_iterator nVit=recoVertices_->begin(); nVit!=recoVertices_->end();++nVit){
211  if( !nVit->isFake()
212  && nVit->ndof()>4
213  && std::fabs( nVit->z()<24.0)
214  && sqrt(nVit->x()*nVit->x() + nVit->y()*nVit->y())<2.0){nVertex++;}
215  }
216  //if(nVertex>20)std::cout<<"nVertex: "<<nVertex<<std::endl;
217  OffEle::EventData eventData;
218  eventData.NVertex=nVertex;
219 
220  OffEle::IsolData isolData;
221  fillIsolData(*gsfIter,isolData);
222 
223  OffEle::ClusShapeData clusShapeData;
224  fillClusShapeData(*gsfIter,clusShapeData);
225 
226  OffEle::HLTData hltData;
227  fillHLTData(*gsfIter,hltData);
228 
229  egHLTOffEles.push_back(OffEle(*gsfIter,clusShapeData,isolData,hltData,eventData));
230 
231  //now we would like to set the cut results
232  OffEle& ele = egHLTOffEles.back();
233  ele.setCutCode(eleCuts_.getCutCode(ele));
235 
236  std::vector<std::pair<TrigCodes::TrigBitSet,int> >trigCutsCutCodes;
237  for(size_t i=0;i<trigCuts_.size();i++) trigCutsCutCodes.push_back(std::make_pair(trigCuts_[i].first,trigCuts_[i].second.getCutCode(ele)));
238  ele.setTrigCutsCutCodes(trigCutsCutCodes);
239  }//end loop over gsf electron collection
240  return 0;
241 }
242 
244 {
252 
253  isolData.ptTrks=ele.dr03TkSumPt();
254  isolData.nrTrks=999; //no longer supported
255  isolData.em= ele.dr03EcalRecHitSumEt();
256  isolData.hadDepth1 = ele.dr03HcalDepth1TowerSumEt();
257  isolData.hadDepth2 = ele.dr03HcalDepth2TowerSumEt();
258 
259  //now time to do the HLT algos
260  if(calHLTHcalIsol_) isolData.hltHad=hcalIsolAlgo.getTowerESum(&ele);
261  else isolData.hltHad = 0.;
263  else isolData.hltTrksEle = 0.;
264  if(calHLTPhoTrkIsol_){
266  else isolData.hltTrksPho=hltPhoTrkIsolAlgo_->photonPtSum(&ele,isolTrks_.product(),false);
267  }
268  else isolData.hltTrksPho = 0.;
269  if(calHLTEmIsol_) isolData.hltEm = ecalIsolAlgoEB.getEtSum(&ele) +
270  ecalIsolAlgoEE.getEtSum(&ele);
271  else isolData.hltEm = 0.;
272 
273 }
274 
275 
277 {
278  clusShapeData.sigmaEtaEta = ele.sigmaEtaEta();
279  clusShapeData.sigmaIEtaIEta = ele.sigmaIetaIeta();
280  double e5x5 = ele.e5x5();
281  if(e5x5!=0.){
282  clusShapeData.e1x5Over5x5 = ele.e1x5()/e5x5;
283  clusShapeData.e2x5MaxOver5x5 = ele.e2x5Max()/e5x5;
284  }else{
285  clusShapeData.e1x5Over5x5 = -1;
286  clusShapeData.e2x5MaxOver5x5 = -1;
287  }
288 
289  //want to calculate r9, sigmaPhiPhi and sigmaIPhiIPhi, have to do old fashioned way
290  const reco::BasicCluster& seedClus = *(ele.superCluster()->seed());
291  const DetId seedDetId = seedClus.hitsAndFractions()[0].first; //note this may not actually be the seed hit but it doesnt matter because all hits will be in the barrel OR endcap
292  if(seedDetId.subdetId()==EcalBarrel){
293  std::vector<float> stdCov = EcalClusterTools::covariances(seedClus,ebRecHits_.product(),caloTopology_.product(),caloGeom_.product());
294  std::vector<float> crysCov = EcalClusterTools::localCovariances(seedClus,ebRecHits_.product(),caloTopology_.product());
295  clusShapeData.sigmaPhiPhi = sqrt(stdCov[2]);
296  clusShapeData.sigmaIPhiIPhi = sqrt(crysCov[2]);
297  if(ele.superCluster()->rawEnergy()!=0.){
298  clusShapeData.r9 = EcalClusterTools::e3x3(seedClus,ebRecHits_.product(),caloTopology_.product()) / ele.superCluster()->rawEnergy();
299  }else clusShapeData.r9 = -1.;
300 
301  }else{
302  std::vector<float> stdCov = EcalClusterTools::covariances(seedClus,eeRecHits_.product(),caloTopology_.product(),caloGeom_.product());
303  std::vector<float> crysCov = EcalClusterTools::localCovariances(seedClus,eeRecHits_.product(),caloTopology_.product());
304  clusShapeData.sigmaPhiPhi = sqrt(stdCov[2]);
305  clusShapeData.sigmaIPhiIPhi = sqrt(crysCov[2]);
306  if(ele.superCluster()->rawEnergy()!=0.){
307  clusShapeData.r9 = EcalClusterTools::e3x3(seedClus,eeRecHits_.product(),caloTopology_.product()) / ele.superCluster()->rawEnergy();
308  }else clusShapeData.r9 = -1.;
309  }
310 }
311 
312 //reco approximations of hlt quantities
314 {
315  if(ele.closestCtfTrackRef().isNonnull() &&
316  ele.closestCtfTrackRef()->extra().isNonnull()){
317  reco::TrackRef ctfTrack = ele.closestCtfTrackRef();
318  reco::SuperClusterRef scClus = ele.superCluster();
319 
320  //dEta
321  const reco::BeamSpot::Point& bsPos = beamSpot_->position();
322  math::XYZPoint scPosWRTVtx(scClus->x()-bsPos.x(), scClus->y()-bsPos.y() , scClus->z()-ctfTrack->vz());
323  hltData.dEtaIn = fabs(scPosWRTVtx.eta()-ctfTrack->eta());
324 
325  //dPhi: lifted straight from hlt code
326  float deltaPhi=fabs(ctfTrack->outerPosition().phi()-scClus->phi());
327  if(deltaPhi>6.283185308) deltaPhi -= 6.283185308;
328  if(deltaPhi>3.141592654) deltaPhi = 6.283185308-deltaPhi;
329  hltData.dPhiIn = deltaPhi;
330 
331  //invEInvP
332  if(ele.ecalEnergy()!=0 && ctfTrack->p()!=0) hltData.invEInvP= 1/ele.ecalEnergy() - 1/ctfTrack->p();
333  else hltData.invEInvP = 0;
334  }else{
335  hltData.dEtaIn =999;
336  hltData.dPhiIn =999;
337  hltData.invEInvP = 999;
338 
339  }
340 
341  //Now get HLT p4 from triggerobject
343  //trigTools::fillHLTposition(phos(),hltFiltersUsed_,l1PreAndSeedFilters_,evtTrigBits,trigEvt_.product(),hltTag_);
344 }
345 
346 
348 {
349  //Now get HLT p4 from triggerobject
351  //trigTools::fillHLTposition(phos(),hltFiltersUsed_,l1PreAndSeedFilters_,evtTrigBits,trigEvt_.product(),hltTag_);
352 }
353 
354 
355 
356 
357 //this function coverts Photons to a format which more useful to me
358 int OffHelper::fillOffPhoVec(std::vector<OffPho>& egHLTOffPhos)
359 {
360  egHLTOffPhos.clear();
361  egHLTOffPhos.reserve(recoPhos_->size());
362  for(reco::PhotonCollection::const_iterator phoIter=recoPhos_->begin(); phoIter!=recoPhos_->end();++phoIter){
363 
364  OffPho::IsolData isolData;
365  OffPho::ClusShapeData clusShapeData;
366 
367  fillIsolData(*phoIter,isolData);
368  fillClusShapeData(*phoIter,clusShapeData);
369 
370  OffPho::HLTData hltData;
371  fillHLTDataPho(*phoIter,hltData);
372 
373  egHLTOffPhos.push_back(OffPho(*phoIter,clusShapeData,isolData,hltData));
374  OffPho& pho = egHLTOffPhos.back();
375  pho.setCutCode(phoCuts_.getCutCode(pho));
377 
378  std::vector<std::pair<TrigCodes::TrigBitSet,int> >trigCutsCutCodes;
379  for(size_t i=0;i<trigCuts_.size();i++) trigCutsCutCodes.push_back(std::make_pair(trigCuts_[i].first,trigCuts_[i].second.getCutCode(pho)));
380  pho.setTrigCutsCutCodes(trigCutsCutCodes);
381 
382 
383  }//end loop over photon collection
384  return 0;
385 }
386 
387 
389 {
397 
398  isolData.nrTrks = pho.nTrkHollowConeDR03();
399  isolData.ptTrks = pho.trkSumPtHollowConeDR03();
400  isolData.em = pho.ecalRecHitSumEtConeDR03();
401  isolData.had = pho.hcalTowerSumEtConeDR03();
402 
403  //now calculate hlt algos
404  if(calHLTHcalIsol_) isolData.hltHad=hcalIsolAlgo.getTowerESum(&pho);
405  else isolData.hltHad = 0.;
406  if(calHLTPhoTrkIsol_){
408  else isolData.hltTrks=hltPhoTrkIsolAlgo_->photonPtSum(&pho,isolTrks_.product(),false);
409  }
410  else isolData.hltTrks = 0.;
411  if(calHLTEmIsol_) isolData.hltEm = ecalIsolAlgoEB.getEtSum(&pho) +
412  ecalIsolAlgoEE.getEtSum(&pho);
413  else isolData.hltEm = 0.;
414 
415 }
416 
418 {
419  clusShapeData.sigmaEtaEta = pho.sigmaEtaEta();
420  clusShapeData.sigmaIEtaIEta = pho.sigmaIetaIeta();
421  double e5x5 = pho.e5x5();
422  if(e5x5!=0.){ //even though it is almost impossible for this to be 0., this code can never ever crash under any situation
423  clusShapeData.e1x5Over5x5 = pho.e1x5()/e5x5;
424  clusShapeData.e2x5MaxOver5x5 = pho.e2x5()/e5x5;
425  }else{
426  clusShapeData.e1x5Over5x5 = -1;
427  clusShapeData.e2x5MaxOver5x5 = -1;
428  }
429  clusShapeData.r9 = pho.r9();
430 
431  //sigmaPhiPhi and sigmaIPhiIPhi are not in object (and nor should they be) so have to get them old fashioned way
432  //need to figure out if its in the barrel or endcap
433  //get the first hit of the cluster and figure out if its barrel or endcap
434  const reco::BasicCluster& seedClus = *(pho.superCluster()->seed());
435  const DetId seedDetId = seedClus.hitsAndFractions()[0].first; //note this may not actually be the seed hit but it doesnt matter because all hits will be in the barrel OR endcap (it is also incredably inefficient as it getHitsByDetId passes the vector by value not reference
436  if(seedDetId.subdetId()==EcalBarrel){
437  std::vector<float> stdCov = EcalClusterTools::covariances(seedClus,ebRecHits_.product(),caloTopology_.product(),caloGeom_.product());
438  std::vector<float> crysCov = EcalClusterTools::localCovariances(seedClus,ebRecHits_.product(),caloTopology_.product());
439  clusShapeData.sigmaPhiPhi = sqrt(stdCov[2]);
440  clusShapeData.sigmaIPhiIPhi = sqrt(crysCov[2]);
441  }else{
442  std::vector<float> stdCov = EcalClusterTools::covariances(seedClus,eeRecHits_.product(),caloTopology_.product(),caloGeom_.product());
443  std::vector<float> crysCov = EcalClusterTools::localCovariances(seedClus,eeRecHits_.product(),caloTopology_.product());
444 
445  clusShapeData.sigmaPhiPhi = sqrt(stdCov[2]);
446  clusShapeData.sigmaIPhiIPhi = sqrt(crysCov[2]);
447  }
448 }
449 
450 int OffHelper::setTrigInfo(const edm::Event & edmEvent, egHLT::OffEvt& offEvent)
451 {
453  //the l1 prescale paths dont have a filter with I can figure out if it passed or failed with so have to use TriggerResults
454  if(l1PreScaledPaths_.size()==l1PreScaledFilters_.size()){ //check to ensure both vectors have same number of events incase of screw ups
455  const edm::TriggerNames & triggerNames = edmEvent.triggerNames(*trigResults_);
456  for(size_t pathNr=0;pathNr<l1PreScaledPaths_.size();pathNr++){ //now we have to check the prescaled l1 trigger paths
457  unsigned int pathIndex = triggerNames.triggerIndex(l1PreScaledPaths_[pathNr]);
458  if(pathIndex<trigResults_->size() && trigResults_->accept(pathIndex)){
459  evtTrigBits |=TrigCodes::getCode(l1PreScaledFilters_[pathNr]);
460  }
461  }
462  }
463 
464  offEvent.setEvtTrigBits(evtTrigBits);
465 
468  return 0;
469 }
T getParameter(std::string const &) const
int i
Definition: DBlmapReader.cc:9
void fillHLTposition(T &obj, U &hltData, const std::vector< std::string > &filters, const trigger::TriggerEvent *trigEvt, const std::string &hltTag)
double hltEMIsolEtaSliceEB_
edm::Handle< reco::TrackCollection > isolTrks_
virtual edm::TriggerNames const & triggerNames(edm::TriggerResults const &triggerResults) const
Definition: Event.cc:199
edm::InputTag ecalRecHitsEBTag_
edm::InputTag vertexTag_
int setTrigInfo(const edm::Event &edmEvent, egHLT::OffEvt &offEvent)
int fillOffPhoVec(std::vector< OffPho > &offPhos)
double hltPhoTrkIsolRSpan_
void setTrigCutsCutCodes(const std::vector< std::pair< TrigCodes::TrigBitSet, int > > trigCutsCutCodes)
Definition: EgHLTOffPho.h:95
float e5x5() const
Definition: Photon.h:185
float hcalTowerSumEtConeDR03() const
Hcal isolation sum.
Definition: Photon.h:363
void setTrigCutsCutCodes(const std::vector< std::pair< TrigCodes::TrigBitSet, int > > trigCutsCutCodes)
Definition: EgHLTOffEle.h:111
void setLooseCutCode(int code)
Definition: EgHLTOffEle.h:109
static TrigBitSet getCode(const std::string &descript)
OffEgSel phoLooseCuts_
TrigCodes::TrigBitSet getFiltersPassed(const std::vector< std::pair< std::string, int > > &filters, const trigger::TriggerEvent *trigEvt, const std::string &hltTag)
void fillClusShapeData(const reco::GsfElectron &ele, OffEle::ClusShapeData &clusShapeData)
edm::Handle< reco::PhotonCollection > recoPhos_
std::vector< std::pair< TrigCodes::TrigBitSet, OffEgSel > > trigCuts_
int getCutCode(const OffEle &ele, int cutMask=~0x0) const
edm::InputTag caloJetsTag_
int getMinNrObjsRequiredByFilter(const std::string &filterName)
double hltEMIsolOuterCone_
OffEgSel eleLooseCuts_
float e1x5() const
Shower shape variables.
Definition: Photon.h:182
std::vector< std::string > l1PreScaledPaths_
EgammaHLTTrackIsolation * hltPhoTrkIsolAlgo_
reco::SuperClusterRef superCluster() const
Ref to SuperCluster.
Definition: Photon.cc:59
std::vector< std::pair< std::string, std::string > > l1PreAndSeedFilters_
double hltEleTrkIsolOuterCone_
void clear()
Definition: EgHLTOffEvt.cc:5
math::XYZPoint Point
point in the space
Definition: BeamSpot.h:30
void fillIsolData(const reco::GsfElectron &ele, OffEle::IsolData &isolData)
int photonTrackCount(const reco::RecoCandidate *const recocand, const reco::TrackCollection *isoTracks, bool useVertex)
float dr03HcalDepth2TowerSumEt() const
Definition: GsfElectron.h:439
void fillHLTData(const reco::GsfElectron &ele, OffEle::HLTData &hltData)
float trkSumPtHollowConeDR03() const
Definition: Photon.h:377
float e2x5Max() const
Definition: GsfElectron.h:385
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:7
double hltEMIsolInnerConeEE_
void setEvtTrigBits(TrigCodes::TrigBitSet bits)
Definition: EgHLTOffEvt.h:55
std::vector< edm::ParameterSet > trigCutParams_
double hltEleTrkIsolInnerCone_
TrackRef closestCtfTrackRef() const
Definition: GsfElectron.h:185
static std::vector< float > covariances(const reco::BasicCluster &cluster, const EcalRecHitCollection *recHits, const CaloTopology *topology, const CaloGeometry *geometry, float w0=4.7)
edm::Handle< HBHERecHitCollection > hbheHits_
double hltPhoTrkIsolPtMin_
double hltEleTrkIsolZSpan_
edm::InputTag electronsTag_
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:250
edm::InputTag hfHitsTag_
void fillHLTDataPho(const reco::Photon &pho, OffPho::HLTData &hltData)
float sigmaIetaIeta() const
Definition: GsfElectron.h:382
static std::vector< float > localCovariances(const reco::BasicCluster &cluster, const EcalRecHitCollection *recHits, const CaloTopology *topology, float w0=4.7)
unsigned int triggerIndex(std::string const &name) const
Definition: TriggerNames.cc:32
double hltHadIsolInnerCone_
float electronPtSum(const reco::Track *const tr, const reco::TrackCollection *isoTracks)
Get Pt sum of tracks inside an isolation cone for electrons.
edm::InputTag isolTrkTag_
void setup(const edm::ParameterSet &)
T sqrt(T t)
Definition: SSEVec.h:46
std::string getL1SeedFilterOfPath(const HLTConfigProvider &hltConfig, const std::string &path)
virtual SuperClusterRef superCluster() const
reference to a SuperCluster
Definition: GsfElectron.h:168
double hltPhoTrkIsolZSpan_
std::vector< std::pair< std::string, int > > hltFiltersUsedWithNrCandsCut_
double hltEleTrkIsolRSpan_
float sigmaIetaIeta() const
Definition: Photon.h:188
double hltHadIsolOuterCone_
static float e3x3(const reco::BasicCluster &cluster, const EcalRecHitCollection *recHits, const CaloTopology *topology)
float dr03TkSumPt() const
Definition: GsfElectron.h:436
edm::Handle< HFRecHitCollection > hfHits_
float dr03HcalDepth1TowerSumEt() const
Definition: GsfElectron.h:438
void setLooseCutCode(int code)
Definition: EgHLTOffPho.h:92
float e2x5() const
Definition: Photon.h:183
edm::Handle< std::vector< reco::CaloJet > > recoJets_
float sigmaEtaEta() const
Definition: Photon.h:187
edm::InputTag trigResultsTag_
double hltEleTrkIsolPtMin_
int nTrkHollowConeDR03() const
Definition: Photon.h:381
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:39
edm::InputTag triggerSummaryLabel_
void setCutCode(int code)
Definition: EgHLTOffEle.h:108
edm::ESHandle< MagneticField > magField_
tuple conf
Definition: dbtoconf.py:185
edm::Handle< trigger::TriggerEvent > trigEvt_
edm::ESHandle< CaloGeometry > caloGeom_
const std::vector< OffPho > & phos() const
Definition: EgHLTOffEvt.h:48
double hltPhoTrkIsolInnerCone_
Definition: DetId.h:20
void setCutCode(int code)
Definition: EgHLTOffPho.h:91
double hltEMIsolEtaSliceEE_
double hltEMIsolInnerConeEB_
edm::Handle< reco::GsfElectronCollection > recoEles_
edm::Handle< edm::TriggerResults > trigResults_
edm::ESHandle< CaloTopology > caloTopology_
void setup(const edm::ParameterSet &conf)
float e1x5() const
Definition: GsfElectron.h:384
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:13
const T & get() const
Definition: EventSetup.h:55
T const * product() const
Definition: ESHandle.h:62
edm::InputTag caloTowersTag_
T const * product() const
Definition: Handle.h:74
std::vector< std::string > l1PreScaledFilters_
float ecalEnergy() const
Definition: GsfElectron.h:724
void setJets(edm::Handle< std::vector< reco::CaloJet > > jets)
Definition: EgHLTOffEvt.h:56
float dr03EcalRecHitSumEt() const
Definition: GsfElectron.h:437
edm::InputTag photonsTag_
edm::Handle< EcalRecHitCollection > eeRecHits_
const std::vector< OffEle > & eles() const
Definition: EgHLTOffEvt.h:46
float e5x5() const
Definition: GsfElectron.h:386
int getHandles(const edm::Event &event, const edm::EventSetup &setup)
double hltPhoTrkIsolOuterCone_
float ecalRecHitSumEtConeDR03() const
Isolation variables in cone dR=0.3.
Definition: Photon.h:361
edm::Handle< CaloTowerCollection > caloTowers_
edm::Handle< EcalRecHitCollection > ebRecHits_
std::vector< std::string > hltFiltersUsed_
edm::Handle< reco::VertexCollection > recoVertices_
float r9() const
Definition: Photon.h:191
static bool getHandle(const edm::Event &event, const edm::InputTag &tag, edm::Handle< T > &handle)
edm::ESHandle< EcalSeverityLevelAlgo > ecalSeverityLevel_
EgammaHLTTrackIsolation * hltEleTrkIsolAlgo_
edm::InputTag ecalRecHitsEETag_
edm::Handle< reco::BeamSpot > beamSpot_
std::string hltTag_
edm::InputTag hbheHitsTag_
void setupTriggers(const HLTConfigProvider &config, const std::vector< std::string > &hltFiltersUsed)
void setFiltersObjPasses(std::vector< T > &objs, const std::vector< std::string > &filters, const std::vector< std::pair< std::string, std::string > > &l1PreAndSeedFilters, const TrigCodes::TrigBitSet &evtTrigBits, const trigger::TriggerEvent *trigEvt, const std::string &hltTag)
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")
tuple size
Write out results.
float photonPtSum(const reco::RecoCandidate *const recocand, const reco::TrackCollection *isoTracks, bool useVertex)
void translateFiltersToPathNames(const HLTConfigProvider &hltConfig, const std::vector< std::string > &filters, std::vector< std::string > &paths)
int makeOffEvt(const edm::Event &edmEvent, const edm::EventSetup &setup, egHLT::OffEvt &offEvent)
float sigmaEtaEta() const
Definition: GsfElectron.h:381
int fillOffEleVec(std::vector< OffEle > &offEles)
virtual GsfTrackRef gsfTrack() const
reference to a GsfTrack
Definition: GsfElectron.h:169
std::bitset< maxNrBits_ > TrigBitSet
edm::InputTag beamSpotTag_