CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes
MaterialBudgetHcalHistos Class Reference

#include <MaterialBudgetHcalHistos.h>

Public Member Functions

void fillBeginJob (const DDCompactView &)
 
void fillEndTrack ()
 
void fillPerStep (const G4Step *)
 
void fillStartTrack (const G4Track *)
 
 MaterialBudgetHcalHistos (const edm::ParameterSet &p)
 
virtual ~MaterialBudgetHcalHistos ()
 

Private Member Functions

void book ()
 
void fillHisto (int ii)
 
void fillLayer ()
 
std::vector< double > getDDDArray (const std::string &str, const DDsvalues_type &sv)
 
std::vector< std::string > getNames (DDFilteredView &fv)
 
void hend ()
 
bool isItEC (std::string)
 
bool isItHF (const G4VTouchable *)
 
bool isSensitive (std::string)
 

Private Attributes

int binEta
 
int binPhi
 
double eta
 
double etaHigh
 
double etaLow
 
bool fillHistos
 
std::vector< int > hfLevels
 
std::vector< std::string > hfNames
 
int id
 
double intLen
 
std::vector< double > intLength
 
int layer
 
std::vector< std::string > matList
 
double maxEta
 
TProfile * me100 [maxSet]
 
TProfile2D * me1000 [maxSet]
 
TProfile2D * me1100 [maxSet]
 
TH2F * me1200 [maxSet]
 
TH1F * me1300 [maxSet2]
 
TH2F * me1400 [maxSet2]
 
TProfile * me1500 [maxSet2]
 
TProfile * me200 [maxSet]
 
TProfile * me300 [maxSet]
 
TH1F * me400 [maxSet]
 
TProfile * me500 [maxSet]
 
TProfile * me600 [maxSet]
 
TProfile * me700 [maxSet]
 
TH1F * me800 [maxSet]
 
TProfile2D * me900 [maxSet]
 
int nlayHB
 
int nlayHE
 
int nlayHF
 
int nlayHO
 
double phi
 
bool printSum
 
double radLen
 
std::vector< double > radLength
 
std::vector< std::string > sensitiveEC
 
std::vector< std::string > sensitives
 
double stepLen
 
std::vector< double > stepLength
 
int steps
 

Static Private Attributes

static const int maxSet = 25
 
static const int maxSet2 = 9
 

Detailed Description

Definition at line 19 of file MaterialBudgetHcalHistos.h.

Constructor & Destructor Documentation

MaterialBudgetHcalHistos::MaterialBudgetHcalHistos ( const edm::ParameterSet p)

Definition at line 17 of file MaterialBudgetHcalHistos.cc.

References binEta, binPhi, book(), etaHigh, etaLow, fillHistos, edm::ParameterSet::getUntrackedParameter(), maxEta, pi, and printSum.

17  {
18  binEta = p.getUntrackedParameter<int>("NBinEta", 260);
19  binPhi = p.getUntrackedParameter<int>("NBinPhi", 180);
20  maxEta = p.getUntrackedParameter<double>("MaxEta", 5.2);
21  etaLow = p.getUntrackedParameter<double>("EtaLow", -5.2);
22  etaHigh = p.getUntrackedParameter<double>("EtaHigh", 5.2);
23  fillHistos = p.getUntrackedParameter<bool>("FillHisto", true);
24  printSum = p.getUntrackedParameter<bool>("PrintSummary", false);
25  edm::LogInfo("MaterialBudget") << "MaterialBudgetHcalHistos: FillHisto : " << fillHistos << " PrintSummary "
26  << printSum << " == Eta plot: NX " << binEta << " Range " << -maxEta << ":" << maxEta
27  << " Phi plot: NX " << binPhi << " Range " << -pi << ":" << pi << " (Eta limit "
28  << etaLow << ":" << etaHigh << ")";
29  if (fillHistos)
30  book();
31 }
T getUntrackedParameter(std::string const &, T const &) const
const Double_t pi
virtual MaterialBudgetHcalHistos::~MaterialBudgetHcalHistos ( )
inlinevirtual

Member Function Documentation

void MaterialBudgetHcalHistos::book ( )
private

Definition at line 237 of file MaterialBudgetHcalHistos.cc.

References binEta, binPhi, mps_fire::i, edm::Service< T >::isAvailable(), TFileService::make(), maxEta, HLT_2018_cff::maxPhi, maxSet, maxSet2, me100, me1000, me1100, me1200, me1300, me1400, me1500, me200, me300, me400, me500, me600, me700, me800, me900, pi, AlCaHLTBitMon_QueryRunRegistry::string, and compare::tfile.

Referenced by MaterialBudgetHcalHistos(), and ~MaterialBudgetHcalHistos().

