CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
HcalRecHitsMaker.h
Go to the documentation of this file.
1 #ifndef FastSimulation__HcalRecHitsMaker__h
2 #define FastSimulation__HcalRecHitsMaker__h
3 
8 #include <map>
9 #include <vector>
10 
11 class CaloGeometry;
14 class HcalDbService;
15 class HcalRespCorrs;
16 class HcalTopology;
17 
18 namespace edm {
19  class Event;
20  class EventSetup;
21  class ParameterSet;
22 }
23 
25 {
26  public:
29 
32  void loadHcalRecHits(edm::Event &iEvent, const HcalTopology&, HORecHitCollection &ho, HODigiCollection & hoDigis,
34  void loadHcalRecHits(edm::Event &iEvent, const HcalTopology&, HFRecHitCollection &hfHits, HFDigiCollection& hfDigis,
36  void init(const edm::EventSetup &es,bool dodigis,bool domiscalib);
37 
38  private:
39  unsigned createVectorsOfCells(const edm::EventSetup &es);
40  unsigned createVectorOfSubdetectorCells( const CaloGeometry&,const HcalTopology&, int subdetn,std::vector<int>&);
41  unsigned noisifySubdet(std::vector<float >& theMap, std::vector<int>& theHits,const std::vector<int>& thecells, unsigned ncells, double hcalHotFraction_, const GaussianTail *,double sigma,double threshold,double correctionfactor,
43  // Not currently used. Will probably be removed soon.
44  // void noisifySignal(std::map<uint32_t,std::pair<float,bool> >& theMap);
46  double noiseInfCfromDB(const HcalDbService * conditions,const HcalDetId & detId);
47  void Fill(int id,float energy, std::vector<int> & myHits,float noise,float correctionfactor, RandomEngineAndDistribution const*);
48  void loadPCaloHits(const edm::Event & iEvent, const HcalTopology&, RandomEngineAndDistribution const*);
49 
50  void clean();
51  void cleanSubDet(std::vector<float>& hits,std::vector<int>& cells);
52  // conversion for digitization
53  int fCtoAdc(double fc) const;
54  double fractionOOT(int time_slice);
55 
56  private:
57  unsigned det_;
58  std::vector<double> threshold_;
59  std::vector<double> noise_;
60  std::vector<double> corrfac_;
61  std::vector<double> hcalHotFraction_;
62  unsigned nnoise_;
63 
64  // edm::ESHandle<CaloTowerConstituentsMap> calotowerMap_;
71  bool doDigis_;
74  std::vector<bool> noiseFromDb_;
75  double refactor_;
78 
79  std::vector<float> hcalRecHits_;
80 
81  std::vector<int> firedCells_;
82 
83  std::vector<HcalDetId> theDetIds_;
84  std::vector<float> miscalib_;
85 
86  // coefficients for fC to ADC conversion
87  std::vector<int> fctoadc_;
88 
89  std::vector<float> peds_;
90  std::vector<float> gains_;
91  std::vector<float> sat_;
92  std::vector<float> noisesigma_;
93  std::vector<float> TPGFactor_;
94 
95  // the hashed indices
96  unsigned maxIndex_;
97  std::vector<int> hbhi_;
98  std::vector<int> hehi_;
99  std::vector<int> hohi_;
100  std::vector<int> hfhi_;
102 
103  std::vector<GaussianTail*> myGaussianTailGenerators_;
104 
105  // const HcalTPGCoder * myCoder_;
106  // HcalSimParameterMap * myHcalSimParameterMap_;
107 
108  // the access to the response corection factors
110 };
111 
112 #endif
void loadHcalRecHits(edm::Event &iEvent, const HcalTopology &, HBHERecHitCollection &hbheHits, HBHEDigiCollection &hbheDigis, RandomEngineAndDistribution const *)
HcalRecHitsMaker(edm::ParameterSet const &p, int)
std::vector< int > hehi_
std::vector< int > hbhi_
std::vector< float > gains_
std::vector< float > miscalib_
std::vector< int > hohi_
std::vector< GaussianTail * > myGaussianTailGenerators_
int fCtoAdc(double fc) const
std::vector< double > hcalHotFraction_
double noiseInfCfromDB(const HcalDbService *conditions, const HcalDetId &detId)
edm::InputTag inputCol_
std::vector< double > noise_
std::vector< float > hcalRecHits_
std::vector< float > noisesigma_
unsigned createVectorsOfCells(const edm::EventSetup &es)
std::vector< double > corrfac_
void loadPCaloHits(const edm::Event &iEvent, const HcalTopology &, RandomEngineAndDistribution const *)
void Fill(int id, float energy, std::vector< int > &myHits, float noise, float correctionfactor, RandomEngineAndDistribution const *)
double fractionOOT(int time_slice)
unsigned noisifySubdet(std::vector< float > &theMap, std::vector< int > &theHits, const std::vector< int > &thecells, unsigned ncells, double hcalHotFraction_, const GaussianTail *, double sigma, double threshold, double correctionfactor, RandomEngineAndDistribution const *)
int iEvent
Definition: GenABIO.cc:230
std::vector< double > threshold_
std::vector< float > sat_
std::vector< int > hfhi_
std::string hcalfileinpath_
void noisify(RandomEngineAndDistribution const *)
std::vector< float > TPGFactor_
unsigned createVectorOfSubdetectorCells(const CaloGeometry &, const HcalTopology &, int subdetn, std::vector< int > &)
const HcalRespCorrs * myRespCorr
std::vector< int > fctoadc_
void cleanSubDet(std::vector< float > &hits, std::vector< int > &cells)
std::vector< int > firedCells_
std::vector< bool > noiseFromDb_
std::vector< HcalDetId > theDetIds_
void init(const edm::EventSetup &es, bool dodigis, bool domiscalib)
std::vector< float > peds_