74 {
75 MsgStream log(
msgSvc(), name());
76
77 log << MSG::INFO << "in initialize()" << endmsg;
78
79 StatusCode status;
80
81 if(service("THistSvc", m_thsvc).isFailure()) {
82 log << MSG::ERROR << "Couldn't get THistSvc" << endreq;
83 return StatusCode::FAILURE;
84 }
85
86 TH1F* inclphi_mass = new TH1F("InclPhi_mass","INCLUSIVE_PHI_MASS",80,1.01,1.05);
87 inclphi_mass->GetXaxis()->SetTitle("M_{KK} (GeV)");
88 inclphi_mass->GetYaxis()->SetTitle("Nentries/0.5MeV/c^{2}");
89 if(m_thsvc->regHist("/DQAHist/InclPhi/InclPhi_mass", inclphi_mass).isFailure()) {
90 log << MSG::ERROR << "Couldn't register inclphi_mass" << endreq;
91 }
92
93
94
95 NTuplePtr nt1(
ntupleSvc(),
"DQAFILE/InclPhi");
96 if ( nt1 ) m_tuple1 = nt1;
97 else {
98 m_tuple1 =
ntupleSvc()->book (
"DQAFILE/InclPhi1", CLID_ColumnWiseTuple,
"inclphi Ntuple");
99 if ( m_tuple1 ) {
100 status = m_tuple1->addItem ("mphiall", m_mphiall);
101 status = m_tuple1->addItem ("mpphiall", m_pphiall);
102 }
103 else {
104 log << MSG::ERROR << " Cannot book N-tuple:" << long(m_tuple1) << endmsg;
105 return StatusCode::FAILURE;
106 }
107 }
108 NTuplePtr nt2(
ntupleSvc(),
"DQAFILE/InclPhi2");
109 if ( nt2 ) m_tuple2 = nt2;
110 else {
111 m_tuple2 =
ntupleSvc()->book (
"DQAFILE/InclPhi2", CLID_ColumnWiseTuple,
"inclphi Ntuple");
112 if ( m_tuple2 ) {
113 status = m_tuple2->addItem ("nkp", m_nkp);
114 status = m_tuple2->addItem ("nkm", m_nkm);
115 status = m_tuple2->addItem ("ncharge", m_ncharge);
116 status = m_tuple2->addItem ("difchi0", m_difchi);
117 status = m_tuple2->addItem ("mmphi", m_mphi);
118 status = m_tuple2->addItem ("pphi", m_pphi);
119 status = m_tuple2->addItem ("pk1", m_pk1);
120 }
121 else {
122 log << MSG::ERROR << " Cannot book N-tuple:" << long(m_tuple2) << endmsg;
123 return StatusCode::FAILURE;
124 }
125 }
126
127
128
129
130 log << MSG::INFO << "successfully return from initialize()" <<endmsg;
131 return StatusCode::SUCCESS;
132
133}