| 48 |
#include "TGraph.h" |
#include "TGraph.h" |
| 49 |
#include "TH1F.h" |
#include "TH1F.h" |
| 50 |
#include "TF1.h" |
#include "TF1.h" |
| 51 |
|
#include "TH2F.h" |
| 52 |
|
#include "TF2.h" |
| 53 |
#include "TGaxis.h" |
#include "TGaxis.h" |
| 54 |
#include "TString.h" |
#include "TString.h" |
| 55 |
#include "TPaveText.h" |
#include "TPaveText.h" |
| 75 |
TString filename = ((TObjString*)base.Tokenize('/')->Last())->GetString(); |
TString filename = ((TObjString*)base.Tokenize('/')->Last())->GetString(); |
| 76 |
filename = ((TObjString*)filename.Tokenize('.')->First())->GetString(); |
filename = ((TObjString*)filename.Tokenize('.')->First())->GetString(); |
| 77 |
char *trc; |
char *trc; |
| 78 |
TString trcs; |
TString trcs,ciao; |
| 79 |
TString str; |
TString str; |
| 80 |
TString trcsstot[31]; |
TString trcsstot[31]; |
| 81 |
TString trcsstot2; |
TString trcsstot2; |
| 262 |
ph = eh->GetPscuHeader(); |
ph = eh->GetPscuHeader(); |
| 263 |
firstime = ph->GetOrbitalTime(); |
firstime = ph->GetOrbitalTime(); |
| 264 |
|
|
| 265 |
int iii =0; |
headBr->GetEntry(nevents); |
| 266 |
|
ph = eh->GetPscuHeader(); |
| 267 |
|
lastime = ph->GetOrbitalTime(); |
| 268 |
|
headBr->GetEntry(nevents-100); |
| 269 |
|
ph = eh->GetPscuHeader(); |
| 270 |
|
if(lastime-ph->GetOrbitalTime()> 100000) nevents=nevents-100; |
| 271 |
|
int iii=0,MaxR=0; |
| 272 |
while(iii < nevents){ |
while(iii < nevents){ |
| 273 |
headBr->GetEntry(iii); |
headBr->GetEntry(iii); |
| 274 |
ph = eh->GetPscuHeader(); |
ph = eh->GetPscuHeader(); |
| 275 |
if((ph->GetOrbitalTime()) <= firstime) firstime=ph->GetOrbitalTime(); |
if((ph->GetOrbitalTime()) <= firstime) firstime=ph->GetOrbitalTime(); |
| 276 |
if((ph->GetOrbitalTime()) >= lastime) lastime=ph->GetOrbitalTime(); |
if((ph->GetOrbitalTime()) >= lastime) lastime=ph->GetOrbitalTime(); |
| 277 |
|
TriggerBr->GetEntry(iii); |
| 278 |
|
if(trige->s4calcount[0]>MaxR)MaxR=trige->s4calcount[0]; |
| 279 |
iii++; |
iii++; |
| 280 |
} |
} |
| 281 |
|
MaxR=10+2*(MaxR/2); |
| 282 |
|
|
| 283 |
obmin=firstime; |
obmin=firstime; |
| 284 |
obmax=lastime; |
obmax=lastime; |
| 285 |
const ULong_t nint=(((lastime-firstime)/(DeltaT*60000))); |
const ULong_t nint=(((lastime-firstime)/(DeltaT*60000))); |
| 298 |
const Int_t size2 = (Int_t)((nint2+1)); // one bin every 10 second |
const Int_t size2 = (Int_t)((nint2+1)); // one bin every 10 second |
| 299 |
const ULong_t nint3=(lastime-firstime)/1000; |
const ULong_t nint3=(lastime-firstime)/1000; |
| 300 |
const Int_t size3 = (Int_t)((nint3+1)); // one bin every 1 second |
const Int_t size3 = (Int_t)((nint3+1)); // one bin every 1 second |
| 301 |
TH1F *rate= new TH1F(title.c_str(), title.c_str(), size2, obmin, obmax); |
const Int_t Rbin = MaxR/2; |
| 302 |
TH1F *rateline= new TH1F(filename+". S4 rate from Trigger Packet: mean value over 100 events", filename+". S4 rate from Trigger Packet: mean value over 100 events", size3, obmin, obmax); |
TH2I *rate= new TH2I(title.c_str(), title.c_str(), size2,obmin,obmax,Rbin,0,MaxR); |
| 303 |
|
TH2I *rateline= new TH2I(filename+". S4 rate from Trigger Packet: mean value over 100 events", filename+". S4 rate from Trigger Packet: mean value over 100 events",size3,obmin,obmax,Rbin,0,MaxR); |
| 304 |
|
|
| 305 |
//------------------------------------------------------------------------------------------------------------------ |
//------------------------------------------------------------------------------------------------------------------ |
| 306 |
//------- fill histograms ---------// |
//------- fill histograms ---------// |
| 311 |
S4Br->GetEntry(i); |
S4Br->GetEntry(i); |
| 312 |
ph = eh->GetPscuHeader(); |
ph = eh->GetPscuHeader(); |
| 313 |
if (s4e->unpackError == 1 && (s4e->S4_DATA)==0) continue; |
if (s4e->unpackError == 1 && (s4e->S4_DATA)==0) continue; |
| 314 |
s4rate= trige->s4calcount[0]; |
rate->Fill(ph->GetOrbitalTime(),trige->s4calcount[0]); |
|
rate->Fill(ph->GetOrbitalTime(), s4rate); |
|
| 315 |
h1->Fill(s4e->S4_DATA); |
h1->Fill(s4e->S4_DATA); |
| 316 |
Allev->Fill(ph->GetOrbitalTime(),s4e->S4_DATA); |
Allev->Fill(ph->GetOrbitalTime(),s4e->S4_DATA); |
| 317 |
Alltime->Fill(ph->GetOrbitalTime()); |
Alltime->Fill(ph->GetOrbitalTime()); |
| 323 |
} |
} |
| 324 |
} |
} |
| 325 |
Int_t kk=0; |
Int_t kk=0; |
| 326 |
|
Double_t Aobt=0; |
| 327 |
while (kk < nevents){ |
while (kk < nevents){ |
| 328 |
obt=0; |
obt=0; |
| 329 |
s4rate=0; |
s4rate=0; |
| 330 |
|
Aobt=0; |
| 331 |
for(Int_t jj=kk; jj< (kk+100); jj++){ |
for(Int_t jj=kk; jj< (kk+100); jj++){ |
| 332 |
TriggerBr->GetEntry(jj); |
TriggerBr->GetEntry(jj); |
| 333 |
headBr->GetEntry(jj); |
headBr->GetEntry(jj); |
| 334 |
obt = obt+(ph->GetOrbitalTime()); |
obt = obt+(ph->GetOrbitalTime()); |
| 335 |
s4rate= s4rate+(trige->s4calcount[0]); |
s4rate= s4rate+(trige->s4calcount[0]); |
| 336 |
|
Aobt=Aobt+((ph->GetOrbitalTime())-obmin)*(trige->s4calcount[0]); |
| 337 |
} |
} |
| 338 |
rateline->Fill((obt/100),(s4rate/100)); |
rateline->Fill((Aobt/s4rate)+obmin,(s4rate/100)); |
| 339 |
kk=kk+100; |
kk=kk+100; |
| 340 |
} |
} |
| 341 |
|
|