CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
EcalBarrelRecHitsMaker.h
Go to the documentation of this file.
1 #ifndef FastSimulation__EcalBarrelRecHitsMaker__h
2 #define FastSimulation__EcalBarrelRecHitsMaker__h
3 
8 //#include <boost/cstdint.hpp>
9 
12 class GaussianTail;
13 
14 namespace edm {
15  class ParameterSet;
16  class Event;
17  class EventSetup;
18 }
19 
21 {
22  public:
25 
28  void init(const edm::EventSetup &es,bool dodigis,bool doMiscalib);
29 
30  private:
31  void clean();
32  void loadPCaloHits(const edm::Event & iEvent, RandomEngineAndDistribution const*);
33  void geVtoGainAdc(float e,unsigned& gain,unsigned &adc) const;
35  bool noisifyTriggerTower(unsigned tthi, RandomEngineAndDistribution const*);
37  bool isHighInterest(int tthi);
38 
39 
40  private:
41  bool doDigis_;
43  double refactor_;
45  // poor-man Selective Readout
46  double threshold_;
47  double noise_;
48  double calibfactor_;
49  double EBHotFraction_ ;
51 
52  bool noisified_;
54  // array (size = 62000) of the energy in the barrel
55  std::vector<float> theCalorimeterHits_;
56  // array of the hashedindices in the previous array of the cells that received a hit
57  std::vector<int> theFiredCells_;
58  // array of the hashedindices in the previous array of the cells that have a high noise fluctuation
59  std::vector<int> applyZSCells_;
60  // equivalent of the EcalIntercalibConstants from RecoLocalCalo/EcalRecProducers/src/EcalRecHitProduer.cc
61  std::vector<float> theCalibConstants_;
62 
63  //array conversion hashedIndex rawId
64  std::vector<uint32_t> barrelRawId_;
65  float adcToGeV_;
67  unsigned minAdc_;
68  unsigned maxAdc_;
69  float t1_,t2_,sat_;
70 
72  // Array of the DetIds
73  std::vector<EcalTrigTowerDetId> theTTDetIds_;
74  // Transverse Energy of the TT
75  std::vector<float> TTTEnergy_;
76  // shot TTs
77  std::vector<unsigned> theFiredTTs_;
78  // treated TTs
79  std::vector<bool> treatedTTs_;
80  // neighboring TT DetIds
81  std::vector<std::vector<int> > neighboringTTs_;
82  // the crystals in a given TT
83  std::vector<std::vector<int> > crystalsinTT_;
84  // the towers which have been looked at
85  std::vector<int> theTTofHighInterest_;
86  // the status of the towers. A tower is of high interest if it or one of its neighbour is above the threshold
87  std::vector<int> TTHighInterest_;
88  // vector of parameter for custom noise simulation (size =4 : 0 & 1 define the gaussian shape
89  // of the noise ; 2 & 3 define the sigma and threshold in ADC counts of the *OFFLINE* amplitude
90 
91  std::vector<double> highNoiseParameters_ ;
93 
94  // selective readout threshold
95  float SRThreshold_;
98  // theta of the ieta
99  std::vector<float> sinTheta_;
100  // the cell-dependant noise sigma
101  std::vector<float> noisesigma_;
103  // noise in ADC counts
104  double noiseADC_;
105  // need to keep the address of ICMC
106  const std::vector<float> * ICMC_;
107 
108 };
109 
110 #endif
int adc(sample_type sample)
get the ADC sample (12 bits)
void randomNoisifier(RandomEngineAndDistribution const *)
const GaussianTail * myGaussianTailGenerator_
const std::vector< float > * ICMC_
std::vector< int > theFiredCells_
std::vector< float > sinTheta_
std::vector< float > theCalorimeterHits_
std::vector< float > noisesigma_
void geVtoGainAdc(float e, unsigned &gain, unsigned &adc) const
void noisifyTriggerTowers(RandomEngineAndDistribution const *)
int iEvent
Definition: GenABIO.cc:230
EcalBarrelRecHitsMaker(edm::ParameterSet const &p)
std::vector< uint32_t > barrelRawId_
std::vector< double > highNoiseParameters_
std::vector< unsigned > theFiredTTs_
void loadPCaloHits(const edm::Event &iEvent, RandomEngineAndDistribution const *)
const EcalTrigTowerConstituentsMap * eTTmap_
std::vector< float > TTTEnergy_
bool noisifyTriggerTower(unsigned tthi, RandomEngineAndDistribution const *)
std::vector< std::vector< int > > crystalsinTT_
std::vector< std::vector< int > > neighboringTTs_
std::vector< float > theCalibConstants_
std::vector< int > theTTofHighInterest_
std::vector< int > applyZSCells_
void loadEcalBarrelRecHits(edm::Event &iEvent, EBRecHitCollection &ecalHits, EBDigiCollection &ecaldigis, RandomEngineAndDistribution const *)
void init(const edm::EventSetup &es, bool dodigis, bool doMiscalib)
std::vector< EcalTrigTowerDetId > theTTDetIds_
std::vector< bool > treatedTTs_
std::vector< int > TTHighInterest_