104 {
105 MsgStream log(
msgSvc(), name() );
106
107 log << MSG::INFO << "in initialize()" << endmsg;
108 StatusCode status;
109 status = service( "THistSvc", m_thistsvc );
110 if ( status.isFailure() )
111 {
112 log << MSG::INFO << "Unable to retrieve pointer to THistSvc" << endmsg;
113 return status;
114 }
115
116 m_ha_costheta = new TH1F( "PHY_HAD_SUM_costheta", "PHY_HAD_SUM_costheta", 100, -1, 1 );
117 status = m_thistsvc->regHist( "/DQAHist/Hadron/ha_costheta", m_ha_costheta );
118 m_ha_phi = new TH1F( "PHY_HAD_SUM_phi", "PHY_HAD_SUM_phi", 128, -3.2, 3.2 );
119 status = m_thistsvc->regHist( "/DQAHist/Hadron/ha_phi", m_ha_phi );
120 m_ha_pmax = new TH1F( "PHY_HAD_SUM_pmax", "PHY_HAD_SUM_pmax", 100, 0, 2 );
121 status = m_thistsvc->regHist( "/DQAHist/Hadron/ha_pmax", m_ha_pmax );
122 m_ha_emax = new TH1F( "PHY_HAD_SUM_emax", "PHY_HAD_SUM_emax", 100, 0, 2 );
123 status = m_thistsvc->regHist( "/DQAHist/Hadron/ha_emax", m_ha_emax );
124 m_ha_etot = new TH1F( "PHY_HAD_SUM_etot", "PHY_HAD_SUM_etot", 100, 0, 4 );
125 status = m_thistsvc->regHist( "/DQAHist/Hadron/ha_etot", m_ha_etot );
126 m_ha_br = new TH1F( "PHY_HAD_SUM_br", "PHY_HAD_SUM_br", 100, 0, 2 );
127 status = m_thistsvc->regHist( "/DQAHist/Hadron/ha_br", m_ha_br );
128 m_ha_bz = new TH1F( "PHY_HAD_SUM_bz", "PHY_HAD_SUM_bz", 100, 0, 2 );
129 status = m_thistsvc->regHist( "/DQAHist/Hadron/ha_bz", m_ha_bz );
130 m_ha_nneu = new TH1I( "PHY_HAD_SUM_nneu", "PHY_HAD_SUM_nneu", 20, 0, 20 );
131 status = m_thistsvc->regHist( "/DQAHist/Hadron/ha_nneu", m_ha_nneu );
132 m_ha_nchg = new TH1I( "PHY_HAD_SUM_nchg", "PHY_HAD_SUM_nchg", 20, 0, 20 );
133 status = m_thistsvc->regHist( "/DQAHist/Hadron/ha_nchg", m_ha_nchg );
134
135 m_ha_vx = new TH1F( "PHY_HAD_FLS_vx", "PHY_HAD_FLS_vx", 100, -1., 1. );
136 status = m_thistsvc->regHist( "/DQAHist/Hadron/ha_vx", m_ha_vx );
137 m_ha_vy = new TH1F( "PHY_HAD_FLS_vy", "PHY_HAD_FLS_vy", 100, -1., 1. );
138 status = m_thistsvc->regHist( "/DQAHist/Hadron/ha_vy", m_ha_vy );
139 m_ha_vz = new TH1F( "PHY_HAD_FLS_vz", "PHY_HAD_FLS_vz", 100, -10.0, 10. );
140 status = m_thistsvc->regHist( "/DQAHist/Hadron/ha_vz", m_ha_vz );
141
142 NTuplePtr nt1(
ntupleSvc(),
"DQAFILE/Hadron" );
143 if ( nt1 ) m_tuple1 = nt1;
144 else
145 {
146 m_tuple1 =
ntupleSvc()->book(
"DQAFILE/Hadron", CLID_ColumnWiseTuple,
"N-Tuple" );
147 if ( m_tuple1 )
148 {
149 status = m_tuple1->addItem( "run", m_run );
150 status = m_tuple1->addItem( "rec", m_rec );
151 status = m_tuple1->addItem( "Nchrg", m_ncharg );
152 status = m_tuple1->addItem( "Nneu", m_nneu, 0, 40 );
153 status = m_tuple1->addItem( "NGch", m_ngch, 0, 40 );
154 status = m_tuple1->addItem( "NGam", m_nGam );
155
156 status = m_tuple1->addItem( "hadrontag", m_hadrontag );
157
158 status = m_tuple1->addItem( "br", m_br );
159 status = m_tuple1->addItem( "bz", m_bz );
160 status = m_tuple1->addItem( "evis", m_evis );
161 status = m_tuple1->addItem( "thr", m_thr );
162
163 status = m_tuple1->addItem( "acoll", m_acoll );
164 status = m_tuple1->addItem( "acopl", m_acopl );
165 status = m_tuple1->addItem( "deltatof", m_deltatof );
166 status = m_tuple1->addItem( "eop1", m_eop1 );
167 status = m_tuple1->addItem( "eop2", m_eop2 );
168 status = m_tuple1->addItem( "eoeb1", m_eoeb1 );
169 status = m_tuple1->addItem( "eoeb2", m_eoeb2 );
170 status = m_tuple1->addItem( "poeb1", m_poeb1 );
171 status = m_tuple1->addItem( "poeb2", m_poeb2 );
172 status = m_tuple1->addItem( "etoeb1", m_etoeb1 );
173 status = m_tuple1->addItem( "etoeb2", m_etoeb2 );
174 status = m_tuple1->addItem( "mucinfo1", m_mucinfo1 );
175 status = m_tuple1->addItem( "mucinfo2", m_mucinfo2 );
176
177 status = m_tuple1->addIndexedItem( "delang", m_nneu, m_delang );
178 status = m_tuple1->addIndexedItem( "delphi", m_nneu, m_delphi );
179 status = m_tuple1->addIndexedItem( "delthe", m_nneu, m_delthe );
180 status = m_tuple1->addIndexedItem( "npart", m_nneu, m_npart );
181 status = m_tuple1->addIndexedItem( "nemchits", m_nneu, m_nemchits );
182 status = m_tuple1->addIndexedItem( "module", m_nneu, m_module );
183 status = m_tuple1->addIndexedItem( "x", m_nneu, m_x );
184 status = m_tuple1->addIndexedItem( "y", m_nneu, m_y );
185 status = m_tuple1->addIndexedItem( "z", m_nneu, m_z );
186
187
188
189 status = m_tuple1->addIndexedItem( "theta", m_nneu, m_theta );
190 status = m_tuple1->addIndexedItem( "phi", m_nneu, m_phi );
191 status = m_tuple1->addIndexedItem( "dx", m_nneu, m_dx );
192 status = m_tuple1->addIndexedItem( "dy", m_nneu, m_dy );
193 status = m_tuple1->addIndexedItem( "dz", m_nneu, m_dz );
194 status = m_tuple1->addIndexedItem( "dtheta", m_nneu, m_dtheta );
195 status = m_tuple1->addIndexedItem( "dphi", m_nneu, m_dphi );
196 status = m_tuple1->addIndexedItem( "energy", m_nneu, m_energy );
197 status = m_tuple1->addIndexedItem( "dE", m_nneu, m_dE );
198 status = m_tuple1->addIndexedItem( "eSeed", m_nneu, m_eSeed );
199 status = m_tuple1->addIndexedItem( "nSeed", m_nneu, m_nSeed );
200 status = m_tuple1->addIndexedItem( "e3x3", m_nneu, m_e3x3 );
201 status = m_tuple1->addIndexedItem( "e5x5", m_nneu, m_e5x5 );
202 status = m_tuple1->addIndexedItem( "secondMoment", m_nneu, m_secondMoment );
203 status = m_tuple1->addIndexedItem( "latMoment", m_nneu, m_latMoment );
204 status = m_tuple1->addIndexedItem( "a20Moment", m_nneu, m_a20Moment );
205 status = m_tuple1->addIndexedItem( "a42Moment", m_nneu, m_a42Moment );
206 status = m_tuple1->addIndexedItem( "getTime", m_nneu, m_getTime );
207 status = m_tuple1->addIndexedItem( "getEAll", m_nneu, m_getEAll );
208
209 status = m_tuple1->addIndexedItem( "charge", m_ngch, m_charge );
210 status = m_tuple1->addIndexedItem( "vx", m_ngch, m_vx0 );
211 status = m_tuple1->addIndexedItem( "vy", m_ngch, m_vy0 );
212 status = m_tuple1->addIndexedItem( "vz", m_ngch, m_vz0 );
213
214 status = m_tuple1->addIndexedItem( "px", m_ngch, m_px );
215 status = m_tuple1->addIndexedItem( "py", m_ngch, m_py );
216 status = m_tuple1->addIndexedItem( "pz", m_ngch, m_pz );
217 status = m_tuple1->addIndexedItem( "p", m_ngch, m_p );
218
219 status = m_tuple1->addIndexedItem( "kal_vx", m_ngch, m_kal_vx0 );
220 status = m_tuple1->addIndexedItem( "kal_vy", m_ngch, m_kal_vy0 );
221 status = m_tuple1->addIndexedItem( "kal_vz", m_ngch, m_kal_vz0 );
222
223 status = m_tuple1->addIndexedItem( "kal_px", m_ngch, m_kal_px );
224 status = m_tuple1->addIndexedItem( "kal_py", m_ngch, m_kal_py );
225 status = m_tuple1->addIndexedItem( "kal_pz", m_ngch, m_kal_pz );
226 status = m_tuple1->addIndexedItem( "kal_p", m_ngch, m_kal_p );
227
228 status = m_tuple1->addIndexedItem( "probPH", m_ngch, m_probPH );
229 status = m_tuple1->addIndexedItem( "normPH", m_ngch, m_normPH );
230 status = m_tuple1->addIndexedItem( "chie", m_ngch, m_chie );
231 status = m_tuple1->addIndexedItem( "chimu", m_ngch, m_chimu );
232 status = m_tuple1->addIndexedItem( "chipi", m_ngch, m_chipi );
233 status = m_tuple1->addIndexedItem( "chik", m_ngch, m_chik );
234 status = m_tuple1->addIndexedItem( "chip", m_ngch, m_chip );
235 status = m_tuple1->addIndexedItem( "ghit", m_ngch, m_ghit );
236 status = m_tuple1->addIndexedItem( "thit", m_ngch, m_thit );
237
238 status = m_tuple1->addIndexedItem( "e_emc", m_ngch, m_e_emc );
239 status = m_tuple1->addIndexedItem( "phi_emc", m_ngch, m_phi_emc );
240 status = m_tuple1->addIndexedItem( "theta_emc", m_ngch, m_theta_emc );
241
242 status = m_tuple1->addIndexedItem( "nhit_muc", m_ngch, m_nhit_muc );
243 status = m_tuple1->addIndexedItem( "nlay_muc", m_ngch, m_nlay_muc );
244 status = m_tuple1->addIndexedItem( "t_btof", m_ngch, m_t_btof );
245 status = m_tuple1->addIndexedItem( "t_etof", m_ngch, m_t_etof );
246 status = m_tuple1->addIndexedItem( "qual_etof", m_ngch, m_qual_etof );
247 status = m_tuple1->addIndexedItem( "tof_etof", m_ngch, m_tof_etof );
248 status = m_tuple1->addIndexedItem( "te_etof", m_ngch, m_te_etof );
249 status = m_tuple1->addIndexedItem( "tmu_etof", m_ngch, m_tmu_etof );
250 status = m_tuple1->addIndexedItem( "tpi_etof", m_ngch, m_tpi_etof );
251 status = m_tuple1->addIndexedItem( "tk_etof", m_ngch, m_tk_etof );
252 status = m_tuple1->addIndexedItem( "tp_etof", m_ngch, m_tp_etof );
253
254 status = m_tuple1->addIndexedItem( "qual_btof1", m_ngch, m_qual_btof1 );
255 status = m_tuple1->addIndexedItem( "tof_btof1", m_ngch, m_tof_btof1 );
256 status = m_tuple1->addIndexedItem( "te_btof1", m_ngch, m_te_btof1 );
257 status = m_tuple1->addIndexedItem( "tmu_btof1", m_ngch, m_tmu_btof1 );
258 status = m_tuple1->addIndexedItem( "tpi_btof1", m_ngch, m_tpi_btof1 );
259 status = m_tuple1->addIndexedItem( "tk_btof1", m_ngch, m_tk_btof1 );
260 status = m_tuple1->addIndexedItem( "tp_btof1", m_ngch, m_tp_btof1 );
261
262 status = m_tuple1->addIndexedItem( "qual_btof2", m_ngch, m_qual_btof2 );
263 status = m_tuple1->addIndexedItem( "tof_btof2", m_ngch, m_tof_btof2 );
264 status = m_tuple1->addIndexedItem( "te_btof2", m_ngch, m_te_btof2 );
265 status = m_tuple1->addIndexedItem( "tmu_btof2", m_ngch, m_tmu_btof2 );
266 status = m_tuple1->addIndexedItem( "tpi_btof2", m_ngch, m_tpi_btof2 );
267 status = m_tuple1->addIndexedItem( "tk_btof2", m_ngch, m_tk_btof2 );
268 status = m_tuple1->addIndexedItem( "tp_btof2", m_ngch, m_tp_btof2 );
269 status = m_tuple1->addIndexedItem( "pidcode", m_ngch, m_pidcode );
270 status = m_tuple1->addIndexedItem( "pidprob", m_ngch, m_pidprob );
271 status = m_tuple1->addIndexedItem( "pidchiDedx", m_ngch, m_pidchiDedx );
272 status = m_tuple1->addIndexedItem( "pidchiTof1", m_ngch, m_pidchiTof1 );
273 status = m_tuple1->addIndexedItem( "pidchiTof2", m_ngch, m_pidchiTof2 );
274
275 status = m_tuple1->addItem( "px_cms_ep", m_px_cms_ep );
276 status = m_tuple1->addItem( "py_cms_ep", m_py_cms_ep );
277 status = m_tuple1->addItem( "pz_cms_ep", m_pz_cms_ep );
278 status = m_tuple1->addItem( "e_cms_ep", m_e_cms_ep );
279 status = m_tuple1->addItem( "cos_ep", m_cos_ep );
280 status = m_tuple1->addItem( "px_cms_em", m_px_cms_em );
281 status = m_tuple1->addItem( "py_cms_em", m_py_cms_em );
282 status = m_tuple1->addItem( "pz_cms_em", m_pz_cms_em );
283 status = m_tuple1->addItem( "e_cms_em", m_e_cms_em );
284 status = m_tuple1->addItem( "cos_em", m_cos_em );
285 status = m_tuple1->addItem( "mass_ee", m_mass_ee );
286 status = m_tuple1->addItem( "emax", m_emax );
287 status = m_tuple1->addItem( "esum", m_esum );
288 status = m_tuple1->addItem( "npip", m_npip );
289 status = m_tuple1->addItem( "npim", m_npim );
290 status = m_tuple1->addItem( "nkp", m_nkp );
291 status = m_tuple1->addItem( "nkm", m_nkm );
292 status = m_tuple1->addItem( "np", m_np );
293 status = m_tuple1->addItem( "npb", m_npb );
294
295 status = m_tuple1->addItem( "nep", m_nep );
296 status = m_tuple1->addItem( "nem", m_nem );
297 status = m_tuple1->addItem( "nmup", m_nmup );
298 status = m_tuple1->addItem( "nmum", m_nmum );
299 }
300 else
301 {
302 log << MSG::ERROR << " Cannot book N-tuple:" << long( m_tuple1 ) << endmsg;
303 return StatusCode::FAILURE;
304 }
305 }
306
307
308
309
310
311 log << MSG::INFO << "successfully return from initialize()" << endmsg;
312 return StatusCode::SUCCESS;
313}