ATLAS Offline Software
Functions
GetEnergy.cxx File Reference
#include <iostream>
#include <string>
#include <vector>
#include "HistToolKit.h"
Include dependency graph for GetEnergy.cxx:

Go to the source code of this file.

Functions

float Select (float *Efit, float *Tfit, int m)
 
float Select (float *Efit, float *Tfit, int m, int n)
 
float Select (float *Efit, float *Tfit, int a, int b, int c, int d)
 
float Select (float *Efit, float *Tfit, int a, int b, int c, int d, int e, int f)
 
int GetEnergy ()
 

Function Documentation

◆ GetEnergy()

int GetEnergy ( )

Definition at line 81 of file GetEnergy.cxx.

82 {
83  double p = (5640.0-40.0)/307.0/10.0; // period size of Tile in cm
84  double halfLength = 280.0 ; // half length of barrel module in cm
85  double lambdaIron = 131.9/7.87 ; //radiation length of iron
86  // radiation length of the tile(mixture of iron and scintillantor)
87  double lambda = 20.5559 ;
88  double offset = 2.0; // offset in cm
89  // the z coordiante of impact point in lambda
90  double enterPos = halfLength/lambda + offset/lambdaIron ;
91  // Only use the first 13 B cells here, barrel module has 18 B cells in total.
92  int nBCell = 13 ;
93  // Edge if B cells, unit is lambda, size = nBCell+1 .
94  // The uper edge of this cell is next cell's lower edge.
95  // this array is used create histograms for longitudinal profile.
96  float xBLow[14] ;
97  // the z coordiante of the edge of each B cell in cm.
98  // Center of ATLAS is origin of coordinates.
99  double zBLow[18] {136.0*p, 116.*p, 97.5*p, 79.5*p, 63*p, 46.5*p, 31*p, 15.58*p, 0, 0, -15.58*p, -31*p, -46.5*p, -63*p, -79.5*p, -97.5*p, -116.*p, -136.0*p};
100 
101  // Lower enge of first B Cell - B9
102  xBLow[0] = offset/lambdaIron;
103  int j=0 ;
104  // Calculate lower and uper edges of B Cells
105  for(int i=0 ; i<nBCell ; i++)
106  {
107  xBLow[i+1] = abs(enterPos-zBLow[i+j]/lambda) ; // // the z coordiante of the edge of each B cell in lambda
108  if(i==8) j=1 ;
109  }
110  for(int i=0 ; i<nBCell+1 ; i++)
111  cout<<xBLow[i]<<endl ;
112  // If use total 18 B cells, set the uper edge of the last B Cell - B-9
113  //xBLow[nBCell] = 2*halfLength/lambda + offset/lambdaIron;
114 
115  // Check the output dir holding output files does exist in current working dir,
116  // otherwise create it.
117  if(gSystem->AccessPathName("results"))
118  gSystem->Exec("mkdir results") ;
119  // Check the output dir holding plots does exist in current working dir,
120  // otherwise create it.
121  if (gSystem->AccessPathName("plots"))
122  gSystem->Exec("mkdir plots") ;
123 
124  // list of beam energies in MeV
125  string Energies[] = {"20000", "50000", "100000", "180000"} ;
126  // particle names
127  string Particles[] = {"pi", "pr"} ;
128  // Geant4 physics lists
129  string PhysicsLists[] = {"FTFP_BERT", "FTFP_BERT_ATL_VALIDATION", "QGSP_BERT", "QGSP_BIC"} ;
130 
131  // // main directory of input MC files
132  string InPath = "/rdata2/dengfeng/QT/20.3.7.4/OutputFlagZ2795/" ;
133 
134  // loop over particle types
135  for(int i=0 ; i<sizeof(Particles)/sizeof(string) ; i++)
136  {
137  // loop over beam energies
138  for(int j=0 ; j<sizeof(Energies)/sizeof(string) ; j++)
139  {
140  // loop over physics lists
141  for(int k=0 ; k<sizeof(PhysicsLists)/sizeof(string) ; k++)
142  {
143  // Define the input aant file
144  TFile* inputFile = new TFile((InPath+"/TileTB90-E"+Energies[j]+"-"+Particles[i]+"-"+PhysicsLists[k]+"/tiletb90-E"+Energies[j]+"-"+Particles[i]+"_"+PhysicsLists[k]+".aant.root").c_str()) ;
145  // Check the input aant file does exists, otherwise continue.
146  if (!inputFile)
147  {
148  cout<< "File: "<<InPath+"/Tile_90-E"+Energies[j]+"-"+Particles[i]+"-"+PhysicsLists[k]+"/tile.tb90-E"+Energies[j]+"-"+Particles[i]+"_"+PhysicsLists[k]+".aant.root"<< " doesn't exist!"<<endl ;
149  continue ;
150  }
151  cout<< "In File: "<<inputFile->GetName()<<endl ;
152  // get the input tree-h1000
153  TTree* h1000 = (TTree*) inputFile->Get("h1000") ;
154  // check if get tree-h1000 successfully, if not, continue.
155  if (!h1000)
156  {
157  cout<< "Tree: h1000 doesn't exist!"<<endl ;
158  continue ;
159  }
160 
161  // barrel module:
162  // each side(positive and negative) of the barrel module is connected to 48 PMTs,
163  // but only 45 are used.(the 32ed, 33rd and 44th are not used),
164  // each A,B, C and D cell is connected to two reading out PMTs, except cell-D0.
165  // More details, see the map of PMTs and cells in http://zenis.dnp.fmph.uniba.sk/tile.html
166 
167  // energies collected by PMTs connected to negative side of Barrel Module 0
168  float EfitC0[48] ;
169  // energies collected by PMTs connected to negative side of Central Barrel Module
170  float EfitC1[48] ;
171  // energies collected by PMTs connected to positive side of Barrel Module 0
172  float EfitA0[48] ;
173  // energies collected by PMTs connected to positive side of Central Barrel Module
174  float EfitA1[48] ;
175 
176  // fit time
177  float TfitC0[48] ;
178  float TfitC1[48] ;
179  float TfitA0[48] ;
180  float TfitA1[48] ;
181 
182  // extended barrel module:
183  // 28 of 48 PMTs are connected to extended barrel modules,
184  // Cells-E1,E2,E3,E4 are not simulated.
185  // More details, see the map of PMTs to cells in http://zenis.dnp.fmph.uniba.sk/tile.html
186 
187  // energies collected by PMTs connected to Extended Barrel on positive side
188  float EfitD0[48] ;
189  // energies collected by PMTs connected to Extended Barrel on negative side
190  float EfitE0[48] ;
191 
192  // fit time
193  float TfitD0[48] ;
194  float TfitE0[48] ;
195 
196  // set branch address
197  h1000->SetBranchAddress("EfitC0", EfitC0) ;
198  h1000->SetBranchAddress("EfitC1", EfitC1) ;
199  h1000->SetBranchAddress("EfitA0", EfitA0) ;
200  h1000->SetBranchAddress("EfitA1", EfitA1) ;
201  h1000->SetBranchAddress("EfitD0", EfitD0) ;
202  h1000->SetBranchAddress("EfitE0", EfitE0) ;
203  h1000->SetBranchAddress("TfitC0", TfitC0) ;
204  h1000->SetBranchAddress("TfitC1", TfitC1) ;
205  h1000->SetBranchAddress("TfitA0", TfitA0) ;
206  h1000->SetBranchAddress("TfitA1", TfitA1) ;
207  h1000->SetBranchAddress("TfitD0", TfitD0) ;
208  h1000->SetBranchAddress("TfitE0", TfitE0) ;
209 
210  // total energy (deposited in2 barrel modules and 2 extended barrel modules)
211  // Fill this histogram, then fit it by a Gaussian to get the cut range of
212  // total energy
213  TH1F* AllRecoE = bookTH1F("AllRecoE", "Measured Energy", "Reconstructed Energy [GeV]", "Events", 100, 0, std::stoi(Energies[j])/1000.*1.5) ;
214  // total energy distribution passing total energy cut
215  TH1F* RecoE = bookTH1F("RecoE", "Measured Energy", "Reconstructed Energy [GeV]", "Events", 100, 0, std::stoi(Energies[j])/1000.*1.5) ;
216  // distribution of energy deposited in barrel module 0 passing total energy cut
217  TH1F* RecoEModule0 = bookTH1F("RecoEModule0", "Deposit Energy in Module0", "Reconstructed Energy [GeV]", "Events", 100, 0,std::stoi( Energies[j])/1000.*1.5) ;
218  // distribution of energy deposited in central barrel passing total energy cut
219  TH1F* RecoECentralModule = bookTH1F("RecoECentralModule", "Deposit Energy in Central Module", "Reconstructed Energy [GeV]", "Events", 100, 0, std::stoi(Energies[j])/1000.*1.5) ;
220  // distribution of energy deposited in 2 extended barrel modules passing total energy cut
221  TH1F* RecoEEModule = bookTH1F("RecoEEModule", "Deposit Energy in Extended Module", "Reconstructed Energy [GeV]", "Events", 100, 0, std::stoi(Energies[j])/1000.*1.5) ;
222  // longitudinal profile dsitribution passing total energy cut
223  TH1F* LongitudinalProfile = bookTH1F("LongitudinalProfile", "Longitudinal Profile(Mean Deposit Energy in B, C and A Cells)", "x[#lambda]", "dE/dx[GeV/#lambda]", nBCell, xBLow) ;
224 
225  cout<<"Entries: "<<h1000->GetEntries()<<endl ;
226  // loop over ann events
227  for(int n=0 ; n<h1000->GetEntries() ; n++)
228  {
229  h1000->GetEntry(n) ;
230  float totalE = 0. ; // total energy
231  for(int m=0 ; m<48 ; m++)
232  {
233  if(m==30||m==31||m==43) // these 3 PMTs are not used in Barrel Module
234  {
235  totalE += 0. ;
236  }
237  else
238  {
239  // add energies in two barrel modules
240  totalE += Select(EfitC0, TfitC0, m) ; // energy in PMT with index m of negative of Barrel Module 0
241  totalE += Select(EfitC1, TfitC1, m) ; // energy in PMT with index m of positive of Barrel Module 0
242  totalE += Select(EfitA0, TfitA0, m) ; // energy in PMT with index m of negative of Central Barrel Module
243  totalE += Select(EfitA1, TfitA1, m) ; // energy in PMT with index m of positive of Central Barrel Module
244  }
245  if(m==18||m==19||(m>=24&&m<=29)||m==33||m==34||(m>=42&&m<=47)||m==12||m==13||m==0||m==1) // PMTs with these 10 index are not used
246  {
247  totalE += 0. ;
248  }
249  else
250  {
251  // add energies in two extended barrel modules
252  totalE += Select(EfitD0, TfitD0, m) ; // energy in PMT with index m of positive of Extended Barrel Module
253  totalE += Select(EfitE0, TfitE0, m) ; // energy in PMT with index m of negative of Extended Barrel Module
254  }
255  }
256  AllRecoE->Fill(totalE/1000.) ; // convert the energy to GeV, fill the total energy to AllRecoE
257  }
258 
259  // define the gaus function
260  TF1* func = new TF1("func","gaus",AllRecoE->GetMean()-2*AllRecoE->GetRMS(),AllRecoE->GetMean()+2*AllRecoE->GetRMS()) ;
261  AllRecoE->Fit("func","R") ;
262  // select events with total energy within 3 sigmas around peak.
263  // Get the total energy cut:
264  // low cut of total energy
265  float CoreUp = func->GetParameter(1)+3*func->GetParameter(2) ;
266  // high cut of total energy
267  float CoreDown = func->GetParameter(1)-3*func->GetParameter(2) ;
268 
270  int AccEntries = 0 ;
271  for(int n=0 ; n<h1000->GetEntries() ; n++)
272  {
273  h1000->GetEntry(n) ;
274  float totalE = 0. ; // total energy in all 4 modules
275  float EModule0 = 0. ; // energy in Barrel Module 0
276  float ECModule = 0. ; // energy on Central Barrel Module
277  float EEModule = 0. ; // energy in Extended Barrel Modules
278  float EModule0ABCCell[18] ; // energy distribution as a function of the depth in Barrel Module 0. The depth is taken to be the size of the B sub-cell
279  float ECModuleABCCell[18] ; // energy distribution as a function of the depth in Central Barrel Module.
280  for(int m=0 ; m<18 ; m++)
281  {
282  EModule0ABCCell[m]=0. ;
283  ECModuleABCCell[m]=0. ;
284  }
285 
286  // get energies in B, C and A cells
287  // the map of PMTs to cells is in http://zenis.dnp.fmph.uniba.sk/tile.html
288  // get energy in in cells(B9-B1, C8-C1, A10-A1)
289  // energy in B9 and A10 of negative side of Central Barrel Modules
290  ECModuleABCCell[0] = Select(EfitC1, TfitC1, 44, 45, 46, 47) ;
291  // energy in B9 and A10 of negative side of Barrel Module 0
292  EModule0ABCCell[0] += Select(EfitC0, TfitC0, 44, 45, 46, 47) ;
293  // energy in C8, B8 and A9 negative side of Central Barrel Modules
294  ECModuleABCCell[1] += Select(EfitC1, TfitC1, 41, 40, 37, 38) ;
295  // energy in C8, B8 and A9 negative side of Barrel Module 0
296  EModule0ABCCell[1] += Select(EfitC0, TfitC0, 41, 40, 37, 38) ;
297  // energy in C7, B7 and A8 negative side of Central Barrel Modules
298  ECModuleABCCell[2] += Select(EfitC1, TfitC1, 34, 35, 33, 36) ;
299  // energy in C7, B7 and A8 negative side of Barrel Module 0
300  EModule0ABCCell[2] += Select(EfitC0, TfitC0, 34, 35, 33, 36) ;
301  // energy in C6, B6 and A7 negative side of Central Barrel Modules
302  ECModuleABCCell[3] += Select(EfitC1, TfitC1, 28, 29, 27, 30) ;
303  // energy in C6, B6 and A7 negative side of Barrel Module 0
304  EModule0ABCCell[3] += Select(EfitC0, TfitC0, 28, 29, 27, 30) ;
305  // energy in C5, B5 and A6 and A5 negative side of Central Barrel Modules
306  ECModuleABCCell[4] += Select(EfitC1, TfitC1, 21, 22, 23, 24, 19, 20) ;
307  // energy in C5, B5 and A6 and A5 negative side of Barrel Module 0
308  EModule0ABCCell[4] += Select(EfitC0, TfitC0, 21, 22, 23, 24, 19, 20) ;
309  // energy in C4, B4 and A4 negative side of Central Barrel Modules
310  ECModuleABCCell[5] += Select(EfitC1, TfitC1, 16, 17, 15, 18) ;
311  // energy in C4, B4 and A4 negative side of Barrel Module 0
312  EModule0ABCCell[5] += Select(EfitC0, TfitC0, 16, 17, 15, 18) ;
313  // energy in C3, B3 and A3 negative side of Central Barrel Modules
314  ECModuleABCCell[6] += Select(EfitC1, TfitC1, 11, 12, 9, 10) ;
315  // energy in C3, B3 and A3 negative side of Barrel Module 0
316  EModule0ABCCell[6] += Select(EfitC0, TfitC0, 11, 12, 9, 10) ;
317  // energy in C2, B2 and A2 negative side of Central Barrel Modules
318  ECModuleABCCell[7] += Select(EfitC1, TfitC1, 6, 7, 5, 8) ;
319  // energy in C2, B2 and A2 negative side of Barrel Module 0
320  EModule0ABCCell[7] += Select(EfitC0, TfitC0, 6, 7, 5, 8) ;
321  // energy in C1, B1 and A1 negative side of Central Barrel Modules
322  ECModuleABCCell[8] += Select(EfitC1, TfitC1, 2, 3, 1, 4) ;
323  // energy in C1, B1 and A1 negative side of Barrel Module 0
324  EModule0ABCCell[8] += Select(EfitC0, TfitC0, 2, 3, 1, 4) ;
325 
326  // get the energy in cells (B-1-B-9, A-1-A-10 and C-1-C-8)
327  // positive side of Module 0 and Central Barrel Module
328  ECModuleABCCell[9] += Select(EfitA1, TfitA1, 2, 3, 1, 4) ;
329  EModule0ABCCell[9] += Select(EfitA0, TfitA0, 2, 3, 1, 4) ;
330  ECModuleABCCell[10] += Select(EfitA1, TfitA1, 6, 7, 5, 8) ;
331  EModule0ABCCell[10] += Select(EfitA0, TfitA0, 6, 7, 5, 8) ;
332  ECModuleABCCell[11] += Select(EfitA1, TfitA1, 11, 12, 9, 10) ;
333  EModule0ABCCell[11] += Select(EfitA0, TfitA0, 11, 12, 9, 10) ;
334  ECModuleABCCell[12] += Select(EfitA1, TfitA1, 16, 17, 15, 18) ;
335  EModule0ABCCell[12] += Select(EfitA0, TfitA0, 16, 17, 15, 18) ;
336  ECModuleABCCell[13] += Select(EfitA1, TfitA1, 21, 22, 23, 24, 19, 20) ;
337  EModule0ABCCell[13] += Select(EfitA0, TfitA0, 21, 22, 23, 24, 19, 20) ;
338  ECModuleABCCell[14] += Select(EfitA1, TfitA1, 28, 29, 27, 30) ;
339  EModule0ABCCell[14] += Select(EfitA0, TfitA0, 28, 29, 27, 30) ;
340  ECModuleABCCell[15] += Select(EfitA1, TfitA1, 34, 35, 33, 36) ;
341  EModule0ABCCell[15] += Select(EfitA0, TfitA0, 34, 35, 33, 36) ;
342  ECModuleABCCell[16] += Select(EfitA1, TfitA1, 40, 41, 37, 38) ;
343  EModule0ABCCell[16] += Select(EfitA0, TfitA0, 40, 41, 37, 38) ;
344  ECModuleABCCell[17] += Select(EfitA1, TfitA1, 44, 45, 46, 47) ;
345  EModule0ABCCell[17] += Select(EfitA0, TfitA0, 44, 45, 46, 47) ;
346 
347  float All = 0. ; // total energy
348  for(int m=0 ; m<18 ; m++)
349  {
350  All += ECModuleABCCell[m] ;
351  All += EModule0ABCCell[m] ;
352  }
353 
354  // calculate total energy and energy in Barrrel Module 0 and Cental Barrel
355  for(int m=0 ; m<48 ; m++)
356  {
357  // these 3 PMTs are not used in Barrel Module
358  if(m==30||m==31||m==43)
359  {
360  totalE += 0. ;
361  ECModule += 0. ;
362  EModule0 += 0. ;
363  }
364  else
365  {
366  // add total energy
367  totalE += Select(EfitC0, TfitC0, m) ;
368  totalE += Select(EfitC1, TfitC1, m) ;
369  totalE += Select(EfitA0, TfitA0, m) ;
370  totalE += Select(EfitA1, TfitA1, m) ;
371  // add energy in Barrrel Module 0 and Cental Barrel
372  EModule0 += Select(EfitC0, TfitC0, m) ;
373  EModule0 += Select(EfitA0, TfitA0, m) ;
374  ECModule += Select(EfitC1, TfitC1, m) ;
375  ECModule += Select(EfitA1, TfitA1, m) ;
376  }
377  // these 20 PMTs are not used in Barrel Module
378  if(m==18||m==19||(m>=24&&j<=29)||m==33||m==34||(m>=42&&m<=47)||m==12||m==13||m==0||m==1)
379  {
380  totalE += 0. ;
381  EEModule += 0. ;
382  }
383  else
384  {
385  // calculate total energy and energy in Extended Barrel Modules
386  // add total energy
387  totalE += Select(EfitD0, TfitD0, m) ;
388  totalE += Select(EfitE0, TfitE0, m) ;
389  // add energy and energy in Extended Barrel Modules
390  EEModule += Select(EfitD0, TfitD0, m) ;
391  EEModule += Select(EfitE0, TfitE0, m) ;
392  }
393  }
394 
395  // select events with total energy within 3 sigmas around peak
396  if(totalE/1000<CoreDown||totalE/1000>CoreUp)
397  continue ;
398  // fill the energy
399  RecoEModule0->Fill(EModule0/1000.) ;
400  RecoEEModule->Fill(EEModule/1000.) ;
401  RecoECentralModule->Fill(ECModule/1000.) ;
402  RecoE->Fill(totalE/1000.) ;
403 
404  for(int m=0 ; m<15 ; m++)
405  {
406  // fill the energy/length(in lambda unit) in each B cell length
407  // The Extended Barrel modules are not used in the measurement
408  // of the longitudinal shower profile. Instead, the energy measured
409  // in the Barrel Module 0 is multiplied by a factor of two.
410  LongitudinalProfile->Fill(LongitudinalProfile->GetBinCenter(m+1), ((ECModuleABCCell[m]+2*EModule0ABCCell[m])/1000.)/LongitudinalProfile->GetBinWidth(m+1)) ;
411  }
412  // count the number of events passing total energy cut
413  AccEntries++ ;
414  }
415  cout<<"AccEntries: "<<AccEntries<<endl ;
416  // scale the profile dsitribution by number of total accepted events
417  // to get the mean distribution
418  LongitudinalProfile->Scale(1./AccEntries) ;
419 
420  for(int m=0 ; m<18 ; m++)
421  {
422  // at the tail the distribution a flat, the energy is at level of noise
423  // so truncate the tail
424  if(LongitudinalProfile->GetBinContent(m+1)<0.05)
425  {
426  LongitudinalProfile->SetBinContent(m+1, 0.) ;
427  LongitudinalProfile->SetBinError(m+1, 0.) ;
428  }
429  }
430 
431  // all outputs of each type of particles are placed in its own dir
432  // if this dir doesn't exist, create it.
433  string Sub_OutPath = "./results/"+Particles[i]+"/" ;
434  if(gSystem->AccessPathName(Sub_OutPath.c_str()))
435  {
436  cout<<Sub_OutPath<<" doesn't exist! Making......"<<endl ;
437  gSystem->Exec(("mkdir "+Sub_OutPath).c_str()) ;
438  }
439 
440  string PhysicsList = PhysicsLists[k] ;
441  if(PhysicsLists[k]=="FTFP_BERT_ATL_VALIDATION")
442  PhysicsList = "FTFP_BERT_ATL" ;
443  // create output file
444  TFile* outputFile = new TFile((Sub_OutPath+"/tiletb90-E"+Energies[j]+"-"+Particles[i]+"_"+PhysicsList+".root").c_str(),"RECREATE") ;
445  cout<<"outputFile: "<<outputFile->GetName()<<endl ;
446  // write histograms
447  //AllRecoE->Write() ;
448  RecoE->Write() ;
449  RecoEModule0->Write() ;
450  RecoEEModule->Write() ;
451  RecoECentralModule->Write() ;
452  LongitudinalProfile->Write() ;
453  outputFile->Close() ;
454  }
455  // Done looping over physics lists
456  }
457  // Done looping over beam energies
458  }
459  // Done looping over particles
460  return 0 ;
461 }

