CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
ConversionTrackCandidateProducer Class Reference
Inheritance diagram for ConversionTrackCandidateProducer:
edm::stream::EDProducer<>

Public Member Functions

void beginRun (edm::Run const &, edm::EventSetup const &es) final
 
 ConversionTrackCandidateProducer (const edm::ParameterSet &ps)
 
void produce (edm::Event &evt, const edm::EventSetup &es) override
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 

Private Member Functions

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, CaloTowerCollection const &hcalTowers, TrackCandidateCollection &outInTracks, TrackCandidateCollection &inOutTracks, std::vector< edm::Ptr< reco::CaloCluster >> &vecRecOI, std::vector< edm::Ptr< reco::CaloCluster >> &vecRecIO)
 
void setEventSetup (const edm::EventSetup &es)
 Initialize EventSetup objects at each event. More...
 

Private Attributes

edm::EDGetTokenT< EcalRecHitCollectionbarrelecalCollection_
 
edm::EDGetTokenT< edm::View< reco::CaloCluster > > bcBarrelCollection_
 
edm::EDGetTokenT< edm::View< reco::CaloCluster > > bcEndcapCollection_
 
std::vector< edm::Ptr< reco::CaloCluster > > caloPtrVecInOut_
 
std::vector< edm::Ptr< reco::CaloCluster > > caloPtrVecOutIn_
 
double ecalIsoCut_offset_
 
double ecalIsoCut_slope_
 
edm::EDGetTokenT< EcalRecHitCollectionendcapecalCollection_
 
std::vector< int > flagsexclEB_
 
std::vector< int > flagsexclEE_
 
edm::EDGetTokenT< CaloTowerCollectionhcalTowers_
 
double hOverEConeSize_
 
InOutConversionSeedFinder inOutSeedFinder_
 
std::string InOutTrackCandidateCollection_
 
InOutConversionTrackFinder inOutTrackFinder_
 
std::string InOutTrackSCAssociationCollection_
 
double isoConeR_
 
double isoEMin_
 
double isoEtaSlice_
 
double isoEtMin_
 
double isoInnerConeR_
 
double maxHOverE_
 
edm::EDGetTokenT< MeasurementTrackerEventmeasurementTrkEvtToken_
 
double minSCEt_
 
OutInConversionSeedFinder outInSeedFinder_
 
std::string OutInTrackCandidateCollection_
 
OutInConversionTrackFinder outInTrackFinder_
 
std::string OutInTrackSCAssociationCollection_
 
edm::EDGetTokenT< edm::View< reco::CaloCluster > > scHybridBarrelProducer_
 
edm::EDGetTokenT< edm::View< reco::CaloCluster > > scIslandEndcapProducer_
 
std::vector< int > severitiesexclEB_
 
std::vector< int > severitiesexclEE_
 
edm::ESHandle< CaloGeometrytheCaloGeom_
 
std::unique_ptr< BaseCkfTrajectoryBuildertheTrajectoryBuilder_
 
bool useNumXtals_
 
std::vector< edm::Ref< reco::SuperClusterCollection > > vecOfSCRefForInOut
 
std::vector< edm::Ref< reco::SuperClusterCollection > > vecOfSCRefForOutIn
 
bool vetoClusteredHits_
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDProducer<>
typedef CacheContexts< T... > CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T... > HasAbility
 
typedef CacheTypes::LuminosityBlockCache LuminosityBlockCache
 
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 

Detailed Description

Author
Nancy Marinelli, U. of Notre Dame, US

Definition at line 49 of file ConversionTrackCandidateProducer.cc.

Constructor & Destructor Documentation

◆ ConversionTrackCandidateProducer()

ConversionTrackCandidateProducer::ConversionTrackCandidateProducer ( const edm::ParameterSet ps)

Definition at line 132 of file ConversionTrackCandidateProducer.cc.

