10 #include "TPostScript.h"
17 #include "CalibrationHelperFunctions.h"
18 #include "CalibrationHelperFunctions.cxx"
21 double fit_function(
double *x,
double *par);
22 double fit_function2(
double *x,
double *par);
23 double background_only_fit(
double *x,
double *par);
24 int lookup_crate(
float,
float);
31 void electron_master_alt(
const char* infile=
"infile.root",
const char* output=
"outfile.root",
const char* gfname=
"mip.gains"){
35 gROOT->Macro(
"LoadLogger.C");
36 gROOT->Macro(
"loadMuDst.C");
37 gSystem->Load(
"StTpcDb");
38 gSystem->Load(
"StDaqLib");
39 gSystem->Load(
"StDetectorDbMaker");
40 gSystem->Load(
"St_db_Maker");
41 gSystem->Load(
"StDbUtilities");
42 gSystem->Load(
"StEmcRawMaker");
43 gSystem->Load(
"StMcEvent");
44 gSystem->Load(
"StMcEventMaker");
45 gSystem->Load(
"StEmcSimulatorMaker");
46 gSystem->Load(
"StEmcADCtoEMaker");
47 gSystem->Load(
"StEpcMaker");
48 gSystem->Load(
"StDbBroker");
49 gSystem->Load(
"StEEmcUtil");
50 gSystem->Load(
"StAssociationMaker");
51 gSystem->Load(
"StEmcTriggerMaker");
52 gSystem->Load(
"StTriggerUtilities");
53 gSystem->Load(
"StEmcOfflineCalibrationMaker");
55 const char* dbDate=
"2009-04-10 00:11:00";
57 cout<<
"input: "<<infile<<endl;
58 cout<<
"output: "<<output<<endl;
59 cout<<
"db Date: "<<dbDate<<endl;
75 TChain* tree =
new TChain(
"skimTree");
86 const int ntowers = 4800;
87 const int nrings = 40;
88 const int ncrates = 30;
89 const int ncrateslices = ncrates*20;
93 float peakerr[ntowers];
94 float gainerr[ntowers];
97 ifstream gainfile(gfname);
100 float peak,err,gain,eta,theta;
101 gainfile >>
id >> peak >> err >> stat;
102 if(!gainfile.good())
break;
103 eta = helper->getEta(
id);
104 theta = helper->getTheta(
id);
105 gain = 0.264*(1+0.056*eta*eta)/(sin(theta)*peak);
119 TFile* geant_file =
new TFile(
"geant_fits.root",
"READ");
121 for(
int i = 0; i < 20; i++){
122 TString fname =
"fit_";
124 geant_fits[i] = (TF1*)geant_file->Get(fname);
128 TFile outfile(output,
"RECREATE");
133 TH1F *checkcrateslice =
new TH1F(
"checkcrateslice",
"ccs",600,-0.5,599.5);
135 TH1 *crate_histo[ncrates];
136 TH1 *crate_histo_tof[ncrates];
137 TF1 *crate_fit[ncrates];
138 TH1 *electron_histo[ntowers];
141 TH1 *ring_histo[nrings];
142 TH1 *ring_histo_tof[nrings];
147 TH2 *ringp_histo[nrings];
148 TH2 *ringp_histo_tof[nrings];
149 TH1 *crateslice_histo[ncrates][nrings/2];
150 TH1 *crateslice_histo_tof[ncrates][nrings/2];
151 TF1 *crateslice_fit[ncrates][nrings/2];
153 TF1 *ringfit[nrings];
154 TH2F* ring_pve[nrings];
157 int etaindex, geantetaindex;
160 TH2F *energyleak =
new TH2F(
"energyleak",
"",20,0.0,0.03,20,0.0,1.0);
161 TH2F *findbg =
new TH2F(
"findbg",
"",20,0.0,0.03,30,0.0,5.0);
162 TH1F *energymean =
new TH1F(
"energymean",
"",20,0.0,0.03);
163 TH1F *leakmean =
new TH1F(
"leakmean",
"",20,0.0,0.03);
164 energyleak->SetXTitle(
"#DeltaR");
165 energyleak->SetYTitle(
"leaked energy / total energy");
166 findbg->SetXTitle(
"#DeltaR");
167 findbg->SetYTitle(
"Total energy / track momentum");
168 TH2F *tevsp =
new TH2F(
"tevsp",
"",50,0.0,20.0,50,0.0,30.0);
169 TH1F *pmean =
new TH1F(
"pmean",
"",20,0.0,15.0);
170 tevsp->SetXTitle(
"track momentum (GeV)");
171 tevsp->SetYTitle(
"Total Energy (GeV)");
172 TH2F *tevspcent =
new TH2F(
"tevspcent",
"",20,0.0,15.0,20,0.0,15.0);
173 tevspcent->SetXTitle(
"track momentum (GeV)");
174 tevspcent->SetYTitle(
"Energy in central tower (GeV)");
175 TH1F *cmean =
new TH1F(
"cmain",
"",20,0.0,15.0);
176 TH2F *sistertracks =
new TH2F(
"sistertracks",
"",20,0.0,8.0,20,0.0,8.0);
177 sistertracks->SetXTitle(
"Track momentum (GeV)");
178 sistertracks->SetYTitle(
"Neighbor momentum (GeV)");
179 TH2F* dEdxvspE =
new TH2F(
"dEdxvspE",
"",100,0,2,100,0,1.0e-5);
180 dEdxvspE->SetXTitle(
"p/E");
181 dEdxvspE->SetYTitle(
"dE/dx");
182 TH2F* dEdxvsp =
new TH2F(
"dEdxvsp",
"",100,1.4,10.1,100,0,1.0e-5);
183 dEdxvsp->SetXTitle(
"p");
184 dEdxvsp->SetYTitle(
"dE/dx");
185 TH2F* dEdxvsp10 =
new TH2F(
"dEdxvsp10",
"",100,0.15,1.3,100,-5.7,-5.);
186 dEdxvsp10->SetXTitle(
"Log(p)");
187 dEdxvsp10->SetYTitle(
"Log(dE/dx)");
188 TH2F* dEdxvsp_east =
new TH2F(
"dEdxvsp_east",
"",100,0.15,1.3,100,-5.7,-5.0);
189 dEdxvsp_east->SetXTitle(
"Log(p)");
190 dEdxvsp_east->SetYTitle(
"Log(dE/dx)");
191 TH2F* dEdxvsp_west =
new TH2F(
"dEdxvsp_west",
"",100,0.15,1.3,100,-5.7,-5.0);
192 dEdxvsp_west->SetXTitle(
"Log(p)");
193 dEdxvsp_west->SetYTitle(
"Log(dE/dx)");
194 TH2F* energyleak2 =
new TH2F(
"energyleak2",
"",20,0.0,0.03,20,0.0,1.0);
195 TH1F* energymean2 =
new TH1F(
"energymean2",
"",20,0.0,0.03);
196 TH1F* towermult =
new TH1F(
"towermult",
"",9,0.0,9.0);
197 energyleak2->SetXTitle(
"#DeltaR");
198 energyleak2->SetYTitle(
"leaked energy/total energy");
199 towermult->SetXTitle(
"Neighbors with energy");
200 TH2F* multvsp =
new TH2F(
"multvsp",
"",20,0.0,20.0,9,0.0,9.0);
201 multvsp->SetXTitle(
"Track momentum (GeV)");
202 multvsp->SetYTitle(
"Neighbors with energy");
203 TH1F* multmean =
new TH1F(
"multmean",
"",20,0.0,20.0);
204 TH2F* tep3 =
new TH2F(
"tep3",
"2 < p < 3",20,0.0,0.03,20,0.0,4.0);
205 TH2F* tep5 =
new TH2F(
"tep5",
"3 < p < 5",20,0.0,0.03,20,0.0,4.0);
206 TH2F* tep10 =
new TH2F(
"tep10",
"5 < p < 10",20,0.0,0.03,20,0.0,4.0);
207 tep3->SetXTitle(
"DeltaR");
208 tep3->SetYTitle(
"Total energy / track momentum");
209 tep5->SetXTitle(
"DeltaR");
210 tep5->SetYTitle(
"Total energy / track momentum");
211 tep10->SetXTitle(
"DeltaR");
212 tep10->SetYTitle(
"Total energy / track momentum");
213 TH1F* tep3mean =
new TH1F(
"tep3mean",
"",20,0,0.03);
214 TH1F* tep5mean =
new TH1F(
"tep5mean",
"",20,0,0.03);
215 TH1F* tep10mean =
new TH1F(
"tep10mean",
"",20,0,0.03);
216 TH1F* multen =
new TH1F(
"multen",
"",40,0.0,1.0);
217 multen->SetXTitle(
"Energy in neighbor towers (GeV)");
218 TH1F* east_histo =
new TH1F(
"east_histo",
"Electron E/p in East",40,0.0,2.0);
219 TH1F* west_histo =
new TH1F(
"west_histo",
"Electron E/p in West",40,0.0,2.0);
220 TH1F* all_histo =
new TH1F(
"all_histo",
"Electron E/p",40,0.0,2.0);
221 TH2F* pvsep =
new TH2F(
"pvsep",
"Electron p vs E/p",120,0,3.0,20,0,20.0);
222 pvsep->SetYTitle(
"p (Gev)");
223 pvsep->SetXTitle(
"E/p");
224 TH2F* pvsep0 =
new TH2F(
"pvsep0",
"Electron p vs E/p",120,0,3.0,20,0,20.0);
225 pvsep0->SetYTitle(
"p (Gev)");
226 pvsep0->SetXTitle(
"E/p");
227 TH2F* evsep =
new TH2F(
"evsep",
"Electron E vs E/p",120,0,3.0,20,0,20.0);
228 evsep->SetYTitle(
"E (GeV)");
229 evsep->SetXTitle(
"E/p");
231 TH1F* bsmde =
new TH1F(
"bsmde",
"BSMDE ADC TOT",1500,0,1500);
232 TH1F* bsmdp =
new TH1F(
"bsmdp",
"BSMDP ADC TOT",1500,0,1500);
234 TH1F* bsmde_central =
new TH1F(
"bsmde_central",
"BSMDE ADC TOT",100,0,1500);
235 TH1F* bsmde_mid =
new TH1F(
"bsmde_mid",
"BSMDE ADC TOT",100,0,1500);
236 TH1F* bsmde_outer =
new TH1F(
"bsmde_outer",
"BSMDE ADC TOT",100,0,1500);
238 TH2F* bsmdep =
new TH2F(
"bsmdep",
"BSMDE v BSMDP",100,0,1500,100,0,1500);
240 TH2F* bsmdevp =
new TH2F(
"bsmdevp",
"BSMDE v p",100,1.0,15.0,100,0,1500);
241 TH2F* bsmdpvp =
new TH2F(
"bsmdpvp",
"BSMDP v p",100,1.0,15.0,100,0,1500);
242 TH2F* bsmdevep =
new TH2F(
"bsmdevep",
"BSMDE v E/p",100,0.0,2.0,100,0,1500);
243 TH2F* bsmdpvep =
new TH2F(
"bsmdpvep",
"BSMDP v E/p",100,0.0,2.0,100,0,1500);
245 TH2F* bsmdeve =
new TH2F(
"bsmdeve",
"BSMDE v E",100,1.0,30.0,100,0,1500);
246 TH2F* bsmdpve =
new TH2F(
"bsmdpve",
"BSMDP v E",100,1.0,30.0,100,0,1500);
248 TH1F* httrig =
new TH1F(
"httrig",
"HT Trigger",5,-0.5,4.5);
250 TH1F* pplus =
new TH1F(
"pplus",
"e+ p",100,0,20);
251 TH1F* pminus =
new TH1F(
"pminus",
"e- p",100,0,20);
253 TH1F* posep =
new TH1F(
"posep",
"e+ E/p",60,0,3.0);
254 TH1F* negep =
new TH1F(
"negep",
"e- E/p",60,0,3.0);
256 TH2F* petafinal =
new TH2F(
"petafinal",
"p vs eta",85,1.5,10.,40,-1,1);
257 TH2F* petafinal_tof =
new TH2F(
"petafinal_tof",
"p vs eta with TOF",85,1.5,10.,40,-1.,1.);
260 TH2F* pEpHT1 =
new TH2F(
"pEpHT1",
"HT trig = 1",100,0,2,100,0,10);
261 TH2F* pEpHT2 =
new TH2F(
"pEpHT2",
"HT trig = 2",100,0,2,100,0,10);
262 TH2F* pEpTOF =
new TH2F(
"pEpTOF",
"TOF trig",100,0,2,100,0,10);
263 TH2F* pEpMB =
new TH2F(
"pEpMB",
"MB trig",100,0,2,100,0,10);
266 TH2F *hTofSigmaElectron =
new TH2F(
"hTofSigmaElectron",
"TofSigmaElectron",100,0,10,100,-10,10);
268 TH2F *hTofDeltaBeta =
new TH2F(
"hTofDeltaBeta",
"TofDeltaBeta",100,0,10,100,-0.2,0.2);
269 TH2F *hTofDeltaBetaSigmaElectron =
new TH2F(
"hTofDeltaBetaSigmaElectron",
"TOF DeltaBeta vs TPC SigmaElectron",100,-0.2,0.2,100,-10,10);
270 TH2F *hTofDeltaBetaEta =
new TH2F(
"hTofDeltaBetaEta",
"TofDeltaBeta vs eta",100,-1.,1.,100,-0.2,0.2);
276 for(
int i=0; i<ntowers; i++){
277 sprintf(name,
"electron_histo_%i",i+1);
278 electron_histo[i] =
new TH1F(name,
"",60,0.,3.0);
279 electron_histo[i]->SetXTitle(
"E/p");
282 for(
int i = 0; i < ncrates; i++){
283 sprintf(name,
"crate_%i",i+1);
284 sprintf(title,
"E/p for Crate %i",i+1);
285 crate_histo[i] =
new TH1F(name,title,60,0.,3.0);
286 crate_histo[i]->SetXTitle(
"E/p");
287 sprintf(name,
"crate_tof_%i",i+1);
288 crate_histo_tof[i] =
new TH1F(name,title,60,0.,3.0);
291 for(
int i = 0; i < ncrates; i++){
292 for(
int j = 0; j < nrings/2; j++){
293 sprintf(name,
"crateslice_%i_%i",i+1,j+1);
294 sprintf(title,
"E/p for CrateSlice %i %i",i+1,j+1);
295 crateslice_histo[i][j] =
new TH1F(name,title,60,0.,3.0);
296 crateslice_histo[i][j]->SetXTitle(
"E/p");
297 sprintf(name,
"crateslice_tof_%i_%i",i+1,j+1);
298 crateslice_histo_tof[i][j] =
new TH1F(name,title,60,0.,3.0);
302 for(
int i=0; i<nrings;i++)
304 sprintf(name,
"ring_histo_%i",i);
305 sprintf(title,
"E/p for Ring %i",i+1);
308 ring_histo[i] =
new TH1F(name,title,60,0.,3.0);
309 ring_histo[i]->SetXTitle(
"E/p");
310 sprintf(name,
"ring_histo_tof_%i",i);
311 ring_histo_tof[i] =
new TH1F(name,name,60,0.,3.0);
313 sprintf(name,
"ringp_histo_%i",i);
314 ringp_histo[i] =
new TH2F(name,name,60,0.,3.0,85,1.5,10.);
315 ringp_histo[i]->SetXTitle(
"E/p");
316 ringp_histo[i]->SetYTitle(
"p");
317 sprintf(name,
"ringp_histo_tof_%i",i);
318 ringp_histo_tof[i] =
new TH2F(name,name,60,0.,3.0,85,1.5,10.);
319 ringp_histo_tof[i]->SetXTitle(
"E/p");
320 ringp_histo_tof[i]->SetYTitle(
"p");
344 for(
int i = 0; i < 6; i++){
345 sprintf(jname,
"jan_pve_%i",i);
346 jan_pve[i] =
new TH2F(jname,
"",120,0,3.0,20,0,20.0);
347 jan_pve[i]->SetXTitle(
"E/p");
348 jan_pve[i]->SetYTitle(
"p (GeV)");
351 gStyle->SetOptStat(
"oue");
352 gStyle->SetOptFit(111);
353 gStyle->SetCanvasColor(10);
354 gStyle->SetCanvasBorderMode(0);
355 gStyle->SetOptTitle(0);
356 gStyle->SetPalette(1);
357 gStyle->SetStatColor(0);
361 tree->SetBranchAddress(
"clusters",&cluster);
367 int nentries = tree->GetEntries();
368 cout<<nentries<<endl;
377 for(
int j=0; j<nentries; j++){
379 track = &(cluster->centralTrack);
380 TClonesArray *tracks = cluster->tracks;
383 if(j%100000 == 0) cout<<
"reading "<<j<<
" of "<<nentries<<endl;
385 httrig->Fill((
float)track->htTrig);
387 if(track->charge > 0)pplus->Fill(track->p);
388 if(track->charge < 0)pminus->Fill(track->p);
392 for(
int i = 0; i < 11; i++){
393 if(track->smde_adc[i] > track->smde_pedestal[i])bsmdeadctot += track->smde_adc[i] - track->smde_pedestal[i];
394 if(track->smdp_adc[i] > track->smdp_pedestal[i])bsmdpadctot += track->smdp_adc[i] - track->smdp_pedestal[i];
397 double dR = TMath::Sqrt(track->deta*track->deta + track->dphi*track->dphi);
399 double scaled_adc = (track->tower_adc[0] - track->tower_pedestal[0]) / track->p;
401 int index = track->tower_id[0];
404 eta = helper->getEta(index);
405 if(TMath::Abs(eta) > 0.968) eta += 0.005 * TMath::Abs(eta)/eta;
406 etaindex = ((TMath::Nint(eta * 1000.0) + 25)/50 + 19);
407 geantetaindex = ((TMath::Nint(fabs(eta) * 1000.0) + 25)/50 -1);
409 double geant_scale = geant_fits[geantetaindex]->Eval(dR);
410 scaled_adc /= geant_scale;
416 if(geantetaindex == 19)dR *= 0.025/0.017;
419 double tgain = gains[index-1];
422 if((track->tower_adc[0] - track->tower_pedestal[0]) < 2.5 * track->tower_pedestal_rms[0])
continue;
424 dEdxvsp->Fill(track->p,track->dEdx);
425 dEdxvsp10->Fill(TMath::Log10(track->p),TMath::Log10(track->dEdx));
426 if(track->tower_id[0] <= 2400)dEdxvsp_west->Fill(TMath::Log10(track->p),TMath::Log10(track->dEdx));
427 if(track->tower_id[0] > 2400)dEdxvsp_east->Fill(TMath::Log10(track->p),TMath::Log10(track->dEdx));
429 if(track->tower_id[0] != track->tower_id_exit)
continue;
432 if(status[index-1]!=1)
continue;
434 pvsep0->Fill(scaled_adc*tgain,track->p);
435 if(track->p > 10)
continue;
442 float squarefid = 0.02;
445 int numsis = tracks->GetEntries();
450 for(
int i = 0; i < 9; i++){
451 if(track->tower_adc[i] - track->tower_pedestal[i] < 0)
continue;
452 float theta = helper->getTheta(track->tower_id[i]);
453 float nextEt = (track->tower_adc[i] - track->tower_pedestal[i]) * bemctables->calib(1,track->tower_id[i])*sin(theta);
462 if(numsis > 0)
continue;
464 if(maxId != 0)
continue;
468 if(dR > 0.02)
continue;
474 dEdxvspE->Fill(scaled_adc*tgain,track->dEdx);
476 if(track->dEdx*1000000 > 5.0 || track->dEdx*1000000 < 3.5)
continue;
494 if(track->htTrig == 1 || (track->htTrig == 2 && track->nonhtTrig != 0)) pEpHT1->Fill(scaled_adc*tgain,track->p);
495 else if(track->htTrig == 2 && track->nonhtTrig == 0) pEpHT2->Fill(scaled_adc*tgain,track->p);
496 else if(track->htTrig == 0)
498 if(track->tofTrig == 1) pEpTOF->Fill(scaled_adc*tgain,track->p);
499 else pEpMB->Fill(scaled_adc*tgain,track->p);
502 if(track->htTrig == 2 && track->nonhtTrig == 0)
continue;
506 float deltabeta = -999;
508 if(track->tofmatchedflag >= 1 && track->toftime > -1. && track->toftime < 100. && track->tofbeta > -1.)
510 hTofSigmaElectron->Fill(track->p,track->tofsigmaelectron);
512 deltabeta = 1. - (track->tofbeta)*sqrt(0.000511*0.000511/(track->p*track->p)+1);
513 hTofDeltaBeta->Fill(track->p,deltabeta);
514 hTofDeltaBetaSigmaElectron->Fill(deltabeta,track->nSigmaElectron);
515 hTofDeltaBetaEta->Fill(eta,deltabeta);
517 if(fabs(deltabeta)<0.04) tofreject = 1;
539 electron_histo[index-1]->Fill(scaled_adc*tgain);
543 ring_histo[etaindex]->Fill(scaled_adc*tgain);
544 if(tofreject==1)ring_histo_tof[etaindex]->Fill(scaled_adc*tgain);
546 ringp_histo[etaindex]->Fill(scaled_adc*tgain,track->p);
547 if(tofreject==1)ringp_histo_tof[etaindex]->Fill(scaled_adc*tgain,track->p);
551 float phi = helper->getPhi(index);
555 crate_histo[crate-1]->Fill(scaled_adc*tgain);
556 if(tofreject==1)crate_histo_tof[crate-1]->Fill(scaled_adc*tgain);
562 crateslice_histo[crate-1][geantetaindex]->Fill(scaled_adc*tgain);
563 if(tofreject==1)crateslice_histo_tof[crate-1][geantetaindex]->Fill(scaled_adc*tgain);
567 petafinal->Fill(track->p,eta);
568 if(tofreject==1) petafinal_tof->Fill(track->p,eta);
577 if(etaindex == 0 || etaindex == 39){
583 float abseta = TMath::Abs(eta);
585 jan_pve[5]->Fill(scaled_adc*tgain,track->p);
586 }
else if(abseta > 0.9){
587 jan_pve[4]->Fill(scaled_adc*tgain,track->p);
588 }
else if(abseta > 0.6){
589 jan_pve[3]->Fill(scaled_adc*tgain,track->p);
590 }
else if(abseta > 0.3){
591 jan_pve[2]->Fill(scaled_adc*tgain,track->p);
592 }
else if(abseta > 0.05){
593 jan_pve[1]->Fill(scaled_adc*tgain,track->p);
595 jan_pve[0]->Fill(scaled_adc*tgain,track->p);
598 all_histo->Fill(scaled_adc*tgain);
599 pvsep->Fill(scaled_adc*tgain,track->p);
600 evsep->Fill(scaled_adc*tgain,track->p*scaled_adc*tgain);
601 tevsp->Fill(track->p,scaled_adc*tgain*track->p);
603 if(track->charge > 0)posep->Fill(scaled_adc*tgain);
604 if(track->charge < 0)negep->Fill(scaled_adc*tgain);
607 bsmde->Fill(bsmdeadctot);
608 bsmdp->Fill(bsmdpadctot);
609 bsmdep->Fill(bsmdeadctot,bsmdpadctot);
612 bsmde_outer->Fill(bsmdeadctot);
613 }
else if(abseta > 0.3){
614 bsmde_mid->Fill(bsmdeadctot);
616 bsmde_central->Fill(bsmdeadctot);
619 bsmdevp->Fill(track->p,bsmdeadctot);
620 bsmdpvp->Fill(track->p,bsmdpadctot);
621 bsmdevep->Fill(scaled_adc*tgain,bsmdeadctot);
622 bsmdpvep->Fill(scaled_adc*tgain,bsmdpadctot);
624 bsmdeve->Fill(scaled_adc*tgain*track->p,bsmdeadctot);
625 bsmdpve->Fill(scaled_adc*tgain*track->p,bsmdpadctot);
628 if(dR > 0.015)
continue;
629 if(track->tower_id[0] <= 2400){
630 west_histo->Fill(scaled_adc*tgain);
632 if(track->tower_id[0] > 2400){
633 east_histo->Fill(scaled_adc*tgain);
637 cout<<
"processed electron tree"<<endl;
638 cout<<
"ngoodhit: "<<ngoodhit<<endl;
639 cout<<
"nenterexit: "<<nenterexit<<endl;
640 cout<<
"n not trig: "<<nnottrig<<endl;
641 cout<<
"n p < 10: "<<nplt10<<endl;
642 cout<<
"n in fidu: "<<nfidu<<endl;
643 cout<<
"nbsmdhit: "<<nbsmdgood<<endl;
644 cout<<
"n no sis: "<<nnosis<<endl;
645 cout<<
"n final: "<<nfinal<<endl;
648 for(
int h=0;h<21;h++){
649 TH1D* projection = energyleak->ProjectionY(
"projection",h,h);
650 float mean = projection->GetMean();
651 energymean->SetBinContent(h,mean);
652 TH1D* projection1 = findbg->ProjectionY(
"projection1",h,h);
653 float mean1 = projection1->GetMean();
654 leakmean->SetBinContent(h,mean1);
655 TH1D* projection2 = tevsp->ProjectionY(
"projection2",h,h);
656 float mean2 = projection2->GetMean();
657 pmean->SetBinContent(h,mean2);
659 TH1D* projection3 = tevspcent->ProjectionY(
"projection3",h,h);
660 float mean3 = projection3->GetMean();
661 cmean->SetBinContent(h,mean3);
662 TH1D* projection4 = energyleak2->ProjectionY(
"projection4",h,h);
663 float mean4 = projection4->GetMean();
664 energymean2->SetBinContent(h,mean4);
665 TH1D* projection5 = multvsp->ProjectionY(
"projection5",h,h);
666 float mean5 = projection5->GetMean();
667 multmean->SetBinContent(h,mean5);
668 TH1D* projection6 = tep3->ProjectionY(
"projection6",h,h);
669 float mean6 = projection6->GetMean();
670 tep3mean->SetBinContent(h,mean6);
671 TH1D* projection7 = tep3->ProjectionY(
"projection7",h,h);
672 float mean7 = projection7->GetMean();
673 tep5mean->SetBinContent(h,mean7);
674 TH1D* projection8 = tep3->ProjectionY(
"projection8",h,h);
675 float mean8 = projection8->GetMean();
676 tep10mean->SetBinContent(h,mean8);
void loadTables(const char *sqlTime, const char *flavor="ofl")
load directly from DB, no Maker needed
int GetCrateFromTowerId(int softId, int &crate, int &sequence) const
Get crate number and position in crate for Software Id.
StEmcDecoder * getDecoder()
Return pointer to decoder.