12 #include "CLHEP/Units/GlobalPhysicalConstants.h" 13 #include "CLHEP/Units/GlobalSystemOfUnits.h" 25 edm::LogInfo(
"MaterialBudget") <<
"MaterialBudgetCastorHistos: FillHisto : " 27 <<
" == Eta plot: NX " <<
binEta <<
" Range " 28 << etaLow <<
" (" << -
etaHigh <<
") : " 29 <<
etaHigh <<
" (" << -etaLow <<
") Phi plot: " 30 <<
"NX " << binPhi <<
" Range " << -
pi <<
":" 31 <<
pi <<
" (Eta limit " << etaLow <<
":" 38 edm::LogInfo(
"MaterialBudget") <<
"MaterialBudgetCastorHistos: Save user " 47 const G4ThreeVector&
dir = aTrack->GetMomentum() ;
48 if (dir.theta() != 0 ) {
54 double theEnergy = aTrack->GetTotalEnergy();
55 int theID = (
int)(aTrack->GetDefinition()->GetPDGEncoding());
64 edm::LogInfo(
"MaterialBudget") <<
"MaterialBudgetCastorHistos: Track " 65 << aTrack->GetTrackID() <<
" Code " << theID
66 <<
" Energy " << theEnergy/
GeV <<
" GeV; Eta " 67 <<
eta <<
" Phi " <<
phi/deg <<
" PT " 68 << dir.perp()/
GeV <<
" GeV *****";
74 G4Material * material = aStep->GetPreStepPoint()->GetMaterial();
75 double step = aStep->GetStepLength();
76 double radl = material->GetRadlen();
77 double intl = material->GetNuclearInterLength();
78 double density = material->GetDensity() / (
g/cm3);
82 const G4VTouchable* touch = aStep->GetPreStepPoint()->GetTouchable();
102 edm::LogInfo(
"MaterialBudget") << name <<
" " << step <<
" " << matName
103 <<
" " <<
stepLen <<
" " << step/radl <<
" " 106 edm::LogInfo(
"MaterialBudget") <<
"MaterialBudgetCastorHistos: Step at " 107 << name <<
" Length " << step <<
" in " 108 << matName <<
" of density " << density
109 <<
" g/cc; Radiation Length " <<radl <<
" mm;" 110 <<
" Interaction Length " << intl <<
" mm\n" 112 << aStep->GetPreStepPoint()->GetPosition()
114 <<aStep->GetPreStepPoint()->GetPosition().perp()
115 <<
" Length (so far) " <<
stepLen <<
" L/X0 " 116 << step/radl <<
"/" <<
radLen <<
" L/Lambda " 117 << step/intl <<
"/" <<
intLen;
120 int level = ((touch->GetHistoryDepth())+1);
122 if (level>3) name1 = touch->GetVolume(level-4)->GetName();
123 if (level>4) name2 = touch->GetVolume(level-5)->GetName();
124 if (name1 ==
"CAST") {
126 if (name2 ==
"CAEC")
id2 = 2;
127 else if (name2 ==
"CAHC")
id2 = 3;
128 else if (name2 ==
"CEDC")
id2 = 4;
129 else if (name2 ==
"CHDC")
id2 = 5;
134 LogDebug(
"MaterialBudget") <<
"MaterialBudgetCastorHistos: Level " << level
135 <<
" Volume " << name1 <<
" and " << name2
136 <<
" ID1 " <<
id1 <<
" (" << id1Old <<
") ID2 " 137 <<
id2 <<
" (" << id2Old <<
")";
178 <<
"please add it to config file";
181 edm::LogInfo(
"MaterialBudget") <<
"MaterialBudgetCastorHistos: Booking user " 182 <<
"histos === with " <<
binEta <<
" bins " 183 <<
"in eta from " <<
etaLow <<
" to " 185 <<
"in phi from " << -maxPhi <<
" to " 198 tag2 =
" (-ve Eta Side)";
200 tag2 =
" (+ve Eta Side)";
210 me100[
i] = tfile->
make<TProfile>(std::to_string(
i + 100).c_str(),
212 me200[
i] = tfile->
make<TProfile>(std::to_string(
i + 200).c_str(),
214 me300[
i] = tfile->
make<TProfile>(std::to_string(
i + 300).c_str(),
216 me400[
i] = tfile->
make<TH1F>(std::to_string(
i + 400).c_str(),
218 me500[
i] = tfile->
make<TProfile>(std::to_string(
i + 500).c_str(),
220 me600[
i] = tfile->
make<TProfile>(std::to_string(
i + 600).c_str(),
222 me700[
i] = tfile->
make<TProfile>(std::to_string(
i + 700).c_str(),
224 me800[
i] = tfile->
make<TH1F>(std::to_string(
i + 800).c_str(),
226 me900[
i] = tfile->
make<TProfile2D>(std::to_string(
i + 900).c_str(),
229 me1000[
i]= tfile->
make<TProfile2D>(std::to_string(
i + 1000).c_str(),
232 me1100[
i]= tfile->
make<TProfile2D>(std::to_string(
i + 1100).c_str(),
235 me1200[
i]= tfile->
make<TH2F>(std::to_string(
i + 1200).c_str(),
240 edm::LogInfo(
"MaterialBudget") <<
"MaterialBudgetCastorHistos: Booking user " 241 <<
"histos done ===";
247 int ii = 2*(
id-1) + ix;
253 LogDebug(
"MaterialBudget") <<
"MaterialBudgetCastorHistos:FillHisto " 254 <<
"called with index " <<
id <<
":" << ix
255 <<
":" << 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()