133  : bcBarrelCollection_{consumes(config.getParameter<edm::InputTag>("bcBarrelCollection"))},
134  bcEndcapCollection_{consumes(config.getParameter<edm::InputTag>("bcEndcapCollection"))},
135  scHybridBarrelProducer_{consumes(config.getParameter<edm::InputTag>("scHybridBarrelProducer"))},
136  scIslandEndcapProducer_{consumes(config.getParameter<edm::InputTag>("scIslandEndcapProducer"))},
137 
138  hcalTowers_{consumes(config.getParameter<edm::InputTag>("hcalTowers"))},
139  barrelecalCollection_{consumes(config.getParameter<edm::InputTag>("barrelEcalRecHitCollection"))},
140  endcapecalCollection_{consumes(config.getParameter<edm::InputTag>("endcapEcalRecHitCollection"))},
141  measurementTrkEvtToken_{consumes(edm::InputTag("MeasurementTrackerEvent"))},
142 
143  theTrajectoryBuilder_(createBaseCkfTrajectoryBuilder(
144  config.getParameter<edm::ParameterSet>("TrajectoryBuilderPSet"), consumesCollector())),
145  outInSeedFinder_{config, consumesCollector()},
147  inOutSeedFinder_{config, consumesCollector()},
149  OutInTrackCandidateCollection_ = config.getParameter<std::string>("outInTrackCandidateCollection");
150  InOutTrackCandidateCollection_ = config.getParameter<std::string>("inOutTrackCandidateCollection");
151 
152  OutInTrackSCAssociationCollection_ = config.getParameter<std::string>("outInTrackCandidateSCAssociationCollection");
153  InOutTrackSCAssociationCollection_ = config.getParameter<std::string>("inOutTrackCandidateSCAssociationCollection");
154 
155  hOverEConeSize_ = config.getParameter<double>("hOverEConeSize");
156  maxHOverE_ = config.getParameter<double>("maxHOverE");
157  minSCEt_ = config.getParameter<double>("minSCEt");
158  isoConeR_ = config.getParameter<double>("isoConeR");
159  isoInnerConeR_ = config.getParameter<double>("isoInnerConeR");
160  isoEtaSlice_ = config.getParameter<double>("isoEtaSlice");
161  isoEtMin_ = config.getParameter<double>("isoEtMin");
162  isoEMin_ = config.getParameter<double>("isoEMin");
163  vetoClusteredHits_ = config.getParameter<bool>("vetoClusteredHits");
164  useNumXtals_ = config.getParameter<bool>("useNumXstals");
165  ecalIsoCut_offset_ = config.getParameter<double>("ecalIsoCut_offset");
166  ecalIsoCut_slope_ = config.getParameter<double>("ecalIsoCut_slope");
167 
168  //Flags and Severities to be excluded from photon calculations
169  auto const& flagnamesEB = config.getParameter<std::vector<std::string>>("RecHitFlagToBeExcludedEB");
170  auto const& flagnamesEE = config.getParameter<std::vector<std::string>>("RecHitFlagToBeExcludedEE");
171 
172  flagsexclEB_ = StringToEnumValue<EcalRecHit::Flags>(flagnamesEB);
173  flagsexclEE_ = StringToEnumValue<EcalRecHit::Flags>(flagnamesEE);
174 
175  auto const& severitynamesEB = config.getParameter<std::vector<std::string>>("RecHitSeverityToBeExcludedEB");
176  auto const& severitynamesEE = config.getParameter<std::vector<std::string>>("RecHitSeverityToBeExcludedEE");
177 
178  severitiesexclEB_ = StringToEnumValue<EcalSeverityLevel::SeverityLevel>(severitynamesEB);
179  severitiesexclEE_ = StringToEnumValue<EcalSeverityLevel::SeverityLevel>(severitynamesEE);
180 
181  // Register the product
182  produces<TrackCandidateCollection>(OutInTrackCandidateCollection_);
183  produces<TrackCandidateCollection>(InOutTrackCandidateCollection_);
184 
185  produces<reco::TrackCandidateCaloClusterPtrAssociation>(OutInTrackSCAssociationCollection_);
186  produces<reco::TrackCandidateCaloClusterPtrAssociation>(InOutTrackSCAssociationCollection_);
187 }

Member Function Documentation

◆ beginRun()

void ConversionTrackCandidateProducer::beginRun ( edm::Run const &  r,
edm::EventSetup const &  es 
)
final

Definition at line 196 of file ConversionTrackCandidateProducer.cc.

196  {
198  theEventSetup.get<NavigationSchoolRecord>().get("SimpleNavigationSchool", nav);
199  const NavigationSchool* navigation = nav.product();
200  theTrajectoryBuilder_->setNavigationSchool(navigation);
203 }

References edm::EventSetup::get(), get, inOutSeedFinder_, outInSeedFinder_, edm::ESHandle< T >::product(), ConversionSeedFinder::setNavigationSchool(), and theTrajectoryBuilder_.

◆ buildCollections()

void ConversionTrackCandidateProducer::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,
CaloTowerCollection const &  hcalTowers,
TrackCandidateCollection outInTracks,
TrackCandidateCollection inOutTracks,
std::vector< edm::Ptr< reco::CaloCluster >> &  vecRecOI,
std::vector< edm::Ptr< reco::CaloCluster >> &  vecRecIO 
)
private

Definition at line 329 of file ConversionTrackCandidateProducer.cc.

340 {
341  // Loop over SC in the barrel and reconstruct converted photons
342  for (auto const& aClus : scHandle->ptrs()) {
343  // preselection based in Et and H/E cut.
344  if (aClus->energy() / cosh(aClus->eta()) <= minSCEt_)
345  continue;
346  if (aClus->eta() > 1.479 && aClus->eta() < 1.556)
347  continue;
348 
349  const reco::CaloCluster* pClus = &(*aClus);
350  const reco::SuperCluster* sc = dynamic_cast<const reco::SuperCluster*>(pClus);
351  double scEt = sc->energy() / cosh(sc->eta());
352  EgammaTowerIsolation towerIso(hOverEConeSize_, 0., 0., -1, &hcalTowers);
353  double HoE = towerIso.getTowerESum(sc) / sc->energy();
354  if (HoE >= maxHOverE_)
355  continue;
356 
358  EgammaRecHitIsolation ecalIso(
360 
361  ecalIso.setVetoClustered(vetoClusteredHits_);
362  ecalIso.setUseNumCrystals(useNumXtals_);
363  if (isBarrel) {
364  ecalIso.doFlagChecks(flagsexclEB_);
365  ecalIso.doSeverityChecks(&ecalRecHits, severitiesexclEB_);
366  } else {
367  ecalIso.doFlagChecks(flagsexclEE_);
368  ecalIso.doSeverityChecks(&ecalRecHits, severitiesexclEE_);
369  }
370 
371  double ecalIsolation = ecalIso.getEtSum(sc);
373  continue;
374 
375  // Now launch the seed finding
377  GlobalPoint(pClus->position().x(), pClus->position().y(), pClus->position().z()));
378  outInSeedFinder_.makeSeeds(bcHandle);
379 
380  std::vector<Trajectory> theOutInTracks = outInTrackFinder_.tracks(outInSeedFinder_.seeds(), outInTrackCandidates);
381 
383  GlobalPoint(pClus->position().x(), pClus->position().y(), pClus->position().z()));
384  inOutSeedFinder_.setTracks(theOutInTracks);
385  inOutSeedFinder_.makeSeeds(bcHandle);
386 
387  std::vector<Trajectory> theInOutTracks = inOutTrackFinder_.tracks(inOutSeedFinder_.seeds(), inOutTrackCandidates);
388 
389  // Debug
390  // 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";
391 
393  for (auto it = theOutInTracks.begin(); it != theOutInTracks.end(); ++it) {
394  vecRecOI.push_back(aClus);
395  // std::cout << "ConversionTrackCandidateProducer Barrel OutIn Tracks Number of hits " << (*it).foundHits() << "\n";
396  }
397 
398  for (auto it = theInOutTracks.begin(); it != theInOutTracks.end(); ++it) {
399  vecRecIO.push_back(aClus);
400  // std::cout << "ConversionTrackCandidateProducer Barrel InOut Tracks Number of hits " << (*it).foundHits() << "\n";
401  }
402  }
403 }

