| 61 | Int_t    yTrig=0; | Int_t    yTrig=0; | 
| 62 | Int_t    yUpperBackground=0; | Int_t    yUpperBackground=0; | 
| 63 | Int_t    yBottomBackground=0; | Int_t    yBottomBackground=0; | 
| 64 | ULong_t  lastime=0, firstime=0, obt1=0; | ULong_t  lastime=0, firstime=700000000; | 
| 65 | Double_t scale= 1./DeltaTevtime; | Double_t scale= 1./DeltaTevtime; | 
| 66 | stringstream title, title1; | stringstream title, title1; | 
| 67 | double obt; | double obt; | 
|  | Float_t     cut; |  | 
| 68 | stringstream oss, noentries; | stringstream oss, noentries; | 
| 69 | stringstream oss1, oss2, oss3; | stringstream oss1, oss2, oss3; | 
| 70 |  |  | 
| 131 | } | } | 
| 132 |  |  | 
| 133 | //------------ first and last  events ->  nbin ---------------------------------// | //------------ first and last  events ->  nbin ---------------------------------// | 
| 134 | for (Int_t i = 0; i < nevents; i++){ | headBr->GetEntry(0); | 
| 135 |  | ph = eh->GetPscuHeader(); | 
| 136 |  | firstime = ph->GetOrbitalTime(); | 
| 137 |  |  | 
| 138 |  | for (Int_t i = 0; i < nevents; i++){ | 
| 139 | headBr->GetEntry(i); | headBr->GetEntry(i); | 
| 140 | ph = eh->GetPscuHeader(); | ph = eh->GetPscuHeader(); | 
| 141 | obt1 = ph->GetOrbitalTime(); | if((ph->GetOrbitalTime()) <= firstime) firstime=ph->GetOrbitalTime(); | 
| 142 | if(obt1 <= firstime) firstime=obt1; | if((ph->GetOrbitalTime()) >= lastime) lastime=ph->GetOrbitalTime(); | 
|  | if(obt1 >= lastime) lastime=obt1; |  | 
| 143 | } | } | 
|  |  |  | 
|  | const Double_t nint=((lastime-firstime)/(DeltaTevtime*60000)); |  | 
|  | const Double_t nint1=((lastime-firstime)/(DeltaT));// |  | 
|  | const Double_t nint2=lastime-firstime; |  | 
|  | int nbin=(int)nint; |  | 
|  | int nbin1=(int)nint1; |  | 
|  | int nbin2=(int)nint2; |  | 
|  | double obmin=firstime; |  | 
|  | double obmax=lastime; |  | 
| 144 |  |  | 
| 145 |  | const Double_t nint=((lastime-firstime)/(DeltaTevtime*60000)); | 
| 146 |  | const Double_t nint1=((lastime-firstime)/(DeltaT));// | 
| 147 |  | const Double_t nint2=lastime-firstime; | 
| 148 |  | int nbin=(int)nint; | 
| 149 |  | int nbin1=(int)nint1; | 
| 150 |  | int nbin2=(int)nint2; | 
| 151 |  | if(nbin2 >= 37000000) nbin2=37000000; | 
| 152 |  | double obmin=firstime; | 
| 153 |  | double obmax=lastime; | 
| 154 |  |  | 
| 155 | //************************** HISTOGRAMS ***************************************************// | //************************** HISTOGRAMS ***************************************************// | 
| 156 | //---------------------------- First histograms -----------------------------------------// | //---------------------------- First histograms -----------------------------------------// | 
| 157 | oss.str(""); | oss.str(""); | 
| 168 | TH1F *histo1= new TH1F(title.str().c_str(),title.str().c_str(),nbin,obmin,obmax); | TH1F *histo1= new TH1F(title.str().c_str(),title.str().c_str(),nbin,obmin,obmax); | 
| 169 | TH1F *histo1bis= new TH1F(title1.str().c_str(),title1.str().c_str(),nbin,obmin,obmax); | TH1F *histo1bis= new TH1F(title1.str().c_str(),title1.str().c_str(),nbin,obmin,obmax); | 
| 170 | TH1F *histo2= new TH1F(title.str().c_str(),title.str().c_str(),nbin,obmin,obmax); | TH1F *histo2= new TH1F(title.str().c_str(),title.str().c_str(),nbin,obmin,obmax); | 
| 171 |  |  | 
| 172 | //---------------------------- Third histograms -----------------------------------------// | //---------------------------- Third histograms -----------------------------------------// | 
| 173 |  |  | 
| 174 | oss.str(""); | oss.str(""); | 
| 201 | histo2->Fill(ph->GetOrbitalTime(), yBottomBackground); | histo2->Fill(ph->GetOrbitalTime(), yBottomBackground); | 
| 202 | h1->Fill(ph->GetOrbitalTime(), yBottomBackground); | h1->Fill(ph->GetOrbitalTime(), yBottomBackground); | 
| 203 | h3->Fill(ph->GetOrbitalTime(), yUpperBackground); | h3->Fill(ph->GetOrbitalTime(), yUpperBackground); | 
| 204 |  |  | 
| 205 | Trig->Fill(ph->GetOrbitalTime(), yTrig); | Trig->Fill(ph->GetOrbitalTime(), yTrig); | 
| 206 | Trigger->Fill(ph->GetOrbitalTime(), yTrig); | Trigger->Fill(ph->GetOrbitalTime(), yTrig); | 
| 207 | if(yTrig >=10) | if(yTrig >=10) | 
| 232 | histoCanv->Divide(1,2); | histoCanv->Divide(1,2); | 
| 233 |  |  | 
| 234 | histoCanv->cd(1); | histoCanv->cd(1); | 
| 235 |  | gPad->SetLogy(); | 
| 236 | h1bis->SetLineColor(kRed); | h1bis->SetLineColor(kRed); | 
| 237 | h1bis->SetFillStyle(3004); | h1bis->SetFillStyle(3004); | 
| 238 | h1bis->SetFillColor(kRed); | h1bis->SetFillColor(kRed); | 
| 243 | h1bis->Draw(); | h1bis->Draw(); | 
| 244 |  |  | 
| 245 | histoCanv->cd(2); | histoCanv->cd(2); | 
| 246 |  | gPad->SetLogy(); | 
| 247 | h3bis->SetLineColor(kBlue); | h3bis->SetLineColor(kBlue); | 
| 248 | h3bis->SetFillStyle(3004); | h3bis->SetFillStyle(3004); | 
| 249 | h3bis->SetFillColor(kBlue); | h3bis->SetFillColor(kBlue); | 
| 270 | histo1->GetXaxis()->SetTitleOffset(1); | histo1->GetXaxis()->SetTitleOffset(1); | 
| 271 | histo1->GetXaxis()->SetLabelSize(0.03); | histo1->GetXaxis()->SetLabelSize(0.03); | 
| 272 | histo1->GetXaxis()->SetTitle("OBT   (ms)"); | histo1->GetXaxis()->SetTitle("OBT   (ms)"); | 
| 273 | histo1->SetMarkerSize(.5); | histo1->SetMarkerSize(.3); | 
| 274 | histo1->SetMarkerStyle(21); | histo1->SetMarkerStyle(21); | 
| 275 | histo1->SetMarkerColor(3); | histo1->SetMarkerColor(3); | 
| 276 | histo1->Scale(scale); | histo1->Scale(scale); | 
| 278 | histo1->Draw("9p0"); | histo1->Draw("9p0"); | 
| 279 |  |  | 
| 280 | histo2->SetStats(kFALSE); | histo2->SetStats(kFALSE); | 
| 281 | histo2->SetMarkerSize(.5); | histo2->SetMarkerSize(.3); | 
| 282 | histo2->SetMarkerStyle(21); | histo2->SetMarkerStyle(21); | 
| 283 | histo2->SetMarkerColor(2); | histo2->SetMarkerColor(2); | 
| 284 | histo2->Scale(scale); | histo2->Scale(scale); | 
| 291 | leg->Draw(); | leg->Draw(); | 
| 292 |  |  | 
| 293 | finalCanv->cd(2); | finalCanv->cd(2); | 
| 294 | histo1bis->SetMarkerSize(.5); | histo1bis->SetMarkerSize(.3); | 
| 295 | histo1bis->SetStats(kFALSE); | histo1bis->SetStats(kFALSE); | 
| 296 | histo1bis->SetMarkerStyle(21); | histo1bis->SetMarkerStyle(21); | 
| 297 | histo1bis->SetMarkerColor(4); | histo1bis->SetMarkerColor(4); | 
| 331 | triggerCanv->cd(1); | triggerCanv->cd(1); | 
| 332 | Trig->SetStats(kFALSE); | Trig->SetStats(kFALSE); | 
| 333 | Trig->SetMarkerStyle(21); | Trig->SetMarkerStyle(21); | 
| 334 | Trig->SetMarkerSize(.7); | Trig->SetMarkerSize(.4); | 
| 335 | Trig->SetMarkerColor(2); | Trig->SetMarkerColor(2); | 
| 336 | Trig->GetXaxis()->SetTitle("OBT (ms)"); | Trig->GetXaxis()->SetTitle("OBT (ms)"); | 
| 337 | Trig->GetXaxis()->CenterTitle(); | Trig->GetXaxis()->CenterTitle(); | 
| 347 | triggerCanv->cd(2); | triggerCanv->cd(2); | 
| 348 | Trigger->SetStats(kFALSE); | Trigger->SetStats(kFALSE); | 
| 349 | Trigger->SetMarkerStyle(21); | Trigger->SetMarkerStyle(21); | 
| 350 | Trigger->SetMarkerSize(.7); | Trigger->SetMarkerSize(.4); | 
| 351 | Trigger->SetMarkerColor(4); | Trigger->SetMarkerColor(4); | 
| 352 | Trigger->GetYaxis()->SetTitle("Number of Neutrons"); | Trigger->GetYaxis()->SetTitle("Number of Neutrons"); | 
| 353 | Trigger->GetYaxis()->SetTitleSize(0.06); | Trigger->GetYaxis()->SetTitleSize(0.06); | 
| 364 | triggerCanv->cd(3); | triggerCanv->cd(3); | 
| 365 | Triggercut->SetStats(kFALSE); | Triggercut->SetStats(kFALSE); | 
| 366 | Triggercut->SetMarkerStyle(21); | Triggercut->SetMarkerStyle(21); | 
| 367 | Triggercut->SetMarkerSize(.7); | Triggercut->SetMarkerSize(.4); | 
| 368 | Triggercut->SetMarkerColor(4); | Triggercut->SetMarkerColor(4); | 
| 369 | Triggercut->GetYaxis()->SetTitle("Number of Neutrons"); | Triggercut->GetYaxis()->SetTitle("Number of Neutrons"); | 
| 370 | Triggercut->GetYaxis()->SetTitleSize(0.06); | Triggercut->GetYaxis()->SetTitleSize(0.06); | 
| 409 | TString outDir        ="./"; | TString outDir        ="./"; | 
| 410 | TString format        ="jpg"; | TString format        ="jpg"; | 
| 411 | ULong_t DeltaT        =1000;//era 1000 | ULong_t DeltaT        =1000;//era 1000 | 
| 412 | Double_t DeltaTevtime  =5; | Double_t DeltaTevtime  =1; | 
| 413 |  |  | 
| 414 | if (argc < 2){ | if (argc < 2){ | 
| 415 | printf("You have to insert at least the file to analyze \n"); | printf("You have to insert at least the file to analyze \n"); |