CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 15 of file MaterialBudgetHcalHistos.cc.

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

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

Definition at line 24 of file MaterialBudgetHcalHistos.h.

References hend().

Member Function Documentation

void MaterialBudgetHcalHistos::book ( )
private

Definition at line 260 of file MaterialBudgetHcalHistos.cc.

References binEta, binPhi, i, edm::Service< T >::isAvailable(), TFileService::make(), maxEta, maxSet, maxSet2, me100, me1000, me1100, me1200, me1300, me1400, me1500, me200, me300, me400, me500, me600, me700, me800, me900, mergeVDriftHistosByStation::name, pi, and indexGen::title.

Referenced by MaterialBudgetHcalHistos().

260  {
261 
262  // Book histograms
264 
265  if ( !tfile.isAvailable() )
266  throw cms::Exception("BadConfig") << "TFileService unavailable: "
267  << "please add it to config file";
268 
269  double maxPhi=pi;
270  edm::LogInfo("MaterialBudget") << "MaterialBudgetHcalHistos: Booking user "
271  << "histos === with " << binEta << " bins "
272  << "in eta from " << -maxEta << " to "
273  << maxEta << " and " << binPhi << " bins "
274  << "in phi from " << -maxPhi << " to "
275  << maxPhi;
276 
277  char name[10], title[40];
278  // total X0
279  for (int i=0; i<maxSet; i++) {
280  sprintf(name, "%d", i+100);
281  sprintf(title, "MB(X0) prof Eta in region %d", i);
282  me100[i] = tfile->make<TProfile>(name, title, binEta, -maxEta, maxEta);
283  sprintf(name, "%d", i+200);
284  sprintf(title, "MB(L0) prof Eta in region %d", i);
285  me200[i] = tfile->make<TProfile>(name, title, binEta, -maxEta, maxEta);
286  sprintf(name, "%d", i+300);
287  sprintf(title, "MB(Step) prof Eta in region %d", i);
288  me300[i] = tfile->make<TProfile>(name, title, binEta, -maxEta, maxEta);
289  sprintf(name, "%d", i+400);
290  sprintf(title, "Eta in region %d", i);
291  me400[i] = tfile->make<TH1F>(name, title, binEta, -maxEta, maxEta);
292  sprintf(name, "%d", i+500);
293  sprintf(title, "MB(X0) prof Ph in region %d", i);
294  me500[i] = tfile->make<TProfile>(name, title, binPhi, -maxPhi, maxPhi);
295  sprintf(name, "%d", i+600);
296  sprintf(title, "MB(L0) prof Ph in region %d", i);
297  me600[i] = tfile->make<TProfile>(name, title, binPhi, -maxPhi, maxPhi);
298  sprintf(name, "%d", i+700);
299  sprintf(title, "MB(Step) prof Ph in region %d", i);
300  me700[i] = tfile->make<TProfile>(name, title, binPhi, -maxPhi, maxPhi);
301  sprintf(name, "%d", i+800);
302  sprintf(title, "Phi in region %d", i);
303  me800[i] = tfile->make<TH1F>(name, title, binPhi, -maxPhi, maxPhi);
304  sprintf(name, "%d", i+900);
305  sprintf(title, "MB(X0) prof Eta Phi in region %d", i);
306  me900[i] = tfile->make<TProfile2D>(name, title, binEta/2, -maxEta, maxEta,
307  binPhi/2, -maxPhi, maxPhi);
308  sprintf(name, "%d", i+1000);
309  sprintf(title, "MB(L0) prof Eta Phi in region %d", i);
310  me1000[i]= tfile->make<TProfile2D>(name, title, binEta/2, -maxEta, maxEta,
311  binPhi/2, -maxPhi, maxPhi);
312  sprintf(name, "%d", i+1100);
313  sprintf(title, "MB(Step) prof Eta Phi in region %d", i);
314  me1100[i]= tfile->make<TProfile2D>(name, title, binEta/2, -maxEta, maxEta,
315  binPhi/2, -maxPhi, maxPhi);
316  sprintf(name, "%d", i+1200);
317  sprintf(title, "Eta vs Phi in region %d", i);
318  me1200[i]= tfile->make<TH2F>(name, title, binEta/2, -maxEta, maxEta,
319  binPhi/2, -maxPhi, maxPhi);
320  }
321  for (int i=0; i<maxSet2; i++) {
322  sprintf(name, "%d", i+1300);
323  sprintf(title, "Events with layers Hit (0 all, 1 HB, ..) for %d", i);
324  me1300[i]= tfile->make<TH1F>(name, title, binEta, -maxEta, maxEta);
325  sprintf(name, "%d", i+1400);
326  sprintf(title, "Eta vs Phi for layers hit in %d", i);
327  me1400[i]= tfile->make<TH2F>(name, title, binEta/2, -maxEta, maxEta,
328  binPhi/2, -maxPhi, maxPhi);
329  sprintf(name, "%d", i+1500);
330  sprintf(title, "Number of layers crossed (0 all, 1 HB, ..) for %d", i);
331  me1500[i]= tfile->make<TProfile>(name, title, binEta, -maxEta, maxEta);
332  }
333 
334  edm::LogInfo("MaterialBudget") << "MaterialBudgetHcalHistos: Booking user "
335  << "histos done ===";
336 
337 }
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 35 of file MaterialBudgetHcalHistos.cc.

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