References EgammaRecHitIsolation::doFlagChecks(), EgammaRecHitIsolation::doSeverityChecks(), DetId::Ecal, ecalIsoCut_offset_, ecalIsoCut_slope_, RecoTauCleanerPlugins::ecalIsolation, reco::CaloCluster::energy(), reco::CaloCluster::eta(), flagsexclEB_, flagsexclEE_, EgammaRecHitIsolation::getEtSum(), conversions_cfi::hcalTowers, hOverEConeSize_, inOutSeedFinder_, inOutTrackFinder_, PixelPluginsPhase0_cfi::isBarrel, isoConeR_, isoEMin_, isoEtaSlice_, isoEtMin_, isoInnerConeR_, OutInConversionSeedFinder::makeSeeds(), InOutConversionSeedFinder::makeSeeds(), maxHOverE_, minSCEt_, outInSeedFinder_, outInTrackFinder_, reco::CaloCluster::position(), ConversionSeedFinder::seeds(), ConversionSeedFinder::setCandidate(), InOutConversionSeedFinder::setTracks(), EgammaRecHitIsolation::setUseNumCrystals(), EgammaRecHitIsolation::setVetoClustered(), severitiesexclEB_, severitiesexclEE_, theCaloGeom_, InOutConversionTrackFinder::tracks(), OutInConversionTrackFinder::tracks(), useNumXtals_, and vetoClusteredHits_.

Referenced by produce().

◆ fillDescriptions()

void ConversionTrackCandidateProducer::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 405 of file ConversionTrackCandidateProducer.cc.

405  {
406  // conversionTrackCandidates
408 
409  desc.add<edm::InputTag>("bcBarrelCollection", {"particleFlowSuperClusterECAL", "particleFlowBasicClusterECALBarrel"});
410  desc.add<edm::InputTag>("bcEndcapCollection", {"particleFlowSuperClusterECAL", "particleFlowBasicClusterECALEndcap"});
411  desc.add<edm::InputTag>("scHybridBarrelProducer",
412  {"particleFlowSuperClusterECAL", "particleFlowSuperClusterECALBarrel"});
413  desc.add<edm::InputTag>("scIslandEndcapProducer",
414  {"particleFlowSuperClusterECAL", "particleFlowSuperClusterECALEndcapWithPreshower"});
415 
416  desc.add<std::string>("outInTrackCandidateSCAssociationCollection", "outInTrackCandidateSCAssociationCollection");
417  desc.add<std::string>("inOutTrackCandidateSCAssociationCollection", "inOutTrackCandidateSCAssociationCollection");
418  desc.add<std::string>("outInTrackCandidateCollection", "outInTracksFromConversions");
419  desc.add<std::string>("inOutTrackCandidateCollection", "inOutTracksFromConversions");
420 
421  desc.add<edm::InputTag>("barrelEcalRecHitCollection", {"ecalRecHit", "EcalRecHitsEB"});
422  desc.add<edm::InputTag>("endcapEcalRecHitCollection", {"ecalRecHit", "EcalRecHitsEE"});
423  desc.add<std::string>("MeasurementTrackerName", "");
424  desc.add<std::string>("OutInRedundantSeedCleaner", "CachingSeedCleanerBySharedInput");
425  desc.add<std::string>("InOutRedundantSeedCleaner", "CachingSeedCleanerBySharedInput");
426  desc.add<bool>("useHitsSplitting", false);
427  desc.add<int>("maxNumOfSeedsOutIn", 50);
428  desc.add<int>("maxNumOfSeedsInOut", 50);
429  desc.add<double>("bcEtCut", 1.5);
430  desc.add<double>("bcECut", 1.5);
431  desc.add<bool>("useEtCut", true);
432  desc.add<edm::InputTag>("hcalTowers", {"towerMaker"});
433  desc.add<double>("minSCEt", 20.0);
434  desc.add<double>("hOverEConeSize", 0.15);
435  desc.add<double>("maxHOverE", 0.15);
436  desc.add<double>("isoInnerConeR", 3.5);
437  desc.add<double>("isoConeR", 0.4);
438  desc.add<double>("isoEtaSlice", 2.5);
439  desc.add<double>("isoEtMin", 0.0);
440  desc.add<double>("isoEMin", 0.08);
441  desc.add<bool>("vetoClusteredHits", false);
442  desc.add<bool>("useNumXstals", true);
443  desc.add<double>("ecalIsoCut_offset", 999999999); // alternative value: 4.2
444  desc.add<double>("ecalIsoCut_slope", 0.0); // alternative value: 0.003
445 
446  desc.add<std::vector<std::string>>("RecHitFlagToBeExcludedEB", {});
447  desc.add<std::vector<std::string>>("RecHitSeverityToBeExcludedEB", {});
448  desc.add<std::vector<std::string>>("RecHitFlagToBeExcludedEE", {});
449  desc.add<std::vector<std::string>>("RecHitSeverityToBeExcludedEE", {});
450 
451  desc.add<double>("fractionShared", 0.5);
452  desc.add<std::string>("TrajectoryBuilder", "TrajectoryBuilderForConversions");
453  {
455  psd0.setUnknown();
456  desc.add<edm::ParameterSetDescription>("TrajectoryBuilderPSet", psd0);
457  }
458  {
460  psd0.add<std::string>("propagatorAlongTISE", "alongMomElePropagator");
461  psd0.add<int>("numberMeasurementsForFit", 4);
462  psd0.add<std::string>("propagatorOppositeTISE", "oppositeToMomElePropagator");
463  desc.add<edm::ParameterSetDescription>("TransientInitialStateEstimatorParameters", psd0);
464  }
465  desc.add<bool>("allowSharedFirstHit", true);
466  desc.add<double>("ValidHitBonus", 5.0);
467  desc.add<double>("MissingHitPenalty", 20.0);
468 
469  descriptions.add("conversionTrackCandidates", desc);
470  // or use the following to generate the label from the module's C++ type
471  //descriptions.addWithDefaultLabel(desc);
472 }

