CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
SiStripRecHitConverter.cc
Go to the documentation of this file.
3 
5  : recHitConverterAlgorithm(conf) ,
6  matchedRecHitsTag( conf.getParameter<std::string>( "matchedRecHits" ) ),
7  rphiRecHitsTag( conf.getParameter<std::string>( "rphiRecHits" ) ),
8  stereoRecHitsTag( conf.getParameter<std::string>( "stereoRecHits" ) ),
9  clusterProducer(conf.getParameter<edm::InputTag>("ClusterProducer")),
10  lazyGetterProducer(conf.getParameter<edm::InputTag>("LazyGetterProducer")),
11  regional(conf.getParameter<bool>("Regional"))
12 {
13  produces<SiStripMatchedRecHit2DCollection>( matchedRecHitsTag );
14  produces<SiStripRecHit2DCollection>( rphiRecHitsTag );
15  produces<SiStripRecHit2DCollection>( stereoRecHitsTag );
16  produces<SiStripRecHit2DCollection>( rphiRecHitsTag + "Unmatched" );
17  produces<SiStripRecHit2DCollection>( stereoRecHitsTag + "Unmatched" );
18 }
19 
22 {
26 
27  if (regional){
28  e.getByLabel(clusterProducer, refclusters);
29  e.getByLabel(lazyGetterProducer, lazygetter);
30  } else e.getByLabel(clusterProducer, clusters);
31 
34 
35  if (regional) recHitConverterAlgorithm.run(refclusters,lazygetter,output);
36  else recHitConverterAlgorithm.run(clusters, output);
37 
38  LogDebug("SiStripRecHitConverter") << "found\n"
39  << output.rphi->dataSize() << " clusters in mono detectors\n"
40  << output.stereo->dataSize() << " clusters in partners stereo detectors\n";
41 
42  e.put( output.matched, matchedRecHitsTag );
43  e.put( output.rphi, rphiRecHitsTag );
44  e.put( output.stereo, stereoRecHitsTag );
45  e.put( output.rphiUnmatched, rphiRecHitsTag + "Unmatched" );
46  e.put( output.stereoUnmatched, stereoRecHitsTag + "Unmatched" );
47 
48 }
#define LogDebug(id)
void run(edm::Handle< edmNew::DetSetVector< SiStripCluster > > input, products &output)
std::auto_ptr< SiStripRecHit2DCollection > rphiUnmatched
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:85
SiStripRecHitConverter(const edm::ParameterSet &)
std::auto_ptr< SiStripRecHit2DCollection > stereoUnmatched
std::auto_ptr< SiStripRecHit2DCollection > rphi
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:356
tuple conf
Definition: dbtoconf.py:185
virtual void produce(edm::Event &, const edm::EventSetup &)
std::auto_ptr< SiStripMatchedRecHit2DCollection > matched
std::auto_ptr< SiStripRecHit2DCollection > stereo
SiStripRecHitConverterAlgorithm recHitConverterAlgorithm