79 {
80 MsgStream log(
msgSvc(), name());
81
82 log << MSG::INFO << "in initialize()" << endmsg;
83
84 StatusCode status;
85
86 NTuplePtr nt4(
ntupleSvc(),
"DQAFILE/Rhopi");
87 if ( nt4 ) m_tuple4 = nt4;
88 else {
89 m_tuple4 =
ntupleSvc()->book (
"DQAFILE/Rhopi", CLID_ColumnWiseTuple,
"ks N-Tuple example");
90 if ( m_tuple4 ) {
91 status = m_tuple4->addItem ("run", m_run);
92 status = m_tuple4->addItem ("rec", m_rec);
93 status = m_tuple4->addItem ("nch", m_nch);
94 status = m_tuple4->addItem ("nneu", m_nneu);
95 status = m_tuple4->addItem ("chi1", m_chi1);
96 status = m_tuple4->addItem ("mpi0", m_mpi0);
97 status = m_tuple4->addItem ("mprho0", m_prho0);
98 status = m_tuple4->addItem ("mprhop", m_prhop);
99 status = m_tuple4->addItem ("mprhom", m_prhom);
100 status = m_tuple4->addItem ("mgood", m_good);
101 status = m_tuple4->addItem ("mgam", m_gam);
102 status = m_tuple4->addItem ("mpip", m_pip);
103 status = m_tuple4->addItem ("mpim", m_pim);
104 status = m_tuple4->addItem ("m2gam", m_2gam);
105 status = m_tuple4->addItem ("ngch", m_ngch, 0, 10);
106 status = m_tuple4->addItem ("nggneu", m_nggneu,0, 10);
107 status = m_tuple4->addItem ("moutpi0",m_outpi0);
108 status = m_tuple4->addItem ("cosang", m_cosang);
109 status = m_tuple4->addItem ("moutpip",m_outpip);
110 status = m_tuple4->addItem ("moutpim",m_outpim);
111 status = m_tuple4->addItem ("menpip", m_enpip);
112 status = m_tuple4->addItem ("mdcpip", m_dcpip );
113 status = m_tuple4->addItem ("menpim", m_enpim );
114 status = m_tuple4->addItem ("mdcpim", m_dcpim );
115 status = m_tuple4->addItem ("mpipf", m_pipf);
116 status = m_tuple4->addItem ("mpimf", m_pimf);
117 status = m_tuple4->addItem ("mpi0f", m_pi0f);
118
119 status = m_tuple4->addItem ("mpmax", m_pmax);
120 status = m_tuple4->addItem ("mppx", m_ppx);
121 status = m_tuple4->addItem ("mppy", m_ppy);
122 status = m_tuple4->addItem ("mppz", m_ppz);
123 status = m_tuple4->addItem ("mcosthep",m_costhep);
124 status = m_tuple4->addItem ("mppxkal", m_ppxkal);
125 status = m_tuple4->addItem ("mppykal", m_ppykal);
126 status = m_tuple4->addItem ("mppzkal", m_ppzkal);
127 status = m_tuple4->addItem ("mmpx", m_mpx);
128 status = m_tuple4->addItem ("mmpy", m_mpy);
129 status = m_tuple4->addItem ("mmpz", m_mpz);
130 status = m_tuple4->addItem ("mcosthem",m_costhem);
131 status = m_tuple4->addItem ("mmpxkal", m_mpxkal);
132 status = m_tuple4->addItem ("mmpykal", m_mpykal);
133 status = m_tuple4->addItem ("mmpzkal", m_mpzkal);
134
135 status = m_tuple4->addItem ("mvxpin", m_vxpin);
136 status = m_tuple4->addItem ("mvypin", m_vypin);
137 status = m_tuple4->addItem ("mvzpin", m_vzpin);
138 status = m_tuple4->addItem ("mvrpin", m_vrpin);
139 status = m_tuple4->addItem ("mcosthepin",m_costhepin);
140 status = m_tuple4->addItem ("mvxmin", m_vxmin);
141 status = m_tuple4->addItem ("mvymin", m_vymin);
142 status = m_tuple4->addItem ("mvzmin", m_vzmin);
143 status = m_tuple4->addItem ("mvrmin", m_vrmin);
144 status = m_tuple4->addItem ("mcosthemin",m_costhemin);
145 status = m_tuple4->addItem ("mvxp", m_vxp);
146 status = m_tuple4->addItem ("mvyp", m_vyp);
147 status = m_tuple4->addItem ("mvzp", m_vzp);
148 status = m_tuple4->addItem ("mvrp", m_vrp);
149 status = m_tuple4->addItem ("mvxm", m_vxm);
150 status = m_tuple4->addItem ("mvym", m_vym);
151 status = m_tuple4->addItem ("mvzm", m_vzm);
152 status = m_tuple4->addItem ("mvrm", m_vrm);
153 status = m_tuple4->addItem ("nangecc",m_nangecc,0,10);
154 status = m_tuple4->addIndexedItem ("mdthec", m_nangecc, m_dthec);
155 status = m_tuple4->addIndexedItem ("mdphic", m_nangecc, m_dphic);
156 status = m_tuple4->addIndexedItem ("mdangc", m_nangecc, m_dangc);
157 status = m_tuple4->addIndexedItem ("mspippim", m_nangecc, m_mspippim);
158
159 status = m_tuple4->addItem ("angsg", dangsg);
160 status = m_tuple4->addItem ("thesg", dthesg);
161 status = m_tuple4->addItem ("phisg", dphisg);
162 status = m_tuple4->addItem ("cosgth1", cosgth1);
163 status = m_tuple4->addItem ("cosgth2", cosgth2);
164
165 status = m_tuple4->addItem ("mchi5", m_chi5);
166 status = m_tuple4->addItem ("mkpi0", m_kpi0);
167 status = m_tuple4->addItem ("mkpkm", m_kpkm);
168 status = m_tuple4->addItem ("mkpp0", m_kpp0);
169 status = m_tuple4->addItem ("mkmp0", m_kmp0);
170 status = m_tuple4->addItem ("mpgam2pi1",m_pgam2pi1);
171 status = m_tuple4->addItem ("mpgam2pi2",m_pgam2pi2);
172 status = m_tuple4->addItem ("cosva1", cosva1);
173 status = m_tuple4->addItem ("cosva2", cosva2);
174 status = m_tuple4->addItem ("laypi1", m_laypi1);
175 status = m_tuple4->addItem ("hit1", m_hit1);
176 status = m_tuple4->addItem ("laypi2", m_laypi2);
177 status = m_tuple4->addItem ("hit2", m_hit2);
178 status = m_tuple4->addItem ("anglepm", m_anglepm);
179
180 status = m_tuple4->addIndexedItem ("mptrk", m_ngch, m_ptrk);
181 status = m_tuple4->addIndexedItem ("chie", m_ngch, m_chie);
182 status = m_tuple4->addIndexedItem ("chimu", m_ngch,m_chimu);
183 status = m_tuple4->addIndexedItem ("chipi", m_ngch,m_chipi);
184 status = m_tuple4->addIndexedItem ("chik", m_ngch,m_chik);
185 status = m_tuple4->addIndexedItem ("chip", m_ngch,m_chip);
186 status = m_tuple4->addIndexedItem ("probPH", m_ngch,m_probPH);
187 status = m_tuple4->addIndexedItem ("normPH", m_ngch,m_normPH);
188 status = m_tuple4->addIndexedItem ("ghit", m_ngch,m_ghit);
189 status = m_tuple4->addIndexedItem ("thit", m_ngch,m_thit);
190
191 status = m_tuple4->addIndexedItem ("ptot_etof", m_ngch,m_ptot_etof);
192 status = m_tuple4->addIndexedItem ("cntr_etof", m_ngch,m_cntr_etof);
193 status = m_tuple4->addIndexedItem ("te_etof", m_ngch,m_te_etof);
194 status = m_tuple4->addIndexedItem ("tmu_etof", m_ngch,m_tmu_etof);
195 status = m_tuple4->addIndexedItem ("tpi_etof", m_ngch,m_tpi_etof);
196 status = m_tuple4->addIndexedItem ("tk_etof", m_ngch,m_tk_etof);
197 status = m_tuple4->addIndexedItem ("tp_etof", m_ngch,m_tp_etof);
198 status = m_tuple4->addIndexedItem ("ph_etof", m_ngch,m_ph_etof);
199 status = m_tuple4->addIndexedItem ("rhit_etof", m_ngch,m_rhit_etof);
200 status = m_tuple4->addIndexedItem ("qual_etof", m_ngch,m_qual_etof);
201 status = m_tuple4->addIndexedItem ("ec_toff_e", m_ngch,m_ec_toff_e);
202 status = m_tuple4->addIndexedItem ("ec_toff_mu",m_ngch,m_ec_toff_mu);
203 status = m_tuple4->addIndexedItem ("ec_toff_pi",m_ngch,m_ec_toff_pi);
204 status = m_tuple4->addIndexedItem ("ec_toff_k", m_ngch,m_ec_toff_k);
205 status = m_tuple4->addIndexedItem ("ec_toff_p", m_ngch,m_ec_toff_p);
206 status = m_tuple4->addIndexedItem ("ec_tsig_e", m_ngch,m_ec_tsig_e);
207 status = m_tuple4->addIndexedItem ("ec_tsig_mu",m_ngch,m_ec_tsig_mu);
208 status = m_tuple4->addIndexedItem ("ec_tsig_pi",m_ngch,m_ec_tsig_pi);
209 status = m_tuple4->addIndexedItem ("ec_tsig_k", m_ngch,m_ec_tsig_k);
210 status = m_tuple4->addIndexedItem ("ec_tsig_p", m_ngch,m_ec_tsig_p);
211 status = m_tuple4->addIndexedItem ("ec_tof", m_ngch,m_ec_tof);
212 status = m_tuple4->addIndexedItem ("ptot_btof1",m_ngch,m_ptot_btof1);
213 status = m_tuple4->addIndexedItem ("cntr_btof1",m_ngch,m_cntr_btof1);
214 status = m_tuple4->addIndexedItem ("te_btof1", m_ngch,m_te_btof1);
215 status = m_tuple4->addIndexedItem ("tmu_btof1", m_ngch,m_tmu_btof1);
216 status = m_tuple4->addIndexedItem ("tpi_btof1", m_ngch,m_tpi_btof1);
217 status = m_tuple4->addIndexedItem ("tk_btof1", m_ngch,m_tk_btof1);
218 status = m_tuple4->addIndexedItem ("tp_btof1", m_ngch,m_tp_btof1);
219 status = m_tuple4->addIndexedItem ("ph_btof1", m_ngch,m_ph_btof1);
220 status = m_tuple4->addIndexedItem ("zhit_btof1",m_ngch,m_zhit_btof1);
221 status = m_tuple4->addIndexedItem ("qual_btof1",m_ngch,m_qual_btof1);
222 status = m_tuple4->addIndexedItem ("b1_toff_e", m_ngch,m_b1_toff_e);
223 status = m_tuple4->addIndexedItem ("b1_toff_mu",m_ngch,m_b1_toff_mu);
224 status = m_tuple4->addIndexedItem ("b1_toff_pi",m_ngch,m_b1_toff_pi);
225 status = m_tuple4->addIndexedItem ("b1_toff_k", m_ngch,m_b1_toff_k);
226 status = m_tuple4->addIndexedItem ("b1_toff_p", m_ngch,m_b1_toff_p);
227 status = m_tuple4->addIndexedItem ("b1_tsig_e", m_ngch,m_b1_tsig_e);
228 status = m_tuple4->addIndexedItem ("b1_tsig_mu",m_ngch,m_b1_tsig_mu);
229 status = m_tuple4->addIndexedItem ("b1_tsig_pi",m_ngch,m_b1_tsig_pi);
230 status = m_tuple4->addIndexedItem ("b1_tsig_k", m_ngch,m_b1_tsig_k);
231 status = m_tuple4->addIndexedItem ("b1_tsig_p", m_ngch,m_b1_tsig_p);
232 status = m_tuple4->addIndexedItem ("b1_tof", m_ngch,m_b1_tof);
233
234 status = m_tuple4->addIndexedItem ("mdedx_pid", m_ngch,m_dedx_pid);
235 status = m_tuple4->addIndexedItem ("mtof1_pid", m_ngch,m_tof1_pid);
236 status = m_tuple4->addIndexedItem ("mtof2_pid", m_ngch,m_tof2_pid);
237 status = m_tuple4->addIndexedItem ("mprob_pid", m_ngch,m_prob_pid);
238 status = m_tuple4->addIndexedItem ("mptrk_pid", m_ngch,m_ptrk_pid);
239 status = m_tuple4->addIndexedItem ("mcost_pid", m_ngch,m_cost_pid);
240 status = m_tuple4->addItem ("mpnp", m_pnp);
241 status = m_tuple4->addItem ("mpnm", m_pnm);
242
243 status = m_tuple4->addIndexedItem ("numHits", m_nggneu,m_numHits);
244 status = m_tuple4->addIndexedItem ("secondmoment", m_nggneu,m_secondmoment);
245 status = m_tuple4->addIndexedItem ("mx", m_nggneu,m_x);
246 status = m_tuple4->addIndexedItem ("my", m_nggneu,m_y);
247 status = m_tuple4->addIndexedItem ("mz", m_nggneu,m_z);
248 status = m_tuple4->addIndexedItem ("cosemc", m_nggneu,m_cosemc);
249 status = m_tuple4->addIndexedItem ("phiemc", m_nggneu,m_phiemc);
250 status = m_tuple4->addIndexedItem ("energy", m_nggneu,m_energy);
251 status = m_tuple4->addIndexedItem ("eseed", m_nggneu,m_eSeed);
252 status = m_tuple4->addIndexedItem ("me9", m_nggneu,m_e3x3);
253 status = m_tuple4->addIndexedItem ("me25", m_nggneu,m_e5x5);
254 status = m_tuple4->addIndexedItem ("mlat", m_nggneu,m_lat);
255 status = m_tuple4->addIndexedItem ("ma20", m_nggneu,m_a20);
256 status = m_tuple4->addIndexedItem ("ma42", m_nggneu,m_a42);
257
258 }
259 else {
260 log << MSG::ERROR << " Cannot book N-tuple:" << long(m_tuple4) << endmsg;
261 return StatusCode::FAILURE;
262 }
263 }
264
265 if(service("THistSvc", m_thsvc).isFailure()) {
266 log << MSG::ERROR << "Couldn't get THistSvc" << endreq;
267 return StatusCode::FAILURE;
268 }
269
270
271
272
273 TH1F* mrho0 = new TH1F("mrho0", "mass for #rho^{0}->#pi^{+}#pi^{-}", 160, 0.0, 3.2);
274 if(m_thsvc->regHist("/DQAHist/Rhopi/mrho0", mrho0).isFailure()) {
275 log << MSG::ERROR << "Couldn't register mrho0" << endreq;
276 }
277
278 TH1F* mrhop = new TH1F("mrhop", "mass for #rho^{+}->#pi^{+}#pi^{0}", 160, 0.0,3.2);
279 if(m_thsvc->regHist("/DQAHist/Rhopi/mrhop", mrhop).isFailure()) {
280 log << MSG::ERROR << "Couldn't register mrhop" << endreq;
281 }
282
283 TH1F* mrhom = new TH1F("mrhom", "mass for #rho^{-}->#pi^{-}#pi^{0}", 160, 0.0, 3.2);
284 if(m_thsvc->regHist("/DQAHist/Rhopi/mrhom", mrhom).isFailure()) {
285 log << MSG::ERROR << "Couldn't register mrhom" << endreq;
286 }
287
288
289 TH1F*
mpi0 =
new TH1F(
"mpi0",
"mass for #pi^{0}->#gamma #gamma", 50,0.08, 0.18);
290 if(m_thsvc->regHist(
"/DQAHist/Rhopi/mpi0",
mpi0).isFailure()) {
291 log << MSG::ERROR << "Couldn't register mpi0" << endreq;
292 }
293
294
295
296
297
298 log << MSG::INFO << "successfully return from initialize()" <<endmsg;
299 return StatusCode::SUCCESS;
300
301}