2 |
* FTrkScanQlook_EXPERT.cxx |
* FTrkScanQlook_EXPERT.cxx |
3 |
* |
* |
4 |
* autor: D.Fedele |
* autor: D.Fedele |
5 |
* version v1r11 |
* version v1r18 |
6 |
* Parameters: |
* Parameters: |
7 |
* file - the path to the root file to analyze |
* file - the path to the root file to analyze |
8 |
* outdir - total path of output file |
* outdir - total path of output file |
141 |
pamela::EventHeader *eh=0,*eH=0; |
pamela::EventHeader *eh=0,*eH=0; |
142 |
pamela::PscuHeader *ph=0,*pH=0; |
pamela::PscuHeader *ph=0,*pH=0; |
143 |
pamela::RunHeaderEvent *reh=0; |
pamela::RunHeaderEvent *reh=0; |
144 |
|
pamela::EventCounter *cod=0; |
145 |
|
|
146 |
|
pamela::PacketType *pctp=0; |
147 |
// open files |
// open files |
148 |
TFile *trackerFile = new TFile(file); |
TFile *trackerFile = new TFile(file); |
149 |
if ( !trackerFile ){ |
if ( !trackerFile ){ |
175 |
printf(" Number of Header Entries: %d\n",neventH); |
printf(" Number of Header Entries: %d\n",neventH); |
176 |
|
|
177 |
Long64_t obt=0; |
Long64_t obt=0; |
178 |
Int_t ev[2]; |
Int_t ev[2],cin=0; |
179 |
TString cal=""; |
TString cal=""; |
180 |
|
|
181 |
ev[0]=0; |
ev[0]=3; |
182 |
ev[1]=0; |
ev[1]=4; |
183 |
for(Int_t i=0;i<neventH;i++){ |
for(Int_t i=0;i<neventH;i++){ |
184 |
otr->GetEntry(i); |
otr->GetEntry(i); |
185 |
pH = eH->GetPscuHeader(); |
pH = eH->GetPscuHeader(); |
194 |
ev[1]=3; |
ev[1]=3; |
195 |
} |
} |
196 |
} |
} |
197 |
if(ev[0]==0){ |
if(ev[0]==3){ |
198 |
for(Int_t i=0;i<nevents;i++){ |
for(Int_t i=0;i<nevents;i++){ |
199 |
tr->GetEntry(i); |
tr->GetEntry(i); |
200 |
ph = eh->GetPscuHeader(); |
ph = eh->GetPscuHeader(); |
201 |
if(ph->GetOrbitalTime()>obt){ |
cod = eh->GetCounter(); |
202 |
ev[0]=i+2; |
if(i==0) cin=cod->Get(pctp->CalibTrk1); |
203 |
ev[1]=i+3; |
if(reh->TRK_CALIB_USED==104) continue; |
204 |
|
if(event<0 && cod->Get(pctp->CalibTrk1)==cin+1){ |
205 |
|
ev[0]=i+3; |
206 |
|
ev[1]=i+4; |
207 |
|
break; |
208 |
|
} |
209 |
|
else if(event>=0 && ph->GetOrbitalTime()>obt){ |
210 |
|
ev[0]=i+3; |
211 |
|
ev[1]=i+4; |
212 |
break; |
break; |
213 |
} |
} |
214 |
} |
} |
221 |
TCanvas *c1[2]; |
TCanvas *c1[2]; |
222 |
|
|
223 |
for(Int_t e=0;e<2;e++){ |
for(Int_t e=0;e<2;e++){ |
224 |
event=ev[e]; |
if(event<=0) |
225 |
|
event=ev[e]; |
226 |
|
else { |
227 |
|
event=event+e; |
228 |
|
if(event>ev[e]-3 && ev[0]>2) |
229 |
|
cal="Event with online calibration"; |
230 |
|
else |
231 |
|
cal="***** ONLINE CALIBRATION NOT FOUND IN THIS FILE *****"; |
232 |
|
} |
233 |
printf("Scan of Entry %d\n",event); |
printf("Scan of Entry %d\n",event); |
234 |
|
|
235 |
tr->GetEntry(event); |
tr->GetEntry(event); |
509 |
if(icomp[nn]==1) histocomp[nn][e]->Draw("9bsame]["); |
if(icomp[nn]==1) histocomp[nn][e]->Draw("9bsame]["); |
510 |
if(imax[nn]==1) histomax[nn][e]->Draw("same]["); |
if(imax[nn]==1) histomax[nn][e]->Draw("same]["); |
511 |
histocomp[nn][e]->Draw("axis same"); |
histocomp[nn][e]->Draw("axis same"); |
512 |
if(nn==1){ |
if(nn==0){ |
513 |
|
b.SetFillColor(107); |
514 |
|
b.SetFillStyle(3945); |
515 |
|
b.DrawBox(768.,-500.,2047.,4500.); |
516 |
|
} |
517 |
|
else if(nn==1){ |
518 |
b.SetFillColor(6); |
b.SetFillColor(6); |
519 |
b.SetFillStyle(3945); |
b.SetFillStyle(3945); |
520 |
b.DrawBox(2944.,-500.,3060.,4500.); |
b.DrawBox(2944.,-500.,3060.,4500.); |
521 |
|
|
522 |
b.SetFillColor(107); |
b.SetFillColor(107); |
523 |
b.SetFillStyle(3954); |
b.SetFillStyle(3954); |
524 |
|
//b.DrawBox(384.,-500.,512.,4500.); |
525 |
b.DrawBox(2816.,-500.,2944.,4500.); |
b.DrawBox(2816.,-500.,2944.,4500.); |
526 |
b.DrawBox(2048.,-500.,2176.,4500.); |
b.DrawBox(2048.,-500.,2176.,4500.); |
527 |
} |
} |
546 |
b.SetFillStyle(3954); |
b.SetFillStyle(3954); |
547 |
b.DrawBox(512.,-500.,768.,4500.); |
b.DrawBox(512.,-500.,768.,4500.); |
548 |
} |
} |
549 |
|
else if(nn==8){ |
550 |
|
b.SetFillColor(107); |
551 |
|
b.SetFillStyle(3954); |
552 |
|
b.DrawBox(512.,-500.,768.,4500.); |
553 |
|
} |
554 |
|
else if(nn==9){ |
555 |
|
b.SetFillColor(107); |
556 |
|
b.SetFillStyle(3954); |
557 |
|
b.DrawBox(256.,-500.,384.,4500.); |
558 |
|
//b.DrawBox(1280.,-500.,1408.,4500.); |
559 |
|
//b.DrawBox(1792.,-500.,1920.,4500.); |
560 |
|
} |
561 |
|
else if(nn==10){ |
562 |
|
b.SetFillColor(107); |
563 |
|
b.SetFillStyle(3954); |
564 |
|
b.DrawBox(2048.,-500.,3070.,4500.); |
565 |
|
} |
566 |
else if(nn==11){ |
else if(nn==11){ |
567 |
b.SetFillColor(6); |
b.SetFillColor(6); |
568 |
b.SetFillStyle(3945); |
b.SetFillStyle(3945); |
570 |
|
|
571 |
b.SetFillColor(107); |
b.SetFillColor(107); |
572 |
b.SetFillStyle(3954); |
b.SetFillStyle(3954); |
573 |
b.DrawBox(0.,-500.,512.,4500); |
b.DrawBox(0.,-500.,512.,4500.); |
574 |
b.DrawBox(1920.,-500.,2048.,4500); |
b.DrawBox(1920.,-500.,2560.,4500.); |
|
b.DrawBox(2176.,-500.,2304.,4500); |
|
575 |
} |
} |
576 |
c1[e]->Update(); |
c1[e]->Update(); |
577 |
} |
} |