80 {
82 Gaudi::svcLocator() -> service(
"MessageSvc",
msgSvc);
83 MsgStream log(
msgSvc,
"IniMdcCalib");
84 log << MSG::INFO << "IniMdcCalib::initialize()" << endreq;
85
86 m_hlist = hlist;
87 m_mdcGeomSvc = mdcGeomSvc;
88 m_mdcFunSvc = mdcFunSvc;
89 m_mdcUtilitySvc = mdcUtilitySvc;
90
91 int lay;
92 int cel;
93 int wir;
94 int ncel;
95 char hname[200];
96
97 m_nWire = m_mdcGeomSvc -> getWireSize();
98 m_nLayer = m_mdcGeomSvc -> getLayerSize();
99
100 m_fdcom = new TFolder("Common", "Common");
101 m_hlist->Add(m_fdcom);
102
103 m_fdTmap = new TFolder("Thitmap", "Thitmap");
104 m_hlist->Add(m_fdTmap);
105
106 m_fdTraw = new TFolder("Traw", "Traw");
107 m_hlist->Add(m_fdTraw);
108
109 m_fdTrawCel = new TFolder("TrawCell", "TrawCell");
110 m_hlist->Add(m_fdTrawCel);
111
112 m_fdTrawTes = new TFolder("TrawTes", "TrawTes");
113 m_hlist->Add(m_fdTrawTes);
114
115 m_fdQmap = new TFolder("Qhitmap", "Qhitmap");
116 m_hlist->Add(m_fdQmap);
117
118 m_fdQraw = new TFolder("Qraw", "Qraw");
119 m_hlist->Add(m_fdQraw);
120
121 m_fdQrawCel = new TFolder("QrawCell", "QrawCell");
122 m_hlist->Add(m_fdQrawCel);
123
124 m_hLayerHitmapT = new TH1F("T_Hitmap_Layer", "", 43, -0.5, 42.5);
125 m_fdcom->Add(m_hLayerHitmapT);
126
127 m_hWireHitMapT = new TH1F("T_Hitmap_Wire", "", 6796, -0.5, 6795.5);
128 m_fdcom->Add(m_hWireHitMapT);
129
130 m_hLayerHitmapQ = new TH1F("Q_Hitmap_Layer", "", 43, -0.5, 42.5);
131 m_fdcom->Add(m_hLayerHitmapQ);
132
133 m_hWireHitMapQ = new TH1F("Q_Hitmap_Wire", "", 6796, -0.5, 6795.5);
134 m_fdcom->Add(m_hWireHitMapQ);
135
136 int iEs;
137 for(iEs=0; iEs<m_param.
nEsFlag; iEs++){
139 m_hTes[iEs] = new TH1F(hname, "", 2000, 0, 2000);
140 m_fdcom->Add(m_hTes[iEs]);
141 }
142
143 m_hTesAllFlag = new TH1F("TesAllFlag", "", 300, -0.5, 299.5);
144 m_fdcom ->
Add(m_hTesAllFlag);
145
146 m_hTesAll = new TH1F("TesAll", "", 2000, 0, 2000);
147 m_fdcom->Add(m_hTesAll);
148
149 m_hTesCal = new TH1F("TesCal", "", 2000, 0, 2000);
150 m_fdcom->Add(m_hTesCal);
151
152 m_hTesFlag = new TH1F("Tes_Flag", "", 300, -0.5, 299.5);
153 m_fdcom->Add(m_hTesFlag);
154
155 int tdcNbin = 1000;
156 double tdcmin = 0;
157 double tdcmax = 20000;
158
159 int trawNbin = 1000;
160 double trawmin = 0;
161 double trawmax = 2000;
162
163 for(lay=0; lay<m_nLayer; lay++){
165
166 sprintf(hname,
"T_hitmap_Lay%02d", lay);
167 m_hlaymapT[lay] = new TH1F(hname, "", ncel, -0.5, (float)ncel-0.5);
168 m_fdTmap ->
Add(m_hlaymapT[lay]);
169
170 sprintf(hname,
"TDC_Lay%02d", lay);
171 m_htdc[lay] = new TH1F(hname, "", tdcNbin, tdcmin, tdcmax);
172 m_fdTraw ->
Add(m_htdc[lay]);
173
174 sprintf(hname,
"Traw_Lay%02d", lay);
175 m_htraw[lay] = new TH1F(hname, "", trawNbin, trawmin, trawmax);
176 m_fdTraw ->
Add(m_htraw[lay]);
177
178 for(iEs=0; iEs<m_param.
nEsFlag; iEs++){
179 sprintf(hname,
"TDC_Lay%02d_Tes%d", lay, m_param.
esFlag[iEs]);
180 m_htdcTes[lay][iEs] = new TH1F(hname, "", tdcNbin, tdcmin, tdcmax);
181 m_fdTrawTes ->
Add(m_htdcTes[lay][iEs]);
182
183 sprintf(hname,
"Traw_Lay%02d_Tes%d", lay, m_param.
esFlag[iEs]);
184 m_htrawTes[lay][iEs] = new TH1F(hname, "", trawNbin, trawmin, trawmax);
185 m_fdTrawTes ->
Add(m_htrawTes[lay][iEs]);
186 }
187
188 sprintf(hname,
"Q_hitmap_Lay%02d", lay);
189 m_hlaymapQ[lay] = new TH1F(hname, "", ncel, -0.5, (float)ncel-0.5);
190 m_fdQmap ->
Add(m_hlaymapQ[lay]);
191
192 sprintf(hname,
"Qraw_Lay%02d", lay);
193 m_hqraw[lay] = new TH1F(hname, "", 2000, 0, 4000);
194 m_fdQraw ->
Add(m_hqraw[lay]);
195 }
196
198 lay = m_mdcGeomSvc -> Wire(wir) -> Layer();
199 cel = m_mdcGeomSvc -> Wire(wir) -> Cell();
200
201 sprintf(hname,
"Traw_%02d_%03d_%04d", lay, cel, wir);
202 m_htrawCel[wir] = new TH1F(hname, "", trawNbin, trawmin, trawmax);
203 m_fdTrawCel ->
Add(m_htrawCel[wir]);
204
205 sprintf(hname,
"Qraw_%02d_%03d_%04d", lay, cel, wir);
206 m_hqrawCel[wir] = new TH1F(hname, "", 2000, 0, 4000);
207 m_fdQrawCel ->
Add(m_hqrawCel[wir]);
208 }
209}
sprintf(cut,"kal_costheta0_em>-0.93&&kal_costheta0_em<0.93&&kal_pxy0_em>=0.05+%d*0.1&&kal_pxy0_em<0.15+%d*0.1&&NGch>=2", j, j)
virtual const MdcGeoLayer *const Layer(unsigned id)=0