CMS 3D CMS Logo

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