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(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
EcalSimHitsValidProducer::eCluster4x4
float eCluster4x4(float e33, MapType &themap)
Definition: EcalSimHitsValidProducer.cc:526
EcalSimHitsValidProducer::totalEInEB
float totalEInEB
Definition: EcalSimHitsValidProducer.h:76
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:81
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:122
EBDetId.h
EEDetId.h
EcalSimHitsValidProducer::nCrystalInEB
int nCrystalInEB
Definition: EcalSimHitsValidProducer.h:90
EcalSimHitsValidProducer::eOfEECaloG4Hit
FloatVector eOfEECaloG4Hit
Definition: EcalSimHitsValidProducer.h:113
EcalSimHitsValidProducer::totalEInEE
float totalEInEE
Definition: EcalSimHitsValidProducer.h:75
EcalSimHitsValidProducer::theMomentum
math::XYZTLorentzVector theMomentum
Definition: EcalSimHitsValidProducer.h:127
EcalSimHitsValidProducer::nHitsIn1ESzm
int nHitsIn1ESzm
Definition: EcalSimHitsValidProducer.h:95
EcalSimHitsValidProducer::nCrystalInEEzm
int nCrystalInEEzm
Definition: EcalSimHitsValidProducer.h:92
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:86
EcalSimHitsValidProducer::totalEInEEzm
float totalEInEEzm
Definition: EcalSimHitsValidProducer.h:80
EcalSimHitsValidProducer::ee9
float ee9
Definition: EcalSimHitsValidProducer.h:65
EcalSimHitsValidProducer::~EcalSimHitsValidProducer
~EcalSimHitsValidProducer() override
Definition: EcalSimHitsValidProducer.cc:60
EcalSimHitsValidProducer::totalEInESzm
float totalEInESzm
Definition: EcalSimHitsValidProducer.h:82
Observer.h
EcalSimHitsValidProducer::eb1
float eb1
Definition: EcalSimHitsValidProducer.h:69
EcalSimHitsValidProducer::nHitsIn1ESzp
int nHitsIn1ESzp
Definition: EcalSimHitsValidProducer.h:94
PEcalValidInfo
Definition: PValidationFormats.h:1063
EcalSimHitsValidProducer::etaOfESCaloG4Hit
FloatVector etaOfESCaloG4Hit
Definition: EcalSimHitsValidProducer.h:123
EcalSimHitsValidProducer::totalHits
int totalHits
Definition: EcalSimHitsValidProducer.h:84
EcalSimHitsValidProducer::theVertex
math::XYZTLorentzVector theVertex
Definition: EcalSimHitsValidProducer.h:128
EcalSimHitsValidProducer::thePID
int thePID
Definition: EcalSimHitsValidProducer.h:130
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:77
EcalSimHitsValidProducer::phiOfEECaloG4Hit
FloatVector phiOfEECaloG4Hit
Definition: EcalSimHitsValidProducer.h:110
EcalSimHitsValidProducer::eOf1ESzm
FloatVector eOf1ESzm
Definition: EcalSimHitsValidProducer.h:105
EcalSimHitsValidProducer::eb25
float eb25
Definition: EcalSimHitsValidProducer.h:73
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:109
EcalSimHitsValidProducer::EcalSimHitsValidProducer
EcalSimHitsValidProducer(const edm::ParameterSet &)
Definition: EcalSimHitsValidProducer.cc:19
EcalSimHitsValidProducer::tOfEBCaloG4Hit
FloatVector tOfEBCaloG4Hit
Definition: EcalSimHitsValidProducer.h:119
edm::ParameterSet
Definition: ParameterSet.h:47
EcalSimHitsValidProducer::eOf2ESzp
FloatVector eOf2ESzp
Definition: EcalSimHitsValidProducer.h:106
EcalSimHitsValidProducer::label
std::string label
Definition: EcalSimHitsValidProducer.h:131
ParameterSet
Definition: Functions.h:16
EcalSimHitsValidProducer::nHitsInES
int nHitsInES
Definition: EcalSimHitsValidProducer.h:87
EcalSimHitsValidProducer::eOf1ES
FloatVector eOf1ES
Definition: EcalSimHitsValidProducer.h:102
EcalSimHitsValidProducer::eOf2ES
FloatVector eOf2ES
Definition: EcalSimHitsValidProducer.h:103
SimProducer
Definition: SimProducer.h:64
EcalSimHitsValidProducer::ee1
float ee1
Definition: EcalSimHitsValidProducer.h:63
EcalSimHitsValidProducer::eb16
float eb16
Definition: EcalSimHitsValidProducer.h:72
LorentzVector.h
EcalSimHitsValidProducer::eOfESCaloG4Hit
FloatVector eOfESCaloG4Hit
Definition: EcalSimHitsValidProducer.h:125
EcalSimHitsValidProducer::eb4
float eb4
Definition: EcalSimHitsValidProducer.h:70
EcalSimHitsValidProducer::eOf1ESzp
FloatVector eOf1ESzp
Definition: EcalSimHitsValidProducer.h:104
BeginOfEvent
Definition: BeginOfEvent.h:6
EcalSimHitsValidProducer::nHitsIn1ES
int nHitsIn1ES
Definition: EcalSimHitsValidProducer.h:88
edm::EventSetup
Definition: EventSetup.h:58
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
EcalSimHitsValidProducer::nHitsInEE
int nHitsInEE
Definition: EcalSimHitsValidProducer.h:85
EcalSimHitsValidProducer::tOfESCaloG4Hit
FloatVector tOfESCaloG4Hit
Definition: EcalSimHitsValidProducer.h:124
EcalSimHitsValidProducer::ee25
float ee25
Definition: EcalSimHitsValidProducer.h:67
EcalSimHitsValidProducer::tOfEECaloG4Hit
FloatVector tOfEECaloG4Hit
Definition: EcalSimHitsValidProducer.h:112
EcalSimHitsValidProducer::ee4
float ee4
Definition: EcalSimHitsValidProducer.h:64
EcalSimHitsValidProducer::nCrystalInEEzp
int nCrystalInEEzp
Definition: EcalSimHitsValidProducer.h:91
math::XYZTLorentzVector
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
EcalSimHitsValidProducer::nHitsIn2ESzp
int nHitsIn2ESzp
Definition: EcalSimHitsValidProducer.h:96
EcalSimHitsValidProducer::etaOfEBCaloG4Hit
FloatVector etaOfEBCaloG4Hit
Definition: EcalSimHitsValidProducer.h:118
EcalSimHitsValidProducer::nHitsIn2ES
int nHitsIn2ES
Definition: EcalSimHitsValidProducer.h:89
EcalSimHitsValidProducer::eb9
float eb9
Definition: EcalSimHitsValidProducer.h:71
EcalSimHitsValidProducer::eOfEEMinusCaloG4Hit
FloatVector eOfEEMinusCaloG4Hit
Definition: EcalSimHitsValidProducer.h:115
EcalSimHitsValidProducer::phiOfEBCaloG4Hit
FloatVector phiOfEBCaloG4Hit
Definition: EcalSimHitsValidProducer.h:117
EcalSimHitsValidProducer::ee16
float ee16
Definition: EcalSimHitsValidProducer.h:66
EcalSimHitsValidProducer::nHitsIn2ESzm
int nHitsIn2ESzm
Definition: EcalSimHitsValidProducer.h:97
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:111
EcalSimHitsValidProducer
Definition: EcalSimHitsValidProducer.h:25
EcalSimHitsValidProducer::eOf2ESzm
FloatVector eOf2ESzm
Definition: EcalSimHitsValidProducer.h:107
EcalSimHitsValidProducer::operator=
const EcalSimHitsValidProducer & operator=(const EcalSimHitsValidProducer &)=delete
EcalSimHitsValidProducer::eOfEEPlusCaloG4Hit
FloatVector eOfEEPlusCaloG4Hit
Definition: EcalSimHitsValidProducer.h:114
EcalSimHitsValidProducer::eBX0
float eBX0[26]
Definition: EcalSimHitsValidProducer.h:99
EcalSimHitsValidProducer::eEX0
float eEX0[26]
Definition: EcalSimHitsValidProducer.h:100
EcalSimHitsValidProducer::totalEInEEzp
float totalEInEEzp
Definition: EcalSimHitsValidProducer.h:79
EcalSimHitsValidProducer::eOfEBCaloG4Hit
FloatVector eOfEBCaloG4Hit
Definition: EcalSimHitsValidProducer.h:120