References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::add(), submitPVResolutionJobs::desc, edm::ParameterSetDescription::setUnknown(), and AlCaHLTBitMon_QueryRunRegistry::string.

◆ produce()

void ConversionTrackCandidateProducer::produce ( edm::Event evt,
const edm::EventSetup es 
)
override

Definition at line 205 of file ConversionTrackCandidateProducer.cc.

205  {
206  // get the trajectory builder and initialize it with the data
207  theTrajectoryBuilder_->setEvent(theEvent, theEventSetup, &theEvent.get(measurementTrkEvtToken_));
208 
209  // this need to be done after the initialization of the TrajectoryBuilder!
210  setEventSetup(theEventSetup);
211 
212  outInSeedFinder_.setEvent(theEvent);
213  inOutSeedFinder_.setEvent(theEvent);
214 
215  //
216  // create empty output collections
217  //
218  // Out In Track Candidates
219  auto outInTrackCandidate_p = std::make_unique<TrackCandidateCollection>();
220  // In Out Track Candidates
221  auto inOutTrackCandidate_p = std::make_unique<TrackCandidateCollection>();
222  // Track Candidate calo Cluster Association
223  auto outInAssoc_p = std::make_unique<reco::TrackCandidateCaloClusterPtrAssociation>();
224  auto inOutAssoc_p = std::make_unique<reco::TrackCandidateCaloClusterPtrAssociation>();
225 
226  // Get the basic cluster collection in the Barrel
227  bool validBarrelBCHandle = true;
228  auto bcBarrelHandle = theEvent.getHandle(bcBarrelCollection_);
229  if (!bcBarrelHandle.isValid()) {
230  edm::LogError("ConversionTrackCandidateProducer") << "Error! Can't get the Barrel Basic Clusters!";
231  validBarrelBCHandle = false;
232  }
233 
234  // Get the basic cluster collection in the Endcap
235  bool validEndcapBCHandle = true;
236  auto bcEndcapHandle = theEvent.getHandle(bcEndcapCollection_);
237  if (!bcEndcapHandle.isValid()) {
238  edm::LogError("CoonversionTrackCandidateProducer") << "Error! Can't get the Endcap Basic Clusters";
239  validEndcapBCHandle = false;
240  }
241 
242  // Get the Super Cluster collection in the Barrel
243  bool validBarrelSCHandle = true;
244  auto scBarrelHandle = theEvent.getHandle(scHybridBarrelProducer_);
245  if (!scBarrelHandle.isValid()) {
246  edm::LogError("CoonversionTrackCandidateProducer") << "Error! Can't get the barrel superclusters!";
247  validBarrelSCHandle = false;
248  }
249 
250  // Get the Super Cluster collection in the Endcap
251  bool validEndcapSCHandle = true;
252  auto scEndcapHandle = theEvent.getHandle(scIslandEndcapProducer_);
253  if (!scEndcapHandle.isValid()) {
254  edm::LogError("CoonversionTrackCandidateProducer") << "Error! Can't get the endcap superclusters!";
255  validEndcapSCHandle = false;
256  }
257 
258  // get the geometry from the event setup:
259  theEventSetup.get<CaloGeometryRecord>().get(theCaloGeom_);
260 
261  auto const& hcalTowers = theEvent.get(hcalTowers_);
262 
263  auto const& ecalhitsCollEB = theEvent.get(barrelecalCollection_);
264  auto const& ecalhitsCollEE = theEvent.get(endcapecalCollection_);
265 
267  theEventSetup.get<EcalSeverityLevelAlgoRcd>().get(sevlv);
268  const EcalSeverityLevelAlgo* sevLevel = sevlv.product();
269 
270  caloPtrVecOutIn_.clear();
271  caloPtrVecInOut_.clear();
272 
273  bool isBarrel = true;
274  if (validBarrelBCHandle && validBarrelSCHandle)
276  scBarrelHandle,
277  bcBarrelHandle,
278  ecalhitsCollEB,
279  sevLevel,
280  hcalTowers,
281  *outInTrackCandidate_p,
282  *inOutTrackCandidate_p,
285 
286  if (validEndcapBCHandle && validEndcapSCHandle) {
287  isBarrel = false;
289  scEndcapHandle,
290  bcEndcapHandle,
291  ecalhitsCollEE,
292  sevLevel,
293  hcalTowers,
294  *outInTrackCandidate_p,
295  *inOutTrackCandidate_p,
298  }
299 
300  // std::cout << " ConversionTrackCandidateProducer caloPtrVecOutIn_ size " << caloPtrVecOutIn_.size() << " caloPtrVecInOut_ size " << caloPtrVecInOut_.size() << "\n";
301 
302  // put all products in the event
303  // Barrel
304  //std::cout << "ConversionTrackCandidateProducer Putting in the event " << (*outInTrackCandidate_p).size() << " Out In track Candidates " << "\n";
305  auto const refprodOutInTrackC = theEvent.put(std::move(outInTrackCandidate_p), OutInTrackCandidateCollection_);
306  //std::cout << "ConversionTrackCandidateProducer refprodOutInTrackC size " << (*(refprodOutInTrackC.product())).size() << "\n";
307  //
308  //std::cout << "ConversionTrackCandidateProducer Putting in the event " << (*inOutTrackCandidate_p).size() << " In Out track Candidates " << "\n";
309  auto const refprodInOutTrackC = theEvent.put(std::move(inOutTrackCandidate_p), InOutTrackCandidateCollection_);
310  //std::cout << "ConversionTrackCandidateProducer refprodInOutTrackC size " << (*(refprodInOutTrackC.product())).size() << "\n";
311 
312  edm::ValueMap<reco::CaloClusterPtr>::Filler fillerOI(*outInAssoc_p);
313  fillerOI.insert(refprodOutInTrackC, caloPtrVecOutIn_.begin(), caloPtrVecOutIn_.end());
314  fillerOI.fill();
315  edm::ValueMap<reco::CaloClusterPtr>::Filler fillerIO(*inOutAssoc_p);
316  fillerIO.insert(refprodInOutTrackC, caloPtrVecInOut_.begin(), caloPtrVecInOut_.end());
317  fillerIO.fill();
318 
319  // std::cout << "ConversionTrackCandidateProducer Putting in the event OutIn track - SC association: size " << (*outInAssoc_p).size() << "\n";
320  theEvent.put(std::move(outInAssoc_p), OutInTrackSCAssociationCollection_);
321 
322  // std::cout << "ConversionTrackCandidateProducer Putting in the event InOut track - SC association: size " << (*inOutAssoc_p).size() << "\n";
323  theEvent.put(std::move(inOutAssoc_p), InOutTrackSCAssociationCollection_);
324 
327 }

