CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
CosmicSeedGenerator Class Reference

#include <CosmicSeedGenerator.h>

Inheritance diagram for CosmicSeedGenerator:
edm::EDProducer edm::ProducerBase edm::ProductRegistryHelper

Public Member Functions

 CosmicSeedGenerator (const edm::ParameterSet &conf)
 
virtual void produce (edm::Event &e, const edm::EventSetup &c)
 
virtual ~CosmicSeedGenerator ()
 
- Public Member Functions inherited from edm::EDProducer
 EDProducer ()
 
virtual ~EDProducer ()
 
- Public Member Functions inherited from edm::ProducerBase
 ProducerBase ()
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
boost::function< void(const
BranchDescription &)> 
registrationCallback () const
 used by the fwk to register list of products More...
 
virtual ~ProducerBase ()
 

Private Attributes

edm::ParameterSet conf_
 
SeedGeneratorForCosmics cosmic_seed
 

Additional Inherited Members

- Public Types inherited from edm::EDProducer
typedef EDProducer ModuleType
 
typedef WorkerT< EDProducerWorkerType
 
- Public Types inherited from edm::ProducerBase
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 
- Static Public Member Functions inherited from edm::EDProducer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDProducer
CurrentProcessingContext const * currentContext () const
 
- Protected Member Functions inherited from edm::ProducerBase
template<class TProducer , class TMethod >
void callWhenNewProductsRegistered (TProducer *iProd, TMethod iMethod)
 

Detailed Description

Definition at line 23 of file CosmicSeedGenerator.h.

Constructor & Destructor Documentation

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

Definition at line 24 of file CosmicSeedGenerator.cc.

24  :
25  conf_(conf) ,cosmic_seed(conf)
26  {
27  edm::LogInfo ("CosmicSeedGenerator")<<"Enter the CosmicSeedGenerator";
28  produces<TrajectorySeedCollection>();
29 }
SeedGeneratorForCosmics cosmic_seed
edm::ParameterSet conf_
CosmicSeedGenerator::~CosmicSeedGenerator ( )
virtual

Definition at line 33 of file CosmicSeedGenerator.cc.

33 { }

Member Function Documentation

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

Implements edm::EDProducer.

Definition at line 36 of file CosmicSeedGenerator.cc.

References CastorDataFrameFilter_impl::check(), conf_, cosmic_seed, edm::Event::getByLabel(), edm::ParameterSet::getParameter(), SeedGeneratorForCosmics::init(), LogDebug, ExpressReco_HICollisions_FallBack::matchedrecHits, convertSQLitetoXML_cfg::output, edm::Event::put(), ExpressReco_HICollisions_FallBack::rphirecHits, SeedGeneratorForCosmics::run(), and ClusterChecker::tooManyClusters().

37 {
38  // get Inputs
39  edm::InputTag matchedrecHitsTag = conf_.getParameter<edm::InputTag>("matchedRecHits");
40  edm::InputTag rphirecHitsTag = conf_.getParameter<edm::InputTag>("rphirecHits");
41  edm::InputTag stereorecHitsTag = conf_.getParameter<edm::InputTag>("stereorecHits");
42 
44  ev.getByLabel( rphirecHitsTag, rphirecHits );
46  ev.getByLabel( stereorecHitsTag ,stereorecHits );
48  ev.getByLabel( matchedrecHitsTag ,matchedrecHits );
49 
50 
51  std::auto_ptr<TrajectorySeedCollection> output(new TrajectorySeedCollection);
52 
53  //check on the number of clusters
55  size_t clustsOrZero = check.tooManyClusters(ev);
56  if (!clustsOrZero){
57  cosmic_seed.init(*stereorecHits,*rphirecHits,*matchedrecHits, es);
58 
59  // invoke the seed finding algorithm
60  cosmic_seed.run(*output,es);
61  } else edm::LogError("TooManyClusters") << "Found too many clusters (" << clustsOrZero << "), bailing out.\n";
62 
63  // write output to file
64  LogDebug("CosmicSeedGenerator")<<" number of seeds = "<< output->size();
65 
66 
67  ev.put(output);
68 }
#define LogDebug(id)
T getParameter(std::string const &) const
void run(TrajectorySeedCollection &, const edm::EventSetup &c)
std::vector< TrajectorySeed > TrajectorySeedCollection
bool check(const DataFrame &df, bool capcheck, bool dvercheck)
SeedGeneratorForCosmics cosmic_seed
edm::ParameterSet conf_
void init(const SiStripRecHit2DCollection &collstereo, const SiStripRecHit2DCollection &collrphi, const SiStripMatchedRecHit2DCollection &collmatched, const edm::EventSetup &c)

Member Data Documentation

edm::ParameterSet CosmicSeedGenerator::conf_
private

Definition at line 34 of file CosmicSeedGenerator.h.

Referenced by produce().

SeedGeneratorForCosmics CosmicSeedGenerator::cosmic_seed
private

Definition at line 35 of file CosmicSeedGenerator.h.

Referenced by produce().