72{
73 MsgStream log(
msgSvc(), name());
74 log << MSG::INFO << "in initialize()" << endmsg;
75
76 for(int i = 0; i < 15; i++){
77 m_sel_number[i] = 0;
78 }
79
80 StatusCode status;
81
82 if (m_output == 1) {
83 NTuplePtr nt1(
ntupleSvc(),
"FILE999/glbvtx");
84 if(nt1) m_tuple1 = nt1;
85 else {
86 m_tuple1 =
ntupleSvc()->book (
"FILE999/glbvtx", CLID_ColumnWiseTuple,
"global vertex");
87 if(m_tuple1) {
88 status = m_tuple1->addItem("gvx", m_gvx);
89 status = m_tuple1->addItem("gvy", m_gvy);
90 status = m_tuple1->addItem("gvz", m_gvz);
91 status = m_tuple1->addItem("chig", m_chig);
92 status = m_tuple1->addItem("ndofg", m_ndofg);
93 status = m_tuple1->addItem("probg", m_probg);
94 } else {
95 log << MSG::ERROR << "Cannot book N-tuple:" << long(m_tuple1) << endmsg;
96 return StatusCode::FAILURE;
97 }
98 }
99
100 NTuplePtr nt2(
ntupleSvc(),
"FILE999/chisq");
101 if(nt2) m_tuple2 = nt2;
102 else {
103 m_tuple2 =
ntupleSvc()->book (
"FILE999/chisq", CLID_ColumnWiseTuple,
"chi-square of ");
104 if(m_tuple2) {
105 status = m_tuple2->addItem("chis", m_chis);
106 status = m_tuple2->addItem("probs", m_probs);
107 status = m_tuple2->addItem("chif", m_chif);
108 status = m_tuple2->addItem("probf", m_probf);
109 } else {
110 log << MSG::ERROR << "Cannot book N-tuple:" << long(m_tuple2) << endmsg;
111 return StatusCode::FAILURE;
112 }
113 }
114
115 NTuplePtr nt3(
ntupleSvc(),
"FILE999/Pull");
116 if(nt3) m_tuple3 = nt3;
117 else {
118 m_tuple3 =
ntupleSvc()->book (
"FILE999/Pull", CLID_ColumnWiseTuple,
"Pull");
119 if(m_tuple3) {
120 status = m_tuple3->addItem("pull_drho", m_pull_drho);
121 status = m_tuple3->addItem("pull_phi", m_pull_phi);
122 status = m_tuple3->addItem("pull_kapha", m_pull_kapha);
123 status = m_tuple3->addItem("pull_dz", m_pull_dz);
124 status = m_tuple3->addItem("pull_lamb", m_pull_lamb);
125 status = m_tuple3->addItem("pull_momentum", m_pull_momentum);
126 } else {
127 log << MSG::ERROR << "Cannot book N-tuple:" << long(m_tuple3) << endmsg;
128 return StatusCode::FAILURE;
129 }
130 }
131
132 NTuplePtr nt4(
ntupleSvc(),
"FILE999/kalvtx");
133 if(nt4) m_tuple4 = nt4;
134 else {
135 m_tuple4 =
ntupleSvc()->book (
"FILE999/kalvtx", CLID_ColumnWiseTuple,
"kalman vertex");
136 if(m_tuple4) {
137 status = m_tuple4->addItem("kvx", m_kvx);
138 status = m_tuple4->addItem("kvy", m_kvy);
139 status = m_tuple4->addItem("kvz", m_kvz);
140 status = m_tuple4->addItem("chik", m_chik);
141 status = m_tuple4->addItem("ndofk", m_ndofk);
142 status = m_tuple4->addItem("probk", m_probk);
143 } else {
144 log << MSG::ERROR << "Cannot book N-tuple:" << long(m_tuple4) << endmsg;
145 return StatusCode::FAILURE;
146 }
147 }
148 }
149
150 log << MSG::INFO << "successfully return from initialize()" <<endmsg;
151 return StatusCode::SUCCESS;
152}