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 
19  binEta = p.getUntrackedParameter<int>("NBinEta", 260);
20  binPhi = p.getUntrackedParameter<int>("NBinPhi", 180);
21  maxEta = p.getUntrackedParameter<double>("MaxEta", 5.2);
22  etaLow = p.getUntrackedParameter<double>("EtaLow", -5.2);
23  etaHigh = p.getUntrackedParameter<double>("EtaHigh", 5.2);
24  fillHistos = p.getUntrackedParameter<bool>("FillHisto", true);
25  printSum = p.getUntrackedParameter<bool>("PrintSummary", false);
26  edm::LogInfo("MaterialBudget") << "MaterialBudgetHcalHistos: FillHisto : "
27  << fillHistos << " PrintSummary " << printSum
28  << " == Eta plot: NX " << binEta << " Range "
29  << -maxEta << ":" << maxEta <<" Phi plot: NX "
30  << binPhi << " Range " << -pi << ":" << pi
31  << " (Eta limit " << etaLow << ":" << etaHigh
32  <<")";
33  if (fillHistos) book();
34 
35 }
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 262 of file MaterialBudgetHcalHistos.cc.

References binEta, binPhi, i, edm::Service< T >::isAvailable(), TFileService::make(), maxEta, MuonErrorMatrixAnalyzer_cfi::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().

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

Definition at line 37 of file MaterialBudgetHcalHistos.cc.

References DDFilteredView::addFilter(), equals, fillHistos, DDFilteredView::firstChild(), getDDDArray(), getNames(), hfLevels, hfNames, i, gen::k, hcalDigis_cfi::level, DDFilteredView::mergedSpecifics(), sensitiveEC, sensitives, DDSpecificsFilter::setCriteria(), AlCaHLTBitMon_QueryRunRegistry::string, and groupFilesInBlocks::temp.

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

37  {
38 
39  if (fillHistos) {
40  std::string attribute = "ReadOutName";
41  std::string value = "HcalHits";
42  DDSpecificsFilter filter1;
43  DDValue ddv1(attribute,value,0);
44  filter1.setCriteria(ddv1,DDCompOp::equals);
45  DDFilteredView fv1(cpv);
46  fv1.addFilter(filter1);
47  sensitives = getNames(fv1);
48  edm::LogInfo("MaterialBudget") << "MaterialBudgetHcalHistos: Names to be "
49  << "tested for " << attribute << " = "
50  << value << " has " << sensitives.size()
51  << " elements";
52  for (unsigned int i=0; i<sensitives.size(); i++)
53  edm::LogInfo("MaterialBudget") << "MaterialBudgetHcalHistos: sensitives["
54  << i << "] = " << sensitives[i];
55 
56  attribute = "Volume";
57  value = "HF";
58  DDSpecificsFilter filter2;
59  DDValue ddv2(attribute,value,0);
60  filter2.setCriteria(ddv2,DDCompOp::equals);
61  DDFilteredView fv2(cpv);
62  fv2.addFilter(filter2);
63  hfNames = getNames(fv2);
64  fv2.firstChild();
65  DDsvalues_type sv(fv2.mergedSpecifics());
66  std::vector<double> temp = getDDDArray("Levels",sv);
67  edm::LogInfo("MaterialBudget") << "MaterialBudgetHcalHistos: Names to be "
68  << "tested for " << attribute << " = "
69  << value << " has " << hfNames.size()
70  << " elements";
71  for (unsigned int i=0; i<hfNames.size(); i++) {
72  int level = static_cast<int>(temp[i]);
73  hfLevels.push_back(level);
74  edm::LogInfo("MaterialBudget") << "MaterialBudgetHcalHistos: HF[" << i
75  << "] = " << hfNames[i] << " at level "
76  << hfLevels[i];
77  }
78 
79  std::string ecalRO[2] = {"EcalHitsEB", "EcalHitsEE"};
80  attribute = "ReadOutName";
81  for (int k=0; k<2; k++) {
82  value = ecalRO[k];
83  DDSpecificsFilter filter3;
84  DDValue ddv3(attribute,value,0);
85  filter3.setCriteria(ddv3,DDCompOp::equals);
86  DDFilteredView fv3(cpv);
87  fv3.addFilter(filter3);
88  std::vector<std::string> senstmp = getNames(fv3);
89  edm::LogInfo("MaterialBudget") << "MaterialBudgetHcalHistos: Names to be"
90  << " tested for " << attribute << " = "
91  << value << " has " << senstmp.size()
92  << " elements";
93  for (unsigned int i=0; i<senstmp.size(); i++)
94  sensitiveEC.push_back(senstmp[i]);
95  }
96  for (unsigned int i=0; i<sensitiveEC.size(); i++)
97  edm::LogInfo("MaterialBudget") << "MaterialBudgetHcalHistos:sensitiveEC["
98  << i << "] = " << sensitiveEC[i];
99  }
100 }
int i
Definition: DBlmapReader.cc:9
std::vector< std::string > getNames(DDFilteredView &fv)
std::vector< std::string > hfNames
std::vector< std::pair< unsigned int, DDValue > > DDsvalues_type
std::maps an index to a DDValue. The index corresponds to the index assigned to the name of the std::...
Definition: DDsvalues.h:20
std::vector< std::string > sensitiveEC
Definition: value.py:1
int k[5][pyjets_maxn]
std::vector< std::string > sensitives
std::vector< double > getDDDArray(const std::string &str, const DDsvalues_type &sv)
void setCriteria(const DDValue &nameVal, DDCompOp, DDLogOp l=DDLogOp::AND, bool asString=true, bool merged=true)
Definition: DDFilter.cc:253
The DDGenericFilter is a runtime-parametrized Filter looking on DDSpecifcs.
Definition: DDFilter.h:33
void MaterialBudgetHcalHistos::fillEndTrack ( )