237  {
238  // Book histograms
240 
241  if (!tfile.isAvailable())
242  throw cms::Exception("BadConfig") << "TFileService unavailable: "
243  << "please add it to config file";
244 
245  double maxPhi = pi;
246  edm::LogInfo("MaterialBudget") << "MaterialBudgetHcalHistos: Booking user "
247  << "histos === with " << binEta << " bins "
248  << "in eta from " << -maxEta << " to " << maxEta << " and " << binPhi << " bins "
249  << "in phi from " << -maxPhi << " to " << maxPhi;
250 
251  std::string iter;
252  // total X0
253  for (int i = 0; i < maxSet; i++) {
254  iter = std::to_string(i);
255  me100[i] = tfile->make<TProfile>(
256  std::to_string(i + 100).c_str(), ("MB(X0) prof Eta in region " + iter).c_str(), binEta, -maxEta, maxEta);
257  me200[i] = tfile->make<TProfile>(
258  std::to_string(i + 200).c_str(), ("MB(L0) prof Eta in region " + iter).c_str(), binEta, -maxEta, maxEta);
259  me300[i] = tfile->make<TProfile>(
260  std::to_string(i + 300).c_str(), ("MB(Step) prof Eta in region " + iter).c_str(), binEta, -maxEta, maxEta);
261  me400[i] =
262  tfile->make<TH1F>(std::to_string(i + 400).c_str(), ("Eta in region " + iter).c_str(), binEta, -maxEta, maxEta);
263  me500[i] = tfile->make<TProfile>(
264  std::to_string(i + 500).c_str(), ("MB(X0) prof Ph in region " + iter).c_str(), binPhi, -maxPhi, maxPhi);
265  me600[i] = tfile->make<TProfile>(
266  std::to_string(i + 600).c_str(), ("MB(L0) prof Ph in region " + iter).c_str(), binPhi, -maxPhi, maxPhi);
267  me700[i] = tfile->make<TProfile>(
268  std::to_string(i + 700).c_str(), ("MB(Step) prof Ph in region " + iter).c_str(), binPhi, -maxPhi, maxPhi);
269  me800[i] =
270  tfile->make<TH1F>(std::to_string(i + 800).c_str(), ("Phi in region " + iter).c_str(), binPhi, -maxPhi, maxPhi);
271  me900[i] = tfile->make<TProfile2D>(std::to_string(i + 900).c_str(),
272  ("MB(X0) prof Eta Phi in region " + iter).c_str(),
273  binEta / 2,
274  -maxEta,
275  maxEta,
276  binPhi / 2,
277  -maxPhi,
278  maxPhi);
279  me1000[i] = tfile->make<TProfile2D>(std::to_string(i + 1000).c_str(),
280  ("MB(L0) prof Eta Phi in region " + iter).c_str(),
281  binEta / 2,
282  -maxEta,
283  maxEta,
284  binPhi / 2,
285  -maxPhi,
286  maxPhi);
287  me1100[i] = tfile->make<TProfile2D>(std::to_string(i + 1100).c_str(),
288  ("MB(Step) prof Eta Phi in region " + iter).c_str(),
289  binEta / 2,
290  -maxEta,
291  maxEta,
292  binPhi / 2,
293  -maxPhi,
294  maxPhi);
295  me1200[i] = tfile->make<TH2F>(std::to_string(i + 1200).c_str(),
296  ("Eta vs Phi in region " + iter).c_str(),
297  binEta / 2,
298  -maxEta,
299  maxEta,
300  binPhi / 2,
301  -maxPhi,
302  maxPhi);
303  }
304  for (int i = 0; i < maxSet2; i++) {
305  iter = std::to_string(i);
306  me1300[i] = tfile->make<TH1F>(std::to_string(i + 1300).c_str(),
307  ("Events with layers Hit (0 all, 1 HB, ..) for " + iter).c_str(),
308  binEta,
309  -maxEta,
310  maxEta);
311  me1400[i] = tfile->make<TH2F>(std::to_string(i + 1400).c_str(),
312  ("Eta vs Phi for layers hit in " + iter).c_str(),
313  binEta / 2,
314  -maxEta,
315  maxEta,
316  binPhi / 2,
317  -maxPhi,
318  maxPhi);
319  me1500[i] = tfile->make<TProfile>(std::to_string(i + 1500).c_str(),
320  ("Number of layers crossed (0 all, 1 HB, ..) for " + iter).c_str(),
321  binEta,
322  -maxEta,
323  maxEta);
324  }
325 
326  edm::LogInfo("MaterialBudget") << "MaterialBudgetHcalHistos: Booking user "
327  << "histos done ===";
328 }
T * make(const Args &...args) const
make new ROOT object
Definition: TFileService.h:64
const Double_t pi
bool isAvailable() const
Definition: Service.h:40
void MaterialBudgetHcalHistos::fillBeginJob ( const DDCompactView cpv)