References barrelecalCollection_, bcBarrelCollection_, bcEndcapCollection_, buildCollections(), caloPtrVecInOut_, caloPtrVecOutIn_, ConversionSeedFinder::clear(), endcapecalCollection_, edm::helper::Filler< Map >::fill(), edm::EventSetup::get(), edm::Event::get(), get, edm::Event::getHandle(), conversions_cfi::hcalTowers, hcalTowers_, inOutSeedFinder_, InOutTrackCandidateCollection_, InOutTrackSCAssociationCollection_, edm::helper::Filler< Map >::insert(), PixelPluginsPhase0_cfi::isBarrel, measurementTrkEvtToken_, eostools::move(), outInSeedFinder_, OutInTrackCandidateCollection_, OutInTrackSCAssociationCollection_, edm::ESHandle< T >::product(), edm::Event::put(), scHybridBarrelProducer_, scIslandEndcapProducer_, ConversionSeedFinder::setEvent(), setEventSetup(), theCaloGeom_, and theTrajectoryBuilder_.

◆ setEventSetup()

void ConversionTrackCandidateProducer::setEventSetup ( const edm::EventSetup es)
private

Initialize EventSetup objects at each event.

Definition at line 189 of file ConversionTrackCandidateProducer.cc.

189  {
190  outInSeedFinder_.setEventSetup(theEventSetup);
191  inOutSeedFinder_.setEventSetup(theEventSetup);
192  outInTrackFinder_.setEventSetup(theEventSetup);
193  inOutTrackFinder_.setEventSetup(theEventSetup);
194 }

References inOutSeedFinder_, inOutTrackFinder_, outInSeedFinder_, outInTrackFinder_, ConversionTrackFinder::setEventSetup(), and ConversionSeedFinder::setEventSetup().

Referenced by produce().

Member Data Documentation

◆ barrelecalCollection_

edm::EDGetTokenT<EcalRecHitCollection> ConversionTrackCandidateProducer::barrelecalCollection_
private

Definition at line 73 of file ConversionTrackCandidateProducer.cc.

Referenced by produce().

◆ bcBarrelCollection_

edm::EDGetTokenT<edm::View<reco::CaloCluster> > ConversionTrackCandidateProducer::bcBarrelCollection_
private

Definition at line 68 of file ConversionTrackCandidateProducer.cc.

Referenced by produce().

◆ bcEndcapCollection_

edm::EDGetTokenT<edm::View<reco::CaloCluster> > ConversionTrackCandidateProducer::bcEndcapCollection_
private

Definition at line 69 of file ConversionTrackCandidateProducer.cc.

Referenced by produce().

◆ caloPtrVecInOut_

std::vector<edm::Ptr<reco::CaloCluster> > ConversionTrackCandidateProducer::caloPtrVecInOut_
private

Definition at line 106 of file ConversionTrackCandidateProducer.cc.

Referenced by produce().

◆ caloPtrVecOutIn_

std::vector<edm::Ptr<reco::CaloCluster> > ConversionTrackCandidateProducer::caloPtrVecOutIn_
private

Definition at line 105 of file ConversionTrackCandidateProducer.cc.

Referenced by produce().

◆ ecalIsoCut_offset_

double ConversionTrackCandidateProducer::ecalIsoCut_offset_
private

Definition at line 93 of file ConversionTrackCandidateProducer.cc.

Referenced by buildCollections().

◆ ecalIsoCut_slope_

double ConversionTrackCandidateProducer::ecalIsoCut_slope_
private

Definition at line 94 of file ConversionTrackCandidateProducer.cc.

Referenced by buildCollections().

◆ endcapecalCollection_

edm::EDGetTokenT<EcalRecHitCollection> ConversionTrackCandidateProducer::endcapecalCollection_
private

Definition at line 74 of file ConversionTrackCandidateProducer.cc.

Referenced by produce().

◆ flagsexclEB_

std::vector<int> ConversionTrackCandidateProducer::flagsexclEB_
private

Definition at line 88 of file ConversionTrackCandidateProducer.cc.

Referenced by buildCollections().

◆ flagsexclEE_

std::vector<int> ConversionTrackCandidateProducer::flagsexclEE_
private

Definition at line 89 of file ConversionTrackCandidateProducer.cc.

Referenced by buildCollections().

◆ hcalTowers_

edm::EDGetTokenT<CaloTowerCollection> ConversionTrackCandidateProducer::hcalTowers_
private

