88 {
89 MsgStream log(
msgSvc(), name());
90
91 log << MSG::INFO << "in initialize()" << endmsg;
92 StatusCode status;
93
94 if(service("THistSvc", m_thsvc).isFailure()) {
95 log << MSG::ERROR << "Couldn't get THistSvc" << endreq;
96 return StatusCode::FAILURE;
97 }
98
99
100
101 TH1F* hks_dl = new TH1F("ks_dl", "ks_dl", 300, -5.0, 25.0);
102 if(m_thsvc->regHist("/DQAHist/DQAKsKpi/hks_dl", hks_dl).isFailure()) {
103 log << MSG::ERROR << "Couldn't register ks_dl" << endreq;
104 }
105
106 TH1F* hks_m = new TH1F("ks_m", "ks_m", 200,0.4, 0.6);
107 if(m_thsvc->regHist("/DQAHist/DQAKsKpi/hks_m", hks_m).isFailure()) {
108 log << MSG::ERROR << "Couldn't register ks_m" << endreq;
109 }
110
111 TH1F* hkspi_m = new TH1F("kspi_m", "kspi_m", 200,0.6, 2.6);
112 if(m_thsvc->regHist("/DQAHist/DQAKsKpi/hkspi_m", hkspi_m).isFailure()) {
113 log << MSG::ERROR << "Couldn't register kspi_m" << endreq;
114 }
115
116 TH1F* hks_p = new TH1F("ks_p", "ks_p", 100,0.0, 1.5);
117 if(m_thsvc->regHist("/DQAHist/DQAKsKpi/hks_p", hks_p).isFailure()) {
118 log << MSG::ERROR << "Couldn't register ks_p" << endreq;
119 }
120
121 TH1F* hkpi_m = new TH1F("kpi_m", "kpi_m", 200,0.6, 2.6);
122 if(m_thsvc->regHist("/DQAHist/DQAKsKpi/hkpi_m", hkpi_m).isFailure()) {
123 log << MSG::ERROR << "Couldn't register kpi_m" << endreq;
124 }
125
126
127
128
129 NTuplePtr nt(
ntupleSvc(),
"DQAFILE/KsKpi");
130 if ( nt ) m_tuple = nt;
131 else {
132 m_tuple =
ntupleSvc()->book(
"DQAFILE/KsKpi", CLID_ColumnWiseTuple,
"KsKpi ntuple");
133 if( m_tuple ) {
134 status = m_tuple->addItem("runNo", m_runNo);
135 status = m_tuple->addItem("event", m_event);
136
137
138
139 status = m_tuple->addItem("npip", m_npip);
140 status = m_tuple->addItem("npim", m_npim);
141 status = m_tuple->addItem("nkp", m_nkp);
142 status = m_tuple->addItem("nkm", m_nkm);
143 status = m_tuple->addItem("np", m_np);
144 status = m_tuple->addItem("npb", m_npb);
145
146 status = m_tuple->addItem("vfits_chi", m_vfits_chi);
147 status = m_tuple->addItem("vfits_vx", m_vfits_vx);
148 status = m_tuple->addItem("vfits_vy", m_vfits_vy);
149 status = m_tuple->addItem("vfits_vz", m_vfits_vz);
150 status = m_tuple->addItem("vfits_vr", m_vfits_vr);
151
152 status = m_tuple->addItem("vfitp_chi", m_vfitp_chi);
153 status = m_tuple->addItem("vfitp_vx", m_vfitp_vx);
154 status = m_tuple->addItem("vfitp_vy", m_vfitp_vy);
155 status = m_tuple->addItem("vfitp_vz", m_vfitp_vz);
156 status = m_tuple->addItem("vfitp_vr", m_vfitp_vr);
157
158 status = m_tuple->addItem("vfit2_chi", m_vfit2_chi);
159 status = m_tuple->addItem("vfit2_mks", m_vfit2_mks);
160 status = m_tuple->addItem("vfit2_ct", m_vfit2_ct);
161 status = m_tuple->addItem("vfit2_dl", m_vfit2_dl);
162 status = m_tuple->addItem("vfit2_dle", m_vfit2_dle);
163
164 status = m_tuple->addItem("chi2_fs4c", m_chi2_fs4c);
165 status = m_tuple->addItem("mks_fs4c", m_mks_fs4c);
166 status = m_tuple->addItem("mkspi_fs4c",m_mkspi_fs4c);
167 status = m_tuple->addItem("mksk_fs4c", m_mksk_fs4c);
168 status = m_tuple->addItem("mkpi_fs4c", m_mkpi_fs4c);
169
170 status = m_tuple->addItem("4c_chi2", m_4c_chi2);
171 status = m_tuple->addItem("4c_mks", m_4c_mks);
172 status = m_tuple->addItem("4c_mkspi", m_4c_mkspi);
173 status = m_tuple->addItem("4c_mksk", m_4c_mksk);
174 status = m_tuple->addItem("4c_mkpi", m_4c_mkpi);
175 status = m_tuple->addItem("4c_ks_px", m_4c_ks_px);
176 status = m_tuple->addItem("4c_ks_py", m_4c_ks_py);
177 status = m_tuple->addItem("4c_ks_pz", m_4c_ks_pz);
178 status = m_tuple->addItem("4c_ks_p", m_4c_ks_p);
179 status = m_tuple->addItem("4c_ks_cos", m_4c_ks_cos);
180
181 status = m_tuple->addItem("NGch", m_ngch, 0, 10);
182 status = m_tuple->addIndexedItem("pidcode", m_ngch, m_pidcode);
183 status = m_tuple->addIndexedItem("pidprob", m_ngch, m_pidprob);
184 status = m_tuple->addIndexedItem("pidchiDedx", m_ngch, m_pidchiDedx);
185 status = m_tuple->addIndexedItem("pidchiTof1", m_ngch, m_pidchiTof1);
186 status = m_tuple->addIndexedItem("pidchiTof2", m_ngch, m_pidchiTof2);
187
188 status = m_tuple->addIndexedItem("charge",m_ngch, m_charge);
189 status = m_tuple->addIndexedItem("vx0", m_ngch, m_vx0);
190 status = m_tuple->addIndexedItem("vy0", m_ngch, m_vy0);
191 status = m_tuple->addIndexedItem("vz0", m_ngch, m_vz0);
192 status = m_tuple->addIndexedItem("vr0", m_ngch, m_vr0);
193
194 status = m_tuple->addIndexedItem("vx", m_ngch, m_vx);
195 status = m_tuple->addIndexedItem("vy", m_ngch, m_vy);
196 status = m_tuple->addIndexedItem("vz", m_ngch, m_vz);
197 status = m_tuple->addIndexedItem("vr", m_ngch, m_vr);
198
199 status = m_tuple->addIndexedItem("px", m_ngch, m_px);
200 status = m_tuple->addIndexedItem("py", m_ngch, m_py);
201 status = m_tuple->addIndexedItem("pz", m_ngch, m_pz);
202 status = m_tuple->addIndexedItem("p", m_ngch, m_p);
203 status = m_tuple->addIndexedItem("cost", m_ngch, m_cost);
204
205 status = m_tuple->addIndexedItem("probPH", m_ngch, m_probPH);
206 status = m_tuple->addIndexedItem("normPH", m_ngch, m_normPH);
207 status = m_tuple->addIndexedItem("chie", m_ngch, m_chie);
208 status = m_tuple->addIndexedItem("chimu", m_ngch, m_chimu);
209 status = m_tuple->addIndexedItem("chipi", m_ngch, m_chipi);
210 status = m_tuple->addIndexedItem("chik", m_ngch, m_chik);
211 status = m_tuple->addIndexedItem("chip", m_ngch, m_chip);
212 status = m_tuple->addIndexedItem("ghit", m_ngch, m_ghit);
213 status = m_tuple->addIndexedItem("thit", m_ngch, m_thit);
214
215 status = m_tuple->addIndexedItem("e_emc", m_ngch, m_e_emc);
216
217 status = m_tuple->addIndexedItem("qual_etof", m_ngch, m_qual_etof);
218 status = m_tuple->addIndexedItem("tof_etof", m_ngch, m_tof_etof);
219 status = m_tuple->addIndexedItem("te_etof", m_ngch, m_te_etof);
220 status = m_tuple->addIndexedItem("tmu_etof", m_ngch, m_tmu_etof);
221 status = m_tuple->addIndexedItem("tpi_etof", m_ngch, m_tpi_etof);
222 status = m_tuple->addIndexedItem("tk_etof", m_ngch, m_tk_etof);
223 status = m_tuple->addIndexedItem("tp_etof", m_ngch, m_tp_etof);
224
225 status = m_tuple->addIndexedItem("qual_btof1", m_ngch, m_qual_btof1);
226 status = m_tuple->addIndexedItem("tof_btof1", m_ngch, m_tof_btof1);
227 status = m_tuple->addIndexedItem("te_btof1", m_ngch, m_te_btof1);
228 status = m_tuple->addIndexedItem("tmu_btof1", m_ngch, m_tmu_btof1);
229 status = m_tuple->addIndexedItem("tpi_btof1", m_ngch, m_tpi_btof1);
230 status = m_tuple->addIndexedItem("tk_btof1", m_ngch, m_tk_btof1);
231 status = m_tuple->addIndexedItem("tp_btof1", m_ngch, m_tp_btof1);
232
233 status = m_tuple->addIndexedItem("qual_btof2", m_ngch, m_qual_btof2);
234 status = m_tuple->addIndexedItem("tof_btof2", m_ngch, m_tof_btof2);
235 status = m_tuple->addIndexedItem("te_btof2", m_ngch, m_te_btof2);
236 status = m_tuple->addIndexedItem("tmu_btof2", m_ngch, m_tmu_btof2);
237 status = m_tuple->addIndexedItem("tpi_btof2", m_ngch, m_tpi_btof2);
238 status = m_tuple->addIndexedItem("tk_btof2", m_ngch, m_tk_btof2);
239 status = m_tuple->addIndexedItem("tp_btof2", m_ngch, m_tp_btof2);
240
241 } else {
242 log << MSG::ERROR << "Can not book N-tuple:" << long(m_tuple) << endreq;
243 }
244 }
245
246
247
248 log << MSG::INFO << "successfully return from initialize()" <<endmsg;
249 return StatusCode::SUCCESS;
250
251}