Definition at line 33 of file MaterialBudgetHcalHistos.cc.

References fillHistos, DDFilteredView::firstChild(), getDDDArray(), getNames(), hfLevels, hfNames, mps_fire::i, dqmdumpme::k, personalPlayback::level, DDFilteredView::mergedSpecifics(), sensitiveEC, sensitives, AlCaHLTBitMon_QueryRunRegistry::string, pfDeepBoostedJetPreprocessParams_cfi::sv, and groupFilesInBlocks::temp.

Referenced by MaterialBudgetHcal::update(), and ~MaterialBudgetHcalHistos().

33  {
34  if (fillHistos) {
35  std::string attribute = "ReadOutName";
36  std::string value = "HcalHits";
37  DDSpecificsMatchesValueFilter filter1{DDValue(attribute, value, 0)};
38  DDFilteredView fv1(cpv, filter1);
39  sensitives = getNames(fv1);
40  edm::LogInfo("MaterialBudget") << "MaterialBudgetHcalHistos: Names to be "
41  << "tested for " << attribute << " = " << value << " has " << sensitives.size()
42  << " elements";
43  for (unsigned int i = 0; i < sensitives.size(); i++)
44  edm::LogInfo("MaterialBudget") << "MaterialBudgetHcalHistos: sensitives[" << i << "] = " << sensitives[i];
45 
46  attribute = "Volume";
47  value = "HF";
48  DDSpecificsMatchesValueFilter filter2{DDValue(attribute, value, 0)};
49  DDFilteredView fv2(cpv, filter2);
50  hfNames = getNames(fv2);
51  fv2.firstChild();
52  DDsvalues_type sv(fv2.mergedSpecifics());
53  std::vector<double> temp = getDDDArray("Levels", sv);
54  edm::LogInfo("MaterialBudget") << "MaterialBudgetHcalHistos: Names to be "
55  << "tested for " << attribute << " = " << value << " has " << hfNames.size()
56  << " elements";
57  for (unsigned int i = 0; i < hfNames.size(); i++) {
58  int level = static_cast<int>(temp[i]);
59  hfLevels.push_back(level);
60  edm::LogInfo("MaterialBudget") << "MaterialBudgetHcalHistos: HF[" << i << "] = " << hfNames[i] << " at level "
61  << hfLevels[i];
62  }
63 
64  std::string ecalRO[2] = {"EcalHitsEB", "EcalHitsEE"};
65  attribute = "ReadOutName";
66  for (int k = 0; k < 2; k++) {
67  value = ecalRO[k];
68  DDSpecificsMatchesValueFilter filter3{DDValue(attribute, value, 0)};
69  DDFilteredView fv3(cpv, filter3);
70  std::vector<std::string> senstmp = getNames(fv3);
71  edm::LogInfo("MaterialBudget") << "MaterialBudgetHcalHistos: Names to be"
72  << " tested for " << attribute << " = " << value << " has " << senstmp.size()
73  << " elements";
74  for (unsigned int i = 0; i < senstmp.size(); i++)
75  sensitiveEC.push_back(senstmp[i]);
76  }
77  for (unsigned int i = 0; i < sensitiveEC.size(); i++)
78  edm::LogInfo("MaterialBudget") << "MaterialBudgetHcalHistos:sensitiveEC[" << i << "] = " << sensitiveEC[i];
79  }
80 }
std::vector< std::string > getNames(DDFilteredView &fv)
std::vector< std::string > hfNames
std::vector< std::pair< unsigned int, DDValue > > DDsvalues_type
Definition: DDsvalues.h:12
std::vector< std::string > sensitiveEC
Definition: value.py:1
std::vector< std::string > sensitives
std::vector< double > getDDDArray(const std::string &str, const DDsvalues_type &sv)
void MaterialBudgetHcalHistos::fillEndTrack ( )

Definition at line 222 of file MaterialBudgetHcalHistos.cc.

References fillHisto(), fillHistos, fillLayer(), cuy::ii, intLength, matList, maxSet, nlayHB, nlayHE, nlayHF, nlayHO, printSum, radLength, and stepLength.

Referenced by MaterialBudgetHcal::update(), and ~MaterialBudgetHcalHistos().

222  {
223  edm::LogInfo("MaterialBudget") << "Number of layers hit in HB:" << nlayHB << " HE:" << nlayHE << " HO:" << nlayHO
224  << " HF:" << nlayHF;
225  if (fillHistos) {
226  fillHisto(maxSet - 1);
227  fillLayer();
228  }
229  if (printSum) {
230  for (unsigned int ii = 0; ii < matList.size(); ii++) {
231  edm::LogInfo("MaterialBudget") << matList[ii] << "\t" << stepLength[ii] << "\t" << radLength[ii] << "\t"
232  << intLength[ii];
233  }
234  }
235 }
std::vector< double > stepLength
std::vector< std::string > matList
std::vector< double > radLength
ii
Definition: cuy.py:590
std::vector< double > intLength
void MaterialBudgetHcalHistos::fillHisto ( int  ii)
private

