CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
CosmicSeedGenerator Class Reference

#include <CosmicSeedGenerator.h>

Inheritance diagram for CosmicSeedGenerator:
edm::stream::EDProducer<>

Public Member Functions

 CosmicSeedGenerator (const edm::ParameterSet &conf)
 
void produce (edm::Event &e, const edm::EventSetup &c) override
 
 ~CosmicSeedGenerator () 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
 

Private Attributes

ClusterChecker check
 
SeedGeneratorForCosmics cosmic_seed
 
edm::EDGetTokenT< SiStripMatchedRecHit2DCollectionmatchedrecHitsToken_
 
edm::EDGetTokenT< SiStripRecHit2DCollectionrphirecHitsToken_
 
edm::EDGetTokenT< SiStripRecHit2DCollectionstereorecHitsToken_
 

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

Definition at line 20 of file CosmicSeedGenerator.h.

Constructor & Destructor Documentation

◆ CosmicSeedGenerator()

CosmicSeedGenerator::CosmicSeedGenerator ( const edm::ParameterSet conf)
explicit

Definition at line 17 of file CosmicSeedGenerator.cc.

18  : cosmic_seed(conf),
19  check(conf, consumesCollector())
20 
21 {
22  edm::LogInfo("CosmicSeedGenerator") << "Enter the CosmicSeedGenerator";
23  // get Inputs
24  matchedrecHitsToken_ = consumes<SiStripMatchedRecHit2DCollection>(conf.getParameter<edm::InputTag>("matchedRecHits"));
25  rphirecHitsToken_ = consumes<SiStripRecHit2DCollection>(conf.getParameter<edm::InputTag>("rphirecHits"));
26  stereorecHitsToken_ = consumes<SiStripRecHit2DCollection>(conf.getParameter<edm::InputTag>("stereorecHits"));
27 
28  produces<TrajectorySeedCollection>();
29 }

References edm::ParameterSet::getParameter(), matchedrecHitsToken_, rphirecHitsToken_, and stereorecHitsToken_.

◆ ~CosmicSeedGenerator()

CosmicSeedGenerator::~CosmicSeedGenerator ( )
override

Definition at line 32 of file CosmicSeedGenerator.cc.

32 {}

Member Function Documentation

◆ produce()

void CosmicSeedGenerator::produce ( edm::Event e,
const edm::EventSetup c 
)
override

Definition at line 35 of file CosmicSeedGenerator.cc.

35  {
37  ev.getByToken(rphirecHitsToken_, rphirecHits);
42 
43  auto output = std::make_unique<TrajectorySeedCollection>();
44 
45  //check on the number of clusters
46  size_t clustsOrZero = check.tooManyClusters(ev);
47  if (!clustsOrZero) {
49 
50  // invoke the seed finding algorithm
51  cosmic_seed.run(*output, es);
52  } else
53  edm::LogError("TooManyClusters") << "Found too many clusters (" << clustsOrZero << "), bailing out.\n";
54 
55  // write output to file
56  LogDebug("CosmicSeedGenerator") << " number of seeds = " << output->size();
57 
58  ev.put(std::move(output));
59 }

References check, cosmic_seed, ev, SeedGeneratorForCosmics::init(), LogDebug, AlignmentTrackSelector_cfi::matchedrecHits, matchedrecHitsToken_, eostools::move(), convertSQLitetoXML_cfg::output, AlignmentTrackSelector_cfi::rphirecHits, rphirecHitsToken_, SeedGeneratorForCosmics::run(), convBremSeeds_cfi::stereorecHits, stereorecHitsToken_, and ClusterChecker::tooManyClusters().

Member Data Documentation

◆ check

ClusterChecker CosmicSeedGenerator::check
private

Definition at line 30 of file CosmicSeedGenerator.h.

Referenced by produce().

◆ cosmic_seed

SeedGeneratorForCosmics CosmicSeedGenerator::cosmic_seed
private

Definition at line 29 of file CosmicSeedGenerator.h.

Referenced by produce().

◆ matchedrecHitsToken_

edm::EDGetTokenT<SiStripMatchedRecHit2DCollection> CosmicSeedGenerator::matchedrecHitsToken_
private

Definition at line 32 of file CosmicSeedGenerator.h.

Referenced by CosmicSeedGenerator(), and produce().

◆ rphirecHitsToken_

edm::EDGetTokenT<SiStripRecHit2DCollection> CosmicSeedGenerator::rphirecHitsToken_
private

Definition at line 33 of file CosmicSeedGenerator.h.

Referenced by CosmicSeedGenerator(), and produce().

◆ stereorecHitsToken_

edm::EDGetTokenT<SiStripRecHit2DCollection> CosmicSeedGenerator::stereorecHitsToken_
private

Definition at line 34 of file CosmicSeedGenerator.h.

Referenced by CosmicSeedGenerator(), and produce().

SeedGeneratorForCosmics::init
void init(const SiStripRecHit2DCollection &collstereo, const SiStripRecHit2DCollection &collrphi, const SiStripMatchedRecHit2DCollection &collmatched, const edm::EventSetup &c)
Definition: SeedGeneratorForCosmics.cc:7
SeedGeneratorForCosmics::run
void run(TrajectorySeedCollection &, const edm::EventSetup &c)
Definition: SeedGeneratorForCosmics.cc:66
convertSQLitetoXML_cfg.output
output
Definition: convertSQLitetoXML_cfg.py:72
CosmicSeedGenerator::matchedrecHitsToken_
edm::EDGetTokenT< SiStripMatchedRecHit2DCollection > matchedrecHitsToken_
Definition: CosmicSeedGenerator.h:32
CosmicSeedGenerator::stereorecHitsToken_
edm::EDGetTokenT< SiStripRecHit2DCollection > stereorecHitsToken_
Definition: CosmicSeedGenerator.h:34
convBremSeeds_cfi.stereorecHits
stereorecHits
Definition: convBremSeeds_cfi.py:13
AlignmentTrackSelector_cfi.matchedrecHits
matchedrecHits
Definition: AlignmentTrackSelector_cfi.py:64
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
CosmicSeedGenerator::rphirecHitsToken_
edm::EDGetTokenT< SiStripRecHit2DCollection > rphirecHitsToken_
Definition: CosmicSeedGenerator.h:33
edm::Handle
Definition: AssociativeIterator.h:50
CosmicSeedGenerator::cosmic_seed
SeedGeneratorForCosmics cosmic_seed
Definition: CosmicSeedGenerator.h:29
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:223
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
eostools.move
def move(src, dest)
Definition: eostools.py:511
ev
bool ev
Definition: Hydjet2Hadronizer.cc:95
AlignmentTrackSelector_cfi.rphirecHits
rphirecHits
Definition: AlignmentTrackSelector_cfi.py:63
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
ClusterChecker::tooManyClusters
size_t tooManyClusters(const edm::Event &e) const
Definition: ClusterChecker.cc:44
edm::InputTag
Definition: InputTag.h:15
CosmicSeedGenerator::check
ClusterChecker check
Definition: CosmicSeedGenerator.h:30