12 #include "CLHEP/Units/GlobalPhysicalConstants.h"
13 #include "CLHEP/Units/GlobalSystemOfUnits.h"
23 edm::LogInfo(
"MaterialBudget") <<
"MaterialBudgetCastorHistos: FillHisto : "
25 <<
" == Eta plot: NX " <<
binEta <<
" Range "
26 << etaLow <<
" (" << -
etaHigh <<
") : "
27 <<
etaHigh <<
" (" << -etaLow <<
") Phi plot: "
28 <<
"NX " << binPhi <<
" Range " << -
pi <<
":"
29 <<
pi <<
" (Eta limit " << etaLow <<
":"
36 edm::LogInfo(
"MaterialBudget") <<
"MaterialBudgetCastorHistos: Save user "
45 const G4ThreeVector&
dir = aTrack->GetMomentum() ;
46 if (dir.theta() != 0 ) {
52 double theEnergy = aTrack->GetTotalEnergy();
53 int theID = (int)(aTrack->GetDefinition()->GetPDGEncoding());
62 edm::LogInfo(
"MaterialBudget") <<
"MaterialBudgetCastorHistos: Track "
63 << aTrack->GetTrackID() <<
" Code " << theID
64 <<
" Energy " << theEnergy/GeV <<
" GeV; Eta "
65 <<
eta <<
" Phi " <<
phi/deg <<
" PT "
66 << dir.perp()/GeV <<
" GeV *****";
72 G4Material * material = aStep->GetPreStepPoint()->GetMaterial();
73 double step = aStep->GetStepLength();
74 double radl = material->GetRadlen();
75 double intl = material->GetNuclearInterLength();
76 double density = material->GetDensity() / (
g/cm3);
80 const G4VTouchable* touch = aStep->GetPreStepPoint()->GetTouchable();
81 std::string
name = touch->GetVolume(0)->GetName();
82 std::string matName = material->GetName();
85 for (
unsigned int ii=0; ii<
matList.size(); ii++) {
100 edm::LogInfo(
"MaterialBudget") << name <<
" " << step <<
" " << matName
101 <<
" " <<
stepLen <<
" " << step/radl <<
" "
104 edm::LogInfo(
"MaterialBudget") <<
"MaterialBudgetCastorHistos: Step at "
105 << name <<
" Length " << step <<
" in "
106 << matName <<
" of density " << density
107 <<
" g/cc; Radiation Length " <<radl <<
" mm;"
108 <<
" Interaction Length " << intl <<
" mm\n"
110 << aStep->GetPreStepPoint()->GetPosition()
112 <<aStep->GetPreStepPoint()->GetPosition().perp()
113 <<
" Length (so far) " <<
stepLen <<
" L/X0 "
114 << step/radl <<
"/" <<
radLen <<
" L/Lambda "
115 << step/intl <<
"/" <<
intLen;
118 int level = ((touch->GetHistoryDepth())+1);
119 std::string name1=
"XXXX", name2=
"XXXX";
120 if (level>3) name1 = touch->GetVolume(level-4)->GetName();
121 if (level>4) name2 = touch->GetVolume(level-5)->GetName();
122 if (name1 ==
"CAST") {
124 if (name2 ==
"CAEC")
id2 = 2;
125 else if (name2 ==
"CAHC")
id2 = 3;
126 else if (name2 ==
"CEDC")
id2 = 4;
127 else if (name2 ==
"CHDC")
id2 = 5;
132 LogDebug(
"MaterialBudget") <<
"MaterialBudgetCastorHistos: Level " << level
133 <<
" Volume " << name1 <<
" and " << name2
134 <<
" ID1 " <<
id1 <<
" (" << id1Old <<
") ID2 "
135 <<
id2 <<
" (" << id2Old <<
")";
161 for (
unsigned int ii=0; ii<
matList.size(); ii++) {
176 <<
"please add it to config file";
179 edm::LogInfo(
"MaterialBudget") <<
"MaterialBudgetCastorHistos: Booking user "
180 <<
"histos === with " <<
binEta <<
" bins "
181 <<
"in eta from " <<
etaLow <<
" to "
183 <<
"in phi from " << -maxPhi <<
" to "
186 char name[10],
title[80], tag1[10], tag2[15];
196 sprintf (tag2,
" (-ve Eta Side)");
198 sprintf (tag2,
" (+ve Eta Side)");
202 sprintf (tag1,
" == Start");
205 sprintf (tag1,
" == End");
207 sprintf(name,
"%d",
i+100);
208 sprintf(title,
"MB(X0) prof Eta in region %d%s%s", ireg, tag1, tag2);
210 sprintf(name,
"%d",
i+200);
211 sprintf(title,
"MB(L0) prof Eta in region %d%s%s", ireg, tag1, tag2);
213 sprintf(name,
"%d",
i+300);
214 sprintf(title,
"MB(Step) prof Eta in region %d%s%s", ireg, tag1, tag2);
216 sprintf(name,
"%d",
i+400);
217 sprintf(title,
"Eta in region %d%s%s", ireg, tag1, tag2);
219 sprintf(name,
"%d",
i+500);
220 sprintf(title,
"MB(X0) prof Ph in region %d%s%s", ireg, tag1, tag2);
222 sprintf(name,
"%d",
i+600);
223 sprintf(title,
"MB(L0) prof Ph in region %d%s%s", ireg, tag1, tag2);
225 sprintf(name,
"%d",
i+700);
226 sprintf(title,
"MB(Step) prof Ph in region %d%s%s", ireg, tag1, tag2);
228 sprintf(name,
"%d",
i+800);
229 sprintf(title,
"Phi in region %d%s%s", ireg, tag1, tag2);
231 sprintf(name,
"%d",
i+900);
232 sprintf(title,
"MB(X0) prof Eta Phi in region %d%s%s", ireg, tag1, tag2);
234 binPhi/2, -maxPhi, maxPhi);
235 sprintf(name,
"%d",
i+1000);
236 sprintf(title,
"MB(L0) prof Eta Phi in region %d%s%s", ireg, tag1, tag2);
238 binPhi/2, -maxPhi, maxPhi);
239 sprintf(name,
"%d",
i+1100);
240 sprintf(title,
"MB(Step) prof Eta Phi in region %d%s%s", ireg, tag1, tag2);
242 binPhi/2, -maxPhi, maxPhi);
243 sprintf(name,
"%d",
i+1200);
244 sprintf(title,
"Eta vs Phi in region %d%s%s", ireg, tag1, tag2);
246 binPhi/2, -maxPhi, maxPhi);
249 edm::LogInfo(
"MaterialBudget") <<
"MaterialBudgetCastorHistos: Booking user "
250 <<
"histos done ===";
256 int ii = 2*(
id-1) + ix;
262 LogDebug(
"MaterialBudget") <<
"MaterialBudgetCastorHistos:FillHisto "
263 <<
"called with index " <<
id <<
":" << ix
264 <<
":" << ii <<
" eta " << etaAbs <<
" ("
T getUntrackedParameter(std::string const &, T const &) const
void fillHisto(int id, int ix)
std::vector< std::string > matList
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()
T * make() const
make new ROOT object