CMS 3D CMS Logo

Public Member Functions | Private Attributes

SiStripRecHitConverter Class Reference

#include <SiStripRecHitConverter.h>

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

List of all members.

Public Member Functions

virtual void produce (edm::Event &, const edm::EventSetup &)
 SiStripRecHitConverter (const edm::ParameterSet &)

Private Attributes

edm::InputTag clusterProducer
edm::InputTag lazyGetterProducer
std::string matchedRecHitsTag
SiStripRecHitConverterAlgorithm recHitConverterAlgorithm
bool regional
std::string rphiRecHitsTag
std::string stereoRecHitsTag

Detailed Description

Definition at line 8 of file SiStripRecHitConverter.h.


Constructor & Destructor Documentation

SiStripRecHitConverter::SiStripRecHitConverter ( const edm::ParameterSet conf) [explicit]

Definition at line 4 of file SiStripRecHitConverter.cc.

References matchedRecHitsTag, rphiRecHitsTag, and stereoRecHitsTag.

  : recHitConverterAlgorithm(conf) ,
    matchedRecHitsTag( conf.getParameter<std::string>( "matchedRecHits" ) ), 
    rphiRecHitsTag( conf.getParameter<std::string>( "rphiRecHits" ) ), 
    stereoRecHitsTag( conf.getParameter<std::string>( "stereoRecHits" ) ),
    clusterProducer(conf.getParameter<edm::InputTag>("ClusterProducer")),
    lazyGetterProducer(conf.getParameter<edm::InputTag>("LazyGetterProducer")),
    regional(conf.getParameter<bool>("Regional"))
{
  produces<SiStripMatchedRecHit2DCollection>( matchedRecHitsTag );
  produces<SiStripRecHit2DCollection>( rphiRecHitsTag );
  produces<SiStripRecHit2DCollection>( stereoRecHitsTag );
  produces<SiStripRecHit2DCollection>( rphiRecHitsTag + "Unmatched" );
  produces<SiStripRecHit2DCollection>( stereoRecHitsTag +  "Unmatched" );
}

Member Function Documentation

void SiStripRecHitConverter::produce ( edm::Event e,
const edm::EventSetup es 
) [virtual]

Implements edm::EDProducer.

Definition at line 21 of file SiStripRecHitConverter.cc.

References clusterProducer, edm::Event::getByLabel(), SiStripRecHitConverterAlgorithm::initialize(), lazyGetterProducer, LogDebug, SiStripRecHitConverterAlgorithm::products::matched, matchedRecHitsTag, convertSQLitetoXML_cfg::output, edm::Event::put(), recHitConverterAlgorithm, regional, SiStripRecHitConverterAlgorithm::products::rphi, rphiRecHitsTag, SiStripRecHitConverterAlgorithm::products::rphiUnmatched, SiStripRecHitConverterAlgorithm::run(), SiStripRecHitConverterAlgorithm::products::stereo, stereoRecHitsTag, and SiStripRecHitConverterAlgorithm::products::stereoUnmatched.

{
  edm::Handle<edmNew::DetSetVector<SiStripCluster> > clusters;
  edm::Handle<edm::RefGetter<SiStripCluster> > refclusters;
  edm::Handle<edm::LazyGetter<SiStripCluster> > lazygetter;
  
  if (regional){
    e.getByLabel(clusterProducer, refclusters);
    e.getByLabel(lazyGetterProducer, lazygetter);
  } else e.getByLabel(clusterProducer, clusters);
  
  SiStripRecHitConverterAlgorithm::products output;
  recHitConverterAlgorithm.initialize(es);

  if (regional) recHitConverterAlgorithm.run(refclusters,lazygetter,output);
  else          recHitConverterAlgorithm.run(clusters, output);
  
  LogDebug("SiStripRecHitConverter") << "found\n"  
                                     << output.rphi->dataSize()   << "  clusters in mono detectors\n"                            
                                     << output.stereo->dataSize() << "  clusters in partners stereo detectors\n";

  e.put( output.matched,         matchedRecHitsTag );
  e.put( output.rphi,            rphiRecHitsTag    );
  e.put( output.stereo,          stereoRecHitsTag  );
  e.put( output.rphiUnmatched,   rphiRecHitsTag   + "Unmatched" );
  e.put( output.stereoUnmatched, stereoRecHitsTag + "Unmatched" );  

}

Member Data Documentation

Definition at line 20 of file SiStripRecHitConverter.h.

Referenced by produce().

Definition at line 20 of file SiStripRecHitConverter.h.

Referenced by produce().

Definition at line 19 of file SiStripRecHitConverter.h.

Referenced by produce(), and SiStripRecHitConverter().

Definition at line 18 of file SiStripRecHitConverter.h.

Referenced by produce().

Definition at line 21 of file SiStripRecHitConverter.h.

Referenced by produce().

Definition at line 19 of file SiStripRecHitConverter.h.

Referenced by produce(), and SiStripRecHitConverter().

Definition at line 19 of file SiStripRecHitConverter.h.

Referenced by produce(), and SiStripRecHitConverter().