Definition at line 245 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().

245  {
246  edm::LogInfo("MaterialBudget") << "Number of layers hit in HB:" << nlayHB
247  << " HE:" << nlayHE << " HO:" << nlayHO
248  << " HF:" << nlayHF;
249  if (fillHistos) {
250  fillHisto(maxSet-1);
251  fillLayer();
252  }
253  if (printSum) {
254  for (unsigned int ii=0; ii<matList.size(); ii++) {
255  edm::LogInfo("MaterialBudget") << matList[ii] << "\t" << stepLength[ii]
256  << "\t" << radLength[ii] << "\t"
257  << intLength[ii];
258  }
259  }
260 }
std::vector< double > stepLength
std::vector< std::string > matList
std::vector< double > radLength
ii
Definition: cuy.py:588
std::vector< double > intLength
void MaterialBudgetHcalHistos::fillHisto ( int  ii)
private

Definition at line 328 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().

328  {
329 
330  LogDebug("MaterialBudget") << "MaterialBudgetHcalHistos:FillHisto called "
331  << "with index " << ii << " integrated step "
332  << 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  }
354 }
#define LogDebug(id)
ii
Definition: cuy.py:588
void MaterialBudgetHcalHistos::fillLayer ( )
private

Definition at line 356 of file MaterialBudgetHcalHistos.cc.

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

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

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

Definition at line 133 of file MaterialBudgetHcalHistos.cc.

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

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

