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 
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  virtual ~EcalSimHitsValidProducer();
36 
37  void produce(edm::Event&, const edm::EventSetup&);
38 
39 
40 private:
41  EcalSimHitsValidProducer(const EcalSimHitsValidProducer&); // stop default
42  const EcalSimHitsValidProducer& operator=(const EcalSimHitsValidProducer&); // stop default
43 
44  void update(const BeginOfEvent*);
45  void update(const G4Step*);
46  void update(const EndOfEvent*);
47 
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 
119 
120 
128 
133 
138 
141 
142  int thePID;
144 };
145 
146 #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:29
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)