57 |
TString OUTF; |
TString OUTF; |
58 |
TString LIST; |
TString LIST; |
59 |
TString OPTIONS; |
TString OPTIONS; |
60 |
|
TString CALIBF; |
61 |
|
|
62 |
PamLevel2 *pam_event = NULL; |
PamLevel2 *pam_event = NULL; |
63 |
|
|
76 |
pam_event->SetSELLI(2); |
pam_event->SetSELLI(2); |
77 |
TTree::SetMaxTreeSize(1000*Long64_t(2000000000)); |
TTree::SetMaxTreeSize(1000*Long64_t(2000000000)); |
78 |
// |
// |
79 |
TString outfile_t =0; |
TString outfile_t = ""; |
80 |
outfile_t = OUTF; |
outfile_t = OUTF; |
81 |
outfile_t.Append("b.root"); |
outfile_t.Append(".root"); |
82 |
TFile *outft = (TFile*)gROOT->FindObject(outfile_t); |
TFile *outft = (TFile*)gROOT->FindObject(outfile_t); |
83 |
if (outft) outft->Close(); |
if (outft) outft->Close(); |
84 |
outft = new TFile(outfile_t,"RECREATE"); |
outft = new TFile(outfile_t,"RECREATE"); |
90 |
// |
// |
91 |
outft->cd(); |
outft->cd(); |
92 |
ToFLevel2 *tof = new ToFLevel2(); |
ToFLevel2 *tof = new ToFLevel2(); |
93 |
|
ToFdEdx *tofdedx = new ToFdEdx(); |
94 |
TTree *toft = new TTree("ToF","PAMELA Level2 ToF data"); |
TTree *toft = new TTree("ToF","PAMELA Level2 ToF data"); |
95 |
toft->SetAutoSave(900000000000000LL); |
toft->SetAutoSave(900000000000000LL); |
96 |
tof->Set();//ELENA **TEMPORANEO?** |
tof->Set();//ELENA **TEMPORANEO?** |
100 |
// |
// |
101 |
Int_t ntrkentry = 0; |
Int_t ntrkentry = 0; |
102 |
Int_t npmtentry = 0; |
Int_t npmtentry = 0; |
103 |
|
Float_t xleft=0; |
104 |
|
Float_t xright=0; |
105 |
|
Float_t yleft=0; |
106 |
|
Float_t yright=0; |
107 |
// |
// |
108 |
ULong64_t nevents = pam_event->GetEntries(); |
ULong64_t nevents = pam_event->GetEntries(); |
109 |
printf("\n\n Running on %llu events \n\n",nevents); |
printf("\n\n Running on %llu events \n\n",nevents); |
173 |
// printf(" rhtime %u myrun %i mysrun %i \n",pam_event->GetRunInfo()->RUNHEADER_TIME,(int)myrun,(int)mysrun); |
// printf(" rhtime %u myrun %i mysrun %i \n",pam_event->GetRunInfo()->RUNHEADER_TIME,(int)myrun,(int)mysrun); |
174 |
mysrun = myrun; |
mysrun = myrun; |
175 |
// |
// |
176 |
Int_t error=glparam->Query_GL_PARAM(pam_event->GetRunInfo()->RUNHEADER_TIME,201,dbc); // parameters stored in DB in GL_PRAM table |
|
177 |
|
|
178 |
|
|
179 |
|
|
180 |
|
Int_t error=glparam->Query_GL_PARAM(pam_event->GetRunInfo()->RUNHEADER_TIME,204,dbc); // parameters stored in DB in GL_PRAM table |
181 |
|
if ( error<0 ) { |
182 |
|
return(1); |
183 |
|
}; |
184 |
|
// |
185 |
|
tofdedx->ReadParAtt((glparam->PATH+glparam->NAME).Data()); |
186 |
|
|
187 |
|
// |
188 |
|
error=glparam->Query_GL_PARAM(pam_event->GetRunInfo()->RUNHEADER_TIME,205,dbc); // parameters stored in DB in GL_PRAM table |
189 |
|
if ( error<0 ) { |
190 |
|
return(1); |
191 |
|
}; |
192 |
|
// |
193 |
|
tofdedx->ReadParPos((glparam->PATH+glparam->NAME).Data()); |
194 |
|
|
195 |
|
// |
196 |
|
error=glparam->Query_GL_PARAM(pam_event->GetRunInfo()->RUNHEADER_TIME,206,dbc); // parameters stored in DB in GL_PRAM table |
197 |
|
if ( error<0 ) { |
198 |
|
return(1); |
199 |
|
}; |
200 |
|
// |
201 |
|
tofdedx->ReadParBBneg((glparam->PATH+glparam->NAME).Data()); |
202 |
|
|
203 |
|
// |
204 |
|
error=glparam->Query_GL_PARAM(pam_event->GetRunInfo()->RUNHEADER_TIME,207,dbc); // parameters stored in DB in GL_PRAM table |
205 |
|
if ( error<0 ) { |
206 |
|
return(1); |
207 |
|
}; |
208 |
|
// |
209 |
|
tofdedx->ReadParBBpos((glparam->PATH+glparam->NAME).Data()); |
210 |
|
|
211 |
|
// |
212 |
|
error=glparam->Query_GL_PARAM(pam_event->GetRunInfo()->RUNHEADER_TIME,208,dbc); // parameters stored in DB in GL_PRAM table |
213 |
|
if ( error<0 ) { |
214 |
|
return(1); |
215 |
|
}; |
216 |
|
// |
217 |
|
tofdedx->ReadParDesatBB((glparam->PATH+glparam->NAME).Data()); |
218 |
|
|
219 |
|
|
220 |
|
tofdedx->CheckConnectors(pam_event->GetRunInfo()->RUNHEADER_TIME,glparam,dbc); |
221 |
|
|
222 |
|
|
223 |
|
|
224 |
|
error=glparam->Query_GL_PARAM(pam_event->GetRunInfo()->RUNHEADER_TIME,201,dbc); // parameters stored in DB in GL_PRAM table |
225 |
if ( error<0 ) { |
if ( error<0 ) { |
226 |
return(1); |
return(1); |
227 |
}; |
}; |
240 |
//================================================================ |
//================================================================ |
241 |
//================================================================== |
//================================================================== |
242 |
//--- Define absolute time |
//--- Define absolute time |
243 |
Float_t tabs=pam_event->GetOrbitalInfo()->absTime; |
UInt_t tabs=pam_event->GetOrbitalInfo()->absTime; |
244 |
|
|
245 |
|
if ( !(iev%1000) ) printf(" ATIME %u re %u \n",(Int_t)tabs,(UInt_t)iev); |
246 |
|
|
247 |
//================================================================== |
//================================================================== |
248 |
Float_t dedx_corr_m[2000][48],dedx_corr[48]; |
Float_t dedx_corr_m[2000][48],dedx_corr[48]; |
261 |
//----------------------------------------------------------- |
//----------------------------------------------------------- |
262 |
|
|
263 |
jj=0; |
jj=0; |
264 |
|
printf(" READING NEW CALIBRATION FILE: %s \n",CALIBF.Data()); |
265 |
|
|
266 |
ifstream fin("adcmonitor.7th.100k.cut.dat"); |
ifstream fin(CALIBF.Data()); |
267 |
|
|
268 |
while (! fin.eof()) { |
while (! fin.eof()) { |
269 |
fin>>t1>>tm>>t2; |
fin>>t1>>tm>>t2; |
317 |
thelp2 = mtime[ical+1]; |
thelp2 = mtime[ical+1]; |
318 |
|
|
319 |
for (ii=0; ii<48;ii++) { |
for (ii=0; ii<48;ii++) { |
320 |
yhelp1 = dedx_corr_m[ical][ii]; |
yhelp1 = fabs(dedx_corr_m[ical][ii]); |
321 |
yhelp2 = dedx_corr_m[ical+1][ii]; |
// yhelp1 = 6.; |
322 |
|
if ( yhelp1 < 0.1 ) yhelp1 = 4.; |
323 |
|
yhelp2 = fabs(dedx_corr_m[ical+1][ii]); |
324 |
|
// yhelp2 = 6.; |
325 |
|
if ( yhelp2 < 0.1 ) yhelp2 = 4.; |
326 |
slope = (yhelp2-yhelp1)/(thelp2-thelp1); |
slope = (yhelp2-yhelp1)/(thelp2-thelp1); |
327 |
inter = yhelp1 - slope*thelp1; |
inter = yhelp1 - slope*thelp1; |
328 |
dedx_corr[ii] = slope*tabs + inter; |
dedx_corr[ii] = slope*tabs + inter; |
377 |
// Int_t pppid = tof->GetPMTid(hh,gg); |
// Int_t pppid = tof->GetPMTid(hh,gg); |
378 |
// printf(" pm %i pmt_id %i pppid %i hh %i gg %i tdcc %f tdc %f adc %f \n",pm,pmt->pmt_id,pppid,hh,gg,pmt->tdc_tw,pmt->tdc,pmt->adc); |
// printf(" pm %i pmt_id %i pppid %i hh %i gg %i tdcc %f tdc %f adc %f \n",pm,pmt->pmt_id,pppid,hh,gg,pmt->tdc_tw,pmt->tdc,pmt->adc); |
379 |
}; |
}; |
380 |
|
for (Int_t hh=0; hh<12;hh++){ |
381 |
|
for (Int_t kk=0; kk<4;kk++){ |
382 |
|
tofdedx->Init(kk,hh,adc[kk][hh]); |
383 |
|
}; |
384 |
|
}; |
385 |
// for (Int_t pm=0; pm <48 ; pm++){ |
// for (Int_t pm=0; pm <48 ; pm++){ |
386 |
// tof->GetPMTIndex(pm, gg, hh); |
// tof->GetPMTIndex(pm, gg, hh); |
387 |
// tofinput_.tdc[hh][gg] = (int)500.; |
// tofinput_.tdc[hh][gg] = (int)500.; |
437 |
t_tof->beta[kk] = tofoutput_.betatof_a[kk]; |
t_tof->beta[kk] = tofoutput_.betatof_a[kk]; |
438 |
} |
} |
439 |
// |
// |
|
t_tof->npmtadc = 0; |
|
|
for (Int_t hh=0; hh<12;hh++){ |
|
|
for (Int_t kk=0; kk<4;kk++){ |
|
|
if ( tofoutput_.adctof_c[hh][kk] < 1000 ){ |
|
|
// t_tof->dedx.AddAt(tofoutput_.adctof_c[hh][kk],t_tof->npmtadc); // EMILIANO |
|
|
pmt_id = tof->GetPMTid(kk,hh); |
|
|
t_tof->dedx.AddAt((tofoutput_.adctof_c[hh][kk]*4./dedx_corr[pmt_id]),t_tof->npmtadc); // EMILIANO |
|
|
t_tof->pmtadc.AddAt(pmt_id,t_tof->npmtadc); |
|
|
t_tof->adcflag.AddAt(tofoutput_.adcflagtof[hh][kk],t_tof->npmtadc); // gf: Jan 09/07 |
|
|
t_tof->npmtadc++; |
|
|
}; |
|
|
}; |
|
|
}; |
|
|
// |
|
440 |
memcpy(t_tof->xtofpos,tofoutput_.xtofpos,sizeof(t_tof->xtofpos)); |
memcpy(t_tof->xtofpos,tofoutput_.xtofpos,sizeof(t_tof->xtofpos)); |
441 |
memcpy(t_tof->ytofpos,tofoutput_.ytofpos,sizeof(t_tof->ytofpos)); |
memcpy(t_tof->ytofpos,tofoutput_.ytofpos,sizeof(t_tof->ytofpos)); |
442 |
memcpy(t_tof->xtr_tof,tofoutput_.xtr_tof,sizeof(t_tof->xtr_tof)); |
memcpy(t_tof->xtr_tof,tofoutput_.xtr_tof,sizeof(t_tof->xtr_tof)); |
443 |
memcpy(t_tof->ytr_tof,tofoutput_.ytr_tof,sizeof(t_tof->ytr_tof)); |
memcpy(t_tof->ytr_tof,tofoutput_.ytr_tof,sizeof(t_tof->ytr_tof)); |
444 |
// |
// { |
445 |
new(t[ntrkentry]) ToFTrkVar(*t_tof); |
// Float_t xtof_temp[6]={0.,t_tof->xtofpos[0],t_tof->xtofpos[1],0.,0.,t_tof->xtofpos[2]}; |
446 |
ntrkentry++; |
// Float_t ytof_temp[6]={t_tof->ytofpos[0],0.,0.,t_tof->ytofpos[1],t_tof->ytofpos[2],0.}; |
447 |
t_tof->Clear(); |
// tofdedx->Process(pam_event->GetOrbitalInfo()->absTime,t_tof->beta[12], (Float_t *)xtof_temp,(Float_t *)ytof_temp); |
448 |
// |
// } |
449 |
// |
// t_tof->npmtadc = 0; |
450 |
// |
|
451 |
t_pmt->Clear(); |
|
452 |
// |
// for (Int_t hh=0; hh<12;hh++){ |
453 |
|
// for (Int_t kk=0; kk<4;kk++){ |
454 |
|
// pmt_id = tof->GetPMTid(kk,hh); |
455 |
|
// if ( tofdedx->GetdEdx_pmt(pmt_id)>-1. ){ |
456 |
|
// t_tof->dedx.AddAt((tofdedx->GetdEdx_pmt(pmt_id)*36./pow(dedx_corr[pmt_id],2)),t_tof->npmtadc); |
457 |
|
// t_tof->pmtadc.AddAt(pmt_id,t_tof->npmtadc); |
458 |
|
// t_tof->adcflag.AddAt(0,t_tof->npmtadc); // gf: Jan 09/07 |
459 |
|
// t_tof->npmtadc++; |
460 |
|
// }; |
461 |
|
// }; |
462 |
|
// }; |
463 |
|
{ |
464 |
|
|
465 |
|
Float_t xtof_temp[6]={100.,100.,100.,100.,100.,100.}; |
466 |
|
Float_t ytof_temp[6]={100.,100.,100.,100.,100.,100.}; |
467 |
|
|
468 |
|
if(t_tof->xtofpos[0]<100. && t_tof->ytofpos[0]<100.){ |
469 |
|
xtof_temp[1]=t_tof->xtofpos[0]; |
470 |
|
ytof_temp[0]=t_tof->ytofpos[0]; |
471 |
|
}else if(t_tof->xtofpos[0]>=100. && t_tof->ytofpos[0]<100.){ |
472 |
|
ytof_temp[0]=t_tof->ytofpos[0]; |
473 |
|
tof->GetPaddleGeometry(0,(Int_t)log2(tof->tof_j_flag[0]),xleft, xright, yleft, yright); |
474 |
|
xtof_temp[1]=xleft+2.55; |
475 |
|
}else if(t_tof->ytofpos[0]>=100. && t_tof->xtofpos[0]<100.){ |
476 |
|
xtof_temp[1]=t_tof->xtofpos[0]; |
477 |
|
tof->GetPaddleGeometry(1,(Int_t)log2(tof->tof_j_flag[1]),xleft, xright, yleft, yright); |
478 |
|
ytof_temp[0]=yleft+2.75; |
479 |
|
} |
480 |
|
|
481 |
|
if(t_tof->xtofpos[1]<100. && t_tof->ytofpos[1]<100.){ |
482 |
|
xtof_temp[2]=t_tof->xtofpos[1]; |
483 |
|
ytof_temp[3]=t_tof->ytofpos[1]; |
484 |
|
}else if(t_tof->xtofpos[1]>=100. && t_tof->ytofpos[1]<100.){ |
485 |
|
ytof_temp[3]=t_tof->ytofpos[1]; |
486 |
|
tof->GetPaddleGeometry(3,(Int_t)log2(tof->tof_j_flag[3]),xleft, xright, yleft, yright); |
487 |
|
xtof_temp[2]=xleft+4.5; |
488 |
|
}else if(t_tof->ytofpos[1]>=100. && t_tof->xtofpos[1]<100.){ |
489 |
|
xtof_temp[2]=t_tof->xtofpos[1]; |
490 |
|
tof->GetPaddleGeometry(2,(Int_t)log2(tof->tof_j_flag[2]),xleft, xright, yleft, yright); |
491 |
|
ytof_temp[3]=yleft+3.75; |
492 |
|
} |
493 |
|
|
494 |
|
if(t_tof->xtofpos[2]<100. && t_tof->ytofpos[2]<100.){ |
495 |
|
xtof_temp[5]=t_tof->xtofpos[2]; |
496 |
|
ytof_temp[4]=t_tof->ytofpos[2]; |
497 |
|
}else if(t_tof->xtofpos[2]>=100. && t_tof->ytofpos[2]<100.){ |
498 |
|
ytof_temp[4]=t_tof->ytofpos[2]; |
499 |
|
tof->GetPaddleGeometry(4,(Int_t)log2(tof->tof_j_flag[4]),xleft, xright, yleft, yright); |
500 |
|
xtof_temp[5]=xleft+3; |
501 |
|
}else if(t_tof->ytofpos[2]>=100. && t_tof->xtofpos[2]<100.){ |
502 |
|
xtof_temp[5]=t_tof->xtofpos[2]; |
503 |
|
tof->GetPaddleGeometry(5,(Int_t)log2(tof->tof_j_flag[5]),xleft, xright, yleft, yright); |
504 |
|
ytof_temp[4]=yleft+2.5; |
505 |
|
} |
506 |
|
// Float_t xtof_temp[6]={0.,t_tof->xtofpos[0],t_tof->xtofpos[1],0.,0.,t_tof->xtofpos[2]}; |
507 |
|
// Float_t ytof_temp[6]={t_tof->ytofpos[0],0.,0.,t_tof->ytofpos[1],t_tof->ytofpos[2],0.}; |
508 |
|
// tofdedx->Process(atime,t_tof->beta[12], (Float_t *)xtof_temp,(Float_t *)ytof_temp); |
509 |
|
tofdedx->Process(pam_event->GetOrbitalInfo()->absTime,t_tof->beta[12], (Float_t *)xtof_temp,(Float_t *)ytof_temp); |
510 |
|
t_tof->npmtadc = 0; |
511 |
|
for (Int_t hh=0; hh<12;hh++){ |
512 |
|
for (Int_t kk=0; kk<4;kk++){ |
513 |
|
pmt_id = tof->GetPMTid(kk,hh); |
514 |
|
Int_t Iplane=-1; |
515 |
|
Int_t Ipaddle=-1; |
516 |
|
// Int_t IpaddleT=-1; |
517 |
|
tof->GetPMTPaddle(pmt_id, Iplane, Ipaddle); |
518 |
|
tof->GetPaddleGeometry(Iplane,Ipaddle,xleft,xright,yleft,yright); |
519 |
|
if ( tofdedx->GetdEdx_pmt(pmt_id)>-1. &&((xtof_temp[Iplane]>=xleft&&xtof_temp[Iplane]<=xright) || (ytof_temp[Iplane]>=yleft&&ytof_temp[Iplane]<=yright)) ){ //attenzione:qui va inserito un controllo sulla traccia tof o sulle variabili di posizione !!!! |
520 |
|
t_tof->dedx.AddAt((tofdedx->GetdEdx_pmt(pmt_id)*4./dedx_corr[pmt_id]),t_tof->npmtadc); |
521 |
|
t_tof->pmtadc.AddAt(pmt_id,t_tof->npmtadc); |
522 |
|
t_tof->adcflag.AddAt(0,t_tof->npmtadc); // gf: Jan 09/07 |
523 |
|
t_tof->npmtadc++; |
524 |
|
}; |
525 |
|
}; |
526 |
|
}; |
527 |
|
}; |
528 |
|
|
529 |
|
|
530 |
|
|
531 |
|
|
532 |
|
|
533 |
|
|
534 |
|
|
535 |
|
|
536 |
|
|
537 |
|
|
538 |
|
// for (Int_t hh=0; hh<12;hh++){ |
539 |
|
// for (Int_t kk=0; kk<4;kk++){ |
540 |
|
// if ( tofoutput_.adctof_c[hh][kk] < 1000 ){ |
541 |
|
// // t_tof->dedx.AddAt(tofoutput_.adctof_c[hh][kk],t_tof->npmtadc); // EMILIANO |
542 |
|
// pmt_id = tof->GetPMTid(kk,hh); |
543 |
|
// t_tof->dedx.AddAt((tofoutput_.adctof_c[hh][kk]*4./dedx_corr[pmt_id]),t_tof->npmtadc); // EMILIANO |
544 |
|
// t_tof->pmtadc.AddAt(pmt_id,t_tof->npmtadc); |
545 |
|
// t_tof->adcflag.AddAt(tofoutput_.adcflagtof[hh][kk],t_tof->npmtadc); // gf: Jan 09/07 |
546 |
|
// t_tof->npmtadc++; |
547 |
|
// }; |
548 |
|
// }; |
549 |
|
// }; |
550 |
|
// |
551 |
|
|
552 |
|
// |
553 |
|
new(t[ntrkentry]) ToFTrkVar(*t_tof); |
554 |
|
ntrkentry++; |
555 |
|
t_tof->Clear(); |
556 |
|
// |
557 |
|
// |
558 |
|
// |
559 |
|
t_pmt->Clear(); |
560 |
|
// |
561 |
for (Int_t hh=0; hh<12;hh++){ |
for (Int_t hh=0; hh<12;hh++){ |
562 |
for (Int_t kk=0; kk<4;kk++){ |
for (Int_t kk=0; kk<4;kk++){ |
563 |
// new WM |
// new WM |
594 |
for (Int_t e = 0; e < 5 ; e++){ |
for (Int_t e = 0; e < 5 ; e++){ |
595 |
tofinput_.al_pp[e] = ptt->al[e]; |
tofinput_.al_pp[e] = ptt->al[e]; |
596 |
}; |
}; |
597 |
|
|
598 |
|
// new input for 9th reduction: tracker dEdx |
599 |
|
tofinput_.trkmip = ptt->GetDEDX(); |
600 |
|
|
601 |
// |
// |
602 |
// Get tracker related variables for this track |
// Get tracker related variables for this track |
603 |
// |
// |
621 |
t_tof->beta[kk] = tofoutput_.beta_a[kk]; |
t_tof->beta[kk] = tofoutput_.beta_a[kk]; |
622 |
}; |
}; |
623 |
// |
// |
624 |
|
memcpy(t_tof->xtofpos,tofoutput_.xtofpos,sizeof(t_tof->xtofpos)); |
625 |
|
memcpy(t_tof->ytofpos,tofoutput_.ytofpos,sizeof(t_tof->ytofpos)); |
626 |
|
memcpy(t_tof->xtr_tof,tofoutput_.xtr_tof,sizeof(t_tof->xtr_tof)); |
627 |
|
memcpy(t_tof->ytr_tof,tofoutput_.ytr_tof,sizeof(t_tof->ytr_tof)); |
628 |
|
// |
629 |
|
tofdedx->Process(pam_event->GetOrbitalInfo()->absTime,t_tof->beta[12], (Float_t *)t_tof->xtr_tof,(Float_t *)t_tof->ytr_tof); |
630 |
t_tof->npmtadc = 0; |
t_tof->npmtadc = 0; |
631 |
|
|
632 |
for (Int_t hh=0; hh<12;hh++){ |
for (Int_t hh=0; hh<12;hh++){ |
633 |
for (Int_t kk=0; kk<4;kk++){ |
for (Int_t kk=0; kk<4;kk++){ |
634 |
if ( tofoutput_.adc_c[hh][kk] < 1000 ){ |
pmt_id = tof->GetPMTid(kk,hh); |
635 |
// t_tof->dedx.AddAt(tofoutput_.adc_c[hh][kk],t_tof->npmtadc); // EMILIANO |
Int_t Iplane=-1; |
636 |
pmt_id = tof->GetPMTid(kk,hh); |
Int_t Ipaddle=-1; |
637 |
t_tof->dedx.AddAt((tofoutput_.adc_c[hh][kk]*4./dedx_corr[pmt_id]),t_tof->npmtadc); // EMILIANO |
Int_t IpaddleT=-1; |
638 |
|
tof->GetPMTPaddle(pmt_id, Iplane, Ipaddle); |
639 |
|
IpaddleT=tof->GetPaddleIdOfTrack(t_tof->xtr_tof[Iplane],t_tof->ytr_tof[Iplane], Iplane,0.0); |
640 |
|
if ( tofdedx->GetdEdx_pmt(pmt_id) > -1. && Ipaddle==IpaddleT ){ |
641 |
|
t_tof->dedx.AddAt((tofdedx->GetdEdx_pmt(pmt_id)*4./dedx_corr[pmt_id]),t_tof->npmtadc); |
642 |
t_tof->pmtadc.AddAt(pmt_id,t_tof->npmtadc); |
t_tof->pmtadc.AddAt(pmt_id,t_tof->npmtadc); |
643 |
t_tof->adcflag.AddAt(tofoutput_.adcflag[hh][kk],t_tof->npmtadc); // gf: Jan 09/07 |
t_tof->adcflag.AddAt(0,t_tof->npmtadc); // gf: Jan 09/07 |
644 |
t_tof->npmtadc++; |
t_tof->npmtadc++; |
645 |
}; |
}; |
646 |
|
|
647 |
}; |
}; |
648 |
}; |
}; |
649 |
|
|
650 |
|
|
651 |
|
// for (Int_t hh=0; hh<12;hh++){ |
652 |
|
// for (Int_t kk=0; kk<4;kk++){ |
653 |
|
// pmt_id = tof->GetPMTid(kk,hh); |
654 |
|
// if ( tofdedx->GetdEdx_pmt(pmt_id) > -1. ){ |
655 |
|
// t_tof->dedx.AddAt((tofdedx->GetdEdx_pmt(pmt_id)*36./pow(dedx_corr[pmt_id],2)),t_tof->npmtadc); |
656 |
|
// t_tof->pmtadc.AddAt(pmt_id,t_tof->npmtadc); |
657 |
|
// t_tof->adcflag.AddAt(0,t_tof->npmtadc); // gf: Jan 09/07 |
658 |
|
// printf(" nt %i npmtadc %i dedx %f dedx corr %f\n",nt,t_tof->npmtadc,(tofdedx->GetdEdx_pmt(pmt_id)*36./pow(dedx_corr[pmt_id],2)),dedx_corr[pmt_id]); |
659 |
|
// t_tof->npmtadc++; |
660 |
|
// }; |
661 |
|
|
662 |
|
// }; |
663 |
|
// }; |
664 |
|
// t_tof->npmtadc = 0; |
665 |
|
// for (Int_t hh=0; hh<12;hh++){ |
666 |
|
// for (Int_t kk=0; kk<4;kk++){ |
667 |
|
// if ( tofoutput_.adc_c[hh][kk] < 1000 ){ |
668 |
|
// // t_tof->dedx.AddAt(tofoutput_.adc_c[hh][kk],t_tof->npmtadc); // EMILIANO |
669 |
|
// pmt_id = tof->GetPMTid(kk,hh); |
670 |
|
// t_tof->dedx.AddAt((tofoutput_.adc_c[hh][kk]*4./dedx_corr[pmt_id]),t_tof->npmtadc); // EMILIANO |
671 |
|
// t_tof->pmtadc.AddAt(pmt_id,t_tof->npmtadc); |
672 |
|
// t_tof->adcflag.AddAt(tofoutput_.adcflag[hh][kk],t_tof->npmtadc); // gf: Jan 09/07 |
673 |
|
// t_tof->npmtadc++; |
674 |
|
// }; |
675 |
|
// }; |
676 |
|
// }; |
677 |
// |
// |
678 |
memcpy(t_tof->xtofpos,tofoutput_.xtofpos,sizeof(t_tof->xtofpos)); |
|
|
memcpy(t_tof->ytofpos,tofoutput_.ytofpos,sizeof(t_tof->ytofpos)); |
|
|
memcpy(t_tof->xtr_tof,tofoutput_.xtr_tof,sizeof(t_tof->xtr_tof)); |
|
|
memcpy(t_tof->ytr_tof,tofoutput_.ytr_tof,sizeof(t_tof->ytr_tof)); |
|
679 |
// |
// |
680 |
// Store the tracker track number in order to be sure to have shyncronized data during analysis |
// Store the tracker track number in order to be sure to have shyncronized data during analysis |
681 |
// |
// |
737 |
cout << "-processDir DIR - Level2 data directory \n"; |
cout << "-processDir DIR - Level2 data directory \n"; |
738 |
cout << "-processList LIST - list of files (.txt) or single file (.root) to be analysed \n"; |
cout << "-processList LIST - list of files (.txt) or single file (.root) to be analysed \n"; |
739 |
cout << "-outputFile PATH - name of the output file \n"; |
cout << "-outputFile PATH - name of the output file \n"; |
740 |
|
cout << "-calibFile PATH+NAME - name of the calibration file \n"; |
741 |
cout << "-NumEvents XXX - number of events to be analysed \n"; |
cout << "-NumEvents XXX - number of events to be analysed \n"; |
742 |
cout << "--debug, -g - debug mode \n"; |
cout << "--debug, -g - debug mode \n"; |
743 |
cout << "--help, -h - print this help \n"; |
cout << "--help, -h - print this help \n"; |
788 |
continue; |
continue; |
789 |
} |
} |
790 |
// -----------------------------------------------------// |
// -----------------------------------------------------// |
791 |
|
// -----------------------------------------------------// |
792 |
|
else if (!strcmp(argv[i], "-calibFile")){ |
793 |
|
if (++i >= argc) throw -1; |
794 |
|
CALIBF = gSystem->ExpandPathName(argv[i]); |
795 |
|
cout << "calibFile "<<CALIBF<<endl; |
796 |
|
continue; |
797 |
|
} |
798 |
|
// -----------------------------------------------------// |
799 |
else if (!strcmp(argv[i], "-options")){ |
else if (!strcmp(argv[i], "-options")){ |
800 |
if (++i >= argc) throw -1; |
if (++i >= argc) throw -1; |
801 |
OPTIONS = argv[i]; |
OPTIONS = argv[i]; |