65 MsgStream log(
msgSvc(), name());
66 log << MSG::INFO <<
"in initialize()" << endmsg;
70 if ( nt1 ) m_tuple1 = nt1;
72 m_tuple1 =
ntupleSvc()->book (
"FILE1/ec", CLID_ColumnWiseTuple,
"ks N-Tuple example");
74 status = m_tuple1->addItem (
"ef", m_ef);
75 status = m_tuple1->addItem (
"e5", m_e5);
76 status = m_tuple1->addItem (
"ec", m_ec);
77 status = m_tuple1->addItem (
"ct", m_ct);
80 log << MSG::ERROR <<
" Cannot book N-tuple:" << long(m_tuple1) << endmsg;
81 return StatusCode::FAILURE;
95 double energy,thetaid,peak,peakerr,res,reserr;
97 DataPath=getenv(
"MCCORROOT");
98 DataPath +=
"/share/evset.txt";
100 in1.open(DataPath.c_str(),ios::in);
102 double ep[18]={0.03,0.04,0.05,0.075,0.1,0.125,0.15,0.2,0.25,0.3,0.4,0.5,0.75,1.0,1.25,1.5,1.75,2.0};
103 for(
int i=0;i<504;i++){
111 dt->SetPoint(i,
energy,thetaid,peak);
112 dt->SetPointError(i,0,0,peakerr);
115 log << MSG::INFO <<
"successfully return from initialize()" <<endmsg;
116 return StatusCode::SUCCESS;
124 MsgStream log(
msgSvc(), name());
125 log << MSG::INFO <<
"in execute()" << endreq;
127 SmartDataPtr<Event::EventH> eventHeader(eventSvc(),
"/Event");
130 log << MSG::DEBUG <<
"ncharg, nneu, tottks = "
131 << evtRecEvent->totalCharged() <<
" , "
132 << evtRecEvent->totalNeutral() <<
" , "
133 << evtRecEvent->totalTracks() <<endreq;
138 for(
int i = 0; i< evtRecEvent->totalTracks(); i++) {
141 if(!(*itTrk)->isEmcShowerValid())
continue;
144 int intid = emcTrk->
cellId();
148 if(getthetaid>21)getthetaid=43-getthetaid;
149 if(getmodule==1)getthetaid=getthetaid+6;
150 double energyF = emcTrk->
energy();
151 double e5x5 = emcTrk->
e5x5();
153 double dthetaid=double(getthetaid);