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