File indexing completed on 2024-04-06 12:29:21
0001 #ifndef CastorSim_CastorHitCorrection_h
0002 #define CastorSim_CastorHitCorrection_h
0003
0004
0005
0006
0007
0008
0009 #include "DataFormats/DetId/interface/DetId.h"
0010 #include "DataFormats/HcalDetId/interface/HcalDetId.h"
0011 #include "SimCalorimetry/CaloSimAlgos/interface/CaloVHitCorrection.h"
0012 #include "SimCalorimetry/CaloSimAlgos/interface/CaloVSimParameterMap.h"
0013 #include "SimDataFormats/CrossingFrame/interface/MixCollection.h"
0014 #include <map>
0015 #include <vector>
0016
0017 namespace CLHEP {
0018 class HepRandomEngine;
0019 }
0020
0021 class CastorHitCorrection : public CaloVHitCorrection {
0022 public:
0023 typedef std::map<DetId, double> ChargeSumsByChannel;
0024
0025 CastorHitCorrection(const CaloVSimParameterMap *parameterMap);
0026 ~CastorHitCorrection() override {}
0027
0028 void fillChargeSums(MixCollection<PCaloHit> &hits);
0029
0030 void fillChargeSums(const std::vector<PCaloHit> &hits);
0031
0032 void clear();
0033
0034
0035 double charge(const PCaloHit &hit) const;
0036
0037
0038 double delay(const PCaloHit &hit, CLHEP::HepRandomEngine *) const override;
0039
0040
0041 int timeBin(const PCaloHit &hit) const;
0042
0043
0044 double timeOfFlight(const DetId &id) const;
0045
0046 private:
0047 const CaloVSimParameterMap *theParameterMap;
0048
0049 ChargeSumsByChannel theChargeSumsForTimeBin[10];
0050 };
0051
0052 #endif