◆ Select() [1/4]

float Select ( float *  Efit,
float *  Tfit,
int  a,
int  b,
int  c,
int  d 
)

Definition at line 49 of file GetEnergy.cxx.

50 {
51  float sum = 0 ;
52  if(Efit[a]>=0&&Tfit[a]!=0)
53  sum += Efit[a] ;
54  if(Efit[b]>=0&&Tfit[b]!=0)
55  sum += Efit[b] ;
56  if(Efit[c]>=0&&Tfit[c]!=0)
57  sum += Efit[c] ;
58  if(Efit[d]>=0&&Tfit[d]!=0)
59  sum += Efit[d] ;
60  return sum ;
61 }

◆ Select() [2/4]

float Select ( float *  Efit,
float *  Tfit,
int  a,
int  b,
int  c,
int  d,
int  e,
int  f 
)

Definition at line 63 of file GetEnergy.cxx.

64 {
65  float sum = 0 ;
66  if(Efit[a]>=0&&Tfit[a]!=0)
67  sum += Efit[a] ;
68  if(Efit[b]>=0&&Tfit[b]!=0)
69  sum += Efit[b] ;
70  if(Efit[c]>=0&&Tfit[c]!=0)
71  sum += Efit[c] ;
72  if(Efit[d]>=0&&Tfit[d]!=0)
73  sum += Efit[d] ;
74  if(Efit[e]>=0&&Tfit[e]!=0)
75  sum += Efit[e] ;
76  if(Efit[f]>=0&&Tfit[f]!=0)
77  sum += Efit[f] ;
78  return sum ;
79 }