Definition at line 330 of file MaterialBudgetHcalHistos.cc.

References eta, etaHigh, etaLow, cuy::ii, intLen, LogDebug, maxSet, me100, me1000, me1100, me1200, me200, me300, me400, me500, me600, me700, me800, me900, phi, radLen, and stepLen.

Referenced by fillEndTrack(), fillPerStep(), and ~MaterialBudgetHcalHistos().

330  {
331  LogDebug("MaterialBudget") << "MaterialBudgetHcalHistos:FillHisto called "
332  << "with index " << ii << " integrated step " << stepLen << " X0 " << radLen << " Lamda "
333  << intLen;
334 
335  if (ii >= 0 && ii < maxSet) {
336  me100[ii]->Fill(eta, radLen);
337  me200[ii]->Fill(eta, intLen);
338  me300[ii]->Fill(eta, stepLen);
339  me400[ii]->Fill(eta);
340 
341  if (eta >= etaLow && eta <= etaHigh) {
342  me500[ii]->Fill(phi, radLen);
343  me600[ii]->Fill(phi, intLen);
344  me700[ii]->Fill(phi, stepLen);
345  me800[ii]->Fill(phi);
346  }
347 
348  me900[ii]->Fill(eta, phi, radLen);
349  me1000[ii]->Fill(eta, phi, intLen);
350  me1100[ii]->Fill(eta, phi, stepLen);
351  me1200[ii]->Fill(eta, phi);
352  }
353 }
#define LogDebug(id)
ii
Definition: cuy.py:590
void MaterialBudgetHcalHistos::fillLayer ( )
private

Definition at line 355 of file MaterialBudgetHcalHistos.cc.

References funct::abs(), eta, me1300, me1400, me1500, nlayHB, nlayHE, nlayHF, nlayHO, and phi.

Referenced by fillEndTrack(), and ~MaterialBudgetHcalHistos().

355  {
356  me1300[0]->Fill(eta);
357  me1400[0]->Fill(eta, phi);
358  if (nlayHB > 0) {
359  me1300[1]->Fill(eta);
360  me1400[1]->Fill(eta, phi);
361  }
362  if (nlayHB >= 16) {
363  me1300[2]->Fill(eta);
364  me1400[2]->Fill(eta, phi);
365  }
366  if (nlayHE > 0) {
367  me1300[3]->Fill(eta);
368  me1400[3]->Fill(eta, phi);
369  }
370  if (nlayHE >= 16) {
371  me1300[4]->Fill(eta);
372  me1400[4]->Fill(eta, phi);
373  }
374  if (nlayHO > 0) {
375  me1300[5]->Fill(eta);
376  me1400[5]->Fill(eta, phi);
377  }
378  if (nlayHO >= 2) {
379  me1300[6]->Fill(eta);
380  me1400[6]->Fill(eta, phi);
381  }
382  if (nlayHF > 0) {
383  me1300[7]->Fill(eta);
384  me1400[7]->Fill(eta, phi);
385  }
386  if (nlayHB > 0 || nlayHE > 0 || (nlayHF > 0 && std::abs(eta) > 3.0)) {
387  me1300[8]->Fill(eta);
388  me1400[8]->Fill(eta, phi);
389  }
390  me1500[0]->Fill(eta, (double)(nlayHB + nlayHO + nlayHE + nlayHF));
391  me1500[1]->Fill(eta, (double)(nlayHB));
392  me1500[2]->Fill(eta, (double)(nlayHE));
393  me1500[4]->Fill(eta, (double)(nlayHF));
394 }
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
void MaterialBudgetHcalHistos::fillPerStep ( const G4Step *  aStep)

Definition at line 109 of file MaterialBudgetHcalHistos.cc.

References funct::abs(), fastSimProducer_cff::density, eta, fillHisto(), fillHistos, newFWLiteAna::found, g, id, cuy::ii, intLen, intLength, isItEC(), isItHF(), isSensitive(), layer, LogDebug, matList, Skims_PA_cff::name, nlayHB, nlayHE, nlayHF, nlayHO, phi, printSum, radLen, radLength, stepLen, stepLength, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by MaterialBudgetHcal::update(), and ~MaterialBudgetHcalHistos().