133  {
134 
135  G4Material * material = aStep->GetPreStepPoint()->GetMaterial();
136  double step = aStep->GetStepLength();
137  double radl = material->GetRadlen();
138  double intl = material->GetNuclearInterLength();
139  double density = material->GetDensity() / (g/cm3);
140 
141  int idOld = id;
142  const G4VTouchable* touch = aStep->GetPreStepPoint()->GetTouchable();
143  std::string name = touch->GetVolume(0)->GetName();
144  std::string matName = material->GetName();
145  if (printSum) {
146  bool found = false;
147  for (unsigned int ii=0; ii<matList.size(); ii++) {
148  if (matList[ii] == matName) {
149  stepLength[ii] += step;
150  radLength[ii] += (step/radl);
151  intLength[ii] += (step/intl);
152  found = true;
153  break;
154  }
155  }
156  if (!found) {
157  matList.push_back(matName);
158  stepLength.push_back(step);
159  radLength.push_back(step/radl);
160  intLength.push_back(step/intl);
161  }
162  edm::LogInfo("MaterialBudget") << name << " " << step << " " << matName
163  << " " << stepLen << " " << step/radl << " "
164  << radLen << " " <<step/intl << " " <<intLen;
165  } else {
166  edm::LogInfo("MaterialBudget") << "MaterialBudgetHcalHistos: Step at "
167  << name << " Length " << step << " in "
168  << matName << " of density " << density
169  << " g/cc; Radiation Length " <<radl <<" mm;"
170  << " Interaction Length " << intl << " mm\n"
171  << " Position "
172  << aStep->GetPreStepPoint()->GetPosition()
173  << " Cylindrical R "
174  <<aStep->GetPreStepPoint()->GetPosition().perp()
175  << " Length (so far) " << stepLen << " L/X0 "
176  << step/radl << "/" << radLen << " L/Lambda "
177  << step/intl << "/" << intLen;
178  }
179 
180  int det=0, lay=0;
181  if (fillHistos) {
182  if (isItEC(name)) {
183  det = 1;
184  lay = 1;
185  } else {
186  if (isSensitive(name)) {
187  if (isItHF(touch)) {
188  det = 5;
189  lay = 21;
190  if (lay != layer) nlayHF++;
191  } else {
192  det = (touch->GetReplicaNumber(1))/1000;
193  lay = (touch->GetReplicaNumber(0)/10)%100 + 3;
194  if (det == 4) {
195  double abeta = std::abs(eta);
196  if (abeta < 1.479) lay = layer + 1;
197  else lay--;
198  if (lay < 3) lay = 3;
199  if (lay == layer) lay++;
200  if (lay > 20) lay = 20;
201  if (lay != layer) nlayHE++;
202  } else if (lay != layer) {
203  if (lay >= 20) nlayHO++;
204  else nlayHB++;
205  }
206  }
207  LogDebug("MaterialBudget") << "MaterialBudgetHcalHistos: Det " << det
208  << " Layer " << lay << " Eta " << eta
209  << " Phi " << phi/deg;
210  } else if (layer == 1) {
211  det = -1;
212  lay = 2;
213  }
214  }
215  if (det != 0) {
216  if (lay != layer) {
217  id = lay;
218  layer = lay;
219  }
220  }
221 
222  if (id > idOld) {
223  // edm::LogInfo("MaterialBudget") << "MaterialBudgetHcalHistos: Step at " << name;
224  fillHisto(id-1);
225  }
226  }
227 
228  stepLen += step;
229  radLen += step/radl;
230  intLen += step/intl;
231  if (fillHistos) {
232  if (layer == 21 && det == 5) {
233  if (!isItHF(aStep->GetPostStepPoint()->GetTouchable())) {
234  LogDebug("MaterialBudget") << "MaterialBudgetHcalHistos: After HF in "
235  << aStep->GetPostStepPoint()->GetTouchable()->GetVolume(0)->GetName();
236  fillHisto(id);
237  id++;
238  layer = 0;
239  }
240  }
241  }
242 }
#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:588
step
std::vector< double > intLength
bool isItHF(const G4VTouchable *)
void MaterialBudgetHcalHistos::fillStartTrack ( const G4Track *  aTrack)

Definition at line 102 of file MaterialBudgetHcalHistos.cc.

References 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().

102  {
103 
104  id = layer = steps = 0;
105  radLen = intLen = stepLen = 0;
106  nlayHB = nlayHE = nlayHF = nlayHO = 0;
107 
108  const G4ThreeVector& dir = aTrack->GetMomentum() ;
109  if (dir.theta() != 0 ) {
110  eta = dir.eta();
111  } else {
112  eta = -99;
113  }
114  phi = dir.phi();
115  double theEnergy = aTrack->GetTotalEnergy();
116  int theID = (int)(aTrack->GetDefinition()->GetPDGEncoding());
117 
118  if (printSum) {
119  matList.clear();
120  stepLength.clear();
121  radLength.clear();
122  intLength.clear();
123  }
124 
125  edm::LogInfo("MaterialBudget") << "MaterialBudgetHcalHistos: Track "
126  << aTrack->GetTrackID() << " Code " << theID
127  << " Energy " << theEnergy/GeV << " GeV; Eta "
128  << eta << " Phi " << phi/deg << " PT "
129  << dir.perp()/GeV << " GeV *****";
130 }
const double GeV
Definition: MathUtil.h:16
std::vector< double > stepLength
std::vector< std::string > matList
std::vector< double > radLength
dbl *** dir
Definition: mlp_gen.cc:35
std::vector< double > intLength
std::vector< double > MaterialBudgetHcalHistos::getDDDArray ( const std::string &  str,
const DDsvalues_type sv 
)
private

Definition at line 419 of file MaterialBudgetHcalHistos.cc.

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

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

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

Definition at line 403 of file MaterialBudgetHcalHistos.cc.

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

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

