diff --git a/run/macros/td_mcp2_tof.C b/run/macros/td_mcp2_tof.C index 2c33aa9..ecca1d6 100644 --- a/run/macros/td_mcp2_tof.C +++ b/run/macros/td_mcp2_tof.C @@ -11,13 +11,14 @@ void td_mcp2_tof(const char* fname) Double_t tofTD[NSIZE], tofMCP2[NSIZE], EventIDTD[NSIZE], EventIDMCP2[NSIZE]; Long64_t i, j, k, nEventsTD, nEventsMCP2; TTree *t1; - TH1D *htof, *tof_mcp2, *tof_td; + TH1D *htof, *tof_mcp2_plane, *tof_td; TFile* f1 = new TFile(fname); t1 = (TTree*) gDirectory->FindObjectAny("t1"); // muon time-of-flight to TD t1->Draw("eventID:1000*save_time","save_detID==890&&((save_particleID==-13)||(save_particleID==-1313))"); //0, 2 +// t1->Draw("eventID:1000*save_time","save_detID==890&&save_particleID==-1313"); //0, 2 nEventsTD = t1->GetSelectedRows(); ptofTD = t1->GetV2(); pEventIDTD = t1->GetV1(); @@ -28,7 +29,8 @@ void td_mcp2_tof(const char* fname) } // muon time-of-flight to MCP2, mu+ or Mu - t1->Draw("eventID:1000*save_time","save_detID==902&&((save_particleID==-13)||(save_particleID==-1313))"); //0, 2 + t1->Draw("eventID:1000*save_time","save_detID==902&&((save_particleID==-13)||(save_particleID==-1313))&&sqrt(save_x**2+save_y**2)<=20"); //0, 2 +// t1->Draw("eventID:1000*save_time","save_detID==902&&save_particleID==-1313"); //0, 2 nEventsMCP2 = t1->GetSelectedRows(); ptofMCP2 = t1->GetV2(); pEventIDMCP2 = t1->GetV1(); @@ -79,17 +81,17 @@ void td_mcp2_tof(const char* fname) // muon time-of-flight to MCP2 c1->cd(2); - t1->Draw("1000*save_time >> tof_mcp2(2000, 0.25, 1000.25)","save_detID==902&&((save_particleID==-13)||(save_particleID==-1313))"); //0, 2 - tof_mcp2 = (TH1D*) gDirectory->Get("tof_mcp2"); - tof_mcp2->SetTitle("Time-of-flight to MCP2"); - tof_mcp2->GetXaxis()->SetTitle("MCP2 time of flight (ns)"); + t1->Draw("1000*save_time >> tof_mcp2_plane(2000, 0.25, 1000.25)","save_detID==902&&((save_particleID==-13)||(save_particleID==-1313))"); //0, 2 + tof_mcp2_plane = (TH1D*) gDirectory->Get("tof_mcp2_plane"); + tof_mcp2_plane->SetTitle("Time-of-flight to plane of MCP2 (including muons missing MCP2)"); + tof_mcp2_plane->GetXaxis()->SetTitle("MCP2 time of flight (ns)"); // tof_mcp2->GetXaxis()->SetNdivisions(405); - tof_mcp2->GetYaxis()->SetNdivisions(406); + tof_mcp2_plane->GetYaxis()->SetNdivisions(406); // tof_mcp2->GetXaxis()->SetTickLength(0.018); - tof_mcp2->GetYaxis()->SetTickLength(0.018); - tof_mcp2->Draw("F"); - tof_mcp2->SetFillStyle(1001); - tof_mcp2->Draw(); + tof_mcp2_plane->GetYaxis()->SetTickLength(0.018); + tof_mcp2_plane->Draw("F"); + tof_mcp2_plane->SetFillStyle(1001); + tof_mcp2_plane->Draw(); c1->cd(3); htof->SetTitle("Time-of-flight TD-MCP2");