◆ Select() [3/4]

float Select ( float *  Efit,
float *  Tfit,
int  m 
)

Definition at line 30 of file GetEnergy.cxx.

31 {
32  float sum = 0 ;
33  //only when the energy>0 and fitting time!=0, we use the energy collected by this PMT
34  if(Efit[m]>=0&&Tfit[m]!=0)
35  sum += Efit[m] ;
36  return sum ;
37 }

◆ Select() [4/4]

float Select ( float *  Efit,
float *  Tfit,
int  m,
int  n 
)

Definition at line 39 of file GetEnergy.cxx.

40 {
41  float sum = 0 ;
42  if(Efit[m]>=0&&Tfit[m]!=0)
43  sum += Efit[m] ;
44  if(Efit[n]>=0&&Tfit[n]!=0)
45  sum += Efit[n] ;
46  return sum ;
47 }
python.CaloRecoConfig.f
f
Definition: CaloRecoConfig.py:127
python.SystemOfUnits.m
int m
Definition: SystemOfUnits.py:91
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
hist_file_dump.d
d
Definition: hist_file_dump.py:137
makePlot.Energies
Energies
Definition: makePlot.py:24
compareGeometries.outputFile
string outputFile
Definition: compareGeometries.py:25
convertTimingResiduals.sum
sum
Definition: convertTimingResiduals.py:55
CaloCondBlobAlgs_fillNoiseFromASCII.inputFile
string inputFile
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:17
lumiFormat.i
int i
Definition: lumiFormat.py:92
beamspotman.n
n
Definition: beamspotman.py:731
makePlot.Particles
Particles
Definition: makePlot.py:25
bookTH1F
TH1F * bookTH1F(const std::string &name, const std::string &title, const std::string &xlabel, const std::string &ylabel, int xbins, double xlow, double xhigh, bool sumw2=true, bool overflow=true)
Definition: HistToolKit.h:27
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
DiTauMassTools::MaxHistStrategyV2::e
e
Definition: PhysicsAnalysis/TauID/DiTauMassTools/DiTauMassTools/HelperFunctions.h:26
a
TList * a
Definition: liststreamerinfos.cxx:10
Select
float Select(float *Efit, float *Tfit, int m)
Definition: GetEnergy.cxx:30
makePlot.PhysicsLists
PhysicsLists
Definition: makePlot.py:26
convertTimingResiduals.offset
offset
Definition: convertTimingResiduals.py:71
python.TrigEgammaMonitorHelper.TH1F
def TH1F(name, title, nxbins, bins_par2, bins_par3=None, path='', **kwargs)
Definition: TrigEgammaMonitorHelper.py:24
python.compressB64.c
def c
Definition: compressB64.py:93
PUClassification.All
All
Definition: PUClassification.py:17
fitman.k
k
Definition: fitman.py:528