CMS 3D CMS Logo

ConversionTrackCandidateProducer.cc
Go to the documentation of this file.
1 
48 #include <vector>
49 
51 public:
53 
54  void beginRun(edm::Run const&, edm::EventSetup const& es) final;
55  void produce(edm::Event& evt, const edm::EventSetup& es) override;
56 
57  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
58 
59 private:
61  void setEventSetup(const edm::EventSetup& es);
62 
65 
68 
77 
83 
85  double maxHOverE_;
86  double minSCEt_;
87  double isoConeR_;
89  double isoEtaSlice_;
90  double isoEtMin_;
91  double isoEMin_;
94 
95  std::vector<int> flagsexclEB_;
96  std::vector<int> flagsexclEE_;
97  std::vector<int> severitiesexclEB_;
98  std::vector<int> severitiesexclEE_;
99 
102 
104 
105  std::unique_ptr<BaseCkfTrajectoryBuilder> theTrajectoryBuilder_;
106 
111 
112  std::vector<edm::Ptr<reco::CaloCluster>> caloPtrVecOutIn_;
113  std::vector<edm::Ptr<reco::CaloCluster>> caloPtrVecInOut_;
114 
115  std::vector<edm::Ref<reco::SuperClusterCollection>> vecOfSCRefForOutIn;
116  std::vector<edm::Ref<reco::SuperClusterCollection>> vecOfSCRefForInOut;
117 
118  std::unique_ptr<ElectronHcalHelper> hcalHelper_;
119 
122  HcalPFCuts const* hcalCuts = nullptr;
123 
124  void buildCollections(bool detector,
125  const edm::Handle<edm::View<reco::CaloCluster>>& scHandle,
126  const edm::Handle<edm::View<reco::CaloCluster>>& bcHandle,
127  const EcalRecHitCollection& ecalRecHits,
128  const EcalSeverityLevelAlgo* sevLev,
129  ElectronHcalHelper const& hcalHelper,
130  TrackCandidateCollection& outInTracks,
131  TrackCandidateCollection& inOutTracks,
134 };
135 
138 
139 namespace {
140  auto createBaseCkfTrajectoryBuilder(const edm::ParameterSet& pset, edm::ConsumesCollector&& iC) {
141  return BaseCkfTrajectoryBuilderFactory::get()->create(pset.getParameter<std::string>("ComponentType"), pset, iC);
142  }
143 } // namespace
144 
146  : bcBarrelCollection_{consumes(config.getParameter<edm::InputTag>("bcBarrelCollection"))},
147  bcEndcapCollection_{consumes(config.getParameter<edm::InputTag>("bcEndcapCollection"))},
148  scHybridBarrelProducer_{consumes(config.getParameter<edm::InputTag>("scHybridBarrelProducer"))},
149  scIslandEndcapProducer_{consumes(config.getParameter<edm::InputTag>("scIslandEndcapProducer"))},
150 
151  hbheRecHits_{consumes(config.getParameter<edm::InputTag>("hbheRecHits"))},
152  barrelecalCollection_{consumes(config.getParameter<edm::InputTag>("barrelEcalRecHitCollection"))},
153  endcapecalCollection_{consumes(config.getParameter<edm::InputTag>("endcapEcalRecHitCollection"))},
154  measurementTrkEvtToken_{consumes(edm::InputTag("MeasurementTrackerEvent"))},
155 
156  navToken_(esConsumes<edm::Transition::BeginRun>(edm::ESInputTag("", "SimpleNavigationSchool"))),
157  theCaloGeomToken_(esConsumes()),
158  sevlvToken_(esConsumes()),
159  ecalPFRechitThresholdsToken_{esConsumes()},
160  theTrajectoryBuilder_(createBaseCkfTrajectoryBuilder(
161  config.getParameter<edm::ParameterSet>("TrajectoryBuilderPSet"), consumesCollector())),
162  outInSeedFinder_{config, consumesCollector()},
163  outInTrackFinder_{config, theTrajectoryBuilder_.get(), consumesCollector()},
164  inOutSeedFinder_{config, consumesCollector()},
165  inOutTrackFinder_{config, theTrajectoryBuilder_.get(), consumesCollector()} {
166  OutInTrackCandidateCollection_ = config.getParameter<std::string>("outInTrackCandidateCollection");
167  InOutTrackCandidateCollection_ = config.getParameter<std::string>("inOutTrackCandidateCollection");
168 
169  OutInTrackSCAssociationCollection_ = config.getParameter<std::string>("outInTrackCandidateSCAssociationCollection");
170  InOutTrackSCAssociationCollection_ = config.getParameter<std::string>("inOutTrackCandidateSCAssociationCollection");
171 
172  cutsFromDB = config.getParameter<bool>("usePFThresholdsFromDB");
173  if (cutsFromDB) {
174  hcalCutsToken_ = esConsumes<HcalPFCuts, HcalPFCutsRcd, edm::Transition::BeginRun>(edm::ESInputTag("", "withTopo"));
175  }
176  hOverEConeSize_ = config.getParameter<double>("hOverEConeSize");
177  maxHOverE_ = config.getParameter<double>("maxHOverE");
178  minSCEt_ = config.getParameter<double>("minSCEt");
179  isoConeR_ = config.getParameter<double>("isoConeR");
180  isoInnerConeR_ = config.getParameter<double>("isoInnerConeR");
181  isoEtaSlice_ = config.getParameter<double>("isoEtaSlice");
182  isoEtMin_ = config.getParameter<double>("isoEtMin");
183  isoEMin_ = config.getParameter<double>("isoEMin");
184  vetoClusteredHits_ = config.getParameter<bool>("vetoClusteredHits");
185  useNumXtals_ = config.getParameter<bool>("useNumXstals");
186  ecalIsoCut_offset_ = config.getParameter<double>("ecalIsoCut_offset");
187  ecalIsoCut_slope_ = config.getParameter<double>("ecalIsoCut_slope");
188 
189  //Flags and Severities to be excluded from photon calculations
190  auto const& flagnamesEB = config.getParameter<std::vector<std::string>>("RecHitFlagToBeExcludedEB");
191  auto const& flagnamesEE = config.getParameter<std::vector<std::string>>("RecHitFlagToBeExcludedEE");
192 
193  flagsexclEB_ = StringToEnumValue<EcalRecHit::Flags>(flagnamesEB);
194  flagsexclEE_ = StringToEnumValue<EcalRecHit::Flags>(flagnamesEE);
195 
196  auto const& severitynamesEB = config.getParameter<std::vector<std::string>>("RecHitSeverityToBeExcludedEB");
197  auto const& severitynamesEE = config.getParameter<std::vector<std::string>>("RecHitSeverityToBeExcludedEE");
198 
199  severitiesexclEB_ = StringToEnumValue<EcalSeverityLevel::SeverityLevel>(severitynamesEB);
200  severitiesexclEE_ = StringToEnumValue<EcalSeverityLevel::SeverityLevel>(severitynamesEE);
201 
202  // Register the product
203  produces<TrackCandidateCollection>(OutInTrackCandidateCollection_);
204  produces<TrackCandidateCollection>(InOutTrackCandidateCollection_);
205 
206  produces<reco::TrackCandidateCaloClusterPtrAssociation>(OutInTrackSCAssociationCollection_);
207  produces<reco::TrackCandidateCaloClusterPtrAssociation>(InOutTrackSCAssociationCollection_);
208 
210  cfgCone.hOverEConeSize = hOverEConeSize_;
211  if (cfgCone.hOverEConeSize > 0) {
212  cfgCone.onlyBehindCluster = false;
213  cfgCone.checkHcalStatus = false;
214 
215  cfgCone.hbheRecHits = hbheRecHits_;
216 
217  cfgCone.eThresHB = config.getParameter<EgammaHcalIsolation::arrayHB>("recHitEThresholdHB");
218  cfgCone.maxSeverityHB = config.getParameter<int>("maxHcalRecHitSeverity");
219  cfgCone.eThresHE = config.getParameter<EgammaHcalIsolation::arrayHE>("recHitEThresholdHE");
220  cfgCone.maxSeverityHE = cfgCone.maxSeverityHB;
221  }
222 
223  hcalHelper_ = std::make_unique<ElectronHcalHelper>(cfgCone, consumesCollector());
224 }
225 
227  outInSeedFinder_.setEventSetup(theEventSetup);
228  inOutSeedFinder_.setEventSetup(theEventSetup);
229  outInTrackFinder_.setEventSetup(theEventSetup);
230  inOutTrackFinder_.setEventSetup(theEventSetup);
231 }
232 
234  const NavigationSchool* navigation = &theEventSetup.getData(navToken_);
235  theTrajectoryBuilder_->setNavigationSchool(navigation);
238 
239  if (cutsFromDB) {
240  hcalCuts = &theEventSetup.getData(hcalCutsToken_);
241  }
242 }
243 
245  // get the trajectory builder and initialize it with the data
246  theTrajectoryBuilder_->setEvent(theEvent, theEventSetup, &theEvent.get(measurementTrkEvtToken_));
247 
248  // this need to be done after the initialization of the TrajectoryBuilder!
249  setEventSetup(theEventSetup);
250 
251  outInSeedFinder_.setEvent(theEvent);
252  inOutSeedFinder_.setEvent(theEvent);
253 
254  //
255  // create empty output collections
256  //
257  // Out In Track Candidates
258  auto outInTrackCandidate_p = std::make_unique<TrackCandidateCollection>();
259  // In Out Track Candidates
260  auto inOutTrackCandidate_p = std::make_unique<TrackCandidateCollection>();
261  // Track Candidate calo Cluster Association
262  auto outInAssoc_p = std::make_unique<reco::TrackCandidateCaloClusterPtrAssociation>();
263  auto inOutAssoc_p = std::make_unique<reco::TrackCandidateCaloClusterPtrAssociation>();
264 
265  // Get the basic cluster collection in the Barrel
266  bool validBarrelBCHandle = true;
267  auto bcBarrelHandle = theEvent.getHandle(bcBarrelCollection_);
268  if (!bcBarrelHandle.isValid()) {
269  edm::LogError("ConversionTrackCandidateProducer") << "Error! Can't get the Barrel Basic Clusters!";
270  validBarrelBCHandle = false;
271  }
272 
273  // Get the basic cluster collection in the Endcap
274  bool validEndcapBCHandle = true;
275  auto bcEndcapHandle = theEvent.getHandle(bcEndcapCollection_);
276  if (!bcEndcapHandle.isValid()) {
277  edm::LogError("CoonversionTrackCandidateProducer") << "Error! Can't get the Endcap Basic Clusters";
278  validEndcapBCHandle = false;
279  }
280 
281  // Get the Super Cluster collection in the Barrel
282  bool validBarrelSCHandle = true;
283  auto scBarrelHandle = theEvent.getHandle(scHybridBarrelProducer_);
284  if (!scBarrelHandle.isValid()) {
285  edm::LogError("CoonversionTrackCandidateProducer") << "Error! Can't get the barrel superclusters!";
286  validBarrelSCHandle = false;
287  }
288 
289  // Get the Super Cluster collection in the Endcap
290  bool validEndcapSCHandle = true;
291  auto scEndcapHandle = theEvent.getHandle(scIslandEndcapProducer_);
292  if (!scEndcapHandle.isValid()) {
293  edm::LogError("CoonversionTrackCandidateProducer") << "Error! Can't get the endcap superclusters!";
294  validEndcapSCHandle = false;
295  }
296 
298 
299  // get the geometry from the event setup:
300  theCaloGeom_ = theEventSetup.getHandle(theCaloGeomToken_);
301 
302  hcalHelper_->beginEvent(theEvent, theEventSetup);
303 
304  auto const& ecalhitsCollEB = theEvent.get(barrelecalCollection_);
305  auto const& ecalhitsCollEE = theEvent.get(endcapecalCollection_);
306 
307  const EcalSeverityLevelAlgo* sevLevel = &theEventSetup.getData(sevlvToken_);
308 
309  caloPtrVecOutIn_.clear();
310  caloPtrVecInOut_.clear();
311 
312  bool isBarrel = true;
313  if (validBarrelBCHandle && validBarrelSCHandle)
315  scBarrelHandle,
316  bcBarrelHandle,
317  ecalhitsCollEB,
318  sevLevel,
319  *hcalHelper_,
320  *outInTrackCandidate_p,
321  *inOutTrackCandidate_p,
324 
325  if (validEndcapBCHandle && validEndcapSCHandle) {
326  isBarrel = false;
328  scEndcapHandle,
329  bcEndcapHandle,
330  ecalhitsCollEE,
331  sevLevel,
332  *hcalHelper_,
333  *outInTrackCandidate_p,
334  *inOutTrackCandidate_p,
337  }
338 
339  // std::cout << " ConversionTrackCandidateProducer caloPtrVecOutIn_ size " << caloPtrVecOutIn_.size() << " caloPtrVecInOut_ size " << caloPtrVecInOut_.size() << "\n";
340 
341  // put all products in the event
342  // Barrel
343  //std::cout << "ConversionTrackCandidateProducer Putting in the event " << (*outInTrackCandidate_p).size() << " Out In track Candidates " << "\n";
344  auto const refprodOutInTrackC = theEvent.put(std::move(outInTrackCandidate_p), OutInTrackCandidateCollection_);
345  //std::cout << "ConversionTrackCandidateProducer refprodOutInTrackC size " << (*(refprodOutInTrackC.product())).size() << "\n";
346  //
347  //std::cout << "ConversionTrackCandidateProducer Putting in the event " << (*inOutTrackCandidate_p).size() << " In Out track Candidates " << "\n";
348  auto const refprodInOutTrackC = theEvent.put(std::move(inOutTrackCandidate_p), InOutTrackCandidateCollection_);
349  //std::cout << "ConversionTrackCandidateProducer refprodInOutTrackC size " << (*(refprodInOutTrackC.product())).size() << "\n";
350 
351  edm::ValueMap<reco::CaloClusterPtr>::Filler fillerOI(*outInAssoc_p);
352  fillerOI.insert(refprodOutInTrackC, caloPtrVecOutIn_.begin(), caloPtrVecOutIn_.end());
353  fillerOI.fill();
354  edm::ValueMap<reco::CaloClusterPtr>::Filler fillerIO(*inOutAssoc_p);
355  fillerIO.insert(refprodInOutTrackC, caloPtrVecInOut_.begin(), caloPtrVecInOut_.end());
356  fillerIO.fill();
357 
358  // std::cout << "ConversionTrackCandidateProducer Putting in the event OutIn track - SC association: size " << (*outInAssoc_p).size() << "\n";
359  theEvent.put(std::move(outInAssoc_p), OutInTrackSCAssociationCollection_);
360 
361  // std::cout << "ConversionTrackCandidateProducer Putting in the event InOut track - SC association: size " << (*inOutAssoc_p).size() << "\n";
362  theEvent.put(std::move(inOutAssoc_p), InOutTrackSCAssociationCollection_);
363 
366 }
367 
369  const edm::Handle<edm::View<reco::CaloCluster>>& scHandle,
370  const edm::Handle<edm::View<reco::CaloCluster>>& bcHandle,
371  EcalRecHitCollection const& ecalRecHits,
372  const EcalSeverityLevelAlgo* sevLevel,
373  ElectronHcalHelper const& hcalHelper,
374  TrackCandidateCollection& outInTrackCandidates,
375  TrackCandidateCollection& inOutTrackCandidates,
378 
379 {
380  // Loop over SC in the barrel and reconstruct converted photons
381  for (auto const& aClus : scHandle->ptrs()) {
382  // preselection based in Et and H/E cut.
383  if (aClus->energy() / cosh(aClus->eta()) <= minSCEt_)
384  continue;
385  if (aClus->eta() > 1.479 && aClus->eta() < 1.556)
386  continue;
387 
388  const reco::CaloCluster* pClus = &(*aClus);
389  const reco::SuperCluster* sc = dynamic_cast<const reco::SuperCluster*>(pClus);
390  double scEt = sc->energy() / cosh(sc->eta());
391  double HoE = hcalHelper.hcalESum(*sc, 0, hcalCuts) / sc->energy();
392  if (HoE >= maxHOverE_)
393  continue;
394 
398 
399  ecalIso.setVetoClustered(vetoClusteredHits_);
400  ecalIso.setUseNumCrystals(useNumXtals_);
401  if (isBarrel) {
402  ecalIso.doFlagChecks(flagsexclEB_);
403  ecalIso.doSeverityChecks(&ecalRecHits, severitiesexclEB_);
404  } else {
405  ecalIso.doFlagChecks(flagsexclEE_);
406  ecalIso.doSeverityChecks(&ecalRecHits, severitiesexclEE_);
407  }
408 
409  double ecalIsolation = ecalIso.getEtSum(sc, *thresholds);
411  continue;
412 
413  // Now launch the seed finding
415  GlobalPoint(pClus->position().x(), pClus->position().y(), pClus->position().z()));
416  outInSeedFinder_.makeSeeds(bcHandle);
417 
418  std::vector<Trajectory> theOutInTracks = outInTrackFinder_.tracks(outInSeedFinder_.seeds(), outInTrackCandidates);
419 
421  GlobalPoint(pClus->position().x(), pClus->position().y(), pClus->position().z()));
422  inOutSeedFinder_.setTracks(theOutInTracks);
423  inOutSeedFinder_.makeSeeds(bcHandle);
424 
425  std::vector<Trajectory> theInOutTracks = inOutTrackFinder_.tracks(inOutSeedFinder_.seeds(), inOutTrackCandidates);
426 
427  // Debug
428  // std::cout << "ConversionTrackCandidateProducer theOutInTracks.size() " << theOutInTracks.size() << " theInOutTracks.size() " << theInOutTracks.size() << " Event pointer to out in track size barrel " << outInTrackCandidates.size() << " in out track size " << inOutTrackCandidates.size() << "\n";
429 
431  for (auto it = theOutInTracks.begin(); it != theOutInTracks.end(); ++it) {
432  vecRecOI.push_back(aClus);
433  // std::cout << "ConversionTrackCandidateProducer Barrel OutIn Tracks Number of hits " << (*it).foundHits() << "\n";
434  }
435 
436  for (auto it = theInOutTracks.begin(); it != theInOutTracks.end(); ++it) {
437  vecRecIO.push_back(aClus);
438  // std::cout << "ConversionTrackCandidateProducer Barrel InOut Tracks Number of hits " << (*it).foundHits() << "\n";
439  }
440  }
441 }
442 
444  // conversionTrackCandidates
446 
447  desc.add<edm::InputTag>("bcBarrelCollection", {"particleFlowSuperClusterECAL", "particleFlowBasicClusterECALBarrel"});
448  desc.add<edm::InputTag>("bcEndcapCollection", {"particleFlowSuperClusterECAL", "particleFlowBasicClusterECALEndcap"});
449  desc.add<edm::InputTag>("scHybridBarrelProducer",
450  {"particleFlowSuperClusterECAL", "particleFlowSuperClusterECALBarrel"});
451  desc.add<edm::InputTag>("scIslandEndcapProducer",
452  {"particleFlowSuperClusterECAL", "particleFlowSuperClusterECALEndcapWithPreshower"});
453 
454  desc.add<std::string>("outInTrackCandidateSCAssociationCollection", "outInTrackCandidateSCAssociationCollection");
455  desc.add<std::string>("inOutTrackCandidateSCAssociationCollection", "inOutTrackCandidateSCAssociationCollection");
456  desc.add<std::string>("outInTrackCandidateCollection", "outInTracksFromConversions");
457  desc.add<std::string>("inOutTrackCandidateCollection", "inOutTracksFromConversions");
458 
459  desc.add<edm::InputTag>("barrelEcalRecHitCollection", {"ecalRecHit", "EcalRecHitsEB"});
460  desc.add<edm::InputTag>("endcapEcalRecHitCollection", {"ecalRecHit", "EcalRecHitsEE"});
461  desc.add<std::string>("MeasurementTrackerName", "");
462  desc.add<std::string>("OutInRedundantSeedCleaner", "CachingSeedCleanerBySharedInput");
463  desc.add<std::string>("InOutRedundantSeedCleaner", "CachingSeedCleanerBySharedInput");
464  desc.add<bool>("useHitsSplitting", false);
465  desc.add<int>("maxNumOfSeedsOutIn", 50);
466  desc.add<int>("maxNumOfSeedsInOut", 50);
467  desc.add<double>("bcEtCut", 1.5);
468  desc.add<double>("bcECut", 1.5);
469  desc.add<bool>("useEtCut", true);
470 
471  desc.add<edm::InputTag>("hbheRecHits", {"hbhereco"});
472  desc.add<std::vector<double>>("recHitEThresholdHB", {0., 0., 0., 0.});
473  desc.add<std::vector<double>>("recHitEThresholdHE", {0., 0., 0., 0., 0., 0., 0.});
474  desc.add<bool>("usePFThresholdsFromDB", false);
475  desc.add<int>("maxHcalRecHitSeverity", 999999);
476 
477  desc.add<double>("minSCEt", 20.0);
478  desc.add<double>("hOverEConeSize", 0.15);
479  desc.add<double>("maxHOverE", 0.15);
480  desc.add<double>("isoInnerConeR", 3.5);
481  desc.add<double>("isoConeR", 0.4);
482  desc.add<double>("isoEtaSlice", 2.5);
483  desc.add<double>("isoEtMin", 0.0);
484  desc.add<double>("isoEMin", 0.08);
485  desc.add<bool>("vetoClusteredHits", false);
486  desc.add<bool>("useNumXstals", true);
487  desc.add<double>("ecalIsoCut_offset", 999999999); // alternative value: 4.2
488  desc.add<double>("ecalIsoCut_slope", 0.0); // alternative value: 0.003
489 
490  desc.add<std::vector<std::string>>("RecHitFlagToBeExcludedEB", {});
491  desc.add<std::vector<std::string>>("RecHitSeverityToBeExcludedEB", {});
492  desc.add<std::vector<std::string>>("RecHitFlagToBeExcludedEE", {});
493  desc.add<std::vector<std::string>>("RecHitSeverityToBeExcludedEE", {});
494 
495  desc.add<double>("fractionShared", 0.5);
496  desc.add<std::string>("TrajectoryBuilder", "TrajectoryBuilderForConversions");
497  {
499  psd0.setUnknown();
500  desc.add<edm::ParameterSetDescription>("TrajectoryBuilderPSet", psd0);
501  }
502  {
504  psd0.add<std::string>("propagatorAlongTISE", "alongMomElePropagator");
505  psd0.add<int>("numberMeasurementsForFit", 4);
506  psd0.add<std::string>("propagatorOppositeTISE", "oppositeToMomElePropagator");
507  desc.add<edm::ParameterSetDescription>("TransientInitialStateEstimatorParameters", psd0);
508  }
509  desc.add<bool>("allowSharedFirstHit", true);
510  desc.add<double>("ValidHitBonus", 5.0);
511  desc.add<double>("MissingHitPenalty", 20.0);
512 
513  descriptions.add("conversionTrackCandidatesDefault", desc);
514  // or use the following to generate the label from the module's C++ type
515  //descriptions.addWithDefaultLabel(desc);
516 }
std::vector< Trajectory > tracks(const TrajectorySeedCollection &seeds, TrackCandidateCollection &candidates) const override
const math::XYZPoint & position() const
cluster centroid position
Definition: CaloCluster.h:153
ESGetTokenH3DDVariant esConsumes(std::string const &Record, edm::ConsumesCollector &)
Definition: DeDxTools.cc:283
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:133
void setTracks(std::vector< Trajectory > const &in)
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
Definition: EventSetup.h:119
bool get(ProductID const &oid, Handle< PROD > &result) const
Definition: Event.h:344
edm::ESGetToken< HcalPFCuts, HcalPFCutsRcd > hcalCutsToken_
edm::EDGetTokenT< edm::View< reco::CaloCluster > > scIslandEndcapProducer_
const edm::ESGetToken< NavigationSchool, NavigationSchoolRecord > navToken_
std::vector< TrackCandidate > TrackCandidateCollection
std::vector< edm::Ref< reco::SuperClusterCollection > > vecOfSCRefForOutIn
void insert(const H &h, I begin, I end)
Definition: ValueMap.h:53
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
edm::EDGetTokenT< EcalRecHitCollection > endcapecalCollection_
Definition: config.py:1
std::vector< edm::Ptr< reco::CaloCluster > > caloPtrVecInOut_
Log< level::Error, false > LogError
edm::EDGetTokenT< MeasurementTrackerEvent > measurementTrkEvtToken_
std::unique_ptr< BaseCkfTrajectoryBuilder > theTrajectoryBuilder_
void setNavigationSchool(const NavigationSchool *navigation)
void makeSeeds(const edm::Handle< edm::View< reco::CaloCluster > > &allBc) override
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
const edm::ESGetToken< EcalPFRecHitThresholds, EcalPFRecHitThresholdsRcd > ecalPFRechitThresholdsToken_
void makeSeeds(const edm::Handle< edm::View< reco::CaloCluster > > &allBc) override
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
ParameterDescriptionBase * add(U const &iLabel, T const &value)
ConversionTrackCandidateProducer(const edm::ParameterSet &ps)
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:130
void buildCollections(bool detector, const edm::Handle< edm::View< reco::CaloCluster >> &scHandle, const edm::Handle< edm::View< reco::CaloCluster >> &bcHandle, const EcalRecHitCollection &ecalRecHits, const EcalSeverityLevelAlgo *sevLev, ElectronHcalHelper const &hcalHelper, TrackCandidateCollection &outInTracks, TrackCandidateCollection &inOutTracks, std::vector< edm::Ptr< reco::CaloCluster >> &vecRecOI, std::vector< edm::Ptr< reco::CaloCluster >> &vecRecIO)
std::unique_ptr< ElectronHcalHelper > hcalHelper_
double energy() const
cluster energy
Definition: CaloCluster.h:148
virtual void setCandidate(float e, GlobalPoint pos)
std::vector< edm::Ref< reco::SuperClusterCollection > > vecOfSCRefForInOut
std::vector< edm::Ptr< reco::CaloCluster > > caloPtrVecOutIn_
edm::EDGetTokenT< edm::View< reco::CaloCluster > > scHybridBarrelProducer_
const edm::ESGetToken< CaloGeometry, CaloGeometryRecord > theCaloGeomToken_
TrajectorySeedCollection & seeds()
void setEvent(const edm::Event &e)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
void setEventSetup(const edm::EventSetup &es)
Initialize EventSetup objects at each event.
void setEventSetup(const edm::EventSetup &es)
Initialize EventSetup objects at each event.
Handle< PROD > getHandle(EDGetTokenT< PROD > token) const
Definition: Event.h:552
edm::EDGetTokenT< edm::View< reco::CaloCluster > > bcBarrelCollection_
edm::EDGetTokenT< edm::View< reco::CaloCluster > > bcEndcapCollection_
edm::EDGetTokenT< HBHERecHitCollection > hbheRecHits_
dictionary config
Read in AllInOne config in JSON format.
Definition: DiMuonV_cfg.py:29
double eta() const
pseudorapidity of cluster centroid
Definition: CaloCluster.h:180
void produce(edm::Event &evt, const edm::EventSetup &es) override
void beginRun(edm::Run const &, edm::EventSetup const &es) final
#define get
double hcalESum(const reco::SuperCluster &, int depth, const HcalPFCuts *hcalCuts) const
std::array< double, 4 > arrayHB
std::vector< Trajectory > tracks(const TrajectorySeedCollection &seeds, TrackCandidateCollection &candidate) const override
edm::EDGetTokenT< EcalRecHitCollection > barrelecalCollection_
void setEventSetup(const edm::EventSetup &es)
Initialize EventSetup objects at each event.
const edm::ESGetToken< EcalSeverityLevelAlgo, EcalSeverityLevelAlgoRcd > sevlvToken_
def move(src, dest)
Definition: eostools.py:511
Definition: Run.h:45
std::array< double, 7 > arrayHE