@@ -555,7 +555,7 @@ InitStatus R3BTofDOnlineSpectra::Init()
555555 {
556556 char strNameLos_c[455 ];
557557 sprintf (strNameLos_c, " tofd_los_timediff_plane_%d" , i + 1 );
558- fh_tofd_time_los_h2[i] = R3B ::root_owned<TH2F >(strNameLos_c, strNameLos_c, 44 , 1 , 45 , 20000 , - 1400 , 1900 );
558+ fh_tofd_time_los_h2[i] = R3B ::root_owned<TH2F >(strNameLos_c, strNameLos_c, 44 , 0.5 , 44.5 , 2000 , 5 , 80 );
559559 fh_tofd_time_los_h2[i]->GetXaxis ()->SetTitle (" Bar" );
560560 fh_tofd_time_los_h2[i]->GetYaxis ()->SetTitle (" ToF [ns]" );
561561 fh_tofd_time_los_h2[i]->GetXaxis ()->CenterTitle (true );
@@ -600,7 +600,7 @@ InitStatus R3BTofDOnlineSpectra::Init()
600600
601601 auto cToFd_time_charge = new TCanvas (" tofd_time_vs_charge" , " " , 20 , 20 , 1120 , 1020 );
602602 fh2_tofd_time_vs_charge =
603- R3B ::root_owned<TH2F >(" fh2_tofd_time_vs_charge" , " Time vs Charge" , 10000 , 50 , 150 , 1000 , 0 , 12 );
603+ R3B ::root_owned<TH2F >(" fh2_tofd_time_vs_charge" , " Time vs Charge" , 10000 , 5 , 80 , 1000 , 0 , 12 );
604604 fh2_tofd_time_vs_charge->GetXaxis ()->SetTitle (" ToF [ns]" );
605605 fh2_tofd_time_vs_charge->GetYaxis ()->SetTitle (" Charge" );
606606 fh2_tofd_time_vs_charge->GetXaxis ()->CenterTitle (true );
@@ -618,7 +618,7 @@ InitStatus R3BTofDOnlineSpectra::Init()
618618 fh2_tofd_time_wouttrig_vs_charge->GetYaxis ()->CenterTitle (true );
619619 gPad ->SetLogz ();
620620 fh2_tofd_time_wouttrig_vs_charge->Draw (" colz" );
621- maintofd->Add (cToFd_time_wtrigger_charge);
621+ // maintofd->Add(cToFd_time_wtrigger_charge);
622622
623623 auto cToFd_charge_cor = new TCanvas (" tofd_Charge_correlations" , " " , 20 , 20 , 1120 , 1020 );
624624 cToFd_charge_cor->Divide (2 , 1 );
@@ -855,7 +855,7 @@ void R3BTofDOnlineSpectra::Exec(Option_t* option)
855855 }
856856 }
857857
858- std::vector<double > fTof_without_trig (44 , 0 .);
858+ // std::vector<double> fTof_without_trig(44, 0.);
859859 if (fCalItems )
860860 {
861861 UInt_t vmultihits[fNofPlanes + 1 ][fPaddlesPerPlane ];
@@ -1092,24 +1092,26 @@ void R3BTofDOnlineSpectra::Exec(Option_t* option)
10921092 fh2_tofd_ypos_cal[iPlane - 1 ]->Fill (iBar, dt_mod);
10931093 fh2_tofd_timedif_cal[iPlane - 1 ]->Fill (iBar, topc_ns);
10941094 fh2_tofd_timedif_cal[iPlane - 1 ]->Fill (-1 * iBar, botc_ns);
1095-
1096- if (topc->GetTimeLeading_ns () > 0 && header->GetTStartSimple () > 0 )
1097- {
1098- auto tof_without_trig_top =
1099- fTimeStitch ->GetTime (topc->GetTimeLeading_ns () - header->GetTStartSimple ());
1100- auto tof_without_trig_bot =
1101- fTimeStitch ->GetTime (botc->GetTimeLeading_ns () - header->GetTStartSimple ());
1102- auto mean_tof_trig = (tof_without_trig_top + tof_without_trig_bot) / 2 .;
1103- if (iPlane == 1 )
1104- {
1105- fTof_without_trig [iBar - 1 ] = mean_tof_trig + fTofcor [iBar - 1 ];
1106- fh2_tofd_time_los_cal[topc->GetDetectorId () - 1 ]->Fill (topc->GetBarId (),
1107- fTof_without_trig [iBar - 1 ]);
1108- }
1109- else
1110- fh2_tofd_time_los_cal[topc->GetDetectorId () - 1 ]->Fill (
1111- topc->GetBarId (), mean_tof_trig + fTofcor [44 * (topc->GetDetectorId () - 1 ) + iBar - 1 ]);
1112- }
1095+ /*
1096+ if (topc->GetTimeLeading_ns() > 0 && header->GetTStartSimple() > 0)
1097+ {
1098+ auto tof_without_trig_top =
1099+ fTimeStitch->GetTime(topc->GetTimeLeading_ns() -
1100+ header->GetTStartSimple()); auto tof_without_trig_bot =
1101+ fTimeStitch->GetTime(botc->GetTimeLeading_ns() -
1102+ header->GetTStartSimple()); auto mean_tof_trig = (tof_without_trig_top + tof_without_trig_bot)
1103+ / 2.; if (iPlane == 1)
1104+ {
1105+ fTof_without_trig[iBar - 1] = mean_tof_trig + fTofcor[iBar - 1];
1106+ fh2_tofd_time_los_cal[topc->GetDetectorId() - 1]->Fill(topc->GetBarId(),
1107+ fTof_without_trig[iBar
1108+ - 1]);
1109+ }
1110+ else
1111+ fh2_tofd_time_los_cal[topc->GetDetectorId() - 1]->Fill(
1112+ topc->GetBarId(), mean_tof_trig + fTofcor[44 *
1113+ (topc->GetDetectorId() - 1) + iBar - 1]);
1114+ }*/
11131115 }
11141116
11151117 if (std::abs (dt_mod) < fC_bar_coincidence_ns )
@@ -1225,11 +1227,11 @@ void R3BTofDOnlineSpectra::Exec(Option_t* option)
12251227 fh_tofd_Tot_hit[iPlane - 1 ]->Fill (bar[iPlane - 1 ][ictemp], q[iPlane - 1 ][ictemp]);
12261228 fh_tofd_time_hit[iPlane - 1 ]->Fill (bar[iPlane - 1 ][ictemp], t[iPlane - 1 ][ictemp]);
12271229 fh_tofd_bars[iPlane - 1 ]->Fill (hitTofd->GetBarId ());
1228- fh_tofd_time_los_h2[iPlane - 1 ]->Fill (hitTofd->GetBarId (), hitTofd->GetTof ());
1230+ fh_tofd_time_los_h2[iPlane - 1 ]->Fill (hitTofd->GetBarId (), hitTofd->GetTof () + 513 . );
12291231 fh_tofd_time_los[hitTofd->GetBarId () - 1 ][iPlane - 1 ]->Fill (hitTofd->GetTof ());
12301232 if (iPlane == 1 )
12311233 {
1232- fh2_tofd_time_vs_charge->Fill (hitTofd->GetTof (), hitTofd->GetEloss ());
1234+ fh2_tofd_time_vs_charge->Fill (hitTofd->GetTof () + 513 . , hitTofd->GetEloss ());
12331235 // fh2_tofd_time_wouttrig_vs_charge->Fill(fTof_without_trig[hitTofd->GetBarId() - 1],
12341236 // hitTofd->GetEloss());
12351237 }
@@ -1249,9 +1251,12 @@ void R3BTofDOnlineSpectra::Exec(Option_t* option)
12491251 fh2_tofd_charges12->Fill (charges[0 ], charges[1 ]);
12501252 if (abs (charges[0 ] - charges[1 ]) < 0.5 )
12511253 {
1252- auto ZCharge =
1253- 0.6213293 + 0.65953563445425 * TMath::Sqrt (charges[0 ] * charges[1 ]) +
1254- 0.039440822 * TMath::Sqrt (charges[0 ] * charges[1 ]) * TMath::Sqrt (charges[0 ] * charges[1 ]);
1254+ // auto ZCharge =
1255+ // 0.6213293 + 0.65953563445425 * TMath::Sqrt(charges[0] * charges[1]) +
1256+ // 0.039440822 * TMath::Sqrt(charges[0] * charges[1]) * TMath::Sqrt(charges[0] * charges[1]);
1257+
1258+ auto ZCharge = TMath::Sqrt (charges[0 ] * charges[1 ]);
1259+
12551260 fh1_Zcharge->Fill (ZCharge);
12561261 for (const auto & itpat : tpatindex)
12571262 fh2_zcharge_tpat->Fill (itpat, ZCharge);
0 commit comments