2 |
* FTrkScanQlook_EXPERT.cxx |
* FTrkScanQlook_EXPERT.cxx |
3 |
* |
* |
4 |
* autor: D.Fedele |
* autor: D.Fedele |
5 |
* version v1r15 |
* 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 |
|
if(i==0) cin=cod->Get(pctp->CalibTrk1); |
203 |
|
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; |
ev[0]=i+3; |
211 |
ev[1]=i+4; |
ev[1]=i+4; |
212 |
break; |
break; |
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 |
if(event==0) |
if(event<=0) |
225 |
event=ev[e]; |
event=ev[e]; |
226 |
else { |
else { |
227 |
event=event+e; |
event=event+e; |
228 |
if(event>ev[e] && ev[0]!=2) |
if(event>ev[e]-3 && ev[0]>2) |
229 |
cal="Event with online calibration"; |
cal="Event with online calibration"; |
230 |
else |
else |
231 |
cal="***** ONLINE CALIBRATION NOT FOUND IN THIS FILE *****"; |
cal="***** ONLINE CALIBRATION NOT FOUND IN THIS FILE *****"; |
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 |
} |
} |
549 |
else if(nn==8){ |
else if(nn==8){ |
550 |
b.SetFillColor(107); |
b.SetFillColor(107); |
551 |
b.SetFillStyle(3954); |
b.SetFillStyle(3954); |
552 |
b.DrawBox(512.,-500.,768.,4500); |
b.DrawBox(512.,-500.,768.,4500.); |
553 |
} |
} |
554 |
else if(nn==9){ |
else if(nn==9){ |
555 |
b.SetFillColor(107); |
b.SetFillColor(107); |
556 |
b.SetFillStyle(3954); |
b.SetFillStyle(3954); |
557 |
b.DrawBox(256.,-500.,384.,4500); |
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); |
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.,2560.,4500); |
b.DrawBox(1920.,-500.,2560.,4500.); |
575 |
} |
} |
576 |
c1[e]->Update(); |
c1[e]->Update(); |
577 |
} |
} |