@@ -6,9 +6,46 @@ R__LOAD_LIBRARY(EpicAnalysis)
66// plot eta vs. p in one bin, for PID coverage requests
77void postprocess_eta_vs_p_forPID (TString infile = "out/coverage.fastsim.root" ) {
88 PostProcessor * P = new PostProcessor (infile );
9- P -> Op ()-> Payload ( [& P ](Histos * H ) {
10- P -> DrawSingle (H ,"etaVsP" ,"COLZ" );
11- });
9+ auto draw_payload = [& P ] (Histos * H ) {
10+ auto draw_formatting = [] (auto hist , auto canv ) {
11+ gStyle -> SetPalette (kBird );
12+ std ::vector < std ::tuple < TString ,TBox * ,Color_t >> limits ;
13+ limits .push_back ({
14+ "#splitline{dRICH}{gas}" ,
15+ new TBox (
16+ 9.5 , // p min
17+ 1.3 , // eta min
18+ 50.0 , // p max
19+ 3.7 // eta max
20+ ),
21+ kRed
22+ });
23+ limits .push_back ({
24+ "#splitline{dRICH}{aerogel}" ,
25+ new TBox (
26+ 2.0 , // p min
27+ 1.3 , // eta min
28+ 10.3 , // p max
29+ 3.7 // eta max
30+ ),
31+ kBlue
32+ });
33+ for (auto [name ,box ,color ] : limits ) {
34+ auto box_line = (TBox * ) box -> Clone ();
35+ box -> SetFillColorAlpha (color ,0.3 );
36+ box -> Draw ();
37+ box_line -> SetLineWidth (3 );
38+ box_line -> SetFillStyle (kFEmpty );
39+ box_line -> SetLineColor (color );
40+ box_line -> Draw ();
41+ auto text = new TLatex (1.1 * box -> GetX1 (), (box -> GetY1 ()+ box -> GetY2 ())/2 , name );
42+ text -> SetTextColor (color );
43+ text -> Draw ();
44+ }
45+ };
46+ P -> DrawSingle (H , "etaVsP" , "COLZ" , 0 , false, draw_formatting );
47+ };
48+ P -> Op ()-> Payload (draw_payload );
1249 P -> Execute ();
1350 P -> Finish ();
1451}
0 commit comments