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 //#include <boost/cstdint.hpp>
12 
13 class CaloGeometry;
14 class RandomEngine;
15 // class HcalTPGCoder;
17 class HcalDbService;
18 class HcalRespCorrs;
19 
20 namespace edm {
21  class ParameterSet;
22  class Event;
23  class EventSetup;
24 }
25 
27 {
28  public:
31 
33  void loadHcalRecHits(edm::Event &iEvent, HORecHitCollection &ho, HODigiCollection & hoDigis);
34  void loadHcalRecHits(edm::Event &iEvent, HFRecHitCollection &hfHits, HFDigiCollection& hfDigis);
35  void init(const edm::EventSetup &es,bool dodigis,bool domiscalib);
36 
37  private:
38  unsigned createVectorsOfCells(const edm::EventSetup &es);
39  unsigned createVectorOfSubdetectorCells( const CaloGeometry&,int subdetn,std::vector<int>&);
40  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);
41  // Not currently used. Will probably be removed soon.
42  // void noisifySignal(std::map<uint32_t,std::pair<float,bool> >& theMap);
43  void noisify();
44  double noiseInfCfromDB(const HcalDbService * conditions,const HcalDetId & detId);
45  void Fill(int id,float energy, std::vector<int> & myHits,float noise);
46  void loadPCaloHits(const edm::Event & iEvent);
47 
48  void clean();
49  void cleanSubDet(std::vector<float>& hits,std::vector<int>& cells);
50  // conversion for digitization
51  int fCtoAdc(double fc) const;
52 
53  private:
54  unsigned det_;
55  std::vector<double> threshold_;
56  std::vector<double> noise_;
57  std::vector<double> hcalHotFraction_;
58  unsigned nnoise_;
59 
60  // edm::ESHandle<CaloTowerConstituentsMap> calotowerMap_;
62  static bool initialized_;
63  bool doDigis_;
67  double refactor_;
69  std::string hcalfileinpath_;
70 
71  std::vector<float> hcalRecHits_;
72 
73  std::vector<int> firedCells_;
74 
75  static std::vector<HcalDetId> theDetIds_;
76  static std::vector<float> miscalib_;
77 
78  // coefficients for fC to ADC conversion
79  static std::vector<int> fctoadc_;
80 
81  static std::vector<float> peds_;
82  static std::vector<float> gains_;
83  static std::vector<float> sat_;
84  static std::vector<float> noisesigma_;
85  static std::vector<float> TPGFactor_;
86 
87  // the hashed indices
88  static unsigned maxIndex_;
89  static std::vector<int> hbhi_;
90  static std::vector<int> hehi_;
91  static std::vector<int> hohi_;
92  static std::vector<int> hfhi_;
94 
96  std::vector<GaussianTail*> myGaussianTailGenerators_;
97 
98  // const HcalTPGCoder * myCoder_;
99  // HcalSimParameterMap * myHcalSimParameterMap_;
100 
101  // the access to the response corection factors
103 };
104 
105 #endif
static std::vector< float > peds_
HcalRecHitsMaker(edm::ParameterSet const &p, int, const RandomEngine *random)
static std::vector< float > sat_
std::vector< GaussianTail * > myGaussianTailGenerators_
int fCtoAdc(double fc) const
std::vector< double > hcalHotFraction_
unsigned createVectorOfSubdetectorCells(const CaloGeometry &, int subdetn, std::vector< int > &)
double noiseInfCfromDB(const HcalDbService *conditions, const HcalDetId &detId)
edm::InputTag inputCol_
std::vector< double > noise_
std::vector< float > hcalRecHits_
static std::vector< float > TPGFactor_
TRandom random
Definition: MVATrainer.cc:138
const RandomEngine * random_
static std::vector< int > hfhi_
unsigned createVectorsOfCells(const edm::EventSetup &es)
static std::vector< float > noisesigma_
int iEvent
Definition: GenABIO.cc:243
std::vector< double > threshold_
static std::vector< int > hohi_
static std::vector< int > fctoadc_
void loadPCaloHits(const edm::Event &iEvent)
static bool initialized_
std::string hcalfileinpath_
static std::vector< HcalDetId > theDetIds_
static unsigned maxIndex_
const HcalRespCorrs * myRespCorr
static std::vector< float > gains_
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)
void Fill(int id, float energy, std::vector< int > &myHits, float noise)
void loadHcalRecHits(edm::Event &iEvent, HBHERecHitCollection &hbheHits, HBHEDigiCollection &hbheDigis)
void cleanSubDet(std::vector< float > &hits, std::vector< int > &cells)
std::vector< int > firedCells_
static std::vector< int > hbhi_
static std::vector< float > miscalib_
static std::vector< int > hehi_
void init(const edm::EventSetup &es, bool dodigis, bool domiscalib)