Referenced by MaterialBudgetHcal::update().

35  {
36 
37  if (fillHistos) {
38  std::string attribute = "ReadOutName";
39  std::string value = "HcalHits";
40  DDSpecificsFilter filter1;
41  DDValue ddv1(attribute,value,0);
42  filter1.setCriteria(ddv1,DDCompOp::equals);
43  DDFilteredView fv1(cpv);
44  fv1.addFilter(filter1);
45  sensitives = getNames(fv1);
46  edm::LogInfo("MaterialBudget") << "MaterialBudgetHcalHistos: Names to be "
47  << "tested for " << attribute << " = "
48  << value << " has " << sensitives.size()
49  << " elements";
50  for (unsigned int i=0; i<sensitives.size(); i++)
51  edm::LogInfo("MaterialBudget") << "MaterialBudgetHcalHistos: sensitives["
52  << i << "] = " << sensitives[i];
53 
54  attribute = "Volume";
55  value = "HF";
56  DDSpecificsFilter filter2;
57  DDValue ddv2(attribute,value,0);
58  filter2.setCriteria(ddv2,DDCompOp::equals);
59  DDFilteredView fv2(cpv);
60  fv2.addFilter(filter2);
61  hfNames = getNames(fv2);
62  fv2.firstChild();
63  DDsvalues_type sv(fv2.mergedSpecifics());
64  std::vector<double> temp = getDDDArray("Levels",sv);
65  edm::LogInfo("MaterialBudget") << "MaterialBudgetHcalHistos: Names to be "
66  << "tested for " << attribute << " = "
67  << value << " has " << hfNames.size()
68  << " elements";
69  for (unsigned int i=0; i<hfNames.size(); i++) {
70  int level = static_cast<int>(temp[i]);
71  hfLevels.push_back(level);
72  edm::LogInfo("MaterialBudget") << "MaterialBudgetHcalHistos: HF[" << i
73  << "] = " << hfNames[i] << " at level "
74  << hfLevels[i];
75  }
76 
77  std::string ecalRO[2] = {"EcalHitsEB", "EcalHitsEE"};
78  attribute = "ReadOutName";
79  for (int k=0; k<2; k++) {
80  value = ecalRO[k];
81  DDSpecificsFilter filter3;
82  DDValue ddv3(attribute,value,0);
83  filter3.setCriteria(ddv3,DDCompOp::equals);
84  DDFilteredView fv3(cpv);
85  fv3.addFilter(filter3);
86  std::vector<std::string> senstmp = getNames(fv3);
87  edm::LogInfo("MaterialBudget") << "MaterialBudgetHcalHistos: Names to be"
88  << " tested for " << attribute << " = "
89  << value << " has " << senstmp.size()
90  << " elements";
91  for (unsigned int i=0; i<senstmp.size(); i++)
92  sensitiveEC.push_back(senstmp[i]);
93  }
94  for (unsigned int i=0; i<sensitiveEC.size(); i++)
95  edm::LogInfo("MaterialBudget") << "MaterialBudgetHcalHistos:sensitiveEC["
96  << i << "] = " << sensitiveEC[i];
97  }
98 }
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:19
std::vector< std::string > sensitiveEC
std::vector< std::string > sensitives
tuple level
Definition: testEve_cfg.py:34
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:245
The DDGenericFilter is a runtime-parametrized Filter looking on DDSpecifcs.
Definition: DDFilter.h:32
void MaterialBudgetHcalHistos::fillEndTrack ( )

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

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

