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 } // namespace edm
27 
29 
31 public:
33  edm::ProducesCollector producesCollector,
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  producesCollector.produces<FTLDigiCollection>(digiCollection_);
43  }
44 
45  virtual ~FTLDigitizerBase() {}
46 
50  virtual void accumulate(edm::Event const& e, edm::EventSetup const& c, CLHEP::HepRandomEngine* hre) = 0;
51  virtual void accumulate(PileUpEventPrincipal const& e, edm::EventSetup const& c, CLHEP::HepRandomEngine* hre) = 0;
52  virtual void accumulate(edm::Handle<edm::PSimHitContainer> const& hits,
53  int bxCrossing,
54  CLHEP::HepRandomEngine* hre) = 0;
55 
59  virtual void initializeEvent(edm::Event const& e, edm::EventSetup const& c) = 0;
60  virtual void finalizeEvent(edm::Event& e, edm::EventSetup const& c, CLHEP::HepRandomEngine* hre) = 0;
61 
65  virtual void beginRun(const edm::EventSetup& es) = 0;
66  virtual void endRun() = 0;
67 
68  const std::string& name() const { return name_; }
69 
70 protected:
71  //input/output names
74 
75  //subdetector id
77 
78  //misc switches
79  const uint32_t verbosity_;
80 
81  //reference speed to evaluate time of arrival at the sensititive detector, assuming the center of CMS
82  const float refSpeed_;
83 
84 private:
86 };
87 
92 
93 #endif
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
FTLDigitizerBase(const edm::ParameterSet &config, edm::ProducesCollector producesCollector, edm::ConsumesCollector &iC)
const std::string & name() const
ProductRegistryHelper::BranchAliasSetterT< ProductType > produces()
const edm::InputTag inputSimHits_
Definition: config.py:1
ForwardSubdetector
const float refSpeed_
const ForwardSubdetector mySubDet_
const uint32_t verbosity_
HLT enums.
const std::string digiCollection_
virtual ~FTLDigitizerBase()