CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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(const EcalSimHitsValidProducer &) = delete; // stop default
35  const EcalSimHitsValidProducer &operator=(const EcalSimHitsValidProducer &) = delete; // stop default
36  ~EcalSimHitsValidProducer() override;
37 
38  void produce(edm::Event &, const edm::EventSetup &) override;
39 
40 private:
41  void update(const BeginOfEvent *) override;
42  void update(const G4Step *) override;
43  void update(const EndOfEvent *) override;
44 
46 
47 private:
48  uint32_t getUnitWithMaxEnergy(MapType &themap);
49 
50  float energyInEEMatrix(int nCellInX, int nCellInY, int centralX, int centralY, int centralZ, MapType &themap);
51  float energyInEBMatrix(int nCellInX, int nCellInY, int centralX, int centralY, int centralZ, MapType &themap);
52 
53  bool fillEEMatrix(
54  int nCellInEta, int nCellInPhi, int CentralEta, int CentralPhi, int CentralZ, MapType &fillmap, MapType &themap);
55 
56  bool fillEBMatrix(
57  int nCellInEta, int nCellInPhi, int CentralEta, int CentralPhi, int CentralZ, MapType &fillmap, MapType &themap);
58 
59  float eCluster2x2(MapType &themap);
60  float eCluster4x4(float e33, MapType &themap);
61 
62 private:
63  float ee1;
64  float ee4;
65  float ee9;
66  float ee16;
67  float ee25;
68 
69  float eb1;
70  float eb4;
71  float eb9;
72  float eb16;
73  float eb25;
74 
75  float totalEInEE;
76  float totalEInEB;
77  float totalEInES;
78 
79  float totalEInEEzp;
80  float totalEInEEzm;
81  float totalEInESzp;
82  float totalEInESzm;
83 
84  int totalHits;
85  int nHitsInEE;
86  int nHitsInEB;
87  int nHitsInES;
93 
98 
99  float eBX0[26];
100  float eEX0[26];
101 
108 
116 
121 
126 
129 
130  int thePID;
132 };
133 
134 #endif
void update(const BeginOfEvent *) override
This routine will be called when the appropriate signal arrives.
math::XYZTLorentzVector theMomentum
bool fillEEMatrix(int nCellInEta, int nCellInPhi, int CentralEta, int CentralPhi, int CentralZ, MapType &fillmap, MapType &themap)
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
void fillEventInfo(PEcalValidInfo &)
std::vector< float > FloatVector
uint32_t getUnitWithMaxEnergy(MapType &themap)
bool fillEBMatrix(int nCellInEta, int nCellInPhi, int CentralEta, int CentralPhi, int CentralZ, MapType &fillmap, MapType &themap)
float energyInEBMatrix(int nCellInX, int nCellInY, int centralX, int centralY, int centralZ, MapType &themap)
std::map< uint32_t, float, std::less< uint32_t > > MapType
float energyInEEMatrix(int nCellInX, int nCellInY, int centralX, int centralY, int centralZ, MapType &themap)
const EcalSimHitsValidProducer & operator=(const EcalSimHitsValidProducer &)=delete
math::XYZTLorentzVector theVertex
void produce(edm::Event &, const edm::EventSetup &) override
float eCluster2x2(MapType &themap)
EcalSimHitsValidProducer(const edm::ParameterSet &)
float eCluster4x4(float e33, MapType &themap)