Definition at line 72 of file ConversionTrackCandidateProducer.cc.

Referenced by produce().

◆ hOverEConeSize_

double ConversionTrackCandidateProducer::hOverEConeSize_
private

Definition at line 77 of file ConversionTrackCandidateProducer.cc.

Referenced by buildCollections().

◆ inOutSeedFinder_

InOutConversionSeedFinder ConversionTrackCandidateProducer::inOutSeedFinder_
private

◆ InOutTrackCandidateCollection_

std::string ConversionTrackCandidateProducer::InOutTrackCandidateCollection_
private

Definition at line 63 of file ConversionTrackCandidateProducer.cc.

Referenced by produce().

◆ inOutTrackFinder_

InOutConversionTrackFinder ConversionTrackCandidateProducer::inOutTrackFinder_
private

Definition at line 103 of file ConversionTrackCandidateProducer.cc.

Referenced by buildCollections(), and setEventSetup().

◆ InOutTrackSCAssociationCollection_

std::string ConversionTrackCandidateProducer::InOutTrackSCAssociationCollection_
private

Definition at line 66 of file ConversionTrackCandidateProducer.cc.

Referenced by produce().

◆ isoConeR_

double ConversionTrackCandidateProducer::isoConeR_
private

Definition at line 80 of file ConversionTrackCandidateProducer.cc.

Referenced by buildCollections().

◆ isoEMin_

double ConversionTrackCandidateProducer::isoEMin_
private

Definition at line 84 of file ConversionTrackCandidateProducer.cc.

Referenced by buildCollections().

◆ isoEtaSlice_

double ConversionTrackCandidateProducer::isoEtaSlice_
private

Definition at line 82 of file ConversionTrackCandidateProducer.cc.

Referenced by buildCollections().

◆ isoEtMin_

double ConversionTrackCandidateProducer::isoEtMin_
private

Definition at line 83 of file ConversionTrackCandidateProducer.cc.

Referenced by buildCollections().

◆ isoInnerConeR_

double ConversionTrackCandidateProducer::isoInnerConeR_
private

Definition at line 81 of file ConversionTrackCandidateProducer.cc.

Referenced by buildCollections().

◆ maxHOverE_

double ConversionTrackCandidateProducer::maxHOverE_
private

Definition at line 78 of file ConversionTrackCandidateProducer.cc.

Referenced by buildCollections().

◆ measurementTrkEvtToken_

edm::EDGetTokenT<MeasurementTrackerEvent> ConversionTrackCandidateProducer::measurementTrkEvtToken_
private

Definition at line 75 of file ConversionTrackCandidateProducer.cc.

Referenced by produce().

◆ minSCEt_

double ConversionTrackCandidateProducer::minSCEt_
private

Definition at line 79 of file ConversionTrackCandidateProducer.cc.

Referenced by buildCollections().

◆ outInSeedFinder_

OutInConversionSeedFinder ConversionTrackCandidateProducer::outInSeedFinder_
private

◆ OutInTrackCandidateCollection_

std::string ConversionTrackCandidateProducer::OutInTrackCandidateCollection_
private

Definition at line 62 of file ConversionTrackCandidateProducer.cc.

Referenced by produce().

◆ outInTrackFinder_

OutInConversionTrackFinder ConversionTrackCandidateProducer::outInTrackFinder_
private

Definition at line 101 of file ConversionTrackCandidateProducer.cc.

Referenced by buildCollections(), and setEventSetup().

◆ OutInTrackSCAssociationCollection_

std::string ConversionTrackCandidateProducer::OutInTrackSCAssociationCollection_
private

Definition at line 65 of file ConversionTrackCandidateProducer.cc.

Referenced by produce().

◆ scHybridBarrelProducer_

edm::EDGetTokenT<edm::View<reco::CaloCluster> > ConversionTrackCandidateProducer::scHybridBarrelProducer_
private

Definition at line 70 of file ConversionTrackCandidateProducer.cc.

Referenced by produce().

◆ scIslandEndcapProducer_

edm::EDGetTokenT<edm::View<reco::CaloCluster> > ConversionTrackCandidateProducer::scIslandEndcapProducer_
private

Definition at line 71 of file ConversionTrackCandidateProducer.cc.

Referenced by produce().

◆ severitiesexclEB_

std::vector<int> ConversionTrackCandidateProducer::severitiesexclEB_
private

Definition at line 90 of file ConversionTrackCandidateProducer.cc.

Referenced by buildCollections().

◆ severitiesexclEE_

std::vector<int> ConversionTrackCandidateProducer::severitiesexclEE_
private

Definition at line 91 of file ConversionTrackCandidateProducer.cc.

Referenced by buildCollections().

◆ theCaloGeom_

edm::ESHandle<CaloGeometry> ConversionTrackCandidateProducer::theCaloGeom_
private

Definition at line 96 of file ConversionTrackCandidateProducer.cc.

Referenced by buildCollections(), and produce().

◆ theTrajectoryBuilder_

std::unique_ptr<BaseCkfTrajectoryBuilder> ConversionTrackCandidateProducer::theTrajectoryBuilder_
private

Definition at line 98 of file ConversionTrackCandidateProducer.cc.

Referenced by beginRun(), and produce().

◆ useNumXtals_

bool ConversionTrackCandidateProducer::useNumXtals_
private

Definition at line 86 of file ConversionTrackCandidateProducer.cc.

Referenced by buildCollections().

◆ vecOfSCRefForInOut

std::vector<edm::Ref<reco::SuperClusterCollection> > ConversionTrackCandidateProducer::vecOfSCRefForInOut
private

Definition at line 109 of file ConversionTrackCandidateProducer.cc.

◆ vecOfSCRefForOutIn

std::vector<edm::Ref<reco::SuperClusterCollection> > ConversionTrackCandidateProducer::vecOfSCRefForOutIn
private

