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 
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 
109 
117 
122 
127 
130 
131  int thePID;
133 };
134 
135 #endif
EcalSimHitsValidProducer::eCluster4x4
float eCluster4x4(float e33, MapType &themap)
Definition: EcalSimHitsValidProducer.cc:526
EcalSimHitsValidProducer::totalEInEB
float totalEInEB
Definition: EcalSimHitsValidProducer.h:77
EcalSimHitsValidProducer::produce
void produce(edm::Event &, const edm::EventSetup &) override
Definition: EcalSimHitsValidProducer.cc:62
EcalSimHitsValidProducer::eCluster2x2
float eCluster2x2(MapType &themap)
Definition: EcalSimHitsValidProducer.cc:506
Observer
Definition: Observer.h:23
MessageLogger.h
EcalSimHitsValidProducer::totalEInESzp
float totalEInESzp
Definition: EcalSimHitsValidProducer.h:82
edm
HLT enums.
Definition: AlignableModifier.h:19
SimProducer.h
EcalSimHitsValidProducer::fillEBMatrix
bool fillEBMatrix(int nCellInEta, int nCellInPhi, int CentralEta, int CentralPhi, int CentralZ, MapType &fillmap, MapType &themap)
Definition: EcalSimHitsValidProducer.cc:472
EcalSimHitsValidProducer::phiOfESCaloG4Hit
FloatVector phiOfESCaloG4Hit
Definition: EcalSimHitsValidProducer.h:123
EBDetId.h
EEDetId.h
EcalSimHitsValidProducer::nCrystalInEB
int nCrystalInEB
Definition: EcalSimHitsValidProducer.h:91
EcalSimHitsValidProducer::eOfEECaloG4Hit
FloatVector eOfEECaloG4Hit
Definition: EcalSimHitsValidProducer.h:114
EcalSimHitsValidProducer::totalEInEE
float totalEInEE
Definition: EcalSimHitsValidProducer.h:76
EcalSimHitsValidProducer::theMomentum
math::XYZTLorentzVector theMomentum
Definition: EcalSimHitsValidProducer.h:128
EcalSimHitsValidProducer::nHitsIn1ESzm
int nHitsIn1ESzm
Definition: EcalSimHitsValidProducer.h:96
EcalSimHitsValidProducer::nCrystalInEEzm
int nCrystalInEEzm
Definition: EcalSimHitsValidProducer.h:93
ESDetId.h
EcalSimHitsValidProducer::energyInEEMatrix
float energyInEEMatrix(int nCellInX, int nCellInY, int centralX, int centralY, int centralZ, MapType &themap)
Definition: EcalSimHitsValidProducer.cc:546
EcalSimHitsValidProducer::nHitsInEB
int nHitsInEB
Definition: EcalSimHitsValidProducer.h:87
EcalSimHitsValidProducer::totalEInEEzm
float totalEInEEzm
Definition: EcalSimHitsValidProducer.h:81
EcalSimHitsValidProducer::ee9
float ee9
Definition: EcalSimHitsValidProducer.h:66
EcalSimHitsValidProducer::~EcalSimHitsValidProducer
~EcalSimHitsValidProducer() override
Definition: EcalSimHitsValidProducer.cc:60
EcalSimHitsValidProducer::totalEInESzm
float totalEInESzm
Definition: EcalSimHitsValidProducer.h:83
Observer.h
EcalSimHitsValidProducer::eb1
float eb1
Definition: EcalSimHitsValidProducer.h:70
EcalSimHitsValidProducer::nHitsIn1ESzp
int nHitsIn1ESzp
Definition: EcalSimHitsValidProducer.h:95
PEcalValidInfo
Definition: PValidationFormats.h:1063
EcalSimHitsValidProducer::etaOfESCaloG4Hit
FloatVector etaOfESCaloG4Hit
Definition: EcalSimHitsValidProducer.h:124
EcalSimHitsValidProducer::totalHits
int totalHits
Definition: EcalSimHitsValidProducer.h:85
EcalSimHitsValidProducer::theVertex
math::XYZTLorentzVector theVertex
Definition: EcalSimHitsValidProducer.h:129
EcalSimHitsValidProducer::thePID
int thePID
Definition: EcalSimHitsValidProducer.h:131
EcalSimHitsValidProducer::energyInEBMatrix
float energyInEBMatrix(int nCellInX, int nCellInY, int centralX, int centralY, int centralZ, MapType &themap)
Definition: EcalSimHitsValidProducer.cc:580
EcalSimHitsValidProducer::getUnitWithMaxEnergy
uint32_t getUnitWithMaxEnergy(MapType &themap)
Definition: EcalSimHitsValidProducer.cc:619
EcalSimHitsValidProducer::totalEInES
float totalEInES
Definition: EcalSimHitsValidProducer.h:78
EcalSimHitsValidProducer::phiOfEECaloG4Hit
FloatVector phiOfEECaloG4Hit
Definition: EcalSimHitsValidProducer.h:111
EcalSimHitsValidProducer::eOf1ESzm
FloatVector eOf1ESzm
Definition: EcalSimHitsValidProducer.h:106
EcalSimHitsValidProducer::eb25
float eb25
Definition: EcalSimHitsValidProducer.h:74
EcalSimHitsValidProducer::MapType
std::map< uint32_t, float, std::less< uint32_t > > MapType
Definition: EcalSimHitsValidProducer.h:30
EcalSimHitsValidProducer::update
void update(const BeginOfEvent *) override
This routine will be called when the appropriate signal arrives.
Definition: EcalSimHitsValidProducer.cc:147
EndOfEvent
Definition: EndOfEvent.h:6
EcalSimHitsValidProducer::zOfES
FloatVector zOfES
Definition: EcalSimHitsValidProducer.h:110
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
EcalSimHitsValidProducer::EcalSimHitsValidProducer
EcalSimHitsValidProducer(const edm::ParameterSet &)
Definition: EcalSimHitsValidProducer.cc:19
EcalSimHitsValidProducer::tOfEBCaloG4Hit
FloatVector tOfEBCaloG4Hit
Definition: EcalSimHitsValidProducer.h:120
edm::ParameterSet
Definition: ParameterSet.h:47
EcalSimHitsValidProducer::eOf2ESzp
FloatVector eOf2ESzp
Definition: EcalSimHitsValidProducer.h:107
EcalSimHitsValidProducer::label
std::string label
Definition: EcalSimHitsValidProducer.h:132
ParameterSet
Definition: Functions.h:16
EcalSimHitsValidProducer::nHitsInES
int nHitsInES
Definition: EcalSimHitsValidProducer.h:88
EcalSimHitsValidProducer::eOf1ES
FloatVector eOf1ES
Definition: EcalSimHitsValidProducer.h:103
EcalSimHitsValidProducer::eOf2ES
FloatVector eOf2ES
Definition: EcalSimHitsValidProducer.h:104
SimProducer
Definition: SimProducer.h:64
EcalSimHitsValidProducer::ee1
float ee1
Definition: EcalSimHitsValidProducer.h:64
EcalSimHitsValidProducer::eb16
float eb16
Definition: EcalSimHitsValidProducer.h:73
LorentzVector.h
EcalSimHitsValidProducer::eOfESCaloG4Hit
FloatVector eOfESCaloG4Hit
Definition: EcalSimHitsValidProducer.h:126
EcalSimHitsValidProducer::eb4
float eb4
Definition: EcalSimHitsValidProducer.h:71
EcalSimHitsValidProducer::eOf1ESzp
FloatVector eOf1ESzp
Definition: EcalSimHitsValidProducer.h:105
BeginOfEvent
Definition: BeginOfEvent.h:6
EcalSimHitsValidProducer::nHitsIn1ES
int nHitsIn1ES
Definition: EcalSimHitsValidProducer.h:89
edm::EventSetup
Definition: EventSetup.h:58
EcalSimHitsValidProducer::nHitsInEE
int nHitsInEE
Definition: EcalSimHitsValidProducer.h:86
EcalSimHitsValidProducer::tOfESCaloG4Hit
FloatVector tOfESCaloG4Hit
Definition: EcalSimHitsValidProducer.h:125
EcalSimHitsValidProducer::ee25
float ee25
Definition: EcalSimHitsValidProducer.h:68
EcalSimHitsValidProducer::tOfEECaloG4Hit
FloatVector tOfEECaloG4Hit
Definition: EcalSimHitsValidProducer.h:113
EcalSimHitsValidProducer::ee4
float ee4
Definition: EcalSimHitsValidProducer.h:65
EcalSimHitsValidProducer::nCrystalInEEzp
int nCrystalInEEzp
Definition: EcalSimHitsValidProducer.h:92
math::XYZTLorentzVector
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
EcalSimHitsValidProducer::nHitsIn2ESzp
int nHitsIn2ESzp
Definition: EcalSimHitsValidProducer.h:97
EcalSimHitsValidProducer::etaOfEBCaloG4Hit
FloatVector etaOfEBCaloG4Hit
Definition: EcalSimHitsValidProducer.h:119
EcalSimHitsValidProducer::nHitsIn2ES
int nHitsIn2ES
Definition: EcalSimHitsValidProducer.h:90
EcalSimHitsValidProducer::eb9
float eb9
Definition: EcalSimHitsValidProducer.h:72
EcalSimHitsValidProducer::eOfEEMinusCaloG4Hit
FloatVector eOfEEMinusCaloG4Hit
Definition: EcalSimHitsValidProducer.h:116
EcalSimHitsValidProducer::phiOfEBCaloG4Hit
FloatVector phiOfEBCaloG4Hit
Definition: EcalSimHitsValidProducer.h:118
EcalSimHitsValidProducer::ee16
float ee16
Definition: EcalSimHitsValidProducer.h:67
EcalSimHitsValidProducer::nHitsIn2ESzm
int nHitsIn2ESzm
Definition: EcalSimHitsValidProducer.h:98
EcalSimHitsValidProducer::FloatVector
std::vector< float > FloatVector
Definition: EcalSimHitsValidProducer.h:29
EcalSimHitsValidProducer::fillEventInfo
void fillEventInfo(PEcalValidInfo &)
Definition: EcalSimHitsValidProducer.cc:68
edm::Event
Definition: Event.h:73
EcalSimHitsValidProducer::fillEEMatrix
bool fillEEMatrix(int nCellInEta, int nCellInPhi, int CentralEta, int CentralPhi, int CentralZ, MapType &fillmap, MapType &themap)
Definition: EcalSimHitsValidProducer.cc:442
EcalSimHitsValidProducer::etaOfEECaloG4Hit
FloatVector etaOfEECaloG4Hit
Definition: EcalSimHitsValidProducer.h:112
EcalSimHitsValidProducer
Definition: EcalSimHitsValidProducer.h:25
EcalSimHitsValidProducer::eOf2ESzm
FloatVector eOf2ESzm
Definition: EcalSimHitsValidProducer.h:108
EcalSimHitsValidProducer::operator=
const EcalSimHitsValidProducer & operator=(const EcalSimHitsValidProducer &)=delete
EcalSimHitsValidProducer::eOfEEPlusCaloG4Hit
FloatVector eOfEEPlusCaloG4Hit
Definition: EcalSimHitsValidProducer.h:115
EcalSimHitsValidProducer::eBX0
float eBX0[26]
Definition: EcalSimHitsValidProducer.h:100
EcalSimHitsValidProducer::eEX0
float eEX0[26]
Definition: EcalSimHitsValidProducer.h:101
EcalSimHitsValidProducer::totalEInEEzp
float totalEInEEzp
Definition: EcalSimHitsValidProducer.h:80
EcalSimHitsValidProducer::eOfEBCaloG4Hit
FloatVector eOfEBCaloG4Hit
Definition: EcalSimHitsValidProducer.h:121