109  {
110  G4Material* material = aStep->GetPreStepPoint()->GetMaterial();
111  double step = aStep->GetStepLength();
112  double radl = material->GetRadlen();
113  double intl = material->GetNuclearInterLength();
114  double density = material->GetDensity() / (g / cm3);
115 
116  int idOld = id;
117  const G4VTouchable* touch = aStep->GetPreStepPoint()->GetTouchable();
118  std::string name = touch->GetVolume(0)->GetName();
119  const std::string& matName = material->GetName();
120  if (printSum) {
121  bool found = false;
122  for (unsigned int ii = 0; ii < matList.size(); ii++) {
123  if (matList[ii] == matName) {
124  stepLength[ii] += step;
125  radLength[ii] += (step / radl);
126  intLength[ii] += (step / intl);
127  found = true;
128  break;
129  }
130  }
131  if (!found) {
132  matList.push_back(matName);
133  stepLength.push_back(step);
134  radLength.push_back(step / radl);
135  intLength.push_back(step / intl);
136  }
137  edm::LogInfo("MaterialBudget") << name << " " << step << " " << matName << " " << stepLen << " " << step / radl
138  << " " << radLen << " " << step / intl << " " << intLen;
139  } else {
140  edm::LogInfo("MaterialBudget") << "MaterialBudgetHcalHistos: Step at " << name << " Length " << step << " in "
141  << matName << " of density " << density << " g/cc; Radiation Length " << radl
142  << " mm;"
143  << " Interaction Length " << intl << " mm\n"
144  << " Position " << aStep->GetPreStepPoint()->GetPosition()
145  << " Cylindrical R " << aStep->GetPreStepPoint()->GetPosition().perp()
146  << " Length (so far) " << stepLen << " L/X0 " << step / radl << "/" << radLen
147  << " L/Lambda " << step / intl << "/" << intLen;
148  }
149 
150  int det = 0, lay = 0;
151  if (fillHistos) {
152  if (isItEC(name)) {
153  det = 1;
154  lay = 1;
155  } else {
156  if (isSensitive(name)) {
157  if (isItHF(touch)) {
158  det = 5;
159  lay = 21;
160  if (lay != layer)
161  nlayHF++;
162  } else {
163  det = (touch->GetReplicaNumber(1)) / 1000;
164  lay = (touch->GetReplicaNumber(0) / 10) % 100 + 3;
165  if (det == 4) {
166  double abeta = std::abs(eta);
167  if (abeta < 1.479)
168  lay = layer + 1;
169  else
170  lay--;
171  if (lay < 3)
172  lay = 3;
173  if (lay == layer)
174  lay++;
175  if (lay > 20)
176  lay = 20;
177  if (lay != layer)
178  nlayHE++;
179  } else if (lay != layer) {
180  if (lay >= 20)
181  nlayHO++;
182  else
183  nlayHB++;
184  }
185  }
186  LogDebug("MaterialBudget") << "MaterialBudgetHcalHistos: Det " << det << " Layer " << lay << " Eta " << eta
187  << " Phi " << phi / deg;
188  } else if (layer == 1) {
189  det = -1;
190  lay = 2;
191  }
192  }
193  if (det != 0) {
194  if (lay != layer) {
195  id = lay;
196  layer = lay;
197  }
198  }
199 
200  if (id > idOld) {
201  // edm::LogInfo("MaterialBudget") << "MaterialBudgetHcalHistos: Step at " << name;
202  fillHisto(id - 1);
203  }
204  }
205 
206  stepLen += step;
207  radLen += step / radl;
208  intLen += step / intl;
209  if (fillHistos) {
210  if (layer == 21 && det == 5) {
211  if (!isItHF(aStep->GetPostStepPoint()->GetTouchable())) {
212  LogDebug("MaterialBudget") << "MaterialBudgetHcalHistos: After HF in "
213  << aStep->GetPostStepPoint()->GetTouchable()->GetVolume(0)->GetName();
214  fillHisto(id);
215  id++;
216  layer = 0;
217  }
218  }
219  }
220 }
#define LogDebug(id)
std::vector< double > stepLength
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
Definition: Activities.doc:4
std::vector< std::string > matList
std::vector< double > radLength
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
ii
Definition: cuy.py:590
step
Definition: StallMonitor.cc:94
std::vector< double > intLength
bool isItHF(const G4VTouchable *)
void MaterialBudgetHcalHistos::fillStartTrack ( const G4Track *  aTrack)

Definition at line 82 of file MaterialBudgetHcalHistos.cc.

References DeadROC_duringRun::dir, eta, GeV, createfilelist::int, intLen, intLength, layer, matList, nlayHB, nlayHE, nlayHF, nlayHO, phi, printSum, radLen, radLength, stepLen, stepLength, and steps.

Referenced by MaterialBudgetHcal::update(), and ~MaterialBudgetHcalHistos().

