| 77 |
TString trcss[100]=""; |
TString trcss[100]=""; |
| 78 |
TString trgconf[31]={"TOF1","TOF2","TOF3","TOF4","TOF5","TOF6","TOF7","S4","CALO","CALO-S4","TOF1-S4","TOF2-S4","TOF3-S4","TOF4-S4","TOF5-S4","TOF6-S4","TOF7-S4","TOF1-CALO","TOF2-CALO","TOF3-CALO","TOF4-CALO","TOF5-CALO","TOF6-CALO","TOF7-CALO","TOF1-CALO-S4","TOF2-CALO-S4","TOF3-CALO-S4","TOF4-CALO-S4","TOF5-CALO-S4","TOF6-CALO-S4","TOF7-CALO-S4",}; |
TString trgconf[31]={"TOF1","TOF2","TOF3","TOF4","TOF5","TOF6","TOF7","S4","CALO","CALO-S4","TOF1-S4","TOF2-S4","TOF3-S4","TOF4-S4","TOF5-S4","TOF6-S4","TOF7-S4","TOF1-CALO","TOF2-CALO","TOF3-CALO","TOF4-CALO","TOF5-CALO","TOF6-CALO","TOF7-CALO","TOF1-CALO-S4","TOF2-CALO-S4","TOF3-CALO-S4","TOF4-CALO-S4","TOF5-CALO-S4","TOF6-CALO-S4","TOF7-CALO-S4",}; |
| 79 |
stringstream oss, oss1, oss2, oss3, s4soglia, buffer, conftrig, noentries; |
stringstream oss, oss1, oss2, oss3, s4soglia, buffer, conftrig, noentries; |
| 80 |
ULong_t lastime, firstime; |
ULong_t lastime, firstime, obt1; |
| 81 |
Int_t vardumpentries = 0; |
Int_t vardumpentries = 0; |
| 82 |
char S4_TRH[10]; |
char S4_TRH[10]; |
| 83 |
char S4_TRH2[10]; |
char S4_TRH2[10]; |
| 257 |
TH1F *h2 = new TH1F("S4 Triggered events", "S4 distribution for file: "+filename, adcmax, 10, adcmax+(adcmax/10)); |
TH1F *h2 = new TH1F("S4 Triggered events", "S4 distribution for file: "+filename, adcmax, 10, adcmax+(adcmax/10)); |
| 258 |
|
|
| 259 |
//********************** Second Histogram ************************************// |
//********************** Second Histogram ************************************// |
| 260 |
headBr->GetEntry(0); |
for (Int_t i = 0; i < nevents; i++){ |
| 261 |
ph = eh->GetPscuHeader(); |
headBr->GetEntry(i); |
| 262 |
firstime = ph->GetOrbitalTime(); |
ph = eh->GetPscuHeader(); |
| 263 |
headBr->GetEntry(nevents-1); |
obt1 = ph->GetOrbitalTime(); |
| 264 |
ph = eh->GetPscuHeader(); |
if(obt1 <= firstime) firstime=obt1; |
| 265 |
lastime = ph->GetOrbitalTime(); |
if(obt1 >= lastime) lastime=obt1; |
| 266 |
|
} |
| 267 |
obmin=firstime; |
obmin=firstime; |
| 268 |
obmax=lastime; |
obmax=lastime; |
| 269 |
const ULong_t nint=(((lastime-firstime)/(DeltaT*60000))); |
const ULong_t nint=(((lastime-firstime)/(DeltaT*60000))); |
| 280 |
title=filename+": S4 rate from Trigger Packet"; |
title=filename+": S4 rate from Trigger Packet"; |
| 281 |
|
|
| 282 |
const ULong_t nint3=(lastime-firstime); |
const ULong_t nint3=(lastime-firstime); |
| 283 |
const Int_t size3 = (Int_t)((nint3)/3); |
const Int_t size3 = (Int_t)((nint3)/100); |
| 284 |
|
|
| 285 |
TH1F *rate= new TH1F(title.c_str(), title.c_str(), nint3, obmin, obmax); |
TH1F *rate= new TH1F(title.c_str(), title.c_str(), nint3, obmin, obmax); |
| 286 |
TH1F *rateline= new TH1F(filename+": smoothed S4 rate", filename+": smoothed S4 rate", size3, obmin, obmax); |
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); |
| 287 |
|
|
| 288 |
//------------------------------------------------------------------------------------------------------------------ |
//------------------------------------------------------------------------------------------------------------------ |
| 289 |
//------- fill histograms ---------// |
//------- fill histograms ---------// |
| 300 |
h1->Fill(s4e->S4_DATA); |
h1->Fill(s4e->S4_DATA); |
| 301 |
Allev->Fill(obt,s4e->S4_DATA); |
Allev->Fill(obt,s4e->S4_DATA); |
| 302 |
Alltime->Fill(obt); |
Alltime->Fill(obt); |
| 303 |
if((i==n) && (s4rate >0)){ |
if ((trige->patterntrig[0] == 0) && (trige->patterntrig[1] != 0) &&(trige->patterntrig[2] == 0) && (trige->patterntrig[3] == 0) && (trige->patterntrig[4] == 0) && (trige->patterntrig[5] == 0)){ |
|
rateline->Fill(obt,s4rate); |
|
|
n=n+5; |
|
|
} |
|
|
if ((trige->patterntrig[0] == 0) && (trige->patterntrig[2] == 0) && (trige->patterntrig[3] == 0) && (trige->patterntrig[4] == 0) && (trige->patterntrig[5] == 0)){ |
|
| 304 |
h2->Fill(s4e->S4_DATA); |
h2->Fill(s4e->S4_DATA); |
| 305 |
S4ev->Fill(obt,s4e->S4_DATA); |
S4ev->Fill(obt,s4e->S4_DATA); |
| 306 |
S4time->Fill(obt); |
S4time->Fill(obt); |
| 307 |
p=p+1; |
p=p+1; |
| 308 |
} |
} |
| 309 |
} |
} |
| 310 |
|
Int_t kk=0; |
| 311 |
|
while (kk < nevents){ |
| 312 |
|
obt=0; |
| 313 |
|
s4rate=0; |
| 314 |
|
for(Int_t jj=kk; jj< (kk+100); jj++){ |
| 315 |
|
TriggerBr->GetEntry(jj); |
| 316 |
|
headBr->GetEntry(jj); |
| 317 |
|
obt = obt+(ph->GetOrbitalTime()); |
| 318 |
|
s4rate= s4rate+(trige->s4calcount[0]); |
| 319 |
|
} |
| 320 |
|
rateline->Fill((obt/100),(s4rate/100)); |
| 321 |
|
kk=kk+100; |
| 322 |
|
} |
| 323 |
|
|
| 324 |
//****************************** Canvases *******************************// |
//****************************** Canvases *******************************// |
| 325 |
//------------------- First Canvas --------------------------------// |
//------------------- First Canvas --------------------------------// |