CMS 3D CMS Logo

EgammaHLTExtraProducer.cc
Go to the documentation of this file.
1 
10 
29 
33 
34 #include <sstream>
35 #include <vector>
36 
37 namespace {
38  //changes double to string for product name
39  //ie "." is replaced with "p" and for -ve vals, string is M instead so -28 is M28
40  //has a fixed precision of precision although it removes trailing zeros and the .
41  std::string convertToProdNameStr(double val, int precision = 3) {
42  std::ostringstream valOStr;
43  valOStr << std::fixed << std::setprecision(precision) << val;
44  std::string valStr = valOStr.str();
45  while (valStr.size() > 1 && valStr.back() == '0') {
46  valStr.pop_back();
47  }
48  if (valStr.size() > 1 && valStr.back() == '.') {
49  valStr.pop_back();
50  }
51  auto decPoint = valStr.find('.');
52  if (decPoint != std::string::npos) {
53  valStr.replace(decPoint, 1, "p");
54  }
55  if (val < 0)
56  valStr.replace(0, 1, "M");
57  return valStr;
58  }
59 
60  template <typename T>
61  std::vector<std::unique_ptr<int>> countRecHits(const T& recHitHandle, const std::vector<double>& thresholds) {
62  std::vector<std::unique_ptr<int>> counts(thresholds.size());
63  for (auto& count : counts)
64  count = std::make_unique<int>(0);
65  if (recHitHandle.isValid()) {
66  for (const auto& recHit : *recHitHandle) {
67  for (size_t thresNr = 0; thresNr < thresholds.size(); thresNr++) {
68  if (recHit.energy() >= thresholds[thresNr]) {
69  (*counts[thresNr])++;
70  }
71  }
72  }
73  }
74  return counts;
75  }
76 } // namespace
77 
79 public:
82 
83  void produce(edm::StreamID streamID, edm::Event& event, const edm::EventSetup& eventSetup) const override;
84  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
85 
86 private:
87  static void setVars(trigger::EgammaObject& egTrigObj,
88  const reco::RecoEcalCandidateRef& ecalCandRef,
91  const edm::Handle<reco::GsfTrackCollection>& gsfTrksHandle);
92  static void setGsfTracks(trigger::EgammaObject& egTrigObj,
93  const edm::Handle<reco::GsfTrackCollection>& gsfTrksHandle);
94  static void setSeeds(trigger::EgammaObject& egTrigObj, edm::Handle<reco::ElectronSeedCollection>& eleSeedsHandle);
95 
96  //these three filter functions are overly similar but with annoying differences
97  //eg rechits needs to access geometry, trk dr is also w.r.t the track eta/phi
98  //still could collapse into a single function
99  template <typename RecHitCollection>
100  std::unique_ptr<RecHitCollection> filterRecHits(
101  const std::vector<std::unique_ptr<trigger::EgammaObjectCollection>>& egTrigObjs,
103  const CaloGeometry& geom,
104  float maxDR2 = 0.4 * 0.4) const;
105 
106  std::unique_ptr<reco::TrackCollection> filterTrks(
107  const std::vector<std::unique_ptr<trigger::EgammaObjectCollection>>& egTrigObjs,
109  float maxDR2 = 0.4 * 0.4) const;
110 
111  std::unique_ptr<reco::PFClusterCollection> filterPFClusIso(
112  const std::vector<std::unique_ptr<trigger::EgammaObjectCollection>>& egTrigObjs,
114  float maxDR2 = 0.4 * 0.4) const;
115 
116  struct Tokens {
117  //these are the tokens which comprise the E/gamma candidate (eg cand,gsf track, pixel seeds)
118  struct EgObjTokens {
122  };
123  std::vector<std::pair<EgObjTokens, std::string>> egCands;
124 
125  std::vector<std::pair<edm::EDGetTokenT<EcalRecHitCollection>, std::string>> ecal;
126  std::vector<std::pair<edm::EDGetTokenT<HBHERecHitCollection>, std::string>> hcal;
127  std::vector<std::pair<edm::EDGetTokenT<reco::TrackCollection>, std::string>> trks;
128  std::vector<std::pair<edm::EDGetTokenT<reco::PFClusterCollection>, std::string>> pfClusIso;
129 
130  template <typename T>
133  const edm::ParameterSet& pset,
134  const std::string& tagname) {
135  token = cc.consumes<T>(pset.getParameter<edm::InputTag>(tagname));
136  }
137  template <typename T>
140  const edm::ParameterSet& pset,
141  const std::string& tagname) {
142  auto inputTags = pset.getParameter<std::vector<edm::InputTag>>(tagname);
143  tokens.resize(inputTags.size());
144  for (size_t tagNr = 0; tagNr < inputTags.size(); tagNr++) {
145  tokens[tagNr] = cc.consumes<T>(inputTags[tagNr]);
146  }
147  }
148  template <typename T>
149  static void setToken(std::vector<std::pair<edm::EDGetTokenT<T>, std::string>>& tokens,
151  const edm::ParameterSet& pset,
152  const std::string& tagname) {
153  const auto& collectionPSets = pset.getParameter<std::vector<edm::ParameterSet>>(tagname);
154  for (const auto& collPSet : collectionPSets) {
155  edm::EDGetTokenT<T> token = cc.consumes<T>(collPSet.getParameter<edm::InputTag>("src"));
156  std::string label = collPSet.getParameter<std::string>("label");
157  tokens.emplace_back(token, std::move(label));
158  }
159  }
160 
161  static void setToken(std::vector<std::pair<EgObjTokens, std::string>>& tokens,
163  const edm::ParameterSet& pset,
164  const std::string& tagname) {
165  const auto& collectionPSets = pset.getParameter<std::vector<edm::ParameterSet>>(tagname);
166  for (const auto& collPSet : collectionPSets) {
167  EgObjTokens objTokens;
168  setToken(objTokens.ecalCands, cc, collPSet, "ecalCands");
169  setToken(objTokens.gsfTracks, cc, collPSet, "gsfTracks");
170  setToken(objTokens.pixelSeeds, cc, collPSet, "pixelSeeds");
171  std::string label = collPSet.getParameter<std::string>("label");
172  tokens.emplace_back(objTokens, std::move(label));
173  }
174  }
176  };
177 
179 
183  std::vector<double> recHitCountThresholds_;
184 };
185 
187  setToken(egCands, cc, pset, "egCands");
188  setToken(ecal, cc, pset, "ecal");
189  setToken(hcal, cc, pset, "hcal");
190  setToken(trks, cc, pset, "trks");
191  setToken(pfClusIso, cc, pset, "pfClusIso");
192 }
193 
196  minPtToSaveHits_(pset.getParameter<double>("minPtToSaveHits")),
197  saveHitsPlusPi_(pset.getParameter<bool>("saveHitsPlusPi")),
198  saveHitsPlusHalfPi_(pset.getParameter<bool>("saveHitsPlusHalfPi")),
199  recHitCountThresholds_(pset.getParameter<std::vector<double>>("recHitCountThresholds")) {
200  consumesMany<reco::RecoEcalCandidateIsolationMap>();
201 
202  for (auto& tokenLabel : tokens_.egCands) {
203  produces<trigger::EgammaObjectCollection>(tokenLabel.second);
204  }
205  for (auto& tokenLabel : tokens_.ecal) {
206  produces<EcalRecHitCollection>(tokenLabel.second);
207  for (const auto& thres : recHitCountThresholds_) {
208  produces<int>("countEcalRecHits" + tokenLabel.second + "Thres" + convertToProdNameStr(thres) + "GeV");
209  }
210  }
211  for (auto& tokenLabel : tokens_.hcal) {
212  produces<HBHERecHitCollection>(tokenLabel.second);
213  for (const auto& thres : recHitCountThresholds_) {
214  produces<int>("countHcalRecHits" + tokenLabel.second + "Thres" + convertToProdNameStr(thres) + "GeV");
215  }
216  }
217  for (auto& tokenLabel : tokens_.trks) {
218  produces<reco::TrackCollection>(tokenLabel.second);
219  }
220  for (auto& tokenLabel : tokens_.pfClusIso) {
221  produces<reco::PFClusterCollection>(tokenLabel.second);
222  }
223 }
224 
227  desc.add<double>("minPtToSaveHits", 0.);
228  desc.add<bool>("saveHitsPlusPi", false);
229  desc.add<bool>("saveHitsPlusHalfPi", true);
230  desc.add<std::vector<double>>("recHitCountThresholds", std::vector{0., 0.5, 1.0, 1.5, 2.0});
231 
232  edm::ParameterSetDescription egCandsDesc;
233  egCandsDesc.add<edm::InputTag>("ecalCands", edm::InputTag(""));
234  egCandsDesc.add<edm::InputTag>("pixelSeeds", edm::InputTag(""));
235  egCandsDesc.add<edm::InputTag>("gsfTracks", edm::InputTag(""));
236  egCandsDesc.add<std::string>("label", "");
237  std::vector<edm::ParameterSet> egCandsDefaults(1);
238  egCandsDefaults[0].addParameter("ecalCands", edm::InputTag("hltEgammaCandidates"));
239  egCandsDefaults[0].addParameter("pixelSeeds", edm::InputTag("hltEgammaElectronPixelSeeds"));
240  egCandsDefaults[0].addParameter("gsfTracks", edm::InputTag("hltEgammaGsfTracks"));
241  egCandsDefaults[0].addParameter("label", std::string(""));
242 
243  edm::ParameterSetDescription tokenLabelDesc;
244  tokenLabelDesc.add<edm::InputTag>("src", edm::InputTag(""));
245  tokenLabelDesc.add<std::string>("label", "");
246  std::vector<edm::ParameterSet> ecalDefaults(2);
247  ecalDefaults[0].addParameter("src", edm::InputTag("hltEcalRecHit", "EcalRecHitsEB"));
248  ecalDefaults[0].addParameter("label", std::string("EcalRecHitsEB"));
249  ecalDefaults[1].addParameter("src", edm::InputTag("hltEcalRecHit", "EcalRecHitsEE"));
250  ecalDefaults[1].addParameter("label", std::string("EcalRecHitsEE"));
251  std::vector<edm::ParameterSet> hcalDefaults(1);
252  hcalDefaults[0].addParameter("src", edm::InputTag("hltHbhereco"));
253  hcalDefaults[0].addParameter("label", std::string(""));
254  std::vector<edm::ParameterSet> trksDefaults(1);
255  trksDefaults[0].addParameter("src", edm::InputTag("generalTracks"));
256  trksDefaults[0].addParameter("label", std::string(""));
257  std::vector<edm::ParameterSet> pfClusIsoDefaults(3);
258  pfClusIsoDefaults[0].addParameter("src", edm::InputTag("hltParticleFlowClusterECALL1Seeded"));
259  pfClusIsoDefaults[0].addParameter("label", std::string("Ecal"));
260  pfClusIsoDefaults[1].addParameter("src", edm::InputTag("hltParticleFlowClusterECALUnseeded"));
261  pfClusIsoDefaults[1].addParameter("label", std::string("EcalUnseeded"));
262  pfClusIsoDefaults[2].addParameter("src", edm::InputTag("hltParticleFlowClusterHCAL"));
263  pfClusIsoDefaults[2].addParameter("label", std::string("Hcal"));
264 
265  desc.addVPSet("egCands", egCandsDesc, egCandsDefaults);
266  desc.addVPSet("ecal", tokenLabelDesc, ecalDefaults);
267  desc.addVPSet("hcal", tokenLabelDesc, hcalDefaults);
268  desc.addVPSet("trks", tokenLabelDesc, trksDefaults);
269  desc.addVPSet("pfClusIso", tokenLabelDesc, pfClusIsoDefaults);
270 
271  descriptions.add(("hltEgammaHLTExtraProducer"), desc);
272 }
273 
275  edm::Event& event,
276  const edm::EventSetup& eventSetup) const {
277  std::vector<edm::Handle<reco::RecoEcalCandidateIsolationMap>> valueMapHandles;
278  event.getManyByType(valueMapHandles);
279 
280  std::vector<std::unique_ptr<trigger::EgammaObjectCollection>> egTrigObjColls;
281  for (const auto& egCandsToken : tokens_.egCands) {
282  auto ecalCandsHandle = event.getHandle(egCandsToken.first.ecalCands);
283  auto gsfTrksHandle = event.getHandle(egCandsToken.first.gsfTracks);
284  auto pixelSeedsHandle = event.getHandle(egCandsToken.first.pixelSeeds);
285 
286  auto egTrigObjs = std::make_unique<trigger::EgammaObjectCollection>();
287  for (size_t candNr = 0; ecalCandsHandle.isValid() && candNr < ecalCandsHandle->size(); candNr++) {
288  reco::RecoEcalCandidateRef candRef(ecalCandsHandle, candNr);
289  egTrigObjs->push_back(*candRef);
290  auto& egTrigObj = egTrigObjs->back();
291  setVars(egTrigObj, candRef, valueMapHandles);
292  setGsfTracks(egTrigObj, gsfTrksHandle);
293  setSeeds(egTrigObj, pixelSeedsHandle);
294  }
295  egTrigObjColls.emplace_back(std::move(egTrigObjs));
296  }
297 
298  edm::ESHandle<CaloGeometry> caloGeomHandle;
299  eventSetup.get<CaloGeometryRecord>().get(caloGeomHandle);
300 
301  auto filterAndStoreRecHits = [caloGeomHandle, &event, this](const auto& egTrigObjs, const auto& tokenLabels) {
302  for (const auto& tokenLabel : tokenLabels) {
303  auto handle = event.getHandle(tokenLabel.first);
304  auto recHits = filterRecHits(egTrigObjs, handle, *caloGeomHandle);
305  event.put(std::move(recHits), tokenLabel.second);
306  }
307  };
308 
309  auto storeCountRecHits = [&event](const auto& tokenLabels, const auto& thresholds, const std::string& prefixLabel) {
310  for (const auto& tokenLabel : tokenLabels) {
311  auto handle = event.getHandle(tokenLabel.first);
312  auto count = countRecHits(handle, thresholds);
313  for (size_t thresNr = 0; thresNr < thresholds.size(); thresNr++) {
314  const auto& thres = thresholds[thresNr];
315  event.put(std::move(count[thresNr]),
316  prefixLabel + tokenLabel.second + "Thres" + convertToProdNameStr(thres) + "GeV");
317  }
318  }
319  };
320 
321  auto filterAndStore = [&event, this](const auto& egTrigObjs, const auto& tokenLabels, auto filterFunc) {
322  for (const auto& tokenLabel : tokenLabels) {
323  auto handle = event.getHandle(tokenLabel.first);
324  auto filtered = (this->*filterFunc)(egTrigObjs, handle, 0.4 * 0.4);
325  event.put(std::move(filtered), tokenLabel.second);
326  }
327  };
328 
329  filterAndStoreRecHits(egTrigObjColls, tokens_.ecal);
330  filterAndStoreRecHits(egTrigObjColls, tokens_.hcal);
331  storeCountRecHits(tokens_.ecal, recHitCountThresholds_, "countEcalRecHits");
332  storeCountRecHits(tokens_.hcal, recHitCountThresholds_, "countHcalRecHits");
333  filterAndStore(egTrigObjColls, tokens_.pfClusIso, &EgammaHLTExtraProducer::filterPFClusIso);
334  filterAndStore(egTrigObjColls, tokens_.trks, &EgammaHLTExtraProducer::filterTrks);
335 
336  for (size_t collNr = 0; collNr < egTrigObjColls.size(); collNr++) {
337  event.put(std::move(egTrigObjColls[collNr]), tokens_.egCands[collNr].second);
338  }
339 }
340 
342  trigger::EgammaObject& egTrigObj,
343  const reco::RecoEcalCandidateRef& ecalCandRef,
345  std::vector<std::pair<std::string, float>> vars;
346  for (auto& valueMapHandle : valueMapHandles) {
347  auto mapIt = valueMapHandle->find(ecalCandRef);
348  if (mapIt != valueMapHandle->end()) {
349  std::string name = valueMapHandle.provenance()->moduleLabel();
350  if (!valueMapHandle.provenance()->productInstanceName().empty()) {
351  name += "_" + valueMapHandle.provenance()->productInstanceName();
352  }
353  vars.emplace_back(std::move(name), mapIt->val);
354  }
355  }
356  egTrigObj.setVars(std::move(vars));
357 }
358 
360  const reco::SuperClusterRef& scRef, const edm::Handle<reco::GsfTrackCollection>& gsfTrksHandle) {
361  if (!gsfTrksHandle.isValid()) {
362  return reco::GsfTrackRefVector();
363  }
364 
365  reco::GsfTrackRefVector gsfTrkRefs(gsfTrksHandle.id());
366  for (size_t trkNr = 0; gsfTrksHandle.isValid() && trkNr < gsfTrksHandle->size(); trkNr++) {
367  reco::GsfTrackRef trkRef(gsfTrksHandle, trkNr);
368  edm::RefToBase<TrajectorySeed> seed = trkRef->extra()->seedRef();
370  edm::RefToBase<reco::CaloCluster> caloCluster = eleSeed->caloCluster();
371  reco::SuperClusterRef scRefFromTrk = caloCluster.castTo<reco::SuperClusterRef>();
372  if (scRefFromTrk == scRef) {
373  gsfTrkRefs.push_back(trkRef);
374  }
375  }
376  return gsfTrkRefs;
377 }
378 
380  const edm::Handle<reco::GsfTrackCollection>& gsfTrksHandle) {
381  egTrigObj.setGsfTracks(matchingGsfTrks(egTrigObj.superCluster(), gsfTrksHandle));
382 }
383 
386  if (!eleSeedsHandle.isValid()) {
388  } else {
389  reco::ElectronSeedRefVector trigObjSeeds(eleSeedsHandle.id());
390 
391  for (size_t seedNr = 0; eleSeedsHandle.isValid() && seedNr < eleSeedsHandle->size(); seedNr++) {
392  reco::ElectronSeedRef eleSeed(eleSeedsHandle, seedNr);
393  edm::RefToBase<reco::CaloCluster> caloCluster = eleSeed->caloCluster();
394  reco::SuperClusterRef scRefFromSeed = caloCluster.castTo<reco::SuperClusterRef>();
395 
396  if (scRefFromSeed == egTrigObj.superCluster()) {
397  trigObjSeeds.push_back(eleSeed);
398  }
399  }
400  egTrigObj.setSeeds(std::move(trigObjSeeds));
401  }
402 }
403 
404 template <typename RecHitCollection>
405 std::unique_ptr<RecHitCollection> EgammaHLTExtraProducer::filterRecHits(
406  const std::vector<std::unique_ptr<trigger::EgammaObjectCollection>>& egTrigObjColls,
408  const CaloGeometry& geom,
409  float maxDR2) const {
410  auto filteredHits = std::make_unique<RecHitCollection>();
411  if (!recHits.isValid())
412  return filteredHits;
413 
414  std::vector<std::pair<float, float>> etaPhis;
415  for (const auto& egTrigObjs : egTrigObjColls) {
416  for (const auto& egTrigObj : *egTrigObjs) {
417  if (egTrigObj.pt() >= minPtToSaveHits_) {
418  etaPhis.push_back({egTrigObj.eta(), egTrigObj.phi()});
419  if (saveHitsPlusPi_)
420  etaPhis.push_back({egTrigObj.eta(), egTrigObj.phi() + 3.14159});
422  etaPhis.push_back({egTrigObj.eta(), egTrigObj.phi() + 3.14159 / 2.});
423  }
424  }
425  }
426  auto deltaR2Match = [&etaPhis, &maxDR2](const GlobalPoint& pos) {
427  float eta = pos.eta();
428  float phi = pos.phi();
429  for (auto& etaPhi : etaPhis) {
430  if (reco::deltaR2(eta, phi, etaPhi.first, etaPhi.second) < maxDR2)
431  return true;
432  }
433  return false;
434  };
435 
436  for (auto& hit : *recHits) {
437  const CaloSubdetectorGeometry* subDetGeom = geom.getSubdetectorGeometry(hit.id());
438  if (subDetGeom) {
439  auto cellGeom = subDetGeom->getGeometry(hit.id());
440  if (deltaR2Match(cellGeom->getPosition()))
441  filteredHits->push_back(hit);
442  } else {
443  throw cms::Exception("GeomError") << "could not get geometry for det id " << hit.id().rawId();
444  }
445  }
446  return filteredHits;
447 }
448 
449 std::unique_ptr<reco::TrackCollection> EgammaHLTExtraProducer::filterTrks(
450  const std::vector<std::unique_ptr<trigger::EgammaObjectCollection>>& egTrigObjColls,
452  float maxDR2) const {
453  auto filteredTrks = std::make_unique<reco::TrackCollection>();
454  if (!trks.isValid())
455  return filteredTrks;
456 
457  //so because each egamma object can have multiple eta/phi pairs
458  //easier to just make a temp vector and then copy that in with the +pi and +pi/2
459  std::vector<std::pair<float, float>> etaPhisTmp;
460  for (const auto& egTrigObjs : egTrigObjColls) {
461  for (const auto& egTrigObj : *egTrigObjs) {
462  if (egTrigObj.pt() >= minPtToSaveHits_) {
463  etaPhisTmp.push_back({egTrigObj.eta(), egTrigObj.phi()});
464  //also save the eta /phi of all gsf tracks with the object
465  for (const auto& gsfTrk : egTrigObj.gsfTracks()) {
466  etaPhisTmp.push_back({gsfTrk->eta(), gsfTrk->phi()});
467  }
468  }
469  }
470  }
471  std::vector<std::pair<float, float>> etaPhis;
472  for (const auto& etaPhi : etaPhisTmp) {
473  etaPhis.push_back(etaPhi);
474  if (saveHitsPlusPi_)
475  etaPhis.push_back({etaPhi.first, etaPhi.second + 3.14159});
477  etaPhis.push_back({etaPhi.first, etaPhi.second + 3.14159 / 2.});
478  }
479 
480  auto deltaR2Match = [&etaPhis, &maxDR2](float eta, float phi) {
481  for (auto& etaPhi : etaPhis) {
482  if (reco::deltaR2(eta, phi, etaPhi.first, etaPhi.second) < maxDR2)
483  return true;
484  }
485  return false;
486  };
487 
488  for (auto& trk : *trks) {
489  if (deltaR2Match(trk.eta(), trk.phi()))
490  filteredTrks->push_back(trk);
491  }
492  return filteredTrks;
493 }
494 
495 std::unique_ptr<reco::PFClusterCollection> EgammaHLTExtraProducer::filterPFClusIso(
496  const std::vector<std::unique_ptr<trigger::EgammaObjectCollection>>& egTrigObjColls,
498  float maxDR2) const {
499  auto filteredPFClus = std::make_unique<reco::PFClusterCollection>();
500  if (!pfClus.isValid())
501  return filteredPFClus;
502 
503  std::vector<std::pair<float, float>> etaPhis;
504  for (const auto& egTrigObjs : egTrigObjColls) {
505  for (const auto& egTrigObj : *egTrigObjs) {
506  if (egTrigObj.pt() >= minPtToSaveHits_) {
507  etaPhis.push_back({egTrigObj.eta(), egTrigObj.phi()});
508  if (saveHitsPlusPi_)
509  etaPhis.push_back({egTrigObj.eta(), egTrigObj.phi() + 3.14159});
511  etaPhis.push_back({egTrigObj.eta(), egTrigObj.phi() + 3.14159 / 2.});
512  }
513  }
514  }
515  auto deltaR2Match = [&etaPhis, &maxDR2](float eta, float phi) {
516  for (auto& etaPhi : etaPhis) {
517  if (reco::deltaR2(eta, phi, etaPhi.first, etaPhi.second) < maxDR2)
518  return true;
519  }
520  return false;
521  };
522 
523  for (auto& clus : *pfClus) {
524  if (deltaR2Match(clus.eta(), clus.phi()))
525  filteredPFClus->push_back(clus);
526  }
527  return filteredPFClus;
528 }
529 
RecoEcalCandidateIsolation.h
ConfigurationDescriptions.h
edm::StreamID
Definition: StreamID.h:30
EgammaHLTExtraProducer::Tokens::EgObjTokens::pixelSeeds
edm::EDGetTokenT< reco::ElectronSeedCollection > pixelSeeds
Definition: EgammaHLTExtraProducer.cc:121
alignBH_cfg.fixed
fixed
Definition: alignBH_cfg.py:54
electrons_cff.bool
bool
Definition: electrons_cff.py:366
EgammaHLTExtraProducer::Tokens::setToken
static void setToken(std::vector< edm::EDGetTokenT< T >> &tokens, edm::ConsumesCollector &cc, const edm::ParameterSet &pset, const std::string &tagname)
Definition: EgammaHLTExtraProducer.cc:138
EgammaHLTExtraProducer::Tokens::setToken
static void setToken(std::vector< std::pair< EgObjTokens, std::string >> &tokens, edm::ConsumesCollector &cc, const edm::ParameterSet &pset, const std::string &tagname)
Definition: EgammaHLTExtraProducer.cc:161
edm::ParameterSetDescription::add
ParameterDescriptionBase * add(U const &iLabel, T const &value)
Definition: ParameterSetDescription.h:95
EgammaHLTExtraProducer::tokens_
const Tokens tokens_
Definition: EgammaHLTExtraProducer.cc:178
hit::id
unsigned int id
Definition: SiStripHitEffFromCalibTree.cc:92
particleFlowZeroSuppressionECAL_cff.thresholds
thresholds
Definition: particleFlowZeroSuppressionECAL_cff.py:31
ESHandle.h
patZpeak.handle
handle
Definition: patZpeak.py:23
EgammaHLTExtraProducer::Tokens::EgObjTokens::ecalCands
edm::EDGetTokenT< reco::RecoEcalCandidateCollection > ecalCands
Definition: EgammaHLTExtraProducer.cc:119
EgammaHLTExtraProducer::minPtToSaveHits_
float minPtToSaveHits_
Definition: EgammaHLTExtraProducer.cc:180
edm::EDGetTokenT< reco::RecoEcalCandidateCollection >
CaloGeometryRecord
Definition: CaloGeometryRecord.h:30
hcal
Definition: ConfigurationDatabase.cc:13
pos
Definition: PixelAliasList.h:18
HLT_FULL_cff.InputTag
InputTag
Definition: HLT_FULL_cff.py:89285
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
edm::EDConsumerBase::consumesCollector
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
Definition: EDConsumerBase.cc:47
EgammaHLTExtraProducer::Tokens::ecal
std::vector< std::pair< edm::EDGetTokenT< EcalRecHitCollection >, std::string > > ecal
Definition: EgammaHLTExtraProducer.cc:125
edm::RefVector< GsfTrackCollection >
ecal
Definition: ElectronicsMappingGPU.h:13
edm::Handle
Definition: AssociativeIterator.h:50
rpcPointValidation_cfi.recHit
recHit
Definition: rpcPointValidation_cfi.py:7
EcalRecHitCollections.h
ElectronSeedFwd.h
edm::Ref
Definition: AssociativeIterator.h:58
trigger::EgammaObject::setVars
void setVars(std::vector< std::pair< std::string, float >> vars)
Definition: EgammaObject.cc:59
fileCollector.seed
seed
Definition: fileCollector.py:127
MakerMacros.h
CaloGeometry
Definition: CaloGeometry.h:21
Track.h
EgammaHLTExtraProducer::Tokens::egCands
std::vector< std::pair< EgObjTokens, std::string > > egCands
Definition: EgammaHLTExtraProducer.cc:123
EgammaHLTExtraProducer::Tokens::trks
std::vector< std::pair< edm::EDGetTokenT< reco::TrackCollection >, std::string > > trks
Definition: EgammaHLTExtraProducer.cc:127
edm::EventSetup::get
T get() const
Definition: EventSetup.h:87
TrackFwd.h
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:57
vars
vars
Definition: DeepTauId.cc:164
EgammaHLTExtraProducer::setSeeds
static void setSeeds(trigger::EgammaObject &egTrigObj, edm::Handle< reco::ElectronSeedCollection > &eleSeedsHandle)
Definition: EgammaHLTExtraProducer.cc:384
EgammaHLTExtraProducer::saveHitsPlusPi_
bool saveHitsPlusPi_
Definition: EgammaHLTExtraProducer.cc:181
PVValHelper::eta
Definition: PVValidationHelpers.h:70
EgammaHLTExtraProducer::saveHitsPlusHalfPi_
bool saveHitsPlusHalfPi_
Definition: EgammaHLTExtraProducer.cc:182
EgammaHLTExtraProducer::Tokens::hcal
std::vector< std::pair< edm::EDGetTokenT< HBHERecHitCollection >, std::string > > hcal
Definition: EgammaHLTExtraProducer.cc:126
edm::ESHandle< CaloGeometry >
EgammaHLTExtraProducer::filterRecHits
std::unique_ptr< RecHitCollection > filterRecHits(const std::vector< std::unique_ptr< trigger::EgammaObjectCollection >> &egTrigObjs, const edm::Handle< RecHitCollection > &recHits, const CaloGeometry &geom, float maxDR2=0.4 *0.4) const
Definition: EgammaHLTExtraProducer.cc:405
PFCluster.h
relativeConstraints.geom
geom
Definition: relativeConstraints.py:72
trigger::EgammaObject
Definition: EgammaObject.h:17
submitPVResolutionJobs.count
count
Definition: submitPVResolutionJobs.py:352
HLTMuonOfflineAnalyzer_cfi.inputTags
inputTags
All input tags are specified in this pset for convenience.
Definition: HLTMuonOfflineAnalyzer_cfi.py:82
EgammaHLTExtraProducer::Tokens::EgObjTokens::gsfTracks
edm::EDGetTokenT< reco::GsfTrackCollection > gsfTracks
Definition: EgammaHLTExtraProducer.cc:120
Point3DBase< float, GlobalTag >
ParameterSetDescription.h
edm::global::EDProducer
Definition: EDProducer.h:32
CaloGeometryRecord.h
edm::ConfigurationDescriptions
Definition: ConfigurationDescriptions.h:28
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
EgammaHLTExtraProducer::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition: EgammaHLTExtraProducer.cc:225
FastTrackerRecHitMaskProducer_cfi.recHits
recHits
Definition: FastTrackerRecHitMaskProducer_cfi.py:8
CaloSubdetectorGeometry.h
common_cff.precision
precision
Definition: common_cff.py:44
edm::ParameterSet
Definition: ParameterSet.h:47
EgammaHLTExtraProducer
Definition: EgammaHLTExtraProducer.cc:78
reco::GsfTrackRefVector
edm::RefVector< GsfTrackCollection > GsfTrackRefVector
vector of reference to GsfTrack in the same collection
Definition: GsfTrackFwd.h:17
Event.h
deltaR.h
reco::deltaR2
constexpr auto deltaR2(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
Definition: deltaR.h:16
EgammaHLTExtraProducer::filterTrks
std::unique_ptr< reco::TrackCollection > filterTrks(const std::vector< std::unique_ptr< trigger::EgammaObjectCollection >> &egTrigObjs, const edm::Handle< reco::TrackCollection > &trks, float maxDR2=0.4 *0.4) const
Definition: EgammaHLTExtraProducer.cc:449
edmPickEvents.event
event
Definition: edmPickEvents.py:273
EgammaHLTExtraProducer::Tokens
Definition: EgammaHLTExtraProducer.cc:116
PFClusterFwd.h
GsfTrack.h
filtered
static const TGPicture * filtered(bool iBackgroundIsBlack)
Definition: FWCollectionSummaryWidget.cc:100
trackerHitRTTI::vector
Definition: trackerHitRTTI.h:21
EgammaHLTExtraProducer::setVars
static void setVars(trigger::EgammaObject &egTrigObj, const reco::RecoEcalCandidateRef &ecalCandRef, const std::vector< edm::Handle< reco::RecoEcalCandidateIsolationMap >> &valueMapHandles)
Definition: EgammaHLTExtraProducer.cc:341
EgammaHLTExtraProducer::Tokens::EgObjTokens
Definition: EgammaHLTExtraProducer.cc:118
EgammaObjectFwd.h
edm::EventSetup
Definition: EventSetup.h:58
edm::RefToBase::castTo
REF castTo() const
Definition: RefToBase.h:257
trigger::EgammaObject::setGsfTracks
void setGsfTracks(reco::GsfTrackRefVector trks)
Definition: EgammaObject.h:30
EgammaHLTExtraProducer::matchingGsfTrks
static reco::GsfTrackRefVector matchingGsfTrks(const reco::SuperClusterRef &scRef, const edm::Handle< reco::GsfTrackCollection > &gsfTrksHandle)
Definition: EgammaHLTExtraProducer.cc:359
get
#define get
cc
createPayload.tagname
tagname
Definition: createPayload.py:183
EgammaObject.h
EgammaHLTExtraProducer::Tokens::setToken
static void setToken(edm::EDGetTokenT< T > &token, edm::ConsumesCollector &cc, const edm::ParameterSet &pset, const std::string &tagname)
Definition: EgammaHLTExtraProducer.cc:131
DDAxes::phi
trigger::EgammaObject::setSeeds
void setSeeds(reco::ElectronSeedRefVector seeds)
Definition: EgammaObject.cc:11
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
heppy_batch.val
val
Definition: heppy_batch.py:351
eostools.move
def move(src, dest)
Definition: eostools.py:511
std
Definition: JetResolutionObject.h:76
RecoEcalCandidate.h
GsfTrackFwd.h
SuperClusterFwd.h
GeomDetEnumerators::subDetGeom
constexpr SubDetector subDetGeom[21]
Definition: GeomDetEnumerators.h:40
T
long double T
Definition: Basic3DVectorLD.h:48
SuperCluster.h
EgammaHLTExtraProducer::Tokens::setToken
static void setToken(std::vector< std::pair< edm::EDGetTokenT< T >, std::string >> &tokens, edm::ConsumesCollector &cc, const edm::ParameterSet &pset, const std::string &tagname)
Definition: EgammaHLTExtraProducer.cc:149
Exception
Definition: hltDiff.cc:245
CaloGeometry.h
EgammaHLTExtraProducer::filterPFClusIso
std::unique_ptr< reco::PFClusterCollection > filterPFClusIso(const std::vector< std::unique_ptr< trigger::EgammaObjectCollection >> &egTrigObjs, const edm::Handle< reco::PFClusterCollection > &pfClus, float maxDR2=0.4 *0.4) const
Definition: EgammaHLTExtraProducer.cc:495
dqmiodumpmetadata.counts
counts
Definition: dqmiodumpmetadata.py:25
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
EventSetup.h
CaloSubdetectorGeometry
Definition: CaloSubdetectorGeometry.h:22
edm::RefToBase< TrajectorySeed >
HcalRecHitCollections.h
RecoEcalCandidateFwd.h
EgammaHLTExtraProducer::Tokens::Tokens
Tokens(const edm::ParameterSet &pset, edm::ConsumesCollector &&cc)
Definition: EgammaHLTExtraProducer.cc:186
hltEgammaHLTExtra_cfi.trks
trks
Definition: hltEgammaHLTExtra_cfi.py:43
ConsumesCollector.h
ParameterSet.h
EgammaHLTExtraProducer::Tokens::pfClusIso
std::vector< std::pair< edm::EDGetTokenT< reco::PFClusterCollection >, std::string > > pfClusIso
Definition: EgammaHLTExtraProducer.cc:128
EDProducer.h
EgammaHLTExtraProducer::setGsfTracks
static void setGsfTracks(trigger::EgammaObject &egTrigObj, const edm::Handle< reco::GsfTrackCollection > &gsfTrksHandle)
Definition: EgammaHLTExtraProducer.cc:379
EgammaHLTExtraProducer::~EgammaHLTExtraProducer
~EgammaHLTExtraProducer() override
Definition: EgammaHLTExtraProducer.cc:81
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
EgammaHLTExtraProducer::EgammaHLTExtraProducer
EgammaHLTExtraProducer(const edm::ParameterSet &pset)
Definition: EgammaHLTExtraProducer.cc:194
event
Definition: event.py:1
edm::Event
Definition: Event.h:73
trigger::EgammaObject::superCluster
const reco::SuperClusterRef & superCluster() const
Definition: EgammaObject.h:25
EgammaHLTExtraProducer::recHitCountThresholds_
std::vector< double > recHitCountThresholds_
Definition: EgammaHLTExtraProducer.cc:183
edm::HandleBase::id
ProductID id() const
Definition: HandleBase.cc:29
edm::InputTag
Definition: InputTag.h:15
EgammaHLTExtraProducer::produce
void produce(edm::StreamID streamID, edm::Event &event, const edm::EventSetup &eventSetup) const override
Definition: EgammaHLTExtraProducer.cc:274
edm::ConsumesCollector
Definition: ConsumesCollector.h:45
label
const char * label
Definition: PFTauDecayModeTools.cc:11
hit
Definition: SiStripHitEffFromCalibTree.cc:88
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27
ElectronSeed.h
unpackBuffers-CaloStage2.token
token
Definition: unpackBuffers-CaloStage2.py:316