Definition at line 339 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(), and fillPerStep().

339  {
340 
341  LogDebug("MaterialBudget") << "MaterialBudgetHcalHistos:FillHisto called "
342  << "with index " << ii << " integrated step "
343  << stepLen << " X0 " << radLen << " Lamda "
344  << intLen;
345 
346  if (ii >=0 && ii < maxSet) {
347  me100[ii]->Fill(eta, radLen);
348  me200[ii]->Fill(eta, intLen);
349  me300[ii]->Fill(eta, stepLen);
350  me400[ii]->Fill(eta);
351 
352  if (eta >= etaLow && eta <= etaHigh) {
353  me500[ii]->Fill(phi, radLen);
354  me600[ii]->Fill(phi, intLen);
355  me700[ii]->Fill(phi, stepLen);
356  me800[ii]->Fill(phi);
357  }
358 
359  me900[ii]->Fill(eta, phi, radLen);
360  me1000[ii]->Fill(eta, phi, intLen);
361  me1100[ii]->Fill(eta, phi, stepLen);
362  me1200[ii]->Fill(eta, phi);
363 
364  }
365 }
#define LogDebug(id)
int ii
Definition: cuy.py:588
void MaterialBudgetHcalHistos::fillLayer ( )
private

Definition at line 367 of file MaterialBudgetHcalHistos.cc.

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

Referenced by fillEndTrack().

367  {
368 
369  me1300[0]->Fill(eta);
370  me1400[0]->Fill(eta,phi);
371  if (nlayHB > 0) {
372  me1300[1]->Fill(eta);
373  me1400[1]->Fill(eta,phi);
374  }
375  if (nlayHB >= 16) {
376  me1300[2]->Fill(eta);
377  me1400[2]->Fill(eta,phi);
378  }
379  if (nlayHE > 0) {
380  me1300[3]->Fill(eta);
381  me1400[3]->Fill(eta,phi);
382  }
383  if (nlayHE >= 16) {
384  me1300[4]->Fill(eta);
385  me1400[4]->Fill(eta,phi);
386  }
387  if (nlayHO > 0) {
388  me1300[5]->Fill(eta);
389  me1400[5]->Fill(eta,phi);
390  }
391  if (nlayHO >= 2) {
392  me1300[6]->Fill(eta);
393  me1400[6]->Fill(eta,phi);
394  }
395  if (nlayHF > 0) {
396  me1300[7]->Fill(eta);
397  me1400[7]->Fill(eta,phi);
398  }
399  if (nlayHB > 0 || nlayHE > 0 || (nlayHF > 0 && std::abs(eta) > 3.0)) {
400  me1300[8]->Fill(eta);
401  me1400[8]->Fill(eta,phi);
402  }
403  me1500[0]->Fill(eta,(double)(nlayHB+nlayHO+nlayHE+nlayHF));
404  me1500[1]->Fill(eta,(double)(nlayHB));
405  me1500[2]->Fill(eta,(double)(nlayHE));
406  me1500[4]->Fill(eta,(double)(nlayHF));
407 }
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
void MaterialBudgetHcalHistos::fillPerStep ( const G4Step *  aStep)

Definition at line 131 of file MaterialBudgetHcalHistos.cc.

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

Referenced by MaterialBudgetHcal::update().

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

Definition at line 100 of file MaterialBudgetHcalHistos.cc.

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

Referenced by MaterialBudgetHcal::update().

100  {
101 
102  id = layer = steps = 0;
103  radLen = intLen = stepLen = 0;
104  nlayHB = nlayHE = nlayHF = nlayHO = 0;
105 
106  const G4ThreeVector& dir = aTrack->GetMomentum() ;
107  if (dir.theta() != 0 ) {
108  eta = dir.eta();
109  } else {
110  eta = -99;
111  }
112  phi = dir.phi();
113  double theEnergy = aTrack->GetTotalEnergy();
114  int theID = (int)(aTrack->GetDefinition()->GetPDGEncoding());
115 
116  if (printSum) {
117  matList.clear();
118  stepLength.clear();
119  radLength.clear();
120  intLength.clear();
121  }
122 
123  edm::LogInfo("MaterialBudget") << "MaterialBudgetHcalHistos: Track "
124  << aTrack->GetTrackID() << " Code " << theID
125  << " Energy " << theEnergy/GeV << " GeV; Eta "
126  << eta << " Phi " << phi/deg << " PT "
127  << dir.perp()/GeV << " GeV *****";
128 }
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 430 of file MaterialBudgetHcalHistos.cc.

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