403  {
404 
405  std::vector<std::string> tmp;
406  bool dodet = fv.firstChild();
407  while (dodet) {
408  const DDLogicalPart & log = fv.logicalPart();
409  std::string namx = log.name().name();
410  bool ok = true;
411  for (unsigned int i=0; i<tmp.size(); i++)
412  if (namx == tmp[i]) ok = false;
413  if (ok) tmp.push_back(namx);
414  dodet = fv.next();
415  }
416  return tmp;
417 }
int i
Definition: DBlmapReader.cc:9
const DDLogicalPart & logicalPart() const
The logical-part of the current node in the filtered-view.
const N & name() const
Definition: DDBase.h:78
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:92
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
bool firstChild()
set the current node to the first child ...
const std::string & name() const
Returns the name.
Definition: DDName.cc:90
void MaterialBudgetHcalHistos::hend ( )
private

Definition at line 398 of file MaterialBudgetHcalHistos.cc.

Referenced by ~MaterialBudgetHcalHistos().

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

Definition at line 468 of file MaterialBudgetHcalHistos.cc.

References sensitiveEC.

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

468  {
469 
470  std::vector<std::string>::const_iterator it = sensitiveEC.begin();
471  std::vector<std::string>::const_iterator itEnd = sensitiveEC.end();
472  for (; it != itEnd; ++it)
473  if (name == *it) return true;
474  return false;
475 }
std::vector< std::string > sensitiveEC
bool MaterialBudgetHcalHistos::isItHF ( const G4VTouchable *  touch)
private

Definition at line 455 of file MaterialBudgetHcalHistos.cc.

References hfLevels, hfNames, jetCorrFactors_cfi::levels, dataset::name, and AlCaHLTBitMon_QueryRunRegistry::string.

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

455  {
456 
457  // std::vector<std::string>::const_iterator it = hfNames.begin();
458  int levels = ((touch->GetHistoryDepth())+1);
459  for (unsigned int it=0; it < hfNames.size(); it++) {
460  if (levels >= hfLevels[it]) {
461  std::string name = touch->GetVolume(levels-hfLevels[it])->GetName();
462  if (name == hfNames[it]) return true;
463  }
464  }
465  return false;
466 }
std::vector< std::string > hfNames
levels
correction levels
bool MaterialBudgetHcalHistos::isSensitive ( std::string  name)
private

Definition at line 446 of file MaterialBudgetHcalHistos.cc.

References sensitives.

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

446  {
447 
448  std::vector<std::string>::const_iterator it = sensitives.begin();
449  std::vector<std::string>::const_iterator itEnd = sensitives.end();
450  for (; it != itEnd; ++it)
451  if (name == *it) return true;
452  return false;
453 }
std::vector< std::string > sensitives

Member Data Documentation

int MaterialBudgetHcalHistos::binEta
private

Definition at line 50 of file MaterialBudgetHcalHistos.h.

Referenced by book(), and MaterialBudgetHcalHistos().

int MaterialBudgetHcalHistos::binPhi
private

Definition at line 50 of file MaterialBudgetHcalHistos.h.

Referenced by book(), and MaterialBudgetHcalHistos().

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

Definition at line 51 of file MaterialBudgetHcalHistos.h.

Referenced by fillHisto(), and MaterialBudgetHcalHistos().

double MaterialBudgetHcalHistos::etaLow
private

Definition at line 51 of file MaterialBudgetHcalHistos.h.

Referenced by fillHisto(), and MaterialBudgetHcalHistos().

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

Definition at line 48 of file MaterialBudgetHcalHistos.h.

Referenced by fillBeginJob(), and isItHF().

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

Definition at line 47 of file MaterialBudgetHcalHistos.h.

Referenced by fillBeginJob(), and isItHF().

int MaterialBudgetHcalHistos::id
private

Definition at line 60 of file MaterialBudgetHcalHistos.h.

Referenced by fillPerStep().

double MaterialBudgetHcalHistos::intLen
private

Definition at line 61 of file MaterialBudgetHcalHistos.h.

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

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

Definition at line 53 of file MaterialBudgetHcalHistos.h.

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

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

Definition at line 52 of file MaterialBudgetHcalHistos.h.

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

double MaterialBudgetHcalHistos::maxEta
private

Definition at line 51 of file MaterialBudgetHcalHistos.h.

Referenced by book(), and MaterialBudgetHcalHistos().

const int MaterialBudgetHcalHistos::maxSet = 25
staticprivate

