test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
HGCDigitizer.h
Go to the documentation of this file.
1 #ifndef HGCalSimProducers_HGCDigitizer_h
2 #define HGcalSimProducers_HGCDigitizer_h
3 
7 
10 
18 
19 #include <vector>
20 #include <map>
21 #include <memory>
22 
23 class PCaloHit;
25 
26 namespace edm {
27  class ConsumesCollector;
28 }
29 
30 namespace CLHEP {
31  class HepRandomEngine;
32 }
33 
34 class HGCDigitizer {
35 
36 public:
37 
38  explicit HGCDigitizer(const edm::ParameterSet& ps, edm::ConsumesCollector& iC);
40 
44  void accumulate(edm::Event const& e, edm::EventSetup const& c, CLHEP::HepRandomEngine*);
45  void accumulate(PileUpEventPrincipal const& e, edm::EventSetup const& c, CLHEP::HepRandomEngine*);
46  void accumulate(edm::Handle<edm::PCaloHitContainer> const &hits, int bxCrossing,const edm::ESHandle<HGCalGeometry> &geom, CLHEP::HepRandomEngine*);
47 
51  void initializeEvent(edm::Event const& e, edm::EventSetup const& c);
52  void finalizeEvent(edm::Event& e, edm::EventSetup const& c, CLHEP::HepRandomEngine*);
53 
60 
64  void beginRun(const edm::EventSetup & es);
65  void endRun();
66 
67 private :
68 
69  //used for initialization
71 
72  //input/output names
74 
75  //digitization type (it's up to the specializations to decide it's meaning)
77 
78  //handle sim hits
80  int bxTime_;
81  std::unique_ptr<HGCSimHitDataAccumulator> simHitAccumulator_;
83 
84  //digitizers
85  std::unique_ptr<HGCEEDigitizer> theHGCEEDigitizer_;
86  std::unique_ptr<HGCHEbackDigitizer> theHGCHEbackDigitizer_;
87  std::unique_ptr<HGCHEfrontDigitizer> theHGCHEfrontDigitizer_;
88 
89  //subdetector id
91 
92  //misc switches
95 
96  //reference speed to evaluate time of arrival at the sensititive detector, assuming the center of CMS
97  float refSpeed_;
98 
99  //delay to apply after evaluating time of arrival at the sensitive detector
100  float tofDelay_;
101 };
102 
103 #endif
ForwardSubdetector mySubDet_
Definition: HGCDigitizer.h:90
int digitizationType_
Definition: HGCDigitizer.h:76
std::string hitCollection_
Definition: HGCDigitizer.h:73
void resetSimHitDataAccumulator()
bool useAllChannels_
Definition: HGCDigitizer.h:93
bool checkValidDetIds_
Definition: HGCDigitizer.h:70
void initializeEvent(edm::Event const &e, edm::EventSetup const &c)
actions at the start/end of event
Definition: HGCDigitizer.cc:53
ForwardSubdetector
bool producesEEDigis()
Definition: HGCDigitizer.h:56
std::string digiCollection_
Definition: HGCDigitizer.h:73
void finalizeEvent(edm::Event &e, edm::EventSetup const &c, CLHEP::HepRandomEngine *)
Definition: HGCDigitizer.cc:58
void beginRun(const edm::EventSetup &es)
actions at the start/end of run
float refSpeed_
Definition: HGCDigitizer.h:97
bool producesHEfrontDigis()
Definition: HGCDigitizer.h:57
std::unique_ptr< HGCHEbackDigitizer > theHGCHEbackDigitizer_
Definition: HGCDigitizer.h:86
void accumulate(edm::Event const &e, edm::EventSetup const &c, CLHEP::HepRandomEngine *)
handle SimHit accumulation
Definition: HGCDigitizer.cc:80
bool producesHEbackDigis()
Definition: HGCDigitizer.h:58
int maxSimHitsAccTime_
Definition: HGCDigitizer.h:79
std::unique_ptr< HGCHEfrontDigitizer > theHGCHEfrontDigitizer_
Definition: HGCDigitizer.h:87
std::unique_ptr< HGCEEDigitizer > theHGCEEDigitizer_
Definition: HGCDigitizer.h:85
std::unique_ptr< HGCSimHitDataAccumulator > simHitAccumulator_
Definition: HGCDigitizer.h:81
HGCDigitizer(const edm::ParameterSet &ps, edm::ConsumesCollector &iC)
Definition: HGCDigitizer.cc:20
std::string digiCollection()
Definition: HGCDigitizer.h:59