CMS 3D CMS Logo

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