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 (const PMTDSimAccumulator &simAccumulator)=0
 
virtual void accumulate (edm::Event const &e, edm::EventSetup const &c, CLHEP::HepRandomEngine *hre)=0
 handle SimHit accumulation More...
 
virtual void accumulate (edm::Handle< edm::PSimHitContainer > const &hits, int bxCrossing, CLHEP::HepRandomEngine *hre)=0
 
virtual void accumulate (PileUpEventPrincipal const &e, edm::EventSetup const &c, CLHEP::HepRandomEngine *hre)=0
 
virtual void beginRun (const edm::EventSetup &es)=0
 actions at the start/end of run More...
 
virtual void endRun ()=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.

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  }

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

◆ ~MTDDigitizerBase()

virtual MTDDigitizerBase::~MTDDigitizerBase ( )
inlinevirtual

Definition at line 62 of file MTDDigitizerBase.h.

62 {}

Member Function Documentation

◆ accumulate() [1/4]

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

◆ accumulate() [2/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() [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 ( PileUpEventPrincipal const &  e,
edm::EventSetup const &  c,
CLHEP::HepRandomEngine *  hre 
)
pure virtual

◆ beginRun()

virtual void MTDDigitizerBase::beginRun ( const edm::EventSetup es)
pure virtual

actions at the start/end of run

Implemented in mtd_digitizer::MTDDigitizer< Traits >.

◆ endRun()

virtual void MTDDigitizerBase::endRun ( )
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 87 of file MTDDigitizerBase.h.

87 { return name_; }

References name_.

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

Member Data Documentation

◆ digiCollection_

const std::string MTDDigitizerBase::digiCollection_
protected

Definition at line 92 of file MTDDigitizerBase.h.

Referenced by MTDDigitizerBase().

◆ inputSimHits_

const edm::InputTag MTDDigitizerBase::inputSimHits_
protected

Definition at line 91 of file MTDDigitizerBase.h.

Referenced by MTDDigitizerBase().

◆ name_

std::string MTDDigitizerBase::name_
private

Definition at line 109 of file MTDDigitizerBase.h.

Referenced by MTDDigitizerBase(), and name().

◆ premixStage1_

const bool MTDDigitizerBase::premixStage1_
protected

Definition at line 106 of file MTDDigitizerBase.h.

Referenced by MTDDigitizerBase().

◆ premixStage1MaxCharge_

double MTDDigitizerBase::premixStage1MaxCharge_
protected

Definition at line 103 of file MTDDigitizerBase.h.

◆ premixStage1MinCharge_

double MTDDigitizerBase::premixStage1MinCharge_
protected

Definition at line 101 of file MTDDigitizerBase.h.

◆ refSpeed_

const float MTDDigitizerBase::refSpeed_
protected

Definition at line 98 of file MTDDigitizerBase.h.

◆ verbosity_

const uint32_t MTDDigitizerBase::verbosity_
protected

Definition at line 95 of file MTDDigitizerBase.h.

PMTDSimAccumulator
Definition: PMTDSimAccumulator.h:9
MTDDigitizerBase::inputSimHits_
const edm::InputTag inputSimHits_
Definition: MTDDigitizerBase.h:91
edm::SortedCollection
Definition: SortedCollection.h:49
MTDDigitizerBase::premixStage1_
const bool premixStage1_
Definition: MTDDigitizerBase.h:106
MTDDigitizerBase::premixStage1MaxCharge_
double premixStage1MaxCharge_
Definition: MTDDigitizerBase.h:103
MTDDigitizerBase::digiCollection_
const std::string digiCollection_
Definition: MTDDigitizerBase.h:92
config
Definition: config.py:1
edm::ConsumesCollector::consumes
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
Definition: ConsumesCollector.h:55
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
MTDDigitizerBase::verbosity_
const uint32_t verbosity_
Definition: MTDDigitizerBase.h:95
edm::ProducesCollector::produces
ProductRegistryHelper::BranchAliasSetterT< ProductType > produces()
Definition: ProducesCollector.h:52
MTDDigitizerBase::refSpeed_
const float refSpeed_
Definition: MTDDigitizerBase.h:98
Exception
Definition: hltDiff.cc:246
MTDDigitizerBase::premixStage1MinCharge_
double premixStage1MinCharge_
Definition: MTDDigitizerBase.h:101
edm::InputTag
Definition: InputTag.h:15
MTDDigitizerBase::name_
std::string name_
Definition: MTDDigitizerBase.h:109