82  {
83  id = layer = steps = 0;
84  radLen = intLen = stepLen = 0;
85  nlayHB = nlayHE = nlayHF = nlayHO = 0;
86 
87  const G4ThreeVector& dir = aTrack->GetMomentum();
88  if (dir.theta() != 0) {
89  eta = dir.eta();
90  } else {
91  eta = -99;
92  }
93  phi = dir.phi();
94  double theEnergy = aTrack->GetTotalEnergy();
95  int theID = (int)(aTrack->GetDefinition()->GetPDGEncoding());
96 
97  if (printSum) {
98  matList.clear();
99  stepLength.clear();
100  radLength.clear();
101  intLength.clear();
102  }
103 
104  edm::LogInfo("MaterialBudget") << "MaterialBudgetHcalHistos: Track " << aTrack->GetTrackID() << " Code " << theID
105  << " Energy " << theEnergy / GeV << " GeV; Eta " << eta << " Phi " << phi / deg
106  << " PT " << dir.perp() / GeV << " GeV *****";
107 }
const double GeV
Definition: MathUtil.h:16
std::vector< double > stepLength
std::vector< std::string > matList
std::vector< double > radLength
std::vector< double > intLength
std::vector< double > MaterialBudgetHcalHistos::getDDDArray ( const std::string &  str,
const DDsvalues_type sv 
)
private

Definition at line 418 of file MaterialBudgetHcalHistos.cc.

References DDfetch(), DDValue::doubles(), Exception, LogDebug, str, and relativeConstraints::value.

Referenced by fillBeginJob(), and ~MaterialBudgetHcalHistos().

418  {
419  LogDebug("MaterialBudget") << "MaterialBudgetHcalHistos:getDDDArray called "
420  << "for " << str;
421  DDValue value(str);
422  if (DDfetch(&sv, value)) {
423  LogDebug("MaterialBudget") << value;
424  const std::vector<double>& fvec = value.doubles();
425  int nval = fvec.size();
426  if (nval < 1) {
427  edm::LogError("MaterialBudget") << "MaterialBudgetHcalHistos : # of " << str << " bins " << nval
428  << " < 1 ==> illegal";
429  throw cms::Exception("Unknown", "MaterialBudgetHcalHistos") << "nval < 1 for array " << str << "\n";
430  }
431 
432  return fvec;
433  } else {
434  edm::LogError("MaterialBudget") << "MaterialBudgetHcalHistos : cannot get "
435  << "array " << str;
436  throw cms::Exception("Unknown", "MaterialBudgetHcalHistos") << "cannot get array " << str << "\n";
437  }
438 }
#define LogDebug(id)
bool DDfetch(const DDsvalues_type *, DDValue &)
helper for retrieving DDValues from DDsvalues_type *.
Definition: DDsvalues.cc:79
Definition: value.py:1
#define str(s)
std::vector< std::string > MaterialBudgetHcalHistos::getNames ( DDFilteredView fv)
private

Definition at line 401 of file MaterialBudgetHcalHistos.cc.

References DDFilteredView::firstChild(), mps_fire::i, dqm-mbProfile::log, DDFilteredView::logicalPart(), DDName::name(), DDBase< N, C >::name(), DDFilteredView::next(), convertSQLiteXML::ok, AlCaHLTBitMon_QueryRunRegistry::string, and createJobs::tmp.

Referenced by fillBeginJob(), and ~MaterialBudgetHcalHistos().

401  {
402  std::vector<std::string> tmp;
403  bool dodet = fv.firstChild();
404  while (dodet) {
405  const DDLogicalPart& log = fv.logicalPart();
406  std::string namx = log.name().name();
407  bool ok = true;
408  for (unsigned int i = 0; i < tmp.size(); i++)
409  if (namx == tmp[i])
410  ok = false;
411  if (ok)
412  tmp.push_back(namx);
413  dodet = fv.next();
414  }
415  return tmp;
416 }
const DDLogicalPart & logicalPart() const
The logical-part of the current node in the filtered-view.
const N & name() const
Definition: DDBase.h:59
bool next()
set current node to the next node in the filtered tree
A DDLogicalPart aggregates information concerning material, solid and sensitveness ...
Definition: DDLogicalPart.h:93
bool firstChild()
set the current node to the first child ...
tmp
align.sh
Definition: createJobs.py:716
const std::string & name() const
Returns the name.
Definition: DDName.cc:40
void MaterialBudgetHcalHistos::hend ( )
private

Definition at line 396 of file MaterialBudgetHcalHistos.cc.

Referenced by ~MaterialBudgetHcalHistos().

396  {
397  edm::LogInfo("MaterialBudget") << "MaterialBudgetHcalHistos: Save user "
398  << "histos ===";
399 }
bool MaterialBudgetHcalHistos::isItEC ( std::string  name)
private

Definition at line 462 of file MaterialBudgetHcalHistos.cc.

References sensitiveEC.

Referenced by fillPerStep(), and ~MaterialBudgetHcalHistos().

