19 : g4InfoLabel(ps.getParameter<std::
string>(
"moduleLabelG4")),
20 EEHitsCollection(ps.getParameter<std::
string>(
"EEHitsCollection")),
21 ESHitsCollection(ps.getParameter<std::
string>(
"ESHitsCollection")),
33 ib.
setScope(MonitorElementData::Scope::RUN);
38 histo =
"ES hits layer 2 multiplicity z+";
41 histo =
"ES hits layer 1 multiplicity z-";
44 histo =
"ES hits layer 2 multiplicity z-";
47 histo =
"ES hits energy layer 1 z+";
50 histo =
"ES hits energy layer 2 z+";
53 histo =
"ES hits energy layer 1 z-";
56 histo =
"ES hits energy layer 2 z-";
59 histo =
"ES hits log10energy spectrum";
62 histo =
"ES hits log10energy spectrum vs normalized energy";
65 histo =
"ES E1+07E2 z+";
68 histo =
"ES E1+07E2 z-";
71 histo =
"EE vs ES z+";
74 histo =
"EE vs ES z-";
77 histo =
"ES ene2oEne1 z+";
80 histo =
"ES ene2oEne1 z-";
96 std::vector<PCaloHit> theEECaloHits;
98 theEECaloHits.insert(theEECaloHits.end(), EcalHitsEE->begin(), EcalHitsEE->end());
101 std::vector<PCaloHit> theESCaloHits;
103 theESCaloHits.insert(theESCaloHits.end(), EcalHitsES->begin(), EcalHitsES->end());
106 double ESEnergy_ = 0.;
113 for (std::vector<PCaloHit>::iterator isim = theEECaloHits.begin(); isim != theEECaloHits.end(); ++isim) {
115 if (eeid.zside() > 0)
116 EEetzp_ += isim->energy();
117 if (eeid.zside() < 0)
118 EEetzm_ += isim->energy();
121 uint32_t nESHits1zp = 0;
122 uint32_t nESHits1zm = 0;
123 uint32_t nESHits2zp = 0;
124 uint32_t nESHits2zm = 0;
125 double ESet1zp_ = 0.;
126 double ESet2zp_ = 0.;
127 double ESet1zm_ = 0.;
128 double ESet2zm_ = 0.;
129 std::vector<double> econtr(140, 0.);
131 for (std::vector<PCaloHit>::iterator isim = theESCaloHits.begin(); isim != theESCaloHits.end(); ++isim) {
136 LogDebug(
"HitInfo") <<
" CaloHit " << isim->getName() <<
"\n"
137 <<
" DetID = " << isim->id() <<
" ESDetId: z side " << esid.zside() <<
" plane "
138 << esid.plane() << esid.six() <<
',' << esid.siy() <<
':' << esid.strip() <<
"\n"
139 <<
" Time = " << isim->time() <<
"\n"
140 <<
" Track Id = " << isim->geantTrackId() <<
"\n"
141 <<
" Energy = " << isim->energy();
143 ESEnergy_ += isim->energy();
144 if (isim->energy() > 0) {
146 int log10i = int((log10(isim->energy()) + 10.) * 10.);
147 if (log10i >= 0 && log10i < 140)
148 econtr[log10i] += isim->energy();
151 if (esid.plane() == 1) {
152 if (esid.zside() > 0) {
154 ESet1zp_ += isim->energy();
156 }
else if (esid.zside() < 0) {
158 ESet1zm_ += isim->energy();
161 }
else if (esid.plane() == 2) {
162 if (esid.zside() > 0) {
164 ESet2zp_ += isim->energy();
166 }
else if (esid.zside() < 0) {
168 ESet2zm_ += isim->energy();
180 if (ESEnergy_ != 0) {
181 for (
int i = 0;
i < 140;
i++) {
186 for (HepMC::GenEvent::particle_const_iterator
p = MCEvt->GetEvent()->particles_begin();
187 p != MCEvt->GetEvent()->particles_end();
189 double htheta = (*p)->momentum().theta();
190 double heta = -99999.;
191 if (
tan(htheta * 0.5) > 0) {
192 heta = -
log(
tan(htheta * 0.5));
195 if (heta > 1.653 && heta < 2.6) {
201 if (heta < -1.653 && heta > -2.6) {
MonitorElement * menESHits1zm_
EventNumber_t event() const
T getUntrackedParameter(std::string const &, T const &) const
std::string EEHitsCollection
static std::vector< std::string > checklist log
const edm::EventSetup & c
EcalPreshowerSimHitsValidation(const edm::ParameterSet &ps)
Constructor.
MonitorElement * meEShitLog10EnergyNorm_
virtual void setCurrentFolder(std::string const &fullpath)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
MonitorElement * me2eszmOver1eszm_
virtual MonitorElementData::Scope setScope(MonitorElementData::Scope newscope)
MonitorElement * meEEoverESzm_
MonitorElement * meE1alphaE2zm_
MonitorElement * me2eszpOver1eszp_
void analyze(const edm::Event &e, const edm::EventSetup &c) override
Analyze.
std::string ESHitsCollection
MonitorElement * menESHits2zm_
edm::EDGetTokenT< edm::HepMCProduct > HepMCToken
MonitorElement * bookProfile(TString const &name, TString const &title, int nchX, double lowX, double highX, int, double lowY, double highY, char const *option="s", FUNC onbooking=NOOP())
MonitorElement * meESEnergyHits2zm_
Tan< T >::type tan(const T &t)
MonitorElement * meESEnergyHits1zp_
MonitorElement * menESHits2zp_
void bookHistograms(DQMStore::IBooker &ib, edm::Run const &, edm::EventSetup const &c) override
MonitorElement * meESEnergyHits1zm_
Log< level::Info, false > LogInfo
MonitorElement * meE1alphaE2zp_
MonitorElement * meESEnergyHits2zp_
edm::EDGetTokenT< edm::PCaloHitContainer > EEHitsToken
edm::EDGetTokenT< edm::PCaloHitContainer > ESHitsToken
MonitorElement * meEEoverESzp_
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
MonitorElement * menESHits1zp_
MonitorElement * meEShitLog10Energy_