12 #include "CLHEP/Units/GlobalPhysicalConstants.h" 13 #include "CLHEP/Units/GlobalSystemOfUnits.h" 24 edm::LogInfo(
"MaterialBudget") <<
"MaterialBudgetCastorHistos: FillHisto : " <<
fillHistos <<
" PrintSummary " 25 << printSum <<
" == Eta plot: NX " <<
binEta <<
" Range " << etaLow <<
" (" << -
etaHigh 26 <<
") : " <<
etaHigh <<
" (" << -etaLow <<
") Phi plot: " 27 <<
"NX " << binPhi <<
" Range " << -
pi <<
":" <<
pi <<
" (Eta limit " << etaLow <<
":" 34 edm::LogInfo(
"MaterialBudget") <<
"MaterialBudgetCastorHistos: Save user " 42 const G4ThreeVector&
dir = aTrack->GetMomentum();
43 if (dir.theta() != 0) {
49 double theEnergy = aTrack->GetTotalEnergy();
50 int theID = (
int)(aTrack->GetDefinition()->GetPDGEncoding());
59 edm::LogInfo(
"MaterialBudget") <<
"MaterialBudgetCastorHistos: Track " << aTrack->GetTrackID() <<
" Code " << theID
60 <<
" Energy " << theEnergy /
GeV <<
" GeV; Eta " <<
eta_ <<
" Phi " <<
phi_ / deg
61 <<
" PT " << dir.perp() /
GeV <<
" GeV *****";
65 G4Material* material = aStep->GetPreStepPoint()->GetMaterial();
66 double step = aStep->GetStepLength();
67 double radl = material->GetRadlen();
68 double intl = material->GetNuclearInterLength();
69 double density = material->GetDensity() / (
g / cm3);
73 const G4VTouchable* touch = aStep->GetPreStepPoint()->GetTouchable();
93 edm::LogInfo(
"MaterialBudget") <<
"MaterialBudgetCastorHistos: " << name <<
" " << step <<
" " << matName <<
" " 94 <<
stepLen <<
" " << step / radl <<
" " <<
radLen <<
" " << step / intl <<
" " 97 edm::LogInfo(
"MaterialBudget") <<
"MaterialBudgetCastorHistos: Step at " << name <<
" Length " << step <<
" in " 98 << matName <<
" of density " << density <<
" g/cc; Radiation Length " << radl
100 <<
" Interaction Length " << intl <<
" mm\n" 101 <<
" Position " << aStep->GetPreStepPoint()->GetPosition()
102 <<
" Cylindrical R " << aStep->GetPreStepPoint()->GetPosition().perp()
103 <<
" Length (so far) " <<
stepLen <<
" L/X0 " << step / radl <<
"/" <<
radLen 104 <<
" L/Lambda " << step / intl <<
"/" <<
intLen;
107 int level = ((touch->GetHistoryDepth()) + 1);
110 name1 = touch->GetVolume(level - 4)->GetName();
112 name2 = touch->GetVolume(level - 5)->GetName();
113 if (name1 ==
"CAST") {
117 else if (
name2 ==
"CAHC")
119 else if (
name2 ==
"CEDC")
121 else if (
name2 ==
"CHDC")
128 LogDebug(
"MaterialBudget") <<
"MaterialBudgetCastorHistos: Level " << level <<
" Volume " << name1 <<
" and " <<
name2 129 <<
" ID1 " <<
id1 <<
" (" << id1Old <<
") ID2 " <<
id2 <<
" (" << id2Old <<
")";
171 throw cms::Exception(
"BadConfig") <<
"MaterialBudgetCastorHistos: TFileService unavailable: " 172 <<
"please add it to config file";
175 edm::LogInfo(
"MaterialBudget") <<
"MaterialBudgetCastorHistos: Booking user " 176 <<
"histos === with " <<
binEta <<
" bins " 178 <<
"in phi from " << -maxPhi <<
" to " <<
maxPhi;
190 tag2 =
" (-ve Eta Side)";
192 tag2 =
" (+ve Eta Side)";
198 ireg = (ireg - 1) / 2;
218 me900[
i] = tfile->
make<TProfile2D>(std::to_string(
i + 900).c_str(),
219 (
"MB(X0) prof Eta Phi in region " +
title).c_str(),
226 me1000[
i] = tfile->
make<TProfile2D>(std::to_string(
i + 1000).c_str(),
227 (
"MB(L0) prof Eta Phi in region " +
title).c_str(),
234 me1100[
i] = tfile->
make<TProfile2D>(std::to_string(
i + 1100).c_str(),
235 (
"MB(Step) prof Eta Phi in region " +
title).c_str(),
242 me1200[
i] = tfile->
make<TH2F>(std::to_string(
i + 1200).c_str(),
243 (
"Eta vs Phi in region " +
title).c_str(),
252 edm::LogInfo(
"MaterialBudget") <<
"MaterialBudgetCastorHistos: Booking user " 253 <<
"histos done ===";
257 int ii = 2 * (
id - 1) + ix;
258 double etaAbs =
eta_;
263 LogDebug(
"MaterialBudget") <<
"MaterialBudgetCastorHistos:FillHisto " 264 <<
"called with index " <<
id <<
":" << ix <<
":" << ii <<
" eta " << etaAbs <<
" ("
T getUntrackedParameter(std::string const &, T const &) const
void fillHisto(int id, int ix)
std::vector< std::string > matList
T * make(const Args &...args) const
make new ROOT object
MaterialBudgetCastorHistos(const edm::ParameterSet &p)
std::vector< double > intLength
std::vector< double > stepLength
TProfile2D * me1100[maxSet]
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e g
TProfile2D * me900[maxSet]
TProfile2D * me1000[maxSet]
void fillStartTrack(const G4Track *)
std::vector< double > radLength
void fillPerStep(const G4Step *)
virtual ~MaterialBudgetCastorHistos()