462  {
463  std::vector<std::string>::const_iterator it = sensitiveEC.begin();
464  std::vector<std::string>::const_iterator itEnd = sensitiveEC.end();
465  for (; it != itEnd; ++it)
466  if (name == *it)
467  return true;
468  return false;
469 }
std::vector< std::string > sensitiveEC
bool MaterialBudgetHcalHistos::isItHF ( const G4VTouchable *  touch)
private

Definition at line 449 of file MaterialBudgetHcalHistos.cc.

References hfLevels, hfNames, jets_cff::levels, Skims_PA_cff::name, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by fillPerStep(), and ~MaterialBudgetHcalHistos().

449  {
450  // std::vector<std::string>::const_iterator it = hfNames.begin();
451  int levels = ((touch->GetHistoryDepth()) + 1);
452  for (unsigned int it = 0; it < hfNames.size(); it++) {
453  if (levels >= hfLevels[it]) {
454  std::string name = touch->GetVolume(levels - hfLevels[it])->GetName();
455  if (name == hfNames[it])
456  return true;
457  }
458  }
459  return false;
460 }
std::vector< std::string > hfNames
bool MaterialBudgetHcalHistos::isSensitive ( std::string  name)
private

Definition at line 440 of file MaterialBudgetHcalHistos.cc.

References sensitives.

Referenced by fillPerStep(), and ~MaterialBudgetHcalHistos().

440  {
441  std::vector<std::string>::const_iterator it = sensitives.begin();
442  std::vector<std::string>::const_iterator itEnd = sensitives.end();
443  for (; it != itEnd; ++it)
444  if (name == *it)
445  return true;
446  return false;
447 }
std::vector< std::string > sensitives

Member Data Documentation

int MaterialBudgetHcalHistos::binEta
private

Definition at line 45 of file MaterialBudgetHcalHistos.h.

Referenced by book(), and MaterialBudgetHcalHistos().

int MaterialBudgetHcalHistos::binPhi
private

Definition at line 45 of file MaterialBudgetHcalHistos.h.

Referenced by book(), and MaterialBudgetHcalHistos().

double MaterialBudgetHcalHistos::eta
private
double MaterialBudgetHcalHistos::etaHigh
private

Definition at line 46 of file MaterialBudgetHcalHistos.h.

Referenced by fillHisto(), and MaterialBudgetHcalHistos().

double MaterialBudgetHcalHistos::etaLow
private

Definition at line 46 of file MaterialBudgetHcalHistos.h.

Referenced by fillHisto(), and MaterialBudgetHcalHistos().

bool MaterialBudgetHcalHistos::fillHistos
private
std::vector<int> MaterialBudgetHcalHistos::hfLevels
private

Definition at line 43 of file MaterialBudgetHcalHistos.h.

Referenced by fillBeginJob(), and isItHF().

std::vector<std::string> MaterialBudgetHcalHistos::hfNames
private

Definition at line 42 of file MaterialBudgetHcalHistos.h.

Referenced by fillBeginJob(), and isItHF().

int MaterialBudgetHcalHistos::id
private

Definition at line 55 of file MaterialBudgetHcalHistos.h.

Referenced by fillPerStep().

double MaterialBudgetHcalHistos::intLen
private

Definition at line 56 of file MaterialBudgetHcalHistos.h.

Referenced by fillHisto(), fillPerStep(), and fillStartTrack().

std::vector<double> MaterialBudgetHcalHistos::intLength
private

Definition at line 48 of file MaterialBudgetHcalHistos.h.

Referenced by fillEndTrack(), fillPerStep(), and fillStartTrack().

int MaterialBudgetHcalHistos::layer
private
std::vector<std::string> MaterialBudgetHcalHistos::matList
private

Definition at line 47 of file MaterialBudgetHcalHistos.h.

Referenced by fillEndTrack(), fillPerStep(), and fillStartTrack().

double MaterialBudgetHcalHistos::maxEta
private

Definition at line 46 of file MaterialBudgetHcalHistos.h.

Referenced by book(), and MaterialBudgetHcalHistos().

const int MaterialBudgetHcalHistos::maxSet = 25
staticprivate

Definition at line 41 of file MaterialBudgetHcalHistos.h.

Referenced by book(), fillEndTrack(), and fillHisto().

const int MaterialBudgetHcalHistos::maxSet2 = 9
staticprivate

Definition at line 41 of file MaterialBudgetHcalHistos.h.

Referenced by book().

TProfile* MaterialBudgetHcalHistos::me100[maxSet]
private

Definition at line 51 of file MaterialBudgetHcalHistos.h.

Referenced by book(), and fillHisto().

TProfile2D * MaterialBudgetHcalHistos::me1000[maxSet]
private

Definition at line 54 of file MaterialBudgetHcalHistos.h.

Referenced by book(), and fillHisto().

TProfile2D * MaterialBudgetHcalHistos::me1100[maxSet]
private

Definition at line 54 of file MaterialBudgetHcalHistos.h.

