102 {
103 MsgStream log(
msgSvc(), name());
104
105 log << MSG::INFO << "in initialize()" << endmsg;
106 StatusCode status;
107 status = service("THistSvc", m_thistsvc);
108 if(status.isFailure() ){
109 log << MSG::INFO << "Unable to retrieve pointer to THistSvc" << endreq;
110 return status;
111 }
112
113
114
115
116 m_mumu_mass = new TH1F( "mumu_mass", "mumu_mass", 80, m_ecms-0.3, m_ecms+0.5);
117 status = m_thistsvc->regHist("/DQAHist/Dimu/mumu_mass", m_mumu_mass);
118 m_mumu_acoll = new TH1F( "mumu_acoll", "mumu_acoll", 60, 0, 6 );
119 status = m_thistsvc->regHist("/DQAHist/Dimu/mumu_acoll", m_mumu_acoll);
120 m_mumu_eop_mup = new TH1F( "mumu_eop_mup", "mumu_eop_mup", 100,0.,0.5 );
121 status = m_thistsvc->regHist("/DQAHist/Dimu/mumu_eop_mup", m_mumu_eop_mup);
122 m_mumu_eop_mum = new TH1F( "mumu_eop_mum", "mumu_eop_mum", 100,0.,0.5 );
123 status = m_thistsvc->regHist("/DQAHist/Dimu/mumu_eop_mum", m_mumu_eop_mum);
124 m_mumu_costheta_mup = new TH1F( "mumu_costheta_mup", "mumu_costheta_mup", 100,-1,1 );
125 status = m_thistsvc->regHist("/DQAHist/Dimu/mumu_costheta_mup", m_mumu_costheta_mup);
126 m_mumu_costheta_mum = new TH1F( "mumu_costheta_mum", "mumu_costheta_mum", 100,-1,1 );
127 status = m_thistsvc->regHist("/DQAHist/Dimu/mumu_costheta_mum", m_mumu_costheta_mum);
128
129 m_mumu_phi_mup = new TH1F( "mumu_phi_mup", "mumu_phi_mup", 120,-3.2,3.2 );
130 status = m_thistsvc->regHist("/DQAHist/Dimu/mumu_phi_mup", m_mumu_phi_mup);
131 m_mumu_phi_mum = new TH1F( "mumu_phi_mum", "mumu_phi_mum", 120,-3.2,3.2 );
132 status = m_thistsvc->regHist("/DQAHist/Dimu/mumu_phi_mum", m_mumu_phi_mum);
133
134 m_mumu_nneu = new TH1F( "mumu_nneu", "mumu_nneu", 5,0,5 );
135 status = m_thistsvc->regHist("/DQAHist/Dimu/mumu_nneu", m_mumu_nneu);
136 m_mumu_nlay = new TH1F( "mumu_nlay", "mumu_nlay", 9,0,10 );
137 status = m_thistsvc->regHist("/DQAHist/Dimu/mumu_nlay", m_mumu_nlay);
138 m_mumu_nhit = new TH1F( "mumu_nhit", "mumu_nhit", 19,0,20 );
139 status = m_thistsvc->regHist("/DQAHist/Dimu/mumu_nhit", m_mumu_nhit);
140
141 m_mumu_eemc_mup=new TH1F("mumu_eemc_mup","mumu_eemc_mup",100,0.0,1.0);
142 status = m_thistsvc->regHist("/DQAHist/Dimu/mumu_eemc_mup", m_mumu_eemc_mup);
143 m_mumu_eemc_mum=new TH1F("mumu_eemc_mum","mumu_eemc_mum",100,0.0,1.0);
144 status = m_thistsvc->regHist("/DQAHist/Dimu/mumu_eemc_mum", m_mumu_eemc_mum);
145 m_mumu_x_mup=new TH1F("mumu_x_mup","mumu_x_mup",100,-1.0,1.0);
146 status = m_thistsvc->regHist("/DQAHist/Dimu/mumu_x_mup", m_mumu_x_mup);
147 m_mumu_y_mup=new TH1F("mumu_y_mup","mumu_y_mup",100,-1.0,1.0);
148 status = m_thistsvc->regHist("/DQAHist/Dimu/mumu_y_mup", m_mumu_y_mup);
149 m_mumu_z_mup=new TH1F("mumu_z_mup","mumu_z_mup",100,-10.0,10.0);
150 status = m_thistsvc->regHist("/DQAHist/Dimu/mumu_z_mup", m_mumu_z_mup);
151 m_mumu_x_mum=new TH1F("mumu_x_mum","mumu_x_mum",100,-1.0,1.0);
152 status = m_thistsvc->regHist("/DQAHist/Dimu/mumu_x_mum", m_mumu_x_mum);
153 m_mumu_y_mum=new TH1F("mumu_y_mum","mumu_y_mum",100,-1.0,1.0);
154 status = m_thistsvc->regHist("/DQAHist/Dimu/mumu_y_mum", m_mumu_y_mum);
155 m_mumu_z_mum=new TH1F("mumu_z_mum","mumu_z_mum",100,-10.0,10.0);
156 status = m_thistsvc->regHist("/DQAHist/Dimu/mumu_z_mum", m_mumu_z_mum);
157
158 m_mumu_px_mup=new TH1F("mumu_px_mup","mumu_px_mup",200,-2.0,2.0);
159 status = m_thistsvc->regHist("/DQAHist/Dimu/mumu_px_mup", m_mumu_px_mup);
160 m_mumu_py_mup=new TH1F("mumu_py_mup","mumu_py_mup",200,-2.0,2.0);
161 status = m_thistsvc->regHist("/DQAHist/Dimu/mumu_py_mup", m_mumu_py_mup);
162 m_mumu_pz_mup=new TH1F("mumu_pz_mup","mumu_pz_mup",200,-2.0,2.0);
163 status = m_thistsvc->regHist("/DQAHist/Dimu/mumu_pz_mup", m_mumu_pz_mup);
164 m_mumu_p_mup=new TH1F("mumu_p_mup","mumu_p_mup",100,1.0,2.0);
165 status = m_thistsvc->regHist("/DQAHist/Dimu/mumu_p_mup", m_mumu_p_mup);
166 m_mumu_px_mum=new TH1F("mumu_px_mum","mumu_px_mum",100,-2.0,2.0);
167 status = m_thistsvc->regHist("/DQAHist/Dimu/mumu_px_mum", m_mumu_px_mum);
168 m_mumu_py_mum=new TH1F("mumu_py_mum","mumu_py_mum",100,-2.0,2.0);
169 status = m_thistsvc->regHist("/DQAHist/Dimu/mumu_py_mum", m_mumu_py_mum);
170 m_mumu_pz_mum=new TH1F("mumu_pz_mum","mumu_pz_mum",100,-2.0,2.0);
171 status = m_thistsvc->regHist("/DQAHist/Dimu/mumu_pz_mum", m_mumu_pz_mum);
172 m_mumu_p_mum=new TH1F("mumu_p_mum","mumu_p_mum",100,1.0,2.0);
173 status = m_thistsvc->regHist("/DQAHist/Dimu/mumu_p_mum", m_mumu_p_mum);
174 m_mumu_deltatof=new TH1F("mumu_deltatof","mumu_deltatof",50,0.0,10.0);
175 status = m_thistsvc->regHist("/DQAHist/Dimu/mumu_deltatof", m_mumu_deltatof);
176
177 m_mumu_pidchidedx_mup=new TH1F("mumu_pidchidedx_mup","mumu_pidchidedx_mup",160,-4,4);
178 status = m_thistsvc->regHist("/DQAHist/Dimu/mumu_pidchidedx_mup", m_mumu_pidchidedx_mup);
179 m_mumu_pidchidedx_mum=new TH1F("mumu_pidchidedx_mum","mumu_pidchidedx_mum",160,-4,4);
180 status = m_thistsvc->regHist("/DQAHist/Dimu/mumu_pidchidedx_mum", m_mumu_pidchidedx_mum);
181 m_mumu_pidchitof1_mup=new TH1F("mumu_pidchitof1_mup","mumu_pidchitof1_mup",160,-4,4);
182 status = m_thistsvc->regHist("/DQAHist/Dimu/mumu_pidchitof1_mup", m_mumu_pidchitof1_mup);
183 m_mumu_pidchitof1_mum=new TH1F("mumu_pidchitof1_mum","mumu_pidchitof1_mum",160,-4,4);
184 status = m_thistsvc->regHist("/DQAHist/Dimu/mumu_pidchitof1_mum", m_mumu_pidchitof1_mum);
185 m_mumu_pidchitof2_mup=new TH1F("mumu_pidchitof2_mup","mumu_pidchitof2_mup",160,-4,4);
186 status = m_thistsvc->regHist("/DQAHist/Dimu/mumu_pidchitof2_mup", m_mumu_pidchitof2_mup);
187 m_mumu_pidchitof2_mum=new TH1F("mumu_pidchitof2_mum","mumu_pidchitof2_mum",160,-4,4);
188 status = m_thistsvc->regHist("/DQAHist/Dimu/mumu_pidchitof2_mum", m_mumu_pidchitof2_mum);
189
190
191
192
193
194NTuplePtr nt1(
ntupleSvc(),
"DQAFILE/Dimu");
195if ( nt1 ) m_tuple1 = nt1;
196else {
197 m_tuple1 =
ntupleSvc()->book (
"DQAFILE/Dimu", CLID_ColumnWiseTuple,
"N-Tuple");
198 if ( m_tuple1 ) {
199 status = m_tuple1->addItem ("run", m_run);
200 status = m_tuple1->addItem ("rec", m_rec);
201 status = m_tuple1->addItem ("Nchrg", m_ncharg);
202 status = m_tuple1->addItem ("Nneu", m_nneu,0,40);
203 status = m_tuple1->addItem ("NGch", m_ngch, 0, 40);
204 status = m_tuple1->addItem ("NGam", m_nGam);
205
206
207 status = m_tuple1->addItem ("dimutag", m_dimutag);
208
209 status = m_tuple1->addItem ("acoll", m_acoll);
210 status = m_tuple1->addItem ("acopl", m_acopl);
211 status = m_tuple1->addItem ("deltatof", m_deltatof);
212 status = m_tuple1->addItem ("eop1", m_eop1);
213 status = m_tuple1->addItem ("eop2", m_eop2);
214 status = m_tuple1->addItem ("eoeb1", m_eoeb1);
215 status = m_tuple1->addItem ("eoeb2", m_eoeb2);
216 status = m_tuple1->addItem ("poeb1", m_poeb1);
217 status = m_tuple1->addItem ("poeb2", m_poeb2);
218 status = m_tuple1->addItem ("etoeb1", m_etoeb1);
219 status = m_tuple1->addItem ("etoeb2", m_etoeb2);
220 status = m_tuple1->addItem ("mucinfo1", m_mucinfo1);
221 status = m_tuple1->addItem ("mucinfo2", m_mucinfo2);
222
223
224 status = m_tuple1->addIndexedItem ("delang",m_nneu, m_delang);
225 status = m_tuple1->addIndexedItem ("delphi",m_nneu, m_delphi);
226 status = m_tuple1->addIndexedItem ("delthe",m_nneu, m_delthe);
227 status = m_tuple1->addIndexedItem ("npart",m_nneu, m_npart);
228 status = m_tuple1->addIndexedItem ("nemchits",m_nneu, m_nemchits);
229 status = m_tuple1->addIndexedItem ("module",m_nneu, m_module);
230 status = m_tuple1->addIndexedItem ("x",m_nneu, m_x);
231 status = m_tuple1->addIndexedItem ("y",m_nneu, m_y);
232 status = m_tuple1->addIndexedItem ("z",m_nneu, m_z);
233 status = m_tuple1->addIndexedItem ("px",m_nneu, m_px);
234 status = m_tuple1->addIndexedItem ("py",m_nneu, m_py);
235 status = m_tuple1->addIndexedItem ("pz",m_nneu, m_pz);
236 status = m_tuple1->addIndexedItem ("theta",m_nneu, m_theta);
237 status = m_tuple1->addIndexedItem ("phi",m_nneu, m_phi);
238 status = m_tuple1->addIndexedItem ("dx",m_nneu, m_dx);
239 status = m_tuple1->addIndexedItem ("dy",m_nneu, m_dy);
240 status = m_tuple1->addIndexedItem ("dz",m_nneu, m_dz);
241 status = m_tuple1->addIndexedItem ("dtheta",m_nneu, m_dtheta);
242 status = m_tuple1->addIndexedItem ("dphi",m_nneu, m_dphi);
243 status = m_tuple1->addIndexedItem ("energy",m_nneu, m_energy);
244 status = m_tuple1->addIndexedItem ("dE",m_nneu, m_dE);
245 status = m_tuple1->addIndexedItem ("eSeed",m_nneu, m_eSeed);
246 status = m_tuple1->addIndexedItem ("nSeed",m_nneu, m_nSeed);
247 status = m_tuple1->addIndexedItem ("e3x3",m_nneu, m_e3x3);
248 status = m_tuple1->addIndexedItem ("e5x5",m_nneu, m_e5x5);
249 status = m_tuple1->addIndexedItem ("secondMoment",m_nneu, m_secondMoment);
250 status = m_tuple1->addIndexedItem ("latMoment",m_nneu, m_latMoment);
251 status = m_tuple1->addIndexedItem ("a20Moment",m_nneu, m_a20Moment);
252 status = m_tuple1->addIndexedItem ("a42Moment",m_nneu, m_a42Moment);
253 status = m_tuple1->addIndexedItem ("getTime",m_nneu, m_getTime);
254 status = m_tuple1->addIndexedItem ("getEAll",m_nneu, m_getEAll);
255
256
257
258 status = m_tuple1->addIndexedItem("charge", m_ngch, m_charge);
259 status = m_tuple1->addIndexedItem ("vx", m_ngch, m_vx0);
260 status = m_tuple1->addIndexedItem ("vy", m_ngch, m_vy0);
261 status = m_tuple1->addIndexedItem ("vz", m_ngch, m_vz0);
262
263
264 status = m_tuple1->addIndexedItem ("px", m_ngch, m_px) ;
265 status = m_tuple1->addIndexedItem ("py", m_ngch, m_py) ;
266 status = m_tuple1->addIndexedItem ("pz", m_ngch, m_pz) ;
267 status = m_tuple1->addIndexedItem ("p", m_ngch, m_p) ;
268
269
270
271 status = m_tuple1->addIndexedItem ("kal_vx", m_ngch, m_kal_vx0);
272 status = m_tuple1->addIndexedItem ("kal_vy", m_ngch, m_kal_vy0);
273 status = m_tuple1->addIndexedItem ("kal_vz", m_ngch, m_kal_vz0);
274
275
276 status = m_tuple1->addIndexedItem ("kal_px", m_ngch, m_kal_px) ;
277 status = m_tuple1->addIndexedItem ("kal_py", m_ngch, m_kal_py) ;
278 status = m_tuple1->addIndexedItem ("kal_pz", m_ngch, m_kal_pz) ;
279 status = m_tuple1->addIndexedItem ("kal_p", m_ngch, m_kal_p) ;
280
281
282 status = m_tuple1->addIndexedItem ("probPH" , m_ngch, m_probPH) ;
283 status = m_tuple1->addIndexedItem ("normPH" , m_ngch, m_normPH) ;
284 status = m_tuple1->addIndexedItem ("chie" , m_ngch, m_chie) ;
285 status = m_tuple1->addIndexedItem ("chimu" , m_ngch, m_chimu) ;
286 status = m_tuple1->addIndexedItem ("chipi" , m_ngch, m_chipi) ;
287 status = m_tuple1->addIndexedItem ("chik" , m_ngch, m_chik) ;
288 status = m_tuple1->addIndexedItem ("chip" , m_ngch, m_chip) ;
289 status = m_tuple1->addIndexedItem ("ghit" , m_ngch, m_ghit) ;
290 status = m_tuple1->addIndexedItem ("thit" , m_ngch, m_thit) ;
291
292 status = m_tuple1->addIndexedItem ("e_emc" , m_ngch, m_e_emc) ;
293 status = m_tuple1->addIndexedItem ("phi_emc" , m_ngch, m_phi_emc) ;
294 status = m_tuple1->addIndexedItem ("theta_emc" , m_ngch, m_theta_emc) ;
295
296 status = m_tuple1->addIndexedItem ("nhit_muc" , m_ngch, m_nhit_muc) ;
297 status = m_tuple1->addIndexedItem ("nlay_muc" , m_ngch, m_nlay_muc) ;
298 status = m_tuple1->addIndexedItem ("t_btof" , m_ngch, m_t_btof );
299 status = m_tuple1->addIndexedItem ("t_etof" , m_ngch, m_t_etof );
300 status = m_tuple1->addIndexedItem ("qual_etof" , m_ngch, m_qual_etof );
301 status = m_tuple1->addIndexedItem ("tof_etof" , m_ngch, m_tof_etof );
302 status = m_tuple1->addIndexedItem ("te_etof" , m_ngch, m_te_etof );
303 status = m_tuple1->addIndexedItem ("tmu_etof" , m_ngch, m_tmu_etof );
304 status = m_tuple1->addIndexedItem ("tpi_etof" , m_ngch, m_tpi_etof );
305 status = m_tuple1->addIndexedItem ("tk_etof" , m_ngch, m_tk_etof );
306 status = m_tuple1->addIndexedItem ("tp_etof" , m_ngch, m_tp_etof );
307
308 status = m_tuple1->addIndexedItem ("qual_btof1", m_ngch, m_qual_btof1 );
309 status = m_tuple1->addIndexedItem ("tof_btof1" , m_ngch, m_tof_btof1 );
310 status = m_tuple1->addIndexedItem ("te_btof1" , m_ngch, m_te_btof1 );
311 status = m_tuple1->addIndexedItem ("tmu_btof1" , m_ngch, m_tmu_btof1 );
312 status = m_tuple1->addIndexedItem ("tpi_btof1" , m_ngch, m_tpi_btof1 );
313 status = m_tuple1->addIndexedItem ("tk_btof1" , m_ngch, m_tk_btof1 );
314 status = m_tuple1->addIndexedItem ("tp_btof1" , m_ngch, m_tp_btof1 );
315
316 status = m_tuple1->addIndexedItem ("qual_btof2", m_ngch, m_qual_btof2 );
317 status = m_tuple1->addIndexedItem ("tof_btof2" , m_ngch, m_tof_btof2 );
318 status = m_tuple1->addIndexedItem ("te_btof2" , m_ngch, m_te_btof2 );
319 status = m_tuple1->addIndexedItem ("tmu_btof2" , m_ngch, m_tmu_btof2 );
320 status = m_tuple1->addIndexedItem ("tpi_btof2" , m_ngch, m_tpi_btof2 );
321 status = m_tuple1->addIndexedItem ("tk_btof2" , m_ngch, m_tk_btof2 );
322 status = m_tuple1->addIndexedItem ("tp_btof2" , m_ngch, m_tp_btof2 );
323 status = m_tuple1->addIndexedItem ("pidcode" , m_ngch, m_pidcode);
324 status = m_tuple1->addIndexedItem ("pidprob" , m_ngch, m_pidprob);
325 status = m_tuple1->addIndexedItem ("pidchiDedx" , m_ngch, m_pidchiDedx);
326 status = m_tuple1->addIndexedItem ("pidchiTof1" , m_ngch, m_pidchiTof1);
327 status = m_tuple1->addIndexedItem ("pidchiTof2" , m_ngch, m_pidchiTof2);
328
329 status = m_tuple1->addItem ("px_cms_ep", m_px_cms_ep);
330 status = m_tuple1->addItem ("py_cms_ep", m_py_cms_ep);
331 status = m_tuple1->addItem ("pz_cms_ep", m_pz_cms_ep);
332 status = m_tuple1->addItem ("e_cms_ep", m_e_cms_ep);
333 status = m_tuple1->addItem ("cos_ep", m_cos_ep);
334 status = m_tuple1->addItem ("px_cms_em", m_px_cms_em);
335 status = m_tuple1->addItem ("py_cms_em", m_py_cms_em);
336 status = m_tuple1->addItem ("pz_cms_em", m_pz_cms_em);
337 status = m_tuple1->addItem ("e_cms_em", m_e_cms_em);
338 status = m_tuple1->addItem ("cos_em", m_cos_em);
339 status = m_tuple1->addItem ("mass_ee", m_mass_ee);
340 status = m_tuple1->addItem ("emax", m_emax);
341 status = m_tuple1->addItem ("esum", m_esum);
342 status = m_tuple1->addItem ( "npip", m_npip );
343 status = m_tuple1->addItem ( "npim", m_npim );
344 status = m_tuple1->addItem ( "nkp", m_nkp );
345 status = m_tuple1->addItem ( "nkm", m_nkm );
346 status = m_tuple1->addItem ( "np", m_np );
347 status = m_tuple1->addItem ( "npb", m_npb );
348
349 status = m_tuple1->addItem ( "nep", m_nep );
350 status = m_tuple1->addItem ( "nem", m_nem );
351 status = m_tuple1->addItem ( "nmup", m_nmup );
352 status = m_tuple1->addItem ( "nmum", m_nmum );
353
354 }
355 else {
356 log << MSG::ERROR << " Cannot book N-tuple:" << long(m_tuple1) << endmsg;
357 return StatusCode::FAILURE;
358 }
359}
360
361
362
363
364
365log << MSG::INFO << "successfully return from initialize()" <<endmsg;
366return StatusCode::SUCCESS;
367
368
369
370
371}