CMS 3D CMS Logo

EcalSimHitsValidProducer.h
Go to the documentation of this file.
1 #ifndef _EcalSimHitsValidProducer_h
2 #define _EcalSimHitsValidProducer_h
3 #include <map>
4 #include <string>
5 #include <vector>
6 
13 
15 
16 class BeginOfEvent;
17 class G4Step;
18 class EndOfEvent;
19 class PEcalValidInfo;
20 
21 namespace edm {
22  class ParameterSet;
23 }
24 
26  public Observer<const BeginOfEvent *>,
27  public Observer<const G4Step *>,
28  public Observer<const EndOfEvent *> {
29  typedef std::vector<float> FloatVector;
30  typedef std::map<uint32_t, float, std::less<uint32_t>> MapType;
31 
32 public:
34  ~EcalSimHitsValidProducer() override;
35 
36  void produce(edm::Event &, const edm::EventSetup &) override;
37 
38 private:
39  EcalSimHitsValidProducer(const EcalSimHitsValidProducer &) = delete; // stop default
40  const EcalSimHitsValidProducer &operator=(const EcalSimHitsValidProducer &) = delete; // stop default
41 
42  void update(const BeginOfEvent *) override;
43  void update(const G4Step *) override;
44  void update(const EndOfEvent *) override;
45 
46  void fillEventInfo(PEcalValidInfo &);
47 
48 private:
49  uint32_t getUnitWithMaxEnergy(MapType &themap);
50 
51  float energyInEEMatrix(int nCellInX, int nCellInY, int centralX, int centralY, int centralZ, MapType &themap);
52  float energyInEBMatrix(int nCellInX, int nCellInY, int centralX, int centralY, int centralZ, MapType &themap);
53 
54  bool fillEEMatrix(
55  int nCellInEta, int nCellInPhi, int CentralEta, int CentralPhi, int CentralZ, MapType &fillmap, MapType &themap);
56 
57  bool fillEBMatrix(
58  int nCellInEta, int nCellInPhi, int CentralEta, int CentralPhi, int CentralZ, MapType &fillmap, MapType &themap);
59 
60  float eCluster2x2(MapType &themap);
61  float eCluster4x4(float e33, MapType &themap);
62 
63 private:
64  float ee1;
65  float ee4;
66  float ee9;
67  float ee16;
68  float ee25;
69 
70  float eb1;
71  float eb4;
72  float eb9;
73  float eb16;
74  float eb25;
75 
76  float totalEInEE;
77  float totalEInEB;
78  float totalEInES;
79 
80  float totalEInEEzp;
81  float totalEInEEzm;
82  float totalEInESzp;
83  float totalEInESzm;
84 
85  int totalHits;
86  int nHitsInEE;
87  int nHitsInEB;
88  int nHitsInES;
94 
99 
100  float eBX0[26];
101  float eEX0[26];
102 
103  FloatVector eOf1ES;
104  FloatVector eOf2ES;
105  FloatVector eOf1ESzp;
106  FloatVector eOf1ESzm;
107  FloatVector eOf2ESzp;
108  FloatVector eOf2ESzm;
109 
110  FloatVector zOfES;
111  FloatVector phiOfEECaloG4Hit;
112  FloatVector etaOfEECaloG4Hit;
113  FloatVector tOfEECaloG4Hit;
114  FloatVector eOfEECaloG4Hit;
115  FloatVector eOfEEPlusCaloG4Hit;
116  FloatVector eOfEEMinusCaloG4Hit;
117 
118  FloatVector phiOfEBCaloG4Hit;
119  FloatVector etaOfEBCaloG4Hit;
120  FloatVector tOfEBCaloG4Hit;
121  FloatVector eOfEBCaloG4Hit;
122 
123  FloatVector phiOfESCaloG4Hit;
124  FloatVector etaOfESCaloG4Hit;
125  FloatVector tOfESCaloG4Hit;
126  FloatVector eOfESCaloG4Hit;
127 
130 
131  int thePID;
133 };
134 
135 #endif
math::XYZTLorentzVector theMomentum
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
std::vector< float > FloatVector
std::map< uint32_t, float, std::less< uint32_t > > MapType
math::XYZTLorentzVector theVertex
HLT enums.
#define update(a, b)