CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 
22  public Observer<const BeginOfEvent*>,
23  public Observer<const G4Step*>,
24  public Observer<const EndOfEvent*>
25 {
26  typedef std::vector<float> FloatVector;
27  typedef std::map<uint32_t,float,std::less<uint32_t> > MapType;
28 
29 public:
31  virtual ~EcalSimHitsValidProducer();
32 
33  void produce(edm::Event&, const edm::EventSetup&);
34 
35 
36 private:
37  EcalSimHitsValidProducer(const EcalSimHitsValidProducer&); // stop default
38  const EcalSimHitsValidProducer& operator=(const EcalSimHitsValidProducer&); // stop default
39 
40  void update(const BeginOfEvent*);
41  void update(const G4Step*);
42  void update(const EndOfEvent*);
43 
45 
46 private:
47  uint32_t getUnitWithMaxEnergy(MapType& themap);
48 
49  float energyInEEMatrix(int nCellInX, int nCellInY,
50  int centralX, int centralY, int centralZ,
51  MapType& themap);
52  float energyInEBMatrix(int nCellInX, int nCellInY,
53  int centralX, int centralY, int centralZ,
54  MapType& themap);
55 
56 
57  bool fillEEMatrix(int nCellInEta, int nCellInPhi,
58  int CentralEta, int CentralPhi,int CentralZ,
59  MapType& fillmap, MapType& themap);
60 
61  bool fillEBMatrix(int nCellInEta, int nCellInPhi,
62  int CentralEta, int CentralPhi,int CentralZ,
63  MapType& fillmap, MapType& themap);
64 
65  float eCluster2x2( MapType& themap);
66  float eCluster4x4(float e33,MapType& themap);
67 
68 private:
69  float ee1;
70  float ee4;
71  float ee9;
72  float ee16;
73  float ee25;
74 
75  float eb1;
76  float eb4;
77  float eb9;
78  float eb16;
79  float eb25;
80 
81  float totalEInEE;
82  float totalEInEB;
83  float totalEInES;
84 
85  float totalEInEEzp;
86  float totalEInEEzm;
87  float totalEInESzp;
88  float totalEInESzm;
89 
90  int totalHits;
91  int nHitsInEE;
92  int nHitsInEB;
93  int nHitsInES;
99 
104 
105  float eBX0[26];
106  float eEX0[26];
107 
108 
115 
116 
124 
129 
134 
137 
138  int thePID;
139  std::string label;
140 };
141 
142 #endif
void produce(edm::Event &, const edm::EventSetup &)
math::XYZTLorentzVector theMomentum
bool fillEEMatrix(int nCellInEta, int nCellInPhi, int CentralEta, int CentralPhi, int CentralZ, MapType &fillmap, MapType &themap)
void update(const BeginOfEvent *)
This routine will be called when the appropriate signal arrives.
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:30
std::map< uint32_t, float, std::less< uint32_t > > MapType
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)
float energyInEEMatrix(int nCellInX, int nCellInY, int centralX, int centralY, int centralZ, MapType &themap)
const EcalSimHitsValidProducer & operator=(const EcalSimHitsValidProducer &)
math::XYZTLorentzVector theVertex
float eCluster2x2(MapType &themap)
EcalSimHitsValidProducer(const edm::ParameterSet &)
float eCluster4x4(float e33, MapType &themap)