CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Attributes | Private Attributes
MTDDigitizerBase Class Referenceabstract

#include <MTDDigitizerBase.h>

Inheritance diagram for MTDDigitizerBase:
mtd_digitizer::MTDDigitizer< Traits >

Public Member Functions

virtual void accumulate (edm::Event const &e, edm::EventSetup const &c, CLHEP::HepRandomEngine *hre)=0
 handle SimHit accumulation More...
 
virtual void accumulate (PileUpEventPrincipal const &e, edm::EventSetup const &c, CLHEP::HepRandomEngine *hre)=0
 
virtual void accumulate (edm::Handle< edm::PSimHitContainer > const &hits, int bxCrossing, CLHEP::HepRandomEngine *hre)=0
 
virtual void accumulate (const PMTDSimAccumulator &simAccumulator)=0
 
virtual void finalizeEvent (edm::Event &e, edm::EventSetup const &c, CLHEP::HepRandomEngine *hre)=0
 
virtual void initializeEvent (edm::Event const &e, edm::EventSetup const &c)=0
 actions at the start/end of event More...
 
 MTDDigitizerBase (const edm::ParameterSet &config, edm::ProducesCollector producesCollector, edm::ConsumesCollector &iC)
 
const std::string & name () const
 
virtual ~MTDDigitizerBase ()
 

Protected Attributes

const std::string digiCollection_
 
const edm::InputTag inputSimHits_
 
const bool premixStage1_
 
double premixStage1MaxCharge_
 
double premixStage1MinCharge_
 
const float refSpeed_
 
const uint32_t verbosity_
 

Private Attributes

std::string name_
 

Detailed Description

Definition at line 31 of file MTDDigitizerBase.h.

Constructor & Destructor Documentation

◆ MTDDigitizerBase()

MTDDigitizerBase::MTDDigitizerBase ( const edm::ParameterSet config,
edm::ProducesCollector  producesCollector,
edm::ConsumesCollector iC 
)
inline

Definition at line 33 of file MTDDigitizerBase.h.

References edm::ConsumesCollector::consumes(), digiCollection_, Exception, inputSimHits_, name_, premixStage1_, and edm::ProducesCollector::produces().

36  : inputSimHits_(config.getParameter<edm::InputTag>("inputSimHits")),
37  digiCollection_(config.getParameter<std::string>("digiCollectionTag")),
38  verbosity_(config.getUntrackedParameter<uint32_t>("verbosity", 0)),
39  refSpeed_(0.1 * CLHEP::c_light),
40  premixStage1MinCharge_(config.getParameter<double>("premixStage1MinCharge")),
41  premixStage1MaxCharge_(config.getParameter<double>("premixStage1MaxCharge")),
42  premixStage1_(config.getParameter<bool>("premixStage1")),
43  name_(config.getParameter<std::string>("digitizerName")) {
44  iC.consumes<std::vector<PSimHit> >(inputSimHits_);
45 
46  if (name_ == "BTLDigitizer") {
47  if (premixStage1_) {
48  producesCollector.produces<PMTDSimAccumulator>(digiCollection_);
49  } else {
50  producesCollector.produces<BTLDigiCollection>(digiCollection_);
51  }
52  } else if (name_ == "ETLDigitizer")
53  if (premixStage1_) {
54  producesCollector.produces<PMTDSimAccumulator>(digiCollection_);
55  } else {
56  producesCollector.produces<ETLDigiCollection>(digiCollection_);
57  }
58  else
59  throw cms::Exception("[MTDDigitizerBase::MTDDigitizerBase]") << name_ << " is an invalid MTD digitizer name";
60  }
const bool premixStage1_
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
ProductRegistryHelper::BranchAliasSetterT< ProductType > produces()
Definition: config.py:1
const edm::InputTag inputSimHits_
const std::string digiCollection_
const uint32_t verbosity_
double premixStage1MinCharge_
const float refSpeed_
double premixStage1MaxCharge_

◆ ~MTDDigitizerBase()

virtual MTDDigitizerBase::~MTDDigitizerBase ( )
inlinevirtual

Definition at line 62 of file MTDDigitizerBase.h.

62 {}

Member Function Documentation

◆ accumulate() [1/4]

virtual void MTDDigitizerBase::accumulate ( edm::Event const &  e,
edm::EventSetup const &  c,
CLHEP::HepRandomEngine *  hre 
)
pure virtual

handle SimHit accumulation

Implemented in mtd_digitizer::MTDDigitizer< Traits >.

◆ accumulate() [2/4]

virtual void MTDDigitizerBase::accumulate ( PileUpEventPrincipal const &  e,
edm::EventSetup const &  c,
CLHEP::HepRandomEngine *  hre 
)
pure virtual

◆ accumulate() [3/4]

virtual void MTDDigitizerBase::accumulate ( edm::Handle< edm::PSimHitContainer > const &  hits,
int  bxCrossing,
CLHEP::HepRandomEngine *  hre 
)
pure virtual

◆ accumulate() [4/4]

virtual void MTDDigitizerBase::accumulate ( const PMTDSimAccumulator simAccumulator)
pure virtual

◆ finalizeEvent()

virtual void MTDDigitizerBase::finalizeEvent ( edm::Event e,
edm::EventSetup const &  c,
CLHEP::HepRandomEngine *  hre 
)
pure virtual

◆ initializeEvent()

virtual void MTDDigitizerBase::initializeEvent ( edm::Event const &  e,
edm::EventSetup const &  c 
)
pure virtual

actions at the start/end of event

Implemented in mtd_digitizer::MTDDigitizer< Traits >.

◆ name()

const std::string& MTDDigitizerBase::name ( void  ) const
inline

Definition at line 81 of file MTDDigitizerBase.h.

References name_.

Referenced by config.CFG::__str__(), and validation.Sample::digest().

81 { return name_; }

Member Data Documentation

◆ digiCollection_

const std::string MTDDigitizerBase::digiCollection_
protected

Definition at line 86 of file MTDDigitizerBase.h.

Referenced by MTDDigitizerBase().

◆ inputSimHits_

const edm::InputTag MTDDigitizerBase::inputSimHits_
protected

Definition at line 85 of file MTDDigitizerBase.h.

Referenced by MTDDigitizerBase().

◆ name_

std::string MTDDigitizerBase::name_
private

Definition at line 103 of file MTDDigitizerBase.h.

Referenced by MTDDigitizerBase(), and name().

◆ premixStage1_

const bool MTDDigitizerBase::premixStage1_
protected

Definition at line 100 of file MTDDigitizerBase.h.

Referenced by MTDDigitizerBase().

◆ premixStage1MaxCharge_

double MTDDigitizerBase::premixStage1MaxCharge_
protected

Definition at line 97 of file MTDDigitizerBase.h.

◆ premixStage1MinCharge_

double MTDDigitizerBase::premixStage1MinCharge_
protected

Definition at line 95 of file MTDDigitizerBase.h.

◆ refSpeed_

const float MTDDigitizerBase::refSpeed_
protected

Definition at line 92 of file MTDDigitizerBase.h.

◆ verbosity_

const uint32_t MTDDigitizerBase::verbosity_
protected

Definition at line 89 of file MTDDigitizerBase.h.