Referenced by fillBeginJob().

431  {
432 
433  LogDebug("MaterialBudget") << "MaterialBudgetHcalHistos:getDDDArray called "
434  << "for " << str;
435  DDValue value(str);
436  if (DDfetch(&sv,value)) {
437  LogDebug("MaterialBudget") << value;
438  const std::vector<double> & fvec = value.doubles();
439  int nval = fvec.size();
440  if (nval < 1) {
441  edm::LogError("MaterialBudget") << "MaterialBudgetHcalHistos : # of "
442  << str << " bins " << nval
443  << " < 1 ==> illegal";
444  throw cms::Exception("Unknown", "MaterialBudgetHcalHistos")
445  << "nval < 1 for array " << str << "\n";
446  }
447 
448  return fvec;
449  } else {
450  edm::LogError("MaterialBudget") << "MaterialBudgetHcalHistos : cannot get "
451  << "array " << str;
452  throw cms::Exception("Unknown", "MaterialBudgetHcalHistos")
453  << "cannot get array " << str << "\n";
454  }
455 }
#define LogDebug(id)
bool DDfetch(const DDsvalues_type *, DDValue &)
helper for retrieving DDValues from DDsvalues_type *.
Definition: DDsvalues.cc:80
std::vector< std::string > MaterialBudgetHcalHistos::getNames ( DDFilteredView fv)
private

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

414  {
415 
416  std::vector<std::string> tmp;
417  bool dodet = fv.firstChild();
418  while (dodet) {
419  const DDLogicalPart & log = fv.logicalPart();
420  std::string namx = log.name().name();
421  bool ok = true;
422  for (unsigned int i=0; i<tmp.size(); i++)
423  if (namx == tmp[i]) ok = false;
424  if (ok) tmp.push_back(namx);
425  dodet = fv.next();
426  }
427  return tmp;
428 }
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:88
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:87
tuple log
Definition: cmsBatch.py:341
void MaterialBudgetHcalHistos::hend ( )
private

Definition at line 409 of file MaterialBudgetHcalHistos.cc.

Referenced by ~MaterialBudgetHcalHistos().

409  {
410  edm::LogInfo("MaterialBudget") << "MaterialBudgetHcalHistos: Save user "
411  << "histos ===";
412 }
bool MaterialBudgetHcalHistos::isItEC ( std::string  name)
private

Definition at line 479 of file MaterialBudgetHcalHistos.cc.

References sensitiveEC.

Referenced by fillPerStep().

479  {
480 
481  std::vector<std::string>::const_iterator it = sensitiveEC.begin();
482  std::vector<std::string>::const_iterator itEnd = sensitiveEC.end();
483  for (; it != itEnd; ++it)
484  if (name == *it) return true;
485  return false;
486 }
std::vector< std::string > sensitiveEC
bool MaterialBudgetHcalHistos::isItHF ( const G4VTouchable *  touch)
private

Definition at line 466 of file MaterialBudgetHcalHistos.cc.

References hfLevels, hfNames, mergeVDriftHistosByStation::name, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by fillPerStep().

466  {
467 
468  // std::vector<std::string>::const_iterator it = hfNames.begin();
469  int levels = ((touch->GetHistoryDepth())+1);
470  for (unsigned int it=0; it < hfNames.size(); it++) {
471  if (levels >= hfLevels[it]) {
472  std::string name = touch->GetVolume(levels-hfLevels[it])->GetName();
473  if (name == hfNames[it]) return true;
474  }
475  }
476  return false;
477 }
std::vector< std::string > hfNames
bool MaterialBudgetHcalHistos::isSensitive ( std::string  name)
private

Definition at line 457 of file MaterialBudgetHcalHistos.cc.

References sensitives.

Referenced by fillPerStep().

457  {
458 
459  std::vector<std::string>::const_iterator it = sensitives.begin();
460  std::vector<std::string>::const_iterator itEnd = sensitives.end();
461  for (; it != itEnd; ++it)
462  if (name == *it) return true;
463  return false;
464 }
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().