Definition at line 108 of file ConversionTrackCandidateProducer.cc.

◆ vetoClusteredHits_

bool ConversionTrackCandidateProducer::vetoClusteredHits_
private

Definition at line 85 of file ConversionTrackCandidateProducer.cc.

Referenced by buildCollections().

ConversionTrackCandidateProducer::outInSeedFinder_
OutInConversionSeedFinder outInSeedFinder_
Definition: ConversionTrackCandidateProducer.cc:100
edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
ConversionSeedFinder::setEventSetup
void setEventSetup(const edm::EventSetup &es)
Initialize EventSetup objects at each event.
Definition: ConversionSeedFinder.cc:41
InOutConversionTrackFinder::tracks
std::vector< Trajectory > tracks(const TrajectorySeedCollection &seeds, TrackCandidateCollection &candidate) const override
Definition: InOutConversionTrackFinder.cc:43
EcalSeverityLevelAlgo
Definition: EcalSeverityLevelAlgo.h:33
InOutConversionSeedFinder::setTracks
void setTracks(std::vector< Trajectory > const &in)
Definition: InOutConversionSeedFinder.h:46
ConversionTrackCandidateProducer::scIslandEndcapProducer_
edm::EDGetTokenT< edm::View< reco::CaloCluster > > scIslandEndcapProducer_
Definition: ConversionTrackCandidateProducer.cc:71
ConversionTrackCandidateProducer::inOutTrackFinder_
InOutConversionTrackFinder inOutTrackFinder_
Definition: ConversionTrackCandidateProducer.cc:103
ConversionSeedFinder::clear
void clear()
Definition: ConversionSeedFinder.h:72
ConversionTrackCandidateProducer::severitiesexclEB_
std::vector< int > severitiesexclEB_
Definition: ConversionTrackCandidateProducer.cc:90
ConversionTrackCandidateProducer::bcBarrelCollection_
edm::EDGetTokenT< edm::View< reco::CaloCluster > > bcBarrelCollection_
Definition: ConversionTrackCandidateProducer.cc:68
ConversionTrackCandidateProducer::theTrajectoryBuilder_
std::unique_ptr< BaseCkfTrajectoryBuilder > theTrajectoryBuilder_
Definition: ConversionTrackCandidateProducer.cc:98
NavigationSchoolRecord
Definition: NavigationSchoolRecord.h:12
edm::ParameterSetDescription::add
ParameterDescriptionBase * add(U const &iLabel, T const &value)
Definition: ParameterSetDescription.h:95
ConversionTrackCandidateProducer::useNumXtals_
bool useNumXtals_
Definition: ConversionTrackCandidateProducer.cc:86
ConversionTrackCandidateProducer::hOverEConeSize_
double hOverEConeSize_
Definition: ConversionTrackCandidateProducer.cc:77
ConversionTrackCandidateProducer::inOutSeedFinder_
InOutConversionSeedFinder inOutSeedFinder_
Definition: ConversionTrackCandidateProducer.cc:102
ConversionTrackCandidateProducer::OutInTrackSCAssociationCollection_
std::string OutInTrackSCAssociationCollection_
Definition: ConversionTrackCandidateProducer.cc:65
reco::SuperCluster
Definition: SuperCluster.h:18
CaloGeometryRecord
Definition: CaloGeometryRecord.h:30
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
ConversionTrackCandidateProducer::OutInTrackCandidateCollection_
std::string OutInTrackCandidateCollection_
Definition: ConversionTrackCandidateProducer.cc:62
ConversionTrackCandidateProducer::severitiesexclEE_
std::vector< int > severitiesexclEE_
Definition: ConversionTrackCandidateProducer.cc:91
ConversionTrackCandidateProducer::barrelecalCollection_
edm::EDGetTokenT< EcalRecHitCollection > barrelecalCollection_
Definition: ConversionTrackCandidateProducer.cc:73
ConversionTrackCandidateProducer::isoEtMin_
double isoEtMin_
Definition: ConversionTrackCandidateProducer.cc:83
ConversionTrackCandidateProducer::endcapecalCollection_
edm::EDGetTokenT< EcalRecHitCollection > endcapecalCollection_
Definition: ConversionTrackCandidateProducer.cc:74
NavigationSchool
Definition: NavigationSchool.h:18
EgammaRecHitIsolation
Definition: EgammaRecHitIsolation.h:26
OutInConversionTrackFinder::tracks
std::vector< Trajectory > tracks(const TrajectorySeedCollection &seeds, TrackCandidateCollection &candidates) const override
Definition: OutInConversionTrackFinder.cc:43
ConversionTrackCandidateProducer::flagsexclEE_
std::vector< int > flagsexclEE_
Definition: ConversionTrackCandidateProducer.cc:89
config
Definition: config.py:1
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:57
ConversionTrackCandidateProducer::hcalTowers_
edm::EDGetTokenT< CaloTowerCollection > hcalTowers_
Definition: ConversionTrackCandidateProducer.cc:72
ConversionTrackCandidateProducer::isoInnerConeR_
double isoInnerConeR_
Definition: ConversionTrackCandidateProducer.cc:81
submitPVResolutionJobs.config
config
parse the configuration file
Definition: submitPVResolutionJobs.py:281
reco::CaloCluster
Definition: CaloCluster.h:31
ConversionTrackCandidateProducer::caloPtrVecOutIn_
std::vector< edm::Ptr< reco::CaloCluster > > caloPtrVecOutIn_
Definition: ConversionTrackCandidateProducer.cc:105
edm::ESHandle< NavigationSchool >
EcalSeverityLevelAlgoRcd
Definition: EcalSeverityLevelAlgoRcd.h:12
GlobalPoint
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
ConversionTrackCandidateProducer::maxHOverE_
double maxHOverE_
Definition: ConversionTrackCandidateProducer.cc:78
ConversionTrackFinder::setEventSetup
void setEventSetup(const edm::EventSetup &es)
Initialize EventSetup objects at each event.
Definition: ConversionTrackFinder.cc:31
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
ConversionTrackCandidateProducer::setEventSetup
void setEventSetup(const edm::EventSetup &es)
Initialize EventSetup objects at each event.
Definition: ConversionTrackCandidateProducer.cc:189
ConversionTrackCandidateProducer::InOutTrackCandidateCollection_
std::string InOutTrackCandidateCollection_
Definition: ConversionTrackCandidateProducer.cc:63
PixelPluginsPhase0_cfi.isBarrel
isBarrel
Definition: PixelPluginsPhase0_cfi.py:17
ConversionTrackCandidateProducer::caloPtrVecInOut_
std::vector< edm::Ptr< reco::CaloCluster > > caloPtrVecInOut_
Definition: ConversionTrackCandidateProducer.cc:106
InOutConversionSeedFinder::makeSeeds
void makeSeeds(const edm::Handle< edm::View< reco::CaloCluster > > &allBc) override
Definition: InOutConversionSeedFinder.cc:36
ConversionTrackCandidateProducer::vetoClusteredHits_
bool vetoClusteredHits_
Definition: ConversionTrackCandidateProducer.cc:85
ConversionSeedFinder::setNavigationSchool
void setNavigationSchool(const NavigationSchool *navigation)
Definition: ConversionSeedFinder.h:69
edm::ParameterSet
Definition: ParameterSet.h:47
ConversionTrackCandidateProducer::isoConeR_
double isoConeR_
Definition: ConversionTrackCandidateProducer.cc:80
ConversionTrackCandidateProducer::InOutTrackSCAssociationCollection_
std::string InOutTrackSCAssociationCollection_
Definition: ConversionTrackCandidateProducer.cc:66
ConversionTrackCandidateProducer::ecalIsoCut_offset_
double ecalIsoCut_offset_
Definition: ConversionTrackCandidateProducer.cc:93
ConversionTrackCandidateProducer::measurementTrkEvtToken_
edm::EDGetTokenT< MeasurementTrackerEvent > measurementTrkEvtToken_
Definition: ConversionTrackCandidateProducer.cc:75
reco::CaloCluster::eta
double eta() const
pseudorapidity of cluster centroid
Definition: CaloCluster.h:181
ConversionTrackCandidateProducer::outInTrackFinder_
OutInConversionTrackFinder outInTrackFinder_
Definition: ConversionTrackCandidateProducer.cc:101
EgammaTowerIsolation
Definition: EgammaTowerIsolation.h:197
ConversionSeedFinder::seeds
TrajectorySeedCollection & seeds()
Definition: ConversionSeedFinder.h:57
edm::ParameterSetDescription::setUnknown
void setUnknown()
Definition: ParameterSetDescription.cc:39
ConversionSeedFinder::setCandidate
virtual void setCandidate(float e, GlobalPoint pos)
Definition: ConversionSeedFinder.h:58
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
DetId::Ecal
Definition: DetId.h:27
get
#define get
OutInConversionSeedFinder::makeSeeds
void makeSeeds(const edm::Handle< edm::View< reco::CaloCluster > > &allBc) override
Definition: OutInConversionSeedFinder.cc:54
reco::CaloCluster::position
const math::XYZPoint & position() const
cluster centroid position
Definition: CaloCluster.h:154
conversions_cfi.hcalTowers
hcalTowers
Definition: conversions_cfi.py:21
ConversionTrackCandidateProducer::minSCEt_
double minSCEt_
Definition: ConversionTrackCandidateProducer.cc:79
ConversionTrackCandidateProducer::isoEMin_
double isoEMin_
Definition: ConversionTrackCandidateProducer.cc:84
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
ConversionSeedFinder::setEvent
void setEvent(const edm::Event &e)
Definition: ConversionSeedFinder.cc:30
eostools.move
def move(src, dest)
Definition: eostools.py:511
ConversionTrackCandidateProducer::scHybridBarrelProducer_
edm::EDGetTokenT< edm::View< reco::CaloCluster > > scHybridBarrelProducer_
Definition: ConversionTrackCandidateProducer.cc:70
ConversionTrackCandidateProducer::isoEtaSlice_
double isoEtaSlice_
Definition: ConversionTrackCandidateProducer.cc:82
RecoTauCleanerPlugins.ecalIsolation
ecalIsolation
Definition: RecoTauCleanerPlugins.py:112
edm::helper::Filler
Definition: ValueMap.h:22
ConversionTrackCandidateProducer::theCaloGeom_
edm::ESHandle< CaloGeometry > theCaloGeom_
Definition: ConversionTrackCandidateProducer.cc:96
ConversionTrackCandidateProducer::bcEndcapCollection_
edm::EDGetTokenT< edm::View< reco::CaloCluster > > bcEndcapCollection_
Definition: ConversionTrackCandidateProducer.cc:69
reco::CaloCluster::energy
double energy() const
cluster energy
Definition: CaloCluster.h:149
ConversionTrackCandidateProducer::ecalIsoCut_slope_
double ecalIsoCut_slope_
Definition: ConversionTrackCandidateProducer.cc:94
edm::InputTag
Definition: InputTag.h:15
ConversionTrackCandidateProducer::buildCollections
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, CaloTowerCollection const &hcalTowers, TrackCandidateCollection &outInTracks, TrackCandidateCollection &inOutTracks, std::vector< edm::Ptr< reco::CaloCluster >> &vecRecOI, std::vector< edm::Ptr< reco::CaloCluster >> &vecRecIO)
Definition: ConversionTrackCandidateProducer.cc:329
ConversionTrackCandidateProducer::flagsexclEB_
std::vector< int > flagsexclEB_
Definition: ConversionTrackCandidateProducer.cc:88