CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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
 
 EDProducer (const EDProducer &)=delete
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
const EDProduceroperator= (const EDProducer &)=delete
 

Private Attributes

ClusterChecker check
 
SeedGeneratorForCosmics cosmic_seed
 
edm::EDGetTokenT
< SiStripMatchedRecHit2DCollection
matchedrecHitsToken_
 
edm::EDGetTokenT
< SiStripRecHit2DCollection
rphirecHitsToken_
 
edm::EDGetTokenT
< SiStripRecHit2DCollection
stereorecHitsToken_
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDProducer<>
using CacheTypes = CacheContexts< T...>
 
using GlobalCache = typename CacheTypes::GlobalCache
 
using HasAbility = AbilityChecker< T...>
 
using InputProcessBlockCache = typename CacheTypes::InputProcessBlockCache
 
using LuminosityBlockCache = typename CacheTypes::LuminosityBlockCache
 
using LuminosityBlockContext = LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCache >
 
using LuminosityBlockSummaryCache = typename CacheTypes::LuminosityBlockSummaryCache
 
using RunCache = typename CacheTypes::RunCache
 
using RunContext = RunContextT< RunCache, GlobalCache >
 
using RunSummaryCache = typename CacheTypes::RunSummaryCache
 

Detailed Description

Definition at line 20 of file CosmicSeedGenerator.h.

Constructor & Destructor Documentation

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

Definition at line 17 of file CosmicSeedGenerator.cc.

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

18  : cosmic_seed(conf, consumesCollector()),
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 }
edm::EDGetTokenT< SiStripMatchedRecHit2DCollection > matchedrecHitsToken_
edm::EDGetTokenT< SiStripRecHit2DCollection > rphirecHitsToken_
edm::EDGetTokenT< SiStripRecHit2DCollection > stereorecHitsToken_
SeedGeneratorForCosmics cosmic_seed
Log< level::Info, false > LogInfo
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
CosmicSeedGenerator::~CosmicSeedGenerator ( )
override

Definition at line 32 of file CosmicSeedGenerator.cc.

32 {}

Member Function Documentation

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

Definition at line 35 of file CosmicSeedGenerator.cc.

References check, cosmic_seed, edm::Event::getByToken(), LogDebug, matchedrecHitsToken_, eostools::move(), convertSQLitetoXML_cfg::output, edm::Event::put(), rphirecHitsToken_, SeedGeneratorForCosmics::run(), stereorecHitsToken_, and ClusterChecker::tooManyClusters().

35  {
37  ev.getByToken(rphirecHitsToken_, rphirecHits);
39  ev.getByToken(stereorecHitsToken_, stereorecHits);
41  ev.getByToken(matchedrecHitsToken_, matchedrecHits);
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) {
48  // invoke the seed finding algorithm
49  cosmic_seed.run(*stereorecHits, *rphirecHits, *matchedrecHits, es, *output);
50  } else
51  edm::LogError("TooManyClusters") << "Found too many clusters (" << clustsOrZero << "), bailing out.\n";
52 
53  // write output to file
54  LogDebug("CosmicSeedGenerator") << " number of seeds = " << output->size();
55 
56  ev.put(std::move(output));
57 }
edm::EDGetTokenT< SiStripMatchedRecHit2DCollection > matchedrecHitsToken_
edm::EDGetTokenT< SiStripRecHit2DCollection > rphirecHitsToken_
Log< level::Error, false > LogError
edm::EDGetTokenT< SiStripRecHit2DCollection > stereorecHitsToken_
def move
Definition: eostools.py:511
size_t tooManyClusters(const edm::Event &e) const
SeedGeneratorForCosmics cosmic_seed
void run(const SiStripRecHit2DCollection &collstereo, const SiStripRecHit2DCollection &collrphi, const SiStripMatchedRecHit2DCollection &collmatched, const edm::EventSetup &c, TrajectorySeedCollection &)
#define LogDebug(id)

Member Data Documentation

ClusterChecker CosmicSeedGenerator::check
private

Definition at line 30 of file CosmicSeedGenerator.h.

Referenced by produce().

SeedGeneratorForCosmics CosmicSeedGenerator::cosmic_seed
private

Definition at line 29 of file CosmicSeedGenerator.h.

Referenced by produce().

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

Definition at line 32 of file CosmicSeedGenerator.h.

Referenced by CosmicSeedGenerator(), and produce().

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

Definition at line 33 of file CosmicSeedGenerator.h.

Referenced by CosmicSeedGenerator(), and produce().

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

Definition at line 34 of file CosmicSeedGenerator.h.

Referenced by CosmicSeedGenerator(), and produce().