CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
CalorimetryManager.h
Go to the documentation of this file.
1 #ifndef CALORIMETRYMANAGER_H
2 #define CALORIMETRYMANAGER_H
3 
5 
6 // FastSimulation headers
12 
13 // For the uint32_t
14 //#include <boost/cstdint.hpp>
15 #include <map>
16 #include <algorithm>
17 
18 class FSimEvent;
19 class FSimTrack;
20 class RawParticle;
21 class CaloGeometryHelper;
22 class Histos;
23 class HSParameters;
24 class RandomEngine;
27 class MaterialEffects;
28 //Gflash
33 
34 namespace edm {
35  class ParameterSet;
36 }
37 
39 
40  public:
42  CalorimetryManager(FSimEvent* aSimEvent,
43  const edm::ParameterSet& fastCalo,
44  const edm::ParameterSet& MuonECALPars,
45  const edm::ParameterSet& MuonHCALPars,
46  const edm::ParameterSet& fastGflash,
47  const RandomEngine* engine);
49 
50  // Does the real job
51  void reconstruct();
52 
53  // Return the address of the Calorimeter
55 
56  // load container from edm::Event
58 
60 
62 
64 
66 
67  private:
68  // Simulation of electromagnetic showers in PS, ECAL, HCAL
69  void EMShowerSimulation(const FSimTrack& myTrack);
70 
71  // Simulation of electromagnetic showers in VFCAL
72  void reconstructECAL(const FSimTrack& track) ;
73 
74  void reconstructHCAL(const FSimTrack& myTrack);
75 
76  void MuonMipSimulation(const FSimTrack & myTrack);
77 
79  void HDShowerSimulation(const FSimTrack& myTrack);
80 
81  // Read the parameters
82  void readParameters(const edm::ParameterSet& fastCalo);
83 
84  void updateMap(uint32_t cellid,float energy,int id,std::map<uint32_t,std::vector<std::pair<int,float> > >& mymap);
85 
86  void updateMap(int hi,float energy,int id,std::vector<std::vector<std::pair<int,float> > > & mymap,std::vector<int> & firedCells);
87 
88  void respCorr(double);
89 
90  void clean();
91 
92  private:
93 
96 
98 
101 
102  // In the not unfolded case (standard) the most inner vector will be of size = 1
103  // the preshower does not have hashed_indices, hence the map
104  std::vector<std::vector<std::pair<int,float> > > EBMapping_;
105  std::vector<std::vector<std::pair<int,float> > > EEMapping_;
106  std::vector<std::vector<std::pair<int,float> > > HMapping_;
107  std::map<uint32_t,std::vector<std::pair<int,float> > > ESMapping_;
108 
109  std::vector<int> firedCellsEB_;
110  std::vector<int> firedCellsEE_;
111  std::vector<int> firedCellsHCAL_;
112 
113  // this is bad, the same information already exists in CaloRecHitsProducers
114  // should make a es_producer of CaloGeometryTools
115  std::vector<DetId> theDetIds_;
116  bool debug_;
117  std::vector<unsigned int> evtsToDebug_;
118 
120 
125 
126  // Parameters
130  // double radiusFactor_;
132  std::vector<double> radiusPreshowerCorrections_;
133  double aTerm, bTerm;
134  std::vector<double> mipValues_;
138  //FR
141  //RF
142 
143  // Famos Random Engine
147 
148  static std::vector<std::pair<int, float> > myZero_;
150 
151  // RespCorrP p, k_e(p), k_h(p) vectors and evaluated for each p
152  // ecorr and hcorr
153  std::vector<double> rsp;
154  std::vector<double> p_knots;
155  std::vector<double> k_e;
156  std::vector<double> k_h;
157  double ecorr;
158  double hcorr;
159 
160  std::vector<FSimTrack> muonSimTracks;
161  MaterialEffects* theMuonEcalEffects; // material effects for muons in ECAL
162  MaterialEffects* theMuonHcalEffects; // material effects for muons in HCAL
163 
164  //Gflash
169 };
170 #endif
std::vector< double > rsp
std::vector< double > k_h
RawParticle myElec
A few pointers to save time.
std::vector< PCaloHit > PCaloHitContainer
GflashPiKShowerProfile * thePiKProfile
void updateMap(uint32_t cellid, float energy, int id, std::map< uint32_t, std::vector< std::pair< int, float > > > &mymap)
std::map< uint32_t, std::vector< std::pair< int, float > > > ESMapping_
MaterialEffects * theMuonEcalEffects
MaterialEffects * theMuonHcalEffects
std::vector< std::vector< std::pair< int, float > > > EBMapping_
GflashHadronShowerProfile * theProfile
void reconstructECAL(const FSimTrack &track)
void loadFromPreshower(edm::PCaloHitContainer &c) const
CaloGeometryHelper * getCalorimeter() const
void readParameters(const edm::ParameterSet &fastCalo)
void HDShowerSimulation(const FSimTrack &myTrack)
Hadronic Shower Simulation.
void MuonMipSimulation(const FSimTrack &myTrack)
std::vector< std::vector< std::pair< int, float > > > EEMapping_
std::vector< double > p_knots
std::vector< int > firedCellsEB_
std::vector< int > firedCellsHCAL_
std::vector< FSimTrack > muonSimTracks
const RandomEngine * random
const LandauFluctuationGenerator * aLandauGenerator
GflashAntiProtonShowerProfile * theAntiProtonProfile
GflashProtonShowerProfile * theProtonProfile
void loadFromEcalEndcap(edm::PCaloHitContainer &c) const
std::vector< DetId > theDetIds_
std::vector< double > radiusPreshowerCorrections_
std::vector< int > firedCellsEE_
std::vector< double > theTailIntervals_
std::vector< std::vector< std::pair< int, float > > > HMapping_
void loadMuonSimTracks(edm::SimTrackContainer &m) const
HCALResponse * myHDResponse_
CaloGeometryHelper * myCalorimeter_
std::vector< double > theCoreIntervals_
void loadFromHcal(edm::PCaloHitContainer &c) const
void EMShowerSimulation(const FSimTrack &myTrack)
GammaFunctionGenerator * aGammaGenerator
std::vector< double > mipValues_
static std::vector< std::pair< int, float > > myZero_
std::vector< unsigned int > evtsToDebug_
std::vector< double > k_e
Definition: Histos.h:19
HSParameters * myHSParameters_
std::vector< SimTrack > SimTrackContainer
void reconstructHCAL(const FSimTrack &myTrack)
void loadFromEcalBarrel(edm::PCaloHitContainer &c) const