73 {
74 MsgStream log(
msgSvc(), name());
75
76 log << MSG::INFO << "in initialize()" << endmsg;
77
78 StatusCode status;
79
80 status = service("THistSvc", m_thistsvc);
81 if(status.isFailure() ){
82 log << MSG::INFO << "Unable to retrieve pointer to THistSvc" << endreq;
83 return status;
84 }
85 m_pi_vx = new TH1F( "pi_vx", "pi_vx", 100,-1.0,1.0 );
86 status = m_thistsvc->regHist("/VAL/PHY/pi_vx", m_pi_vx);
87 m_pi_vy = new TH1F( "pi_vy", "pi_vy", 100,-1.0,1.0 );
88 status = m_thistsvc->regHist("/VAL/PHY/pi_vy", m_pi_vy);
89 m_pi_vz = new TH1F( "pi_vz", "pi_vz", 100,-6.0,6.0 );
90 status = m_thistsvc->regHist("/VAL/PHY/pi_vz", m_pi_vz);
91 m_pip_mom = new TH1F( "pip_mom", "pip_moment", 100,0.0,1.6 );
92 status = m_thistsvc->regHist("/VAL/PHY/pip_mom", m_pip_mom);
93 m_pim_mom = new TH1F( "pim_mom", "pim_moment", 100,0.0,1.6 );
94 status = m_thistsvc->regHist("/VAL/PHY/pim_mom", m_pim_mom);
95 m_rhop_mass = new TH1F( "rhop_mass", "rhop_mass", 100,0.0,1.5 );
96 status = m_thistsvc->regHist("/VAL/PHY/rhop_mass", m_rhop_mass);
97 m_rhom_mass = new TH1F( "rhom_mass", "rhom_mass", 100,0.0,1.5 );
98 status = m_thistsvc->regHist("/VAL/PHY/rhom_mass", m_rhom_mass);
99 m_rho0_mass = new TH1F( "rho0_mass", "rho0_mass", 100,0.0,1.5 );
100 status = m_thistsvc->regHist("/VAL/PHY/rho0_mass", m_rho0_mass);
101 m_pi0_mass = new TH1F( "pi0_mass", "pi0_mass", 100,0.0,0.5 );
102 status = m_thistsvc->regHist("/VAL/PHY/pi0_mass", m_pi0_mass);
103 m_chisq_4c = new TH1F( "chisq_4c", "chisq_4c", 100,0.0,150. );
104 status = m_thistsvc->regHist("/VAL/PHY/chisq_4c", m_chisq_4c);
105 m_chisq_5c = new TH1F( "chisq_5c", "chisq_5c", 100,0.0,150. );
106 status = m_thistsvc->regHist("/VAL/PHY/chisq_5c", m_chisq_5c);
107
108 m_cos_pip = new TH1F( "cos_pip", "cos_pip", 100, -1.0,1.0);
109 status = m_thistsvc->regHist("/VAL/PHY/cos_pip", m_cos_pip);
110 m_cos_pim = new TH1F( "cos_pim", "cos_pim", 100, -1.0,1.0);
111 status = m_thistsvc->regHist("/VAL/PHY/cos_pim", m_cos_pim);
112
113 m_chipi_dedx = new TH1F( "chipi_dedx", "chipi_dedx", 60,-5.0,10. );
114 status = m_thistsvc->regHist("/VAL/PHY/chipi_dedx", m_chipi_dedx);
115 m_chie_dedx = new TH1F( "chie_dedx", "chie_dedx", 60,-15.0,5. );
116 status = m_thistsvc->regHist("/VAL/PHY/chie_dedx", m_chie_dedx);
117 m_chimu_dedx = new TH1F( "chimu_dedx", "chimu_dedx", 60,-5.0,10. );
118 status = m_thistsvc->regHist("/VAL/PHY/chimu_dedx", m_chimu_dedx);
119 m_chik_dedx = new TH1F( "chik_dedx", "chik_dedx", 100,-20.0,10. );
120 status = m_thistsvc->regHist("/VAL/PHY/chik_dedx", m_chik_dedx);
121 m_chip_dedx = new TH1F( "chip_dedx", "chip_dedx", 100,-20.0,5. );
122 status = m_thistsvc->regHist("/VAL/PHY/chip_dedx", m_chip_dedx);
123
125 if ( nt4 ) m_tuple4 = nt4;
126 else {
127 m_tuple4 =
ntupleSvc()->book (
"FILE1/h4", CLID_ColumnWiseTuple,
"4gam6pi Ntuple");
128 if ( m_tuple4 ) {
129 status = m_tuple4->addItem ("ngam", m_ngoodneu);
130 status = m_tuple4->addItem ("npip", m_npip);
131 status = m_tuple4->addItem ("npim", m_npim);
132 status = m_tuple4->addItem ("ngoodch", m_ngoodch);
133 status = m_tuple4->addItem ("chisq4c", m_chisq4c);
134 status = m_tuple4->addItem ("ppi04c", m_ppi0);
135 status = m_tuple4->addItem ("mpi04c", m_mpi0);
136 status = m_tuple4->addItem ("chisq5c", m_chisq5c);
137 status = m_tuple4->addItem ("ppi05c", m_ppi0fit);
138 status = m_tuple4->addItem ("mpi05c", m_mpi0fit);
139 status = m_tuple4->addItem ("g1inpi0the", m_g1inpi0the);
140 status = m_tuple4->addItem ("g2inpi0the", m_g2inpi0the);
141 status = m_tuple4->addItem ("theta2pi", m_theta2pi);
142 status = m_tuple4->addItem ("ppip", m_ppip);
143 status = m_tuple4->addItem ("ppim", m_ppim);
144 status = m_tuple4->addItem ("p2pi", m_p2pi);
145 status = m_tuple4->addItem ("m2pi", m_m2pi);
146 status = m_tuple4->addItem ("ppip0", m_ppip0);
147 status = m_tuple4->addItem ("mpip0", m_mpip0);
148 status = m_tuple4->addItem ("ppim0", m_ppim0);
149 status = m_tuple4->addItem ("mpim0", m_mpim0);
150 status = m_tuple4->addItem ("eneumiss", m_eneumiss);
151 status = m_tuple4->addItem ("pneumiss", m_pneumiss);
152 status = m_tuple4->addItem ("mneumiss", m_mneumiss);
153
154 }
155 else {
156 log << MSG::ERROR << " Cannot book N-tuple:" << long(m_tuple4) << endmsg;
157 return StatusCode::FAILURE;
158 }
159 }
160
162 if ( nt5 ) m_tuple5 = nt5;
163 else {
164 m_tuple5 =
ntupleSvc()->book (
"FILE1/h5", CLID_ColumnWiseTuple,
"4gam6pi Ntuple");
165 if ( m_tuple5 ) {
166 status = m_tuple5->addItem ("m2graw", m_m2graw);
167 status = m_tuple5->addItem ("emiss", m_emiss);
168 status = m_tuple5->addItem ("pmiss", m_pmiss);
169 status = m_tuple5->addItem ("mmiss", m_mmiss);
170 status = m_tuple5->addItem ("prho0", m_prho0);
171 status = m_tuple5->addItem ("mrho0", m_mrho0);
172 status = m_tuple5->addItem ("pmrho0", m_pmrho0);
173 status = m_tuple5->addItem ("mmrho0", m_mmrho0);
174 status = m_tuple5->addItem ("prhop", m_prhop);
175 status = m_tuple5->addItem ("mrhop", m_mrhop);
176 status = m_tuple5->addItem ("pmrhom", m_pmrhom);
177 status = m_tuple5->addItem ("mmrhom", m_mmrhom);
178 status = m_tuple5->addItem ("prhom", m_prhom);
179 status = m_tuple5->addItem ("ppipraw", m_ppipraw);
180 status = m_tuple5->addItem ("mrhom", m_mrhom);
181
182 }
183 else {
184 log << MSG::ERROR << " Cannot book N-tuple:" << long(m_tuple4) << endmsg;
185 return StatusCode::FAILURE;
186 }
187 }
188
189
190
191
192
193
194 log << MSG::INFO << "successfully return from initialize()" <<endmsg;
195 return StatusCode::SUCCESS;
196
197}