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