CMS 3D CMS Logo

CastorHitCorrection.h
Go to the documentation of this file.
1 #ifndef CastorSim_CastorHitCorrection_h
2 #define CastorSim_CastorHitCorrection_h
3 
14 #include <map>
15 #include <vector>
16 
17 namespace CLHEP {
18  class HepRandomEngine;
19 }
20 
22 public:
23  typedef std::map<DetId, double> ChargeSumsByChannel;
24 
25  CastorHitCorrection(const CaloVSimParameterMap *parameterMap);
26  ~CastorHitCorrection() override {}
27 
28  void fillChargeSums(MixCollection<PCaloHit> &hits);
29 
30  void fillChargeSums(const std::vector<PCaloHit> &hits);
31 
32  void clear();
33 
35  double charge(const PCaloHit &hit) const;
36 
38  double delay(const PCaloHit &hit, CLHEP::HepRandomEngine *) const override;
39 
41  int timeBin(const PCaloHit &hit) const;
42 
44  double timeOfFlight(const DetId &id) const;
45 
46 private:
48 
49  ChargeSumsByChannel theChargeSumsForTimeBin[10];
50 };
51 
52 #endif
void clear(CLHEP::HepGenMatrix &m)
Helper function: Reset all elements of a matrix to 0.
Definition: matutil.cc:167
std::map< DetId, double > ChargeSumsByChannel
Definition: DetId.h:18
const CaloVSimParameterMap * theParameterMap
double timeOfFlight(DetId id, const CaloGeometry *geo, bool debug=false)
Definition: CaloSimInfo.cc:17