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 LogDebug(
"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 LogDebug(
"MaterialBudget") << name <<
" " << step <<
" " << matName
101 <<
" " <<
stepLen <<
" " << step/radl <<
" "
104 LogDebug(
"MaterialBudget") <<
"MaterialBudgetCastorHistos: Step at " << name
105 <<
" Length " << step <<
" in " << matName
106 <<
" of density " << density <<
" g/cc;"
107 <<
" 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 <<
")";
160 for (
unsigned int ii=0; ii<
matList.size(); ii++) {
175 <<
"please add it to config file";
178 edm::LogInfo(
"MaterialBudget") <<
"MaterialBudgetCastorHistos: Booking user "
179 <<
"histos === with " <<
binEta <<
" bins "
180 <<
"in eta from " <<
etaLow <<
" to "
182 <<
"in phi from " << -maxPhi <<
" to "
185 char name[10],
title[80], tag1[10], tag2[15];
195 sprintf (tag2,
" (-ve Eta Side)");
197 sprintf (tag2,
" (+ve Eta Side)");
201 sprintf (tag1,
" == Start");
204 sprintf (tag1,
" == End");
206 sprintf(name,
"%d",
i+100);
207 sprintf(title,
"MB(X0) prof Eta in region %d%s%s", ireg, tag1, tag2);
209 sprintf(name,
"%d",
i+200);
210 sprintf(title,
"MB(L0) prof Eta in region %d%s%s", ireg, tag1, tag2);
212 sprintf(name,
"%d",
i+300);
213 sprintf(title,
"MB(Step) prof Eta in region %d%s%s", ireg, tag1, tag2);
215 sprintf(name,
"%d",
i+400);
216 sprintf(title,
"Eta in region %d%s%s", ireg, tag1, tag2);
218 sprintf(name,
"%d",
i+500);
219 sprintf(title,
"MB(X0) prof Ph in region %d%s%s", ireg, tag1, tag2);
221 sprintf(name,
"%d",
i+600);
222 sprintf(title,
"MB(L0) prof Ph in region %d%s%s", ireg, tag1, tag2);
224 sprintf(name,
"%d",
i+700);
225 sprintf(title,
"MB(Step) prof Ph in region %d%s%s", ireg, tag1, tag2);
227 sprintf(name,
"%d",
i+800);
228 sprintf(title,
"Phi in region %d%s%s", ireg, tag1, tag2);
230 sprintf(name,
"%d",
i+900);
231 sprintf(title,
"MB(X0) prof Eta Phi in region %d%s%s", ireg, tag1, tag2);
233 binPhi/2, -maxPhi, maxPhi);
234 sprintf(name,
"%d",
i+1000);
235 sprintf(title,
"MB(L0) prof Eta Phi in region %d%s%s", ireg, tag1, tag2);
237 binPhi/2, -maxPhi, maxPhi);
238 sprintf(name,
"%d",
i+1100);
239 sprintf(title,
"MB(Step) prof Eta Phi in region %d%s%s", ireg, tag1, tag2);
241 binPhi/2, -maxPhi, maxPhi);
242 sprintf(name,
"%d",
i+1200);
243 sprintf(title,
"Eta vs Phi in region %d%s%s", ireg, tag1, tag2);
245 binPhi/2, -maxPhi, maxPhi);
248 edm::LogInfo(
"MaterialBudget") <<
"MaterialBudgetCastorHistos: Booking user "
249 <<
"histos done ===";
255 int ii = 2*(
id-1) + ix;
261 LogDebug(
"MaterialBudget") <<
"MaterialBudgetCastorHistos:FillHisto called "
262 <<
"with index " <<
id <<
":" << ix <<
":" << ii
263 <<
" eta " << etaAbs <<
" (" <<
eta <<
")"
264 <<
" integrated step " <<
stepLen <<
" X0 "
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