ATLAS Offline Software
MdtVsTgcRawData_bookhistograms.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 // Package : MdtVsTgcRawDataValAlg
7 // Author: M.King(Kobe)
8 // Feb. 2011
9 //
10 // DESCRIPTION:
11 // Subject: TGC Efficiency -->TGC Efficiency plots including EIFI by comparing with MDT Segments
13 
14 #include "MdtVsTgcRawDataValAlg.h"
15 
16 #include <TH1F.h>
17 #include <TH2F.h>
18 #include <TH1.h>
19 #include <TH2.h>
20 #include <TF1.h>
21 
22 #include <sstream>
23 #include <algorithm>
24 #include <fstream>
25 
28  MonGroup &mdtvstgclv1_expert_c){
29 
30  std::stringstream sst;
31  std::string AC[2]= {"A","C"};
32  int nbins3D_1[4]= { 0, 0, 0, 0};
33  float fGlobalCoords3Dlo[4]= { 0, 0, 0, 0};
34  float fGlobalCoords3Dup[4]= { 0, 0, 0, 0};
35  // **************************************************************
36  // ** maphists
37  // **************************************************************
39  // Number of~ hists
40  nbins3D_1[0]= 480; nbins3D_1[1]= 120; nbins3D_1[2]= 128; nbins3D_1[3]= 100;
41  fGlobalCoords3Dlo[0]= 0; fGlobalCoords3Dlo[1]= 0; fGlobalCoords3Dlo[2]= 0; fGlobalCoords3Dlo[3]= 0;
42  fGlobalCoords3Dup[0]= 12000; fGlobalCoords3Dup[1]= 3; fGlobalCoords3Dup[2]= 2*M_PI; fGlobalCoords3Dup[3]= 0.5*M_PI;
43  for(int i=0;i<2;i++){// AC
44  // nEvents passing cut criteria
45  sst<<"EffCheck_CutsPassed_"<<AC[i];
46  ATH_MSG_DEBUG("EffCheck_CutsPassed "<<i<<" "<<sst.str().c_str() );
47  m_mvt_cutspassed[i] =new TH1I(sst.str().c_str(), sst.str().c_str(), 14, 1, 15);
48  if(i==0){
49  ATH_CHECK( mdtvstgclv1_expert_a.regHist(m_mvt_cutspassed[i]) );
50  }else{
51  ATH_CHECK( mdtvstgclv1_expert_c.regHist(m_mvt_cutspassed[i]) );
52  }
53 
54  m_mvt_cutspassed[i]->GetYaxis()->SetTitle("nEvents");
55  m_mvt_cutspassed[i]->GetXaxis()->SetBinLabel(1, "Events");
56  m_mvt_cutspassed[i]->GetXaxis()->SetBinLabel(2, "matchedSegm=0");
57  m_mvt_cutspassed[i]->GetXaxis()->SetBinLabel(3, "matchedSegm>1");
58  m_mvt_cutspassed[i]->GetXaxis()->SetBinLabel(4, "matchedSegm=1");
59  m_mvt_cutspassed[i]->GetXaxis()->SetBinLabel(5, "+HasEIFI");
60  m_mvt_cutspassed[i]->GetXaxis()->SetBinLabel(6, "EIFIMatch");
61  m_mvt_cutspassed[i]->GetXaxis()->SetBinLabel(7, "+HasT1");
62  m_mvt_cutspassed[i]->GetXaxis()->SetBinLabel(8, "T1Match");
63  m_mvt_cutspassed[i]->GetXaxis()->SetBinLabel(9,"+HasT2");
64  m_mvt_cutspassed[i]->GetXaxis()->SetBinLabel(10,"T2Match");
65  m_mvt_cutspassed[i]->GetXaxis()->SetBinLabel(11,"+HasT3");
66  m_mvt_cutspassed[i]->GetXaxis()->SetBinLabel(12,"T3Match");
67  m_mvt_cutspassed[i]->GetXaxis()->SetBinLabel(13,"AllStationsMatch");
68  m_mvt_cutspassed[i]->GetXaxis()->SetBinLabel(14,"AllLayersMatch");
69  sst.str("");
70  }// AC
71 
72 
74  // Distributions
75  nbins3D_1[0]= 600; nbins3D_1[1]= 120; nbins3D_1[2]= 128; nbins3D_1[3]= 128;
76  fGlobalCoords3Dlo[0]= 0; fGlobalCoords3Dlo[1]= 0; fGlobalCoords3Dlo[2]= 0; fGlobalCoords3Dlo[3]= 0;
77  fGlobalCoords3Dup[0]= 12000; fGlobalCoords3Dup[1]= 3; fGlobalCoords3Dup[2]= 2*M_PI; fGlobalCoords3Dup[3]= 0.5*M_PI;
78  for(int i=0;i<2;i++){// AC
79  for(int jMDT=0;jMDT<4;jMDT++){// MDT Station
80  // MDT Segm Eta vs Phi
81  sst<<"MDT_SegmMap_MDT"<<jMDT+1;
82  sst<<"_"<<AC[i];
83  ATH_MSG_DEBUG("MDT_SegmMap "<<i<<" "<<jMDT<<" "<<sst.str().c_str() );
84  m_mdt_segmmap[i][jMDT] =new TH2F(sst.str().c_str(),sst.str().c_str(), nbins3D_1[2], fGlobalCoords3Dlo[2], fGlobalCoords3Dup[2], nbins3D_1[1], fGlobalCoords3Dlo[1], fGlobalCoords3Dup[1]);
85  if(i==0){
86  ATH_CHECK( mdtvstgclv1_expert_a.regHist(m_mdt_segmmap[i][jMDT]) );
87  }else{
88  ATH_CHECK( mdtvstgclv1_expert_c.regHist(m_mdt_segmmap[i][jMDT]) );
89  }
90 
91  m_mdt_segmmap[i][jMDT]->GetXaxis()->SetTitle("MDT Phi");
92  m_mdt_segmmap[i][jMDT]->GetYaxis()->SetTitle("MDT Eta");
93  sst.str("");
94  }// MDT Station
95  }// AC
96  return StatusCode::SUCCESS;
97 }
98 
101  MonGroup &mdtvstgclv1_expert_c){
102 
103  std::stringstream sst;
104  std::string AC[2]= {"A","C"};
105  std::string RhoEtaPhiThe[4]={"Rho","Eta","Phi","Theta"};
106  std::string RhoEtaPhiZ[4]= {"Rho","Eta","Phi","Z"};
107  std::string FE[2]= {"F","E"};// Forward, Endcap
108  std::string EffNumDenom[4]= {"","num","denom","error"};
109  std::string WireStrip[2]= {"Wire","Strip"};
110  int nbins3D_1[4]= { 0, 0, 0, 0};
111  float fGlobalCoords3Dlo[4]= { 0, 0, 0, 0};
112  float fGlobalCoords3Dup[4]= { 0, 0, 0, 0};
113  // **************************************************************
114  // ** EffCheck
115  // **************************************************************
117  // Efficiencies
118  nbins3D_1[0]= 100; nbins3D_1[1]= 8; nbins3D_1[2]= 48; nbins3D_1[3]= 100;
119  fGlobalCoords3Dlo[0]= -1000; fGlobalCoords3Dlo[1]= -1; fGlobalCoords3Dlo[2]= -M_PI; fGlobalCoords3Dlo[3]= 0;
120  fGlobalCoords3Dup[0]= 1000; fGlobalCoords3Dup[1]= 1; fGlobalCoords3Dup[2]= M_PI; fGlobalCoords3Dup[3]= 0.5*M_PI;
121  for(int i=0;i<2;i++){// AC
122  for(int k=0;k<2;k++){// WireStrip
123  for(int e=0;e<4;e++){// EffNumDenom
124  // Station Efficiency Map Segm Track
125  sst<<WireStrip[k];
126  sst<<"_EfficiencyAgainstMDT";
127  sst<<"_MapSegmTrack"<<EffNumDenom[e];
128  sst<<"_"<<AC[i];
129  ATH_MSG_DEBUG("Eff_StationMapBase "<<i<<" "<<k<<" "<<e<<sst.str().c_str() );
130  m_eff_stationmapbase[i][k][e]=new TH2F( sst.str().c_str(), sst.str().c_str(),43, 0, 43, 48, 0, 48 );
131  if(i==0){
132  ATH_CHECK( mdtvstgclv1_expert_a.regHist(m_eff_stationmapbase[i][k][e]) );
133  }else{
134  ATH_CHECK( mdtvstgclv1_expert_c.regHist(m_eff_stationmapbase[i][k][e]) );
135  }
136 
138  sst.str("");
139 
140  // Station Efficiency Map Midstation Segments
141  sst<<WireStrip[k];
142  sst<<"_EfficiencyAgainstMDT";
143  sst<<"_MapMidOnly"<<EffNumDenom[e];
144  sst<<"_"<<AC[i];
145  ATH_MSG_DEBUG("Eff_StationMapMid "<<i<<" "<<k<<" "<<e<<sst.str().c_str() );
146  m_eff_stationmapmid[i][k][e]=new TH2F( sst.str().c_str(), sst.str().c_str(),43, 0, 43, 48, 0, 48 );
147  if(i==0){
148  ATH_CHECK( mdtvstgclv1_expert_a.regHist(m_eff_stationmapmid[i][k][e]) );
149  }else{
150  ATH_CHECK( mdtvstgclv1_expert_c.regHist(m_eff_stationmapmid[i][k][e]) );
151  }
152 
154  sst.str("");
155 
156  // Station Efficiency Map Total
157  sst<<WireStrip[k];
158  sst<<"_EfficiencyAgainstMDT";
159  sst<<"_Map"<<EffNumDenom[e];
160  sst<<"_"<<AC[i];
161  ATH_MSG_DEBUG("Eff_StationMap "<<i<<" "<<k<<" "<<e<<sst.str().c_str() );
162  m_eff_stationmap[i][k][e]=new TH2F( sst.str().c_str(), sst.str().c_str(),43, 0, 43, 48, 0, 48 );
163  if(i==0){
164  ATH_CHECK( mdtvstgclv1_expert_a.regHist(m_eff_stationmap[i][k][e]) );
165  }else{
166  ATH_CHECK( mdtvstgclv1_expert_c.regHist(m_eff_stationmap[i][k][e]) );
167  }
168 
170  sst.str("");
171  }// EffNumDenom
172  }// WireStrip
173  }// AC
174 
176  // Sagittas
177 
178 
179  nbins3D_1[0]= 8000; nbins3D_1[1]= 200; nbins3D_1[2]= 4096; nbins3D_1[3]= 40000;
180  fGlobalCoords3Dlo[0]= -8000; fGlobalCoords3Dlo[1]= -1; fGlobalCoords3Dlo[2]= -M_PI; fGlobalCoords3Dlo[3]= -200000;
181  fGlobalCoords3Dup[0]= 8000; fGlobalCoords3Dup[1]= 1; fGlobalCoords3Dup[2]= M_PI; fGlobalCoords3Dup[3]= 200000;
182  for(int i=0;i<2;i++){// AC
183  for(int jTGC=0;jTGC<4;jTGC++){// TGC Station
184  for(int f=0;f<2;f++){// FE
185  for(int k=0;k<2;k++){// WireStrip
186  for(int x=0;x<4;x++){// RhoEtaPhi
187  if(x==0||x==2){ // Only interested in Rho and Phi
188  // TGC EIFI vs MDT extrapolated position, Sagitta
189  sst<<"TGC_SegmTrack_"<<RhoEtaPhiZ[x];
190  sst<<"Sagitta_T"<<jTGC+1;
191  sst<<FE[f];
192  sst<<WireStrip[k];
193  sst<<"_"<<AC[i];
194  ATH_MSG_DEBUG("TGC_Sagitta "<<i<<" "<<jTGC<<" "<<f<<" "<<k<<" "<<x<<" "<<sst.str().c_str() );
195  m_mvt_extrprdsag[i][jTGC][f][k][x] =new TH1F(sst.str().c_str(), sst.str().c_str(), nbins3D_1[x],fGlobalCoords3Dlo[x],fGlobalCoords3Dup[x]);
196  if(i==0){
197  ATH_CHECK( mdtvstgclv1_expert_a.regHist(m_mvt_extrprdsag[i][jTGC][f][k][x]) );
198  }else{
199  ATH_CHECK( mdtvstgclv1_expert_c.regHist(m_mvt_extrprdsag[i][jTGC][f][k][x]) );
200  }
201 
202  m_mvt_extrprdsag[i][jTGC][f][k][x]->GetXaxis()->SetTitle(RhoEtaPhiZ[x].c_str());
203  sst.str("");
204 
205  // TGC EIFI vs MDT extrapolated position, Sagitta
206  sst<<"TGC_MidSegm_"<<RhoEtaPhiZ[x];
207  sst<<"Sagitta_T"<<jTGC+1;
208  sst<<FE[f];
209  sst<<WireStrip[k];
210  sst<<"_"<<AC[i];
211  ATH_MSG_DEBUG("TGC_Sagitta "<<i<<" "<<jTGC<<" "<<f<<" "<<k<<" "<<x<<" "<<sst.str().c_str() );
212  m_mvt_extrprdsag2[i][jTGC][f][k][x] =new TH1F(sst.str().c_str(), sst.str().c_str(), nbins3D_1[x],fGlobalCoords3Dlo[x],fGlobalCoords3Dup[x]);
213  if(i==0){
214  ATH_CHECK( mdtvstgclv1_expert_a.regHist(m_mvt_extrprdsag2[i][jTGC][f][k][x]) );
215  }else{
216  ATH_CHECK( mdtvstgclv1_expert_c.regHist(m_mvt_extrprdsag2[i][jTGC][f][k][x]) );
217  }
218 
219  m_mvt_extrprdsag2[i][jTGC][f][k][x]->GetXaxis()->SetTitle(RhoEtaPhiZ[x].c_str());
220  sst.str("");
221  }
222  }// RhoEtaPhi
223  }// WireStrip
224  }// FE
225  }// TGC Station
226  }// AC
227 
228 
229  for(int k=0;k<2;k++){// WireStrip
230  if(k==0){
231  nbins3D_1[0]= 10000; nbins3D_1[1]= 1200; nbins3D_1[2]= 8192; nbins3D_1[3]= 40000;
232  fGlobalCoords3Dlo[0]= -1000; fGlobalCoords3Dlo[1]= -3; fGlobalCoords3Dlo[2]=-1*M_PI/8; fGlobalCoords3Dlo[3]= -200000;
233  fGlobalCoords3Dup[0]= 1000; fGlobalCoords3Dup[1]= 3; fGlobalCoords3Dup[2]= M_PI/8; fGlobalCoords3Dup[3]= 200000;
234  }
235  else{
236  nbins3D_1[0]= 10000; nbins3D_1[1]= 1200; nbins3D_1[2]= 8192; nbins3D_1[3]= 40000;
237  fGlobalCoords3Dlo[0]= -5000; fGlobalCoords3Dlo[1]= -3; fGlobalCoords3Dlo[2]=-1*M_PI/8; fGlobalCoords3Dlo[3]= -200000;
238  fGlobalCoords3Dup[0]= 5000; fGlobalCoords3Dup[1]= 3; fGlobalCoords3Dup[2]= M_PI/8; fGlobalCoords3Dup[3]= 200000;
239  }
240  for(int i=0;i<2;i++){// AC
241  for(int x=0;x<4;x++){// RhoEtaPhiZ
242  if(x==0||x==2){ // Only interested in Rho and Phi
243  // TGC PRD comparison for Mid Only Check
244  sst<<"TGC_MidStationPRD_"<<RhoEtaPhiZ[x];
245  sst<<"Sagitta_"<<WireStrip[k];
246  sst<<"_"<<AC[i];
247  ATH_MSG_DEBUG("TGC_PRDonly_Sagitta "<<i<<" "<<" "<<k<<" "<<x<<" "<<sst.str().c_str() );
248  m_tgc_prdcompsag[i][k][x] =new TH1F(sst.str().c_str(), sst.str().c_str(), nbins3D_1[x],fGlobalCoords3Dlo[x],fGlobalCoords3Dup[x]);
249  if(i==0){
250  ATH_CHECK( mdtvstgclv1_expert_a.regHist(m_tgc_prdcompsag[i][k][x]) );
251  }else{
252  ATH_CHECK( mdtvstgclv1_expert_c.regHist(m_tgc_prdcompsag[i][k][x]) );
253  }
254 
255  m_tgc_prdcompsag[i][k][x]->GetXaxis()->SetTitle(RhoEtaPhiZ[x].c_str());
256  sst.str("");
257  }
258  }// WireStrip
259  }// RhoEtaPhiThe
260  }// AC
261 
262 
264  // Segment Positions
265 
266  // Initialize to zero
267  for(int i=0;i<2;i++)// AC
268  for(int jMDT1=0;jMDT1<4;jMDT1++)// MDT Station1
269  for(int jMDT2=0;jMDT2<4;jMDT2++)// MDT Station2
270  for(int x=0;x<4;x++){
271  m_mdt_segmmatchsag[i][jMDT1][jMDT2][x]=nullptr;
272  }
273 
274  nbins3D_1[0]= 2000; nbins3D_1[1]= 200; nbins3D_1[2]= 4096; nbins3D_1[3]= 1024;
275  fGlobalCoords3Dlo[0]= -1000; fGlobalCoords3Dlo[1]= -1; fGlobalCoords3Dlo[2]= -M_PI/8; fGlobalCoords3Dlo[3]= 0;
276  fGlobalCoords3Dup[0]= 1000; fGlobalCoords3Dup[1]= 1; fGlobalCoords3Dup[2]= M_PI/8; fGlobalCoords3Dup[3]= 0.5*M_PI;
277  for(int i=0;i<2;i++){// AC
278  for(int jMDT1=0;jMDT1<4;jMDT1++){// MDT Station1
279  for(int jMDT2=0;jMDT2<4;jMDT2++){// MDT Station2
280  //if(jMDT1==jMDT2)continue;
281  for(int x=0;x<4;x++){// RhoEtaPhiThe
282  if(x==0||x==2||x==3){// Not interested in Eta
283  // Segm Matching Sag
284  sst<<"MDT_Matching_"<<RhoEtaPhiThe[x];
285  sst<<"Sagitta_MDT"<<jMDT1+1;
286  sst<<"vsMDT"<<jMDT2+1;
287  sst<<"_"<<AC[i];
288  ATH_MSG_DEBUG("MDT_MatchingSagitta "<<i<<" "<<jMDT1<<" "<<jMDT2<<" "<<x<<" "<<sst.str().c_str() );
289  m_mdt_segmmatchsag[i][jMDT1][jMDT2][x] =new TH1F(sst.str().c_str(),sst.str().c_str(), nbins3D_1[x], fGlobalCoords3Dlo[x], fGlobalCoords3Dup[x]);
290  if(i==0){
291  ATH_CHECK( mdtvstgclv1_expert_a.regHist(m_mdt_segmmatchsag[i][jMDT1][jMDT2][x]) );
292  }else{
293  ATH_CHECK( mdtvstgclv1_expert_c.regHist(m_mdt_segmmatchsag[i][jMDT1][jMDT2][x]) );
294  }
295 
296  m_mdt_segmmatchsag[i][jMDT1][jMDT2][x]->GetXaxis()->SetTitle(RhoEtaPhiThe[x].c_str());
297  sst.str("");
298  }
299  }
300  }
301  }
302  }
303 
304 
306  // Segment Directions
307 
308  for(int i=0;i<2;i++)// AC
309  for(int jMDT1=0;jMDT1<4;jMDT1++){// MDT Station2
310  for(int x=0;x<4;x++){// RhoEtaPhiThe
311  m_mdt_segmposdirsag[i][jMDT1][x]=nullptr;
312  }
313  for(int jMDT2=0;jMDT2<4;jMDT2++){
314  for(int x=0;x<4;x++){
315  m_mdt_trackdirdirsag[i][jMDT1][jMDT2][x]=nullptr;
316  for(int v=0;v<2;v++){
317  m_mdt_trackchecksag[i][jMDT1][jMDT2][x][v]=nullptr;
318  }
319  }
320  }
321  }
322 
323  nbins3D_1[0]= 2000; nbins3D_1[1]= 200; nbins3D_1[2]= 8192; nbins3D_1[3]= 2048;
324  fGlobalCoords3Dlo[0]= -1000; fGlobalCoords3Dlo[1]= -1; fGlobalCoords3Dlo[2]= -2*M_PI; fGlobalCoords3Dlo[3]=-0.5*M_PI;
325  fGlobalCoords3Dup[0]= 1000; fGlobalCoords3Dup[1]= 1; fGlobalCoords3Dup[2]= 2*M_PI; fGlobalCoords3Dup[3]= 0.5*M_PI;
326  for(int i=0;i<2;i++){// AC
327  for(int jMDT1=0;jMDT1<4;jMDT1++){// MDT Station2
328  for(int x=0;x<4;x++){// RhoEtaPhiThe
329  if(x==2||x==3){ // Only interested in Phi & Theta
330  // Segm Pos-Dir Sag
331  sst<<"MDT_PosDir_"<<RhoEtaPhiThe[x];
332  sst<<"Sagitta_MDT"<<jMDT1+1;
333  sst<<"_"<<AC[i];
334  ATH_MSG_DEBUG("MDT_PosDirSagitta "<<i<<" "<<jMDT1<<" "<<x<<" "<<sst.str().c_str() );
335  m_mdt_segmposdirsag[i][jMDT1][x] =new TH1F(sst.str().c_str(),sst.str().c_str(), nbins3D_1[x], fGlobalCoords3Dlo[x], fGlobalCoords3Dup[x]);
336  if(i==0){
337  ATH_CHECK( mdtvstgclv1_expert_a.regHist(m_mdt_segmposdirsag[i][jMDT1][x]) );
338  }else{
339  ATH_CHECK( mdtvstgclv1_expert_c.regHist(m_mdt_segmposdirsag[i][jMDT1][x]) );
340  }
341  m_mdt_segmposdirsag[i][jMDT1][x]->GetXaxis()->SetTitle(RhoEtaPhiThe[x].c_str());
342  sst.str("");
343  }
344  }// RhoEtaPhiThe
345 
346  for(int jMDT2=0;jMDT2<4;jMDT2++){// MDT Station2
347  //if(jMDT1==jMDT2)continue;// Cut same station comparison
348  for(int x=0;x<4;x++){// RhoEtaPhiThe
349  if(x==2||x==3){ // Only interested in Phi & Theta
350  // Track Dir-Dir Sag
351  sst<<"MDT_DirDir_"<<RhoEtaPhiThe[x];
352  sst<<"Sagitta_MDT"<<jMDT1+1;
353  sst<<"vsMDT"<<jMDT2+1;
354  sst<<"_"<<AC[i];
355  ATH_MSG_DEBUG("MDT_DirDirSagitta "<<i<<" "<<jMDT1<<" "<<jMDT2<<" "<<x<<" "<<sst.str().c_str() );
356  m_mdt_trackdirdirsag[i][jMDT1][jMDT2][x] =new TH1F(sst.str().c_str(),sst.str().c_str(), nbins3D_1[x], fGlobalCoords3Dlo[x], fGlobalCoords3Dup[x]);
357  if(i==0){
358  ATH_CHECK( mdtvstgclv1_expert_a.regHist(m_mdt_trackdirdirsag[i][jMDT1][jMDT2][x]) );
359  }else{
360  ATH_CHECK( mdtvstgclv1_expert_c.regHist(m_mdt_trackdirdirsag[i][jMDT1][jMDT2][x]) );
361  }
362 
363  m_mdt_trackdirdirsag[i][jMDT1][jMDT2][x]->GetXaxis()->SetTitle(RhoEtaPhiThe[x].c_str());
364  sst.str("");
365 
366  for(int v=0;v<2;v++){
367  if(jMDT1>=jMDT2)continue;// Regard vector comparison between two stations as
368  // Track Direction Check
369  sst<<"MDT_TrackCheck_"<<RhoEtaPhiThe[x];
370  sst<<"Sagitta_MDT"<<jMDT1+1;
371  sst<<"vs"<<jMDT2+1;
372  sst<<"_MDT";
373  if(v==0)sst<<jMDT1+1;
374  else sst<<jMDT2+1;
375  sst<<"_"<<AC[i];
376  ATH_MSG_DEBUG("MDT_TrackCheckSagitta "<<i<<" "<<jMDT1<<" "<<jMDT2<<" "<<x<<" "<<sst.str().c_str() );
377  m_mdt_trackchecksag[i][jMDT1][jMDT2][x][v] =new TH1F(sst.str().c_str(),sst.str().c_str(), nbins3D_1[x], fGlobalCoords3Dlo[x], fGlobalCoords3Dup[x]);
378  if(i==0){
379  ATH_CHECK( mdtvstgclv1_expert_a.regHist(m_mdt_trackchecksag[i][jMDT1][jMDT2][x][v]) );
380  }else{
381  ATH_CHECK( mdtvstgclv1_expert_c.regHist(m_mdt_trackchecksag[i][jMDT1][jMDT2][x][v]) );
382  }
383  m_mdt_trackchecksag[i][jMDT1][jMDT2][x][v]->GetXaxis()->SetTitle(RhoEtaPhiThe[x].c_str());
384  sst.str("");
385  }
386  }
387  }// RhoEtaPhiThe
388  }// MDT Station2
389  }// MDT Station1
390  }// AC
391 
392  return StatusCode::SUCCESS;
393 }
394 
395 // Apply labels to StationMap histogram's axis
396 void
398  // Blank non-existent chambers
399  BlankStationMap(h2,ws);
400 
401  std::stringstream sst;
402  std::string AC[2]={"A","C"};
403  int nChambers[9]={5,5,5,6,6,6,6,2,2};
404  std::string chamber1[6]={"E1", "E2", "E3", "E4", "F"};
405  std::string chamber3[6]={"E1", "E2", "E3", "E4", "E5", "F"};
406  std::string chamberE[2]={"EI", "FI"};
407 
408  bool rebin=true;
409  // Name StationEtas/Layers
410  int ibin=1;
411  if(rebin){//use new bin
412  for(int l=0 ; l<9 ; l++ ){// Layer
413  //cppcheck-suppress negativeIndex
414  for( int c=0 ; c<nChambers[l] ; c++ ){// Chamber
415  sst << "L" << l+1 << "_";
416  if(nChambers[l]==5)sst<<chamber1[c];
417  else if(nChambers[l]==6)sst<<chamber3[c];
418  else if(nChambers[l]==2)sst<<chamberE[c];
419  if(l+1>0 && l+1<=3 && c+1<5)ibin=7*c+(l+1);
420  else if(l+1>3 && l+1<=7 && c+1<5)ibin=7*c+(l+1);
421  else if(l+1>3 && l+1<=7 && c+1==5)ibin=25+(l+1);
422  else if(l+1==1 && c+1==5)ibin=33;
423  else if(l+1==2 && c+1==5)ibin=34;
424  else if(l+1==3 && c+1==5)ibin=35;
425  else if(l+1==4 && c+1==6)ibin=36;
426  else if(l+1==5 && c+1==6)ibin=37;
427  else if(l+1==6 && c+1==6)ibin=38;
428  else if(l+1==7 && c+1==6)ibin=39;
429  else if(l+1==8 && c+1==1)ibin=40;
430  else if(l+1==8 && c+1==2)ibin=42;
431  else if(l+1==9 && c+1==1)ibin=41;
432  else if(l+1==9 && c+1==2)ibin=43;
433  h2->GetXaxis()->SetBinLabel(ibin, sst.str().c_str());
434  h2->GetXaxis()->SetBit(TAxis::kLabelsVert);
435  sst.str("");
436  }// Chamber
437  }// Layer
438  }else{//use old bin logically dead code, comment out
439 // for(int l=0 ; l<9 ; l++ ){// Layer
440 // for( int c=0 ; c<nChambers[l] ; c++ ){// Chamber
441 // sst << "L" << l+1 << "_";
442 // if(nChambers[l]==5)sst<<chamber1[c];
443 // else if(nChambers[l]==6)sst<<chamber3[c];
444 // else if(nChambers[l]==2)sst<<chamberE[c];
445 // h2->GetXaxis()->SetBinLabel(ibin, sst.str().c_str());
446 // sst.str(""); ibin++;
447 // }// Chamber
448 // }// Layer
449 // h2->GetXaxis()->LabelsOption("v");
450  }
451  // Name Phi Sectors
452  for(int isec=1;isec<=12;isec++){// Sector
453  for(int iphi=0;iphi<=3;iphi+=4){// Phi number
454  if(ac==0||ac==1)sst << AC[ac];
455  if(isec<10)sst << "0";
456  sst << isec << "phi" << iphi;
457  ibin=(isec-1)*4+iphi+1;
458  h2->GetYaxis()->SetBinLabel(ibin, sst.str().c_str());
459  sst.str("");
460  }// Phi number
461  }// Sector
462 }// End of function
MdtVsTgcRawDataValAlg::m_mdt_trackdirdirsag
TH1 * m_mdt_trackdirdirsag[2][4][4][4]
Definition: MdtVsTgcRawDataValAlg.h:152
python.CaloRecoConfig.f
f
Definition: CaloRecoConfig.py:127
MdtVsTgcRawDataValAlg::m_mdt_segmposdirsag
TH1 * m_mdt_segmposdirsag[2][4][4]
Definition: MdtVsTgcRawDataValAlg.h:151
MdtVsTgcRawDataValAlg::m_eff_stationmapbase
TH2 * m_eff_stationmapbase[2][2][4]
Definition: MdtVsTgcRawDataValAlg.h:143
TH1I
Definition: rootspy.cxx:332
MdtVsTgcRawDataValAlg.h
M_PI
#define M_PI
Definition: ActiveFraction.h:11
TRT_PAI_gasdata::AC
const float AC
Definition: TRT_PAI_gasdata.h:27
UploadAMITag.l
list l
Definition: UploadAMITag.larcaf.py:158
MdtVsTgcRawDataValAlg::m_tgc_prdcompsag
TH1 * m_tgc_prdcompsag[2][2][4]
Definition: MdtVsTgcRawDataValAlg.h:149
python.TrigEgammaMonitorHelper.TH2F
def TH2F(name, title, nxbins, bins_par2, bins_par3, bins_par4, bins_par5=None, bins_par6=None, path='', **kwargs)
Definition: TrigEgammaMonitorHelper.py:45
x
#define x
MdtVsTgcRawDataValAlg::m_mvt_cutspassed
TH1 * m_mvt_cutspassed[2]
Definition: MdtVsTgcRawDataValAlg.h:109
MdtVsTgcRawDataValAlg::BlankStationMap
void BlankStationMap(TH2 *h2, int ws)
Definition: MdtVsTgcRawData_functions.cxx:155
MdtVsTgcRawDataValAlg::m_mdt_trackchecksag
TH1 * m_mdt_trackchecksag[2][4][4][4][2]
Definition: MdtVsTgcRawDataValAlg.h:153
ManagedMonitorToolBase::MonGroup
A container of information describing a monitoring object.
Definition: ManagedMonitorToolBase.h:138
lumiFormat.i
int i
Definition: lumiFormat.py:92
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
MdtVsTgcRawDataValAlg::m_mvt_extrprdsag
TH1 * m_mvt_extrprdsag[2][4][2][2][4]
Definition: MdtVsTgcRawDataValAlg.h:147
MdtVsTgcRawDataValAlg::m_mvt_extrprdsag2
TH1 * m_mvt_extrprdsag2[2][4][2][2][4]
Definition: MdtVsTgcRawDataValAlg.h:148
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
TH2
Definition: rootspy.cxx:373
ManagedMonitorToolBase::MonGroup::regHist
StatusCode regHist(TH1 *h)
Registers a TH1 (including TH2, TH3, and TProfile) to be included in the output stream using logical ...
Definition: ManagedMonitorToolBase.cxx:195
makeegammaturnon.rebin
def rebin(binning, data)
Definition: makeegammaturnon.py:17
MdtVsTgcRawDataValAlg::bookeffhists
StatusCode bookeffhists(MonGroup &mdtvstgclv1_expert_a, MonGroup &mdtvstgclv1_expert_c)
Definition: MdtVsTgcRawData_bookhistograms.cxx:100
MdtVsTgcRawDataValAlg::m_mdt_segmmap
TH2 * m_mdt_segmmap[2][4]
Definition: MdtVsTgcRawDataValAlg.h:111
MdtVsTgcRawDataValAlg::bookmaphists
StatusCode bookmaphists(MonGroup &mdtvstgclv1_expert_a, MonGroup &mdtvstgclv1_expert_c)
Definition: MdtVsTgcRawData_bookhistograms.cxx:27
python.PyAthena.v
v
Definition: PyAthena.py:157
DiTauMassTools::MaxHistStrategyV2::e
e
Definition: PhysicsAnalysis/TauID/DiTauMassTools/DiTauMassTools/HelperFunctions.h:26
MdtVsTgcRawDataValAlg::m_mdt_segmmatchsag
TH1 * m_mdt_segmmatchsag[2][4][4][4]
Definition: MdtVsTgcRawDataValAlg.h:150
MdtVsTgcRawDataValAlg::labelStationMap
void labelStationMap(TH2 *h2, int i=-1, int k=-1)
Definition: MdtVsTgcRawData_bookhistograms.cxx:397
MdtVsTgcRawDataValAlg::m_eff_stationmap
TH2 * m_eff_stationmap[2][2][4]
Definition: MdtVsTgcRawDataValAlg.h:145
python.TrigEgammaMonitorHelper.TH1F
def TH1F(name, title, nxbins, bins_par2, bins_par3=None, path='', **kwargs)
Definition: TrigEgammaMonitorHelper.py:24
python.compressB64.c
def c
Definition: compressB64.py:93
MdtVsTgcRawDataValAlg::m_eff_stationmapmid
TH2 * m_eff_stationmapmid[2][2][4]
Definition: MdtVsTgcRawDataValAlg.h:144
fitman.k
k
Definition: fitman.py:528