|
 |
#include <MaterialBudgetHcalHistos.h>
Definition at line 22 of file MaterialBudgetHcalHistos.h.
◆ MaterialBudgetHcalHistos()
Definition at line 20 of file MaterialBudgetHcalHistos.cc.
21 binEta_ =
p.getUntrackedParameter<
int>(
"NBinEta", 260);
22 binPhi_ =
p.getUntrackedParameter<
int>(
"NBinPhi", 180);
23 maxEta_ =
p.getUntrackedParameter<
double>(
"MaxEta", 5.2);
24 etaLow_ =
p.getUntrackedParameter<
double>(
"EtaLow", -5.2);
25 etaHigh_ =
p.getUntrackedParameter<
double>(
"EtaHigh", 5.2);
26 fillHistos_ =
p.getUntrackedParameter<
bool>(
"FillHisto",
true);
27 printSum_ =
p.getUntrackedParameter<
bool>(
"PrintSummary",
false);
28 fromdd4hep_ =
p.getUntrackedParameter<
bool>(
"Fromdd4hep",
false);
29 etaMinP_ =
p.getUntrackedParameter<
double>(
"EtaMinP", 5.2);
30 etaMaxP_ =
p.getUntrackedParameter<
double>(
"EtaMaxP", 0.0);
31 etaLowMin_ =
p.getUntrackedParameter<
double>(
"EtaLowMin", 0.783);
32 etaLowMax_ =
p.getUntrackedParameter<
double>(
"EtaLowMax", 0.870);
33 etaMidMin_ =
p.getUntrackedParameter<
double>(
"EtaMidMin", 2.650);
34 etaMidMax_ =
p.getUntrackedParameter<
double>(
"EtaMidMax", 2.868);
35 etaHighMin_ =
p.getUntrackedParameter<
double>(
"EtaHighMin", 2.868);
36 etaHighMax_ =
p.getUntrackedParameter<
double>(
"EtaHighMax", 3.000);
39 <<
maxEta_ <<
" Phi plot: NX " <<
binPhi_ <<
" Range " << -1._pi <<
":" << 1._pi
References AlCaHLTBitMon_ParallelJobs::p.
◆ ~MaterialBudgetHcalHistos()
virtual MaterialBudgetHcalHistos::~MaterialBudgetHcalHistos |
( |
| ) |
|
|
inlinevirtual |
◆ book()
void MaterialBudgetHcalHistos::book |
( |
| ) |
|
|
private |
Definition at line 331 of file MaterialBudgetHcalHistos.cc.
335 if (!
tfile.isAvailable())
337 <<
"please add it to config file";
350 iter = std::to_string(
i);
352 std::to_string(
i + 100).c_str(), (
"MB(X0) prof Eta in region " + iter).c_str(),
binEta_, -
maxEta_,
maxEta_);
354 std::to_string(
i + 200).c_str(), (
"MB(L0) prof Eta in region " + iter).c_str(),
binEta_, -
maxEta_,
maxEta_);
356 std::to_string(
i + 300).c_str(), (
"MB(Step) prof Eta in region " + iter).c_str(),
binEta_, -
maxEta_,
maxEta_);
360 std::to_string(
i + 500).c_str(), (
"MB(X0) prof Ph in region " + iter).c_str(),
binPhi_, -
maxPhi,
maxPhi);
362 std::to_string(
i + 600).c_str(), (
"MB(L0) prof Ph in region " + iter).c_str(),
binPhi_, -
maxPhi,
maxPhi);
364 std::to_string(
i + 700).c_str(), (
"MB(Step) prof Ph in region " + iter).c_str(),
binPhi_, -
maxPhi,
maxPhi);
367 me900[
i] =
tfile->make<TProfile2D>(std::to_string(
i + 900).c_str(),
368 (
"MB(X0) prof Eta Phi in region " + iter).c_str(),
375 me1000[
i] =
tfile->make<TProfile2D>(std::to_string(
i + 1000).c_str(),
376 (
"MB(L0) prof Eta Phi in region " + iter).c_str(),
383 me1100[
i] =
tfile->make<TProfile2D>(std::to_string(
i + 1100).c_str(),
384 (
"MB(Step) prof Eta Phi in region " + iter).c_str(),
391 me1200[
i] =
tfile->make<TH2F>(std::to_string(
i + 1200).c_str(),
392 (
"Eta vs Phi in region " + iter).c_str(),
399 me1600[
i] =
tfile->make<TProfile>(std::to_string(
i + 1600).c_str(),
400 (
"MB(X0) prof Ph in region " + range0 + iter).c_str(),
404 me1700[
i] =
tfile->make<TProfile>(std::to_string(
i + 1700).c_str(),
405 (
"MB(L0) prof Ph in region " + range0 + iter).c_str(),
409 me1800[
i] =
tfile->make<TProfile>(std::to_string(
i + 1800).c_str(),
410 (
"MB(Step) prof Ph in region " + range0 + iter).c_str(),
414 me1900[
i] =
tfile->make<TProfile>(std::to_string(
i + 1900).c_str(),
415 (
"MB(X0) prof Ph in region " + range1 + iter).c_str(),
419 me2000[
i] =
tfile->make<TProfile>(std::to_string(
i + 2000).c_str(),
420 (
"MB(L0) prof Ph in region " + range1 + iter).c_str(),
424 me2100[
i] =
tfile->make<TProfile>(std::to_string(
i + 2100).c_str(),
425 (
"MB(Step) prof Ph in region " + range1 + iter).c_str(),
429 me2200[
i] =
tfile->make<TProfile>(std::to_string(
i + 2200).c_str(),
430 (
"MB(X0) prof Ph in region " + range2 + iter).c_str(),
434 me2300[
i] =
tfile->make<TProfile>(std::to_string(
i + 2300).c_str(),
435 (
"MB(L0) prof Ph in region " + range2 + iter).c_str(),
439 me2400[
i] =
tfile->make<TProfile>(std::to_string(
i + 2400).c_str(),
440 (
"MB(Step) prof Ph in region " + range2 + iter).c_str(),
446 iter = std::to_string(
i);
447 me1300[
i] =
tfile->make<TH1F>(std::to_string(
i + 1300).c_str(),
448 (
"Events with layers Hit (0 all, 1 HB, ..) for " + iter).c_str(),
452 me1400[
i] =
tfile->make<TH2F>(std::to_string(
i + 1400).c_str(),
453 (
"Eta vs Phi for layers hit in " + iter).c_str(),
460 me1500[
i] =
tfile->make<TProfile>(std::to_string(
i + 1500).c_str(),
461 (
"Number of layers crossed (0 all, 1 HB, ..) for " + iter).c_str(),
467 edm::LogVerbatim(
"MaterialBudget") <<
"MaterialBudgetHcalHistos: Booking user histos done ===";
References mps_fire::i, HLT_FULL_cff::maxPhi, AlCaHLTBitMon_QueryRunRegistry::string, and compare::tfile.
◆ fillBeginJob() [1/2]
Definition at line 105 of file MaterialBudgetHcalHistos.cc.
106 constexpr int32_t addLevel = 1;
118 edm::LogVerbatim(
"MaterialBudgetFull") <<
"MaterialBudgetHcalHistos: Names to be tested for " << attribute <<
" = "
122 <<
"MaterialBudgetHcalHistos: sensitives[" <<
i <<
"] = " <<
sensitives_[
i];
123 attribute =
"Volume";
127 std::vector<int>
temp = fv2.get<std::vector<int> >(
"hf",
"Levels");
129 edm::LogVerbatim(
"MaterialBudgetFull") <<
"MaterialBudgetHcalHistos: Names to be tested for " << attribute <<
" = "
131 for (
unsigned int i = 0;
i <
hfNames_.size();
i++) {
134 <<
"MaterialBudgetHcalHistos: HF[" <<
i <<
"] = " <<
hfNames_[
i] <<
" at level " <<
hfLevels_[
i];
137 const std::string ecalRO[2] = {
"EcalHitsEB",
"EcalHitsEE"};
138 attribute =
"ReadOutName";
139 for (
int k = 0;
k < 2;
k++) {
143 std::vector<std::string> senstmp =
getNames(fv);
144 edm::LogVerbatim(
"MaterialBudgetFull") <<
"MaterialBudgetHcalHistos: Names to be tested for " << attribute
145 <<
" = " <<
value <<
" has " << senstmp.size() <<
" elements";
146 for (
unsigned int i = 0;
i < senstmp.size();
i++) {
154 <<
"MaterialBudgetHcalHistos:sensitiveEC[" <<
i <<
"] = " <<
sensitiveEC_[
i];
References ALCARECOTkAlBeamHalo_cff::filter, spr::find(), cms::DDFilteredView::get(), MsgTools::getNames(), mps_fire::i, dqmdumpme::k, Skims_PA_cff::name, names, AlCaHLTBitMon_QueryRunRegistry::string, and groupFilesInBlocks::temp.
◆ fillBeginJob() [2/2]
void MaterialBudgetHcalHistos::fillBeginJob |
( |
const DDCompactView & |
cpv | ) |
|
Definition at line 49 of file MaterialBudgetHcalHistos.cc.
50 constexpr int32_t addLevel = 0;
62 edm::LogVerbatim(
"MaterialBudgetFull") <<
"MaterialBudgetHcalHistos: Names to be tested for " << attribute <<
" = "
66 <<
"MaterialBudgetHcalHistos: sensitives[" <<
i <<
"] = " <<
sensitives_[
i];
75 edm::LogVerbatim(
"MaterialBudgetFull") <<
"MaterialBudgetHcalHistos: Names to be tested for " << attribute <<
" = "
77 for (
unsigned int i = 0;
i <
hfNames_.size();
i++) {
81 <<
"MaterialBudgetHcalHistos: HF[" <<
i <<
"] = " <<
hfNames_[
i] <<
" at level " <<
hfLevels_[
i];
84 const std::string ecalRO[2] = {
"EcalHitsEB",
"EcalHitsEE"};
85 attribute =
"ReadOutName";
86 for (
int k = 0;
k < 2;
k++) {
90 std::vector<std::string> senstmp =
getNames(fv3);
91 edm::LogVerbatim(
"MaterialBudgetFull") <<
"MaterialBudgetHcalHistos: Names to be tested for " << attribute
92 <<
" = " <<
value <<
" has " << senstmp.size() <<
" elements";
93 for (
unsigned int i = 0;
i < senstmp.size();
i++) {
101 <<
"MaterialBudgetHcalHistos:sensitiveEC[" <<
i <<
"] = " <<
sensitiveEC_[
i];
References spr::find(), DDFilteredView::firstChild(), MsgTools::getNames(), mps_fire::i, dqmdumpme::k, personalPlayback::level, DDFilteredView::mergedSpecifics(), Skims_PA_cff::name, names, AlCaHLTBitMon_QueryRunRegistry::string, pfDeepBoostedJetPreprocessParams_cfi::sv, and groupFilesInBlocks::temp.
◆ fillEndTrack()
void MaterialBudgetHcalHistos::fillEndTrack |
( |
| ) |
|
◆ fillHisto()
void MaterialBudgetHcalHistos::fillHisto |
( |
int |
ii | ) |
|
|
private |
◆ fillLayer()
void MaterialBudgetHcalHistos::fillLayer |
( |
| ) |
|
|
private |
◆ fillPerStep()
void MaterialBudgetHcalHistos::fillPerStep |
( |
const G4Step * |
aStep | ) |
|
Definition at line 187 of file MaterialBudgetHcalHistos.cc.
188 G4Material* material = aStep->GetPreStepPoint()->GetMaterial();
189 double step = aStep->GetStepLength();
190 double radl = material->GetRadlen();
191 double intl = material->GetNuclearInterLength();
195 const G4VTouchable* touch = aStep->GetPreStepPoint()->GetTouchable();
196 std::string name = (static_cast<std::string>(dd4hep::dd::noNamespace(touch->GetVolume(0)->GetName())));
197 std::string matName = (static_cast<std::string>(dd4hep::dd::noNamespace(material->GetName())));
217 <<
" Material " << matName <<
" Old Length " <<
stepLen_ <<
" X0 "
223 << idOld <<
" Length " <<
step <<
" in " << matName <<
" of density "
224 <<
density <<
" g/cc; Radiation Length " << radl <<
" mm; Interaction Length "
225 << intl <<
" mm\n Position "
226 << aStep->GetPreStepPoint()->GetPosition() <<
" Cylindrical R "
227 << aStep->GetPreStepPoint()->GetPosition().perp() <<
" Length (so far) "
232 int det = 0, lay = 0;
237 <<
isItHF(touch) <<
" Eta " << abseta <<
" HC " << ((touch->GetReplicaNumber(1)) / 1000) <<
":"
238 << ((touch->GetReplicaNumber(0) / 10) % 100 + 3) <<
" X0 " << (
radLen_ + (
step / radl)) <<
" Lambda "
252 det = (touch->GetReplicaNumber(1)) / 1000;
253 lay = (touch->GetReplicaNumber(0) / 10) % 100 + 3;
267 }
else if (lay !=
layer_) {
274 edm::LogVerbatim(
"MaterialBudgetFull") <<
"MaterialBudgetHcalHistos: Det " << det <<
" Layer " << lay <<
" Eta "
291 <<
"MaterialBudgetHcalHistos: Step at " <<
name <<
" calls filHisto with " << (
id_ - 1);
301 if (!
isItHF(aStep->GetPostStepPoint()->GetTouchable())) {
304 << static_cast<std::string>(dd4hep::dd::noNamespace(
305 aStep->GetPostStepPoint()->GetTouchable()->GetVolume(0)->GetName()))
306 <<
" calls fillHisto with " <<
id_;
References funct::abs(), angle_units::operators::convertRadToDeg(), geant_units::operators::convertUnitsTo(), fastSimProducer_cff::density, newFWLiteAna::found, cuy::ii, sistrip::layer_, Skims_PA_cff::name, and AlCaHLTBitMon_QueryRunRegistry::string.
◆ fillStartTrack()
void MaterialBudgetHcalHistos::fillStartTrack |
( |
const G4Track * |
aTrack | ) |
|
◆ getDDDArray()
std::vector< double > MaterialBudgetHcalHistos::getDDDArray |
( |
const std::string & |
str, |
|
|
const DDsvalues_type & |
sv |
|
) |
| |
|
private |
◆ getNames() [1/2]
Definition at line 571 of file MaterialBudgetHcalHistos.cc.
572 std::vector<std::string>
tmp;
573 const std::vector<std::string> notIn = {
574 "CALO",
"HCal",
"MBBTL",
"MBBTR",
"MBBTC",
"MBAT",
"MBBT_R1M",
"MBBT_R1P",
"MBBT_R1MX",
"MBBT_R1PX",
"VCAL"};
577 if (
std::find(notIn.begin(), notIn.end(),
n) == notIn.end()) {
References spr::find(), cms::DDFilteredView::firstChild(), dqmiodumpmetadata::n, cms::DDFilteredView::name(), AlCaHLTBitMon_QueryRunRegistry::string, and createJobs::tmp.
◆ getNames() [2/2]
std::vector< std::string > MaterialBudgetHcalHistos::getNames |
( |
DDFilteredView & |
fv | ) |
|
|
private |
◆ hend()
void MaterialBudgetHcalHistos::hend |
( |
| ) |
|
|
private |
◆ isItEC()
bool MaterialBudgetHcalHistos::isItEC |
( |
const std::string & |
name | ) |
|
|
private |
◆ isItHF()
bool MaterialBudgetHcalHistos::isItHF |
( |
const G4VTouchable * |
touch | ) |
|
|
private |
◆ isSensitive()
bool MaterialBudgetHcalHistos::isSensitive |
( |
const std::string & |
name | ) |
|
|
private |
◆ binEta_
int MaterialBudgetHcalHistos::binEta_ |
|
private |
◆ binPhi_
int MaterialBudgetHcalHistos::binPhi_ |
|
private |
◆ eta_
double MaterialBudgetHcalHistos::eta_ |
|
private |
◆ etaHigh_
double MaterialBudgetHcalHistos::etaHigh_ |
|
private |
◆ etaHighMax_
double MaterialBudgetHcalHistos::etaHighMax_ |
|
private |
◆ etaHighMin_
double MaterialBudgetHcalHistos::etaHighMin_ |
|
private |
◆ etaLow_
double MaterialBudgetHcalHistos::etaLow_ |
|
private |
◆ etaLowMax_
double MaterialBudgetHcalHistos::etaLowMax_ |
|
private |
◆ etaLowMin_
double MaterialBudgetHcalHistos::etaLowMin_ |
|
private |
◆ etaMaxP_
double MaterialBudgetHcalHistos::etaMaxP_ |
|
private |
◆ etaMidMax_
double MaterialBudgetHcalHistos::etaMidMax_ |
|
private |
◆ etaMidMin_
double MaterialBudgetHcalHistos::etaMidMin_ |
|
private |
◆ etaMinP_
double MaterialBudgetHcalHistos::etaMinP_ |
|
private |
◆ fillHistos_
bool MaterialBudgetHcalHistos::fillHistos_ |
|
private |
◆ fromdd4hep_
bool MaterialBudgetHcalHistos::fromdd4hep_ |
|
private |
◆ hfLevels_
std::vector<int> MaterialBudgetHcalHistos::hfLevels_ |
|
private |
◆ hfNames_
std::vector<std::string> MaterialBudgetHcalHistos::hfNames_ |
|
private |
◆ id_
int MaterialBudgetHcalHistos::id_ |
|
private |
◆ intLen_
double MaterialBudgetHcalHistos::intLen_ |
|
private |
◆ intLength_
std::vector<double> MaterialBudgetHcalHistos::intLength_ |
|
private |
◆ layer_
int MaterialBudgetHcalHistos::layer_ |
|
private |
◆ matList_
std::vector<std::string> MaterialBudgetHcalHistos::matList_ |
|
private |
◆ maxEta_
double MaterialBudgetHcalHistos::maxEta_ |
|
private |
◆ maxSet2_
const int MaterialBudgetHcalHistos::maxSet2_ = 9 |
|
staticprivate |
◆ maxSet_
const int MaterialBudgetHcalHistos::maxSet_ = 25 |
|
staticprivate |
◆ me100
TProfile* MaterialBudgetHcalHistos::me100[maxSet_] |
|
private |
◆ me1000
TProfile2D * MaterialBudgetHcalHistos::me1000[maxSet_] |
|
private |
◆ me1100
TProfile2D * MaterialBudgetHcalHistos::me1100[maxSet_] |
|
private |
◆ me1200
TH2F* MaterialBudgetHcalHistos::me1200[maxSet_] |
|
private |
◆ me1300
TH1F * MaterialBudgetHcalHistos::me1300[maxSet2_] |
|
private |
◆ me1400
TH2F * MaterialBudgetHcalHistos::me1400[maxSet2_] |
|
private |
◆ me1500
TProfile* MaterialBudgetHcalHistos::me1500[maxSet2_] |
|
private |
◆ me1600
TProfile* MaterialBudgetHcalHistos::me1600[maxSet_] |
|
private |
◆ me1700
TProfile * MaterialBudgetHcalHistos::me1700[maxSet_] |
|
private |
◆ me1800
TProfile * MaterialBudgetHcalHistos::me1800[maxSet_] |
|
private |
◆ me1900
TProfile* MaterialBudgetHcalHistos::me1900[maxSet_] |
|
private |
◆ me200
TProfile * MaterialBudgetHcalHistos::me200[maxSet_] |
|
private |
◆ me2000
TProfile * MaterialBudgetHcalHistos::me2000[maxSet_] |
|
private |
◆ me2100
TProfile * MaterialBudgetHcalHistos::me2100[maxSet_] |
|
private |
◆ me2200
TProfile* MaterialBudgetHcalHistos::me2200[maxSet_] |
|
private |
◆ me2300
TProfile * MaterialBudgetHcalHistos::me2300[maxSet_] |
|
private |
◆ me2400
TProfile * MaterialBudgetHcalHistos::me2400[maxSet_] |
|
private |
◆ me300
TProfile * MaterialBudgetHcalHistos::me300[maxSet_] |
|
private |
◆ me400
TH1F* MaterialBudgetHcalHistos::me400[maxSet_] |
|
private |
◆ me500
TProfile* MaterialBudgetHcalHistos::me500[maxSet_] |
|
private |
◆ me600
TProfile * MaterialBudgetHcalHistos::me600[maxSet_] |
|
private |
◆ me700
TProfile * MaterialBudgetHcalHistos::me700[maxSet_] |
|
private |
◆ me800
TH1F * MaterialBudgetHcalHistos::me800[maxSet_] |
|
private |
◆ me900
TProfile2D* MaterialBudgetHcalHistos::me900[maxSet_] |
|
private |
◆ nlayHB_
int MaterialBudgetHcalHistos::nlayHB_ |
|
private |
◆ nlayHE_
int MaterialBudgetHcalHistos::nlayHE_ |
|
private |
◆ nlayHF_
int MaterialBudgetHcalHistos::nlayHF_ |
|
private |
◆ nlayHO_
int MaterialBudgetHcalHistos::nlayHO_ |
|
private |
◆ phi_
double MaterialBudgetHcalHistos::phi_ |
|
private |
◆ printSum_
bool MaterialBudgetHcalHistos::printSum_ |
|
private |
◆ radLen_
double MaterialBudgetHcalHistos::radLen_ |
|
private |
◆ radLength_
std::vector<double> MaterialBudgetHcalHistos::radLength_ |
|
private |
◆ sensitiveEC_
std::vector<std::string> MaterialBudgetHcalHistos::sensitiveEC_ |
|
private |
◆ sensitives_
std::vector<std::string> MaterialBudgetHcalHistos::sensitives_ |
|
private |
◆ stepLen_
double MaterialBudgetHcalHistos::stepLen_ |
|
private |
◆ stepLength_
std::vector<double> MaterialBudgetHcalHistos::stepLength_ |
|
private |
◆ steps_
int MaterialBudgetHcalHistos::steps_ |
|
private |
bool isItEC(const std::string &)
TProfile * me2100[maxSet_]
TProfile * me1800[maxSet_]
TProfile * me2300[maxSet_]
TProfile2D * me1100[maxSet_]
std::vector< std::string > getNames(DDFilteredView &fv)
TProfile * me300[maxSet_]
constexpr NumType convertRadToDeg(NumType radians)
std::vector< std::string > sensitiveEC_
const DDLogicalPart & logicalPart() const
The logical-part of the current node in the filtered-view.
TProfile * me700[maxSet_]
std::vector< int > hfLevels_
bool isItHF(const G4VTouchable *)
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
std::string_view name() const
bool firstChild()
set the current node to the first child ...
static const int maxSet2_
TProfile * me2200[maxSet_]
constexpr NumType convertUnitsTo(double desiredUnits, NumType val)
const std::string names[nVars_]
std::vector< double > stepLength_
TProfile * me2400[maxSet_]
bool next()
set current node to the next node in the filtered tree
bool firstChild()
set the current node to the first child
bool DDfetch(const DDsvalues_type *, DDValue &)
helper for retrieving DDValues from DDsvalues_type *.
TProfile2D * me1000[maxSet_]
bool isSensitive(const std::string &)
TProfile * me1900[maxSet_]
std::vector< double > intLength_
A DDLogicalPart aggregates information concerning material, solid and sensitveness ....
TProfile * me600[maxSet_]
TProfile * me200[maxSet_]
TProfile * me1700[maxSet_]
std::vector< double > radLength_
TProfile * me1500[maxSet2_]
Log< level::Info, true > LogVerbatim
TProfile * me2000[maxSet_]
std::vector< std::string > sensitives_
TProfile2D * me900[maxSet_]
Abs< T >::type abs(const T &t)
TProfile * me1600[maxSet_]
TProfile * me500[maxSet_]
std::vector< std::pair< unsigned int, DDValue > > DDsvalues_type
std::vector< double > getDDDArray(const std::string &str, const DDsvalues_type &sv)
std::vector< std::string > matList_
TProfile * me100[maxSet_]
std::vector< std::string > hfNames_