Referenced by book(), and fillHisto().

TH2F* MaterialBudgetHcalHistos::me1200[maxSet]
private

Definition at line 50 of file MaterialBudgetHcalHistos.h.

Referenced by book(), and fillHisto().

TH1F * MaterialBudgetHcalHistos::me1300[maxSet2]
private

Definition at line 49 of file MaterialBudgetHcalHistos.h.

Referenced by book(), and fillLayer().

TH2F * MaterialBudgetHcalHistos::me1400[maxSet2]
private

Definition at line 50 of file MaterialBudgetHcalHistos.h.

Referenced by book(), and fillLayer().

TProfile* MaterialBudgetHcalHistos::me1500[maxSet2]
private

Definition at line 53 of file MaterialBudgetHcalHistos.h.

Referenced by book(), and fillLayer().

TProfile * MaterialBudgetHcalHistos::me200[maxSet]
private

Definition at line 51 of file MaterialBudgetHcalHistos.h.

Referenced by book(), and fillHisto().

TProfile * MaterialBudgetHcalHistos::me300[maxSet]
private

Definition at line 51 of file MaterialBudgetHcalHistos.h.

Referenced by book(), and fillHisto().

TH1F* MaterialBudgetHcalHistos::me400[maxSet]
private

Definition at line 49 of file MaterialBudgetHcalHistos.h.

Referenced by book(), and fillHisto().

TProfile* MaterialBudgetHcalHistos::me500[maxSet]
private

Definition at line 52 of file MaterialBudgetHcalHistos.h.

Referenced by book(), and fillHisto().

TProfile * MaterialBudgetHcalHistos::me600[maxSet]
private

Definition at line 52 of file MaterialBudgetHcalHistos.h.

Referenced by book(), and fillHisto().

TProfile * MaterialBudgetHcalHistos::me700[maxSet]
private

Definition at line 52 of file MaterialBudgetHcalHistos.h.

Referenced by book(), and fillHisto().

TH1F * MaterialBudgetHcalHistos::me800[maxSet]
private

Definition at line 49 of file MaterialBudgetHcalHistos.h.

Referenced by book(), and fillHisto().

TProfile2D* MaterialBudgetHcalHistos::me900[maxSet]
private

Definition at line 54 of file MaterialBudgetHcalHistos.h.

Referenced by book(), and fillHisto().

int MaterialBudgetHcalHistos::nlayHB
private

Definition at line 58 of file MaterialBudgetHcalHistos.h.

Referenced by fillEndTrack(), fillLayer(), fillPerStep(), and fillStartTrack().

int MaterialBudgetHcalHistos::nlayHE
private

Definition at line 58 of file MaterialBudgetHcalHistos.h.

Referenced by fillEndTrack(), fillLayer(), fillPerStep(), and fillStartTrack().

int MaterialBudgetHcalHistos::nlayHF
private

Definition at line 58 of file MaterialBudgetHcalHistos.h.

Referenced by fillEndTrack(), fillLayer(), fillPerStep(), and fillStartTrack().

int MaterialBudgetHcalHistos::nlayHO
private

Definition at line 58 of file MaterialBudgetHcalHistos.h.

Referenced by fillEndTrack(), fillLayer(), fillPerStep(), and fillStartTrack().

double MaterialBudgetHcalHistos::phi
private
bool MaterialBudgetHcalHistos::printSum
private
double MaterialBudgetHcalHistos::radLen
private

Definition at line 56 of file MaterialBudgetHcalHistos.h.

Referenced by fillHisto(), fillPerStep(), and fillStartTrack().

std::vector<double> MaterialBudgetHcalHistos::radLength
private

Definition at line 48 of file MaterialBudgetHcalHistos.h.

Referenced by fillEndTrack(), fillPerStep(), and fillStartTrack().

std::vector<std::string> MaterialBudgetHcalHistos::sensitiveEC
private

Definition at line 42 of file MaterialBudgetHcalHistos.h.

Referenced by fillBeginJob(), and isItEC().

std::vector<std::string> MaterialBudgetHcalHistos::sensitives
private

Definition at line 42 of file MaterialBudgetHcalHistos.h.

Referenced by fillBeginJob(), and isSensitive().

double MaterialBudgetHcalHistos::stepLen
private

Definition at line 56 of file MaterialBudgetHcalHistos.h.

Referenced by fillHisto(), fillPerStep(), and fillStartTrack().

std::vector<double> MaterialBudgetHcalHistos::stepLength
private

Definition at line 48 of file MaterialBudgetHcalHistos.h.

Referenced by fillEndTrack(), fillPerStep(), and fillStartTrack().

int MaterialBudgetHcalHistos::steps
private

Definition at line 55 of file MaterialBudgetHcalHistos.h.

Referenced by fillStartTrack().