Definition at line 46 of file MaterialBudgetHcalHistos.h.

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

const int MaterialBudgetHcalHistos::maxSet2 = 9
staticprivate

Definition at line 46 of file MaterialBudgetHcalHistos.h.

Referenced by book().

TProfile* MaterialBudgetHcalHistos::me100[maxSet]
private

Definition at line 56 of file MaterialBudgetHcalHistos.h.

Referenced by book(), and fillHisto().

TProfile2D * MaterialBudgetHcalHistos::me1000[maxSet]
private

Definition at line 59 of file MaterialBudgetHcalHistos.h.

Referenced by book(), and fillHisto().

TProfile2D * MaterialBudgetHcalHistos::me1100[maxSet]
private

Definition at line 59 of file MaterialBudgetHcalHistos.h.

Referenced by book(), and fillHisto().

TH2F* MaterialBudgetHcalHistos::me1200[maxSet]
private

Definition at line 55 of file MaterialBudgetHcalHistos.h.

Referenced by book(), and fillHisto().

TH1F * MaterialBudgetHcalHistos::me1300[maxSet2]
private

Definition at line 54 of file MaterialBudgetHcalHistos.h.

Referenced by book(), and fillLayer().

TH2F * MaterialBudgetHcalHistos::me1400[maxSet2]
private

Definition at line 55 of file MaterialBudgetHcalHistos.h.

Referenced by book(), and fillLayer().

TProfile* MaterialBudgetHcalHistos::me1500[maxSet2]
private

Definition at line 58 of file MaterialBudgetHcalHistos.h.

Referenced by book(), and fillLayer().

TProfile * MaterialBudgetHcalHistos::me200[maxSet]
private

Definition at line 56 of file MaterialBudgetHcalHistos.h.

Referenced by book(), and fillHisto().

TProfile * MaterialBudgetHcalHistos::me300[maxSet]
private

Definition at line 56 of file MaterialBudgetHcalHistos.h.

Referenced by book(), and fillHisto().

TH1F* MaterialBudgetHcalHistos::me400[maxSet]
private

Definition at line 54 of file MaterialBudgetHcalHistos.h.

Referenced by book(), and fillHisto().

TProfile* MaterialBudgetHcalHistos::me500[maxSet]
private

Definition at line 57 of file MaterialBudgetHcalHistos.h.

Referenced by book(), and fillHisto().

TProfile * MaterialBudgetHcalHistos::me600[maxSet]
private

Definition at line 57 of file MaterialBudgetHcalHistos.h.

Referenced by book(), and fillHisto().

TProfile * MaterialBudgetHcalHistos::me700[maxSet]
private

Definition at line 57 of file MaterialBudgetHcalHistos.h.

Referenced by book(), and fillHisto().

TH1F * MaterialBudgetHcalHistos::me800[maxSet]
private

Definition at line 54 of file MaterialBudgetHcalHistos.h.

Referenced by book(), and fillHisto().

TProfile2D* MaterialBudgetHcalHistos::me900[maxSet]
private

Definition at line 59 of file MaterialBudgetHcalHistos.h.

Referenced by book(), and fillHisto().

int MaterialBudgetHcalHistos::nlayHB
private

Definition at line 63 of file MaterialBudgetHcalHistos.h.

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

int MaterialBudgetHcalHistos::nlayHE
private

Definition at line 63 of file MaterialBudgetHcalHistos.h.

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

int MaterialBudgetHcalHistos::nlayHF
private

Definition at line 63 of file MaterialBudgetHcalHistos.h.

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

int MaterialBudgetHcalHistos::nlayHO
private

Definition at line 63 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 61 of file MaterialBudgetHcalHistos.h.

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

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

Definition at line 53 of file MaterialBudgetHcalHistos.h.

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

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

Definition at line 47 of file MaterialBudgetHcalHistos.h.

Referenced by fillBeginJob(), and isItEC().

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

Definition at line 47 of file MaterialBudgetHcalHistos.h.

Referenced by fillBeginJob(), and isSensitive().

double MaterialBudgetHcalHistos::stepLen
private

Definition at line 61 of file MaterialBudgetHcalHistos.h.

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

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

Definition at line 53 of file MaterialBudgetHcalHistos.h.

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

int MaterialBudgetHcalHistos::steps
private

Definition at line 60 of file MaterialBudgetHcalHistos.h.

Referenced by fillStartTrack().