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,double correctionfactor);
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,float correctionfactor);
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  double fractionOOT(int time_slice);
53 
54  private:
55  unsigned det_;
56  std::vector<double> threshold_;
57  std::vector<double> noise_;
58  std::vector<double> corrfac_;
59  std::vector<double> hcalHotFraction_;
60  unsigned nnoise_;
61 
62  // edm::ESHandle<CaloTowerConstituentsMap> calotowerMap_;
64  static bool initialized_;
65  bool doDigis_;
69  double refactor_;
71  std::string hcalfileinpath_;
72 
73  std::vector<float> hcalRecHits_;
74 
75  std::vector<int> firedCells_;
76 
77  static std::vector<HcalDetId> theDetIds_;
78  static std::vector<float> miscalib_;
79 
80  // coefficients for fC to ADC conversion
81  static std::vector<int> fctoadc_;
82 
83  static std::vector<float> peds_;
84  static std::vector<float> gains_;
85  static std::vector<float> sat_;
86  static std::vector<float> noisesigma_;
87  static std::vector<float> TPGFactor_;
88 
89  // the hashed indices
90  static unsigned maxIndex_;
91  static std::vector<int> hbhi_;
92  static std::vector<int> hehi_;
93  static std::vector<int> hohi_;
94  static std::vector<int> hfhi_;
96 
98  std::vector<GaussianTail*> myGaussianTailGenerators_;
99 
100  // const HcalTPGCoder * myCoder_;
101  // HcalSimParameterMap * myHcalSimParameterMap_;
102 
103  // the access to the response corection factors
105 };
106 
107 #endif
static std::vector< float > peds_
HcalRecHitsMaker(edm::ParameterSet const &p, int, const RandomEngine *random)
static std::vector< float > sat_
std::vector< GaussianTail * > myGaussianTailGenerators_
void Fill(int id, float energy, std::vector< int > &myHits, float noise, float correctionfactor)
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)
std::vector< double > corrfac_
static std::vector< float > noisesigma_
double fractionOOT(int time_slice)
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
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)
static std::vector< float > gains_
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)