CMS 3D CMS Logo

FTLDigitizerBase.h
Go to the documentation of this file.
1 #ifndef FastTimingSimProducers_FastTimingCommon_FTLDigitizerBase_h
2 #define FastTimingSimProducers_FastTimingCommon_FTLDigitizerBase_h
3 
8 
11 
14 
15 #include "CLHEP/Units/GlobalPhysicalConstants.h"
16 
17 #include <string>
18 
19 namespace CLHEP {
20  class HepRandomEngine;
21 }
22 
23 namespace edm {
24  class Event;
25  class EventSetup;
26 }
27 
29 
31  public:
35  inputSimHits_( config.getParameter<edm::InputTag>("inputSimHits") ),
36  digiCollection_( config.getParameter<std::string>("digiCollectionTag") ),
37  mySubDet_(FastTime),
38  verbosity_( config.getUntrackedParameter< uint32_t >("verbosity",0) ),
39  refSpeed_( 0.1*CLHEP::c_light ),
40  name_( config.getParameter<std::string>("digitizerName") ) {
41  iC.consumes<std::vector<PSimHit> >(inputSimHits_);
42  parent.produces<FTLDigiCollection>(digiCollection_);
43  }
44 
45  virtual ~FTLDigitizerBase() {}
46 
47 
51  virtual void accumulate(edm::Event const& e, edm::EventSetup const& c, CLHEP::HepRandomEngine* hre) = 0;
52  virtual void accumulate(PileUpEventPrincipal const& e, edm::EventSetup const& c, CLHEP::HepRandomEngine* hre) = 0;
53  virtual void accumulate(edm::Handle<edm::PSimHitContainer> const &hits, int bxCrossing, CLHEP::HepRandomEngine* hre) = 0;
54 
58  virtual void initializeEvent(edm::Event const& e, edm::EventSetup const& c) = 0;
59  virtual void finalizeEvent(edm::Event& e, edm::EventSetup const& c, CLHEP::HepRandomEngine* hre) = 0;
60 
64  virtual void beginRun(const edm::EventSetup & es) = 0;
65  virtual void endRun() = 0;
66 
67  const std::string& name() const {
68  return name_;
69  }
70 
71  protected:
72  //input/output names
75 
76  //subdetector id
78 
79  //misc switches
80  const uint32_t verbosity_;
81 
82  //reference speed to evaluate time of arrival at the sensititive detector, assuming the center of CMS
83  const float refSpeed_;
84 
85  private:
87 };
88 
91 
92 
93 
94 #endif
FTLDigitizerBase(const edm::ParameterSet &config, edm::ConsumesCollector &iC, edm::stream::EDProducerBase &parent)
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
const std::string & name() const
const edm::InputTag inputSimHits_
Definition: config.py:1
ForwardSubdetector
const float refSpeed_
edmplugin::PluginFactory< FTLDigitizerBase *(const edm::ParameterSet &, edm::ConsumesCollector &, edm::stream::EDProducerBase &) > FTLDigitizerFactory
const ForwardSubdetector mySubDet_
const uint32_t verbosity_
HLT enums.
const std::string digiCollection_
virtual ~FTLDigitizerBase()