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") <<
"MaterialBudgetCastorHistos: " 103 << name <<
" " << step <<
" " << matName
104 <<
" " <<
stepLen <<
" " << step/radl <<
" " 107 edm::LogInfo(
"MaterialBudget") <<
"MaterialBudgetCastorHistos: Step at " 108 << name <<
" Length " << step <<
" in " 109 << matName <<
" of density " << density
110 <<
" g/cc; Radiation Length " <<radl <<
" mm;" 111 <<
" Interaction Length " << intl <<
" mm\n" 113 << aStep->GetPreStepPoint()->GetPosition()
115 <<aStep->GetPreStepPoint()->GetPosition().perp()
116 <<
" Length (so far) " <<
stepLen <<
" L/X0 " 117 << step/radl <<
"/" <<
radLen <<
" L/Lambda " 118 << step/intl <<
"/" <<
intLen;
121 int level = ((touch->GetHistoryDepth())+1);
123 if (level>3) name1 = touch->GetVolume(level-4)->GetName();
124 if (level>4) name2 = touch->GetVolume(level-5)->GetName();
125 if (name1 ==
"CAST") {
127 if (name2 ==
"CAEC")
id2 = 2;
128 else if (name2 ==
"CAHC")
id2 = 3;
129 else if (name2 ==
"CEDC")
id2 = 4;
130 else if (name2 ==
"CHDC")
id2 = 5;
135 LogDebug(
"MaterialBudget") <<
"MaterialBudgetCastorHistos: Level " << level
136 <<
" Volume " << name1 <<
" and " << name2
137 <<
" ID1 " <<
id1 <<
" (" << id1Old <<
") ID2 " 138 <<
id2 <<
" (" << id2Old <<
")";
165 edm::LogInfo(
"MaterialBudget") <<
"MaterialBudgetCastorHistos: " 179 throw cms::Exception(
"BadConfig") <<
"MaterialBudgetCastorHistos: TFileService unavailable: " 180 <<
"please add it to config file";
183 edm::LogInfo(
"MaterialBudget") <<
"MaterialBudgetCastorHistos: Booking user " 184 <<
"histos === with " <<
binEta <<
" bins " 185 <<
"in eta from " <<
etaLow <<
" to " 187 <<
"in phi from " << -maxPhi <<
" to " 200 tag2 =
" (-ve Eta Side)";
202 tag2 =
" (+ve Eta Side)";
212 me100[
i] = tfile->
make<TProfile>(std::to_string(
i + 100).c_str(),
214 me200[
i] = tfile->
make<TProfile>(std::to_string(
i + 200).c_str(),
216 me300[
i] = tfile->
make<TProfile>(std::to_string(
i + 300).c_str(),
218 me400[
i] = tfile->
make<TH1F>(std::to_string(
i + 400).c_str(),
220 me500[
i] = tfile->
make<TProfile>(std::to_string(
i + 500).c_str(),
222 me600[
i] = tfile->
make<TProfile>(std::to_string(
i + 600).c_str(),
224 me700[
i] = tfile->
make<TProfile>(std::to_string(
i + 700).c_str(),
226 me800[
i] = tfile->
make<TH1F>(std::to_string(
i + 800).c_str(),
228 me900[
i] = tfile->
make<TProfile2D>(std::to_string(
i + 900).c_str(),
231 me1000[
i]= tfile->
make<TProfile2D>(std::to_string(
i + 1000).c_str(),
234 me1100[
i]= tfile->
make<TProfile2D>(std::to_string(
i + 1100).c_str(),
237 me1200[
i]= tfile->
make<TH2F>(std::to_string(
i + 1200).c_str(),
242 edm::LogInfo(
"MaterialBudget") <<
"MaterialBudgetCastorHistos: Booking user " 243 <<
"histos done ===";
249 int ii = 2*(
id-1) + ix;
255 LogDebug(
"MaterialBudget") <<
"MaterialBudgetCastorHistos:FillHisto " 256 <<
"called with index " <<
id <<
":" << ix
257 <<
":" << 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()