BOSS 7.1.0
BESIII Offline Software System
Loading...
Searching...
No Matches
DDecay Class Reference

#include <DDecay.h>

+ Inheritance diagram for DDecay:

Public Member Functions

 DDecay (const std::string &name, ISvcLocator *pSvcLocator)
 
StatusCode initialize ()
 
StatusCode execute ()
 
StatusCode finalize ()
 

Detailed Description

Definition at line 10 of file DDecay.h.

Constructor & Destructor Documentation

◆ DDecay()

DDecay::DDecay ( const std::string &  name,
ISvcLocator *  pSvcLocator 
)

Definition at line 51 of file DDecay.cxx.

51 :
52 Algorithm(name, pSvcLocator){
53
54}

Member Function Documentation

◆ execute()

StatusCode DDecay::execute ( )

Accessing Ks list

Accessing pi0 list

access pi0 using dtagtool

or accessing pi0 information this way

Access pi0 children

ONLY Break out of loop if tag mode has one pi0 child

accessing Ks using dtagtool

Ks information

Needed to reject Lambda (and conversion?) combinations

ONLY Break out of loop if tag mode has one Ks child

Definition at line 141 of file DDecay.cxx.

141 {
142
143 MsgStream log(msgSvc(), name());
144 log << MSG::INFO << "in execute()" << endreq;
145
146 SmartDataPtr<Event::EventHeader> eventHeader(eventSvc(),"/Event/EventHeader");
147 int runNo=eventHeader->runNumber();
148 int eventNo=eventHeader->eventNumber();
149
150 //cout<<"**************************************"<<endl;
151 //cout<<"event "<<eventNo<<endl;
152 //cout<<"**************************************"<<endl;
153
154 /// Accessing Ks list
155 SmartDataPtr<EvtRecVeeVertexCol> evtRecVeeVertexCol(eventSvc(), "/Event/EvtRec/EvtRecVeeVertexCol");
156 if ( ! evtRecVeeVertexCol ) {
157 log << MSG::FATAL << "Could not find EvtRecVeeVertexCol" << endreq;
158 return StatusCode::FAILURE;
159 }
160
161 /// Accessing pi0 list
162 SmartDataPtr<EvtRecPi0Col> recPi0Col(eventSvc(), "/Event/EvtRec/EvtRecPi0Col");
163 if ( ! recPi0Col ) {
164 log << MSG::FATAL << "Could not find EvtRecPi0Col" << endreq;
165 return StatusCode::FAILURE;
166 }
167
168
169 //get primary vertex from db
170 Hep3Vector xorigin(0,0,0);
171 IVertexDbSvc* vtxsvc;
172 Gaudi::svcLocator()->service("VertexDbSvc", vtxsvc);
173 if (vtxsvc->isVertexValid()) {
174
175 //vertex[0] = vx; vertex[1]= vy; vertex[2] = vz;
176 double* vertex = vtxsvc->PrimaryVertex();
177 xorigin.setX(vertex[0]);
178 xorigin.setY(vertex[1]);
179 xorigin.setZ(vertex[2]);
180 }
181
182
183 //****************************
184
185 //use util tool to get dtaglist
186
187 DTagTool dtagTool;
188 if( dtagTool.isDTagListEmpty() ){
189 //cout<<"no D candidates found"<<endl;
190 return StatusCode::SUCCESS;
191 }
192
193 DTagToolIterator iter_begin = dtagTool.modes_begin();
194 DTagToolIterator iter_end =dtagTool.modes_end();
195
196 cout<<"size of dtag:******:"<<iter_end-iter_begin<<endl;
197
198 int nCharge = 0;
199
200
201 //test to get one mode only
202 cout<<"test single mode search :"<< EvtRecDTag::kD0toKPi<<endl;
203
204 //access all canddidates of one mode
205 vector<int> mode = dtagTool.mode( EvtRecDTag::kD0toKPi );
206 cout<<" there are "<< mode.size() <<" candidates for this mode" <<endl;
207 for( int i=0; i < mode.size(); i++){
208
209 DTagToolIterator iter= dtagTool.modes_begin()+ mode[i];
210 cout<<"No."<<i+1<<" candidate deltaE is : "<< (*iter)->deltaE()<<endl;
211
212 }
213
214
215 //loop the whole DTag list with order when they are filled , do all kinds of fit in side the loop
216
217 for (DTagToolIterator iter_dtag=iter_begin; iter_dtag != iter_end; iter_dtag++){
218
219 //decay mode name
220 cout<<"***********"<<endl;
221 cout<<"***********"<<endl;
222 dtagTool<< iter_dtag;
223
224
225 //****************************************************
226 //mode D0 to KPi only
227 //****************************************************
228
229 if((*iter_dtag)->decayMode()==EvtRecDTag::kD0toKPi) {
230
231 HepLorentzVector p4=(*iter_dtag)->p4();
232 p4.boost(-0.011,0,0);
233
234 Hep3Vector p3=p4.v();
235
236 m_mode=(*iter_dtag)->decayMode();
237 m_type=(*iter_dtag)->type();
238 m_charge=(*iter_dtag)->charge();
239 m_charm=(*iter_dtag)->charm();
240 m_numofchildren=(*iter_dtag)->numOfChildren();
241 m_mass=(*iter_dtag)->mass();
242 m_mBC=(*iter_dtag)->mBC();
243 m_e=(*iter_dtag)->beamE();
244 m_deltae=(*iter_dtag)->deltaE();
245
246 SmartRefVector<EvtRecTrack> tracks=(*iter_dtag)->tracks();
247 SmartRefVector<EvtRecTrack> othertracks=(*iter_dtag)->otherTracks();
248 SmartRefVector<EvtRecTrack> othershowers=(*iter_dtag)->otherShowers();
249 m_ntrk=othertracks.size();
250
251 m_tuple4->write();
252
253
254 RecMdcKalTrack *mdcKalTrk1 = tracks[0]->mdcKalTrack();
255 RecMdcKalTrack *mdcKalTrk2 = tracks[1]->mdcKalTrack();
256 cout<<"same side track 1 charge is:"<<mdcKalTrk1->charge()<<endl;
257 cout<<"same side track 2 charge is:"<<mdcKalTrk2->charge()<<endl;
258
259 for(int tk=0; tk<othertracks.size(); tk++){
260 RecMdcTrack *mdcTrk = othertracks[tk]->mdcTrack();
261 double pch=mdcTrk->p();
262 double x0=mdcTrk->x();
263 double y0=mdcTrk->y();
264 double z0=mdcTrk->z();
265 double phi0=mdcTrk->helix(1);
266 double xp=xorigin.x();
267 double yp=xorigin.y();
268 double Rxy=(x0-xp)*cos(phi0)+(y0-yp)*sin(phi0);
269
270 m_vx0=x0;
271 m_vy0=y0;
272 m_vz0=z0;
273 m_vr0=Rxy;
274 m_tuple1->write();
275 nCharge += mdcTrk->charge();
276
277 std::cout<<"other side track ID is: "<<othertracks[tk]->trackId()<<std::endl;
278
279 if(dtagTool.isPion(othertracks[tk]) )
280 cout<<"it is pion"<<endl;
281 if(dtagTool.isKaon(othertracks[tk]) )
282 cout<<"it is kaon"<<endl;
283
284 //std::cout<<"momentum="<<pch<<", x0="<<x0<<std::endl;
285
286 } //end of looping charged othertracks
287
288 for(int i=0; i<othershowers.size(); i++){
289 //RecEmcShower *shr = othershowers[i]->emcShower();
290 //std::cout<<"shower ID is: "<<othershowers[i]->trackId()<<std::endl;
291 }
292
293 } //end of D0 to K Pi mode
294
295
296
297 //****************************************************
298 //mode D0 to KPiPi0 only
299 //****************************************************
300 if((*iter_dtag)->decayMode()==EvtRecDTag::kD0toKPiPi0) {
301
302 m_mode=(*iter_dtag)->decayMode();
303 m_type=(*iter_dtag)->type();
304 m_charge=(*iter_dtag)->charge();
305 m_charm=(*iter_dtag)->charm();
306 m_numofchildren=(*iter_dtag)->numOfChildren();
307 m_mass=(*iter_dtag)->mass();
308 m_mBC=(*iter_dtag)->mBC();
309 m_e=(*iter_dtag)->beamE();
310 m_deltae=(*iter_dtag)->deltaE();
311
312 SmartRefVector<EvtRecTrack> othertracks=(*iter_dtag)->otherTracks();
313 m_ntrk=othertracks.size();
314
315 m_tuple4->write();
316
317
318 /// access pi0 using dtagtool
319 // users have to use second argument to tell pi0Id function the number of pi0s from the mode
320 // default number is 1
321 vector<int> pi0id= dtagTool.pi0Id(iter_dtag);
322 cout<<"xxxxxxxxxxxxxxxxxxxxxxxxx"<<"num of pi0 is:"<<pi0id.size()<<endl;
323
324 for(int i=0; i<pi0id.size(); i++){
325 pi0Iterator pi0Itr= dtagTool.pi0_begin()+pi0id[i];
326 cout<<"pi0Mass: " << (*pi0Itr)->unconMass() << endl;
327
328 }
329
330 /// or accessing pi0 information this way
331 SmartRefVector<EvtRecTrack> showers=(*iter_dtag)->showers();
332
333 for(EvtRecPi0Col::iterator pi0Itr = recPi0Col->begin();
334 pi0Itr < recPi0Col->end(); pi0Itr++){
335
336 /// Access pi0 children
337 EvtRecTrack* heGammaTrk = const_cast<EvtRecTrack*>((*pi0Itr)->hiEnGamma());
338 EvtRecTrack* leGammaTrk = const_cast<EvtRecTrack*>((*pi0Itr)->loEnGamma());
339
340 int heGammaTrkId = heGammaTrk->trackId();
341 int leGammaTrkId = leGammaTrk->trackId();
342
343 if((heGammaTrkId != showers[0]->trackId())&&
344 (heGammaTrkId != showers[1]->trackId())) continue;
345 if((leGammaTrkId != showers[0]->trackId())&&
346 (leGammaTrkId != showers[1]->trackId())) continue;
347
348 const RecEmcShower* heGamma = heGammaTrk->emcShower();
349 const RecEmcShower* leGamma = leGammaTrk->emcShower();
350
351 cout<<"pi0Mass: " << (*pi0Itr)->unconMass() << endl;
352 cout<<" E(high): " << heGamma->energy() << endl;
353 cout<<" E(low) : " << leGamma->energy() << endl;
354
355 m_pi0mass = (*pi0Itr)->unconMass();
356 m_pi0mode = (*iter_dtag)->decayMode();
357 m_tuple3->write();
358
359 /// ONLY Break out of loop if tag mode has one pi0 child
360 break;
361
362 } // End "pi0Itr" FOR Loop
363
364
365 }// end of D0 to KPIPI0
366
367
368 //****************************************************
369 //mode D0 to KsPiPi only
370 //****************************************************
371 if((*iter_dtag)->decayMode()==EvtRecDTag::kD0toKsPiPi) {
372
373 m_mode=(*iter_dtag)->decayMode();
374 m_type=(*iter_dtag)->type();
375 m_charge=(*iter_dtag)->charge();
376 m_charm=(*iter_dtag)->charm();
377 m_numofchildren=(*iter_dtag)->numOfChildren();
378 m_mass=(*iter_dtag)->mass();
379 m_mBC=(*iter_dtag)->mBC();
380 m_e=(*iter_dtag)->beamE();
381 m_deltae=(*iter_dtag)->deltaE();
382
383 SmartRefVector<EvtRecTrack> othertracks=(*iter_dtag)->otherTracks();
384 m_ntrk=othertracks.size();
385
386 m_tuple4->write();
387
388 /// accessing Ks using dtagtool
389 // users have to use second argument to tell KsId function the number of Ks from the mode
390 // default number is 1
391 vector<int> ksid= dtagTool.ksId(iter_dtag);
392 cout<<"xxxxxxxxxxxxxxxxxxxxxxxxx"<<"num of ks is:"<<ksid.size()<<endl;
393
394 for(int i=0; i<ksid.size(); i++){
395 ksIterator ksItr= dtagTool.ks_begin()+ksid[i];
396 cout<<"ksMass: " << (*ksItr)->mass() << endl;
397
398 }
399
400
401 /// Ks information
402 SmartRefVector<EvtRecTrack> tracks=(*iter_dtag)->tracks();
403
404 for(EvtRecVeeVertexCol::iterator ksItr = evtRecVeeVertexCol->begin();
405 ksItr < evtRecVeeVertexCol->end(); ksItr++){
406
407 /// Needed to reject Lambda (and conversion?) combinations
408 if((*ksItr)->vertexId() != 310) continue;
409
410 EvtRecTrack* aKsChild1Trk = (*ksItr)->daughter(0);
411 EvtRecTrack* aKsChild2Trk = (*ksItr)->daughter(1);
412
413 int ksChild1TrkId = aKsChild1Trk->trackId();
414 int ksChild2TrkId = aKsChild2Trk->trackId();
415
416 if((ksChild1TrkId != tracks[0]->trackId())&&
417 (ksChild1TrkId != tracks[1]->trackId())) continue;
418 if((ksChild2TrkId != tracks[0]->trackId())&&
419 (ksChild2TrkId != tracks[1]->trackId())) continue;
420
421 cout<<"ksMass: " << (*ksItr)->mass() << endl;
422
423 Hep3Vector ks_D3(0,0,0);
424 ks_D3.set((*ksItr)->w()[4],(*ksItr)->w()[5],(*ksItr)->w()[6]);
425
426 m_ksmass = (*ksItr)->mass();
427 m_ksd = ks_D3.mag();
428 m_ksmode = (*iter_dtag)->decayMode();
429 m_tuple2->write();
430
431 /// ONLY Break out of loop if tag mode has one Ks child
432 break;
433
434 } // End "ksItr" FOR Loop
435
436 }// end of D0 to KSpipi
437
438
439 //****************************************************
440 //mode D+ to K- pi+ pi- only
441 //****************************************************
442 if((*iter_dtag)->decayMode()==EvtRecDTag::kDptoKPiPi) {
443
444 m_mode=(*iter_dtag)->decayMode();
445 m_type=(*iter_dtag)->type();
446 m_charge=(*iter_dtag)->charge();
447 m_charm=(*iter_dtag)->charm();
448 m_numofchildren=(*iter_dtag)->numOfChildren();
449 m_mass=(*iter_dtag)->mass();
450 m_mBC=(*iter_dtag)->mBC();
451 m_e=(*iter_dtag)->beamE();
452 m_deltae=(*iter_dtag)->deltaE();
453
454 SmartRefVector<EvtRecTrack> othertracks=(*iter_dtag)->otherTracks();
455 m_ntrk=othertracks.size();
456
457 m_tuple4->write();
458 }// end of Dp to K pi pi
459
460 //****************************************************
461 //mode Ds to Ks pi+ only
462 //****************************************************
463 if((*iter_dtag)->decayMode()==EvtRecDTag::kDstoKsPi) {
464
465 m_mode=(*iter_dtag)->decayMode();
466 m_type=(*iter_dtag)->type();
467 m_charge=(*iter_dtag)->charge();
468 m_charm=(*iter_dtag)->charm();
469 m_numofchildren=(*iter_dtag)->numOfChildren();
470 m_mass=(*iter_dtag)->mass();
471 m_mBC=(*iter_dtag)->mBC();
472 m_e=(*iter_dtag)->beamE();
473 m_deltae=(*iter_dtag)->deltaE();
474
475 SmartRefVector<EvtRecTrack> othertracks=(*iter_dtag)->otherTracks();
476 m_ntrk=othertracks.size();
477
478 m_tuple4->write();
479 }// end of Ds to Ks pi
480
481
482 } //end of looping over the entire DTag list
483
484
485 //************************
486 cout<<"**************"<<endl;
487 cout<<"**************"<<endl;
488 cout<<"test print only D0/Dp/Ds modes"<<endl;
489
490 //looop only D0 modes
491 vector<int> d0itindex= dtagTool.D0modes();
492 for( int i=0; i< d0itindex.size(); i++){
493 DTagToolIterator iter= dtagTool.modes_begin()+d0itindex[i];
494 cout<<"No."<<i+1<<" D0 mode is :"<< (*iter)->decayMode()<<endl;
495 }
496
497 //loop only Dp modes
498 vector<int> dpitindex= dtagTool.Dpmodes();
499 for( int i=0; i< dpitindex.size(); i++){
500 DTagToolIterator iter= dtagTool.modes_begin()+dpitindex[i];
501 cout<<"No."<<i+1<<" Dp mode is :"<< (*iter)->decayMode()<<endl;
502 }
503
504 //loop only Ds modes
505 vector<int> dsitindex= dtagTool.Dsmodes();
506 for( int i=0; i< dsitindex.size(); i++){
507 DTagToolIterator iter= dtagTool.modes_begin()+dsitindex[i];
508 cout<<"No."<<i+1<<" Ds mode is :"<< (*iter)->decayMode()<<endl;
509 }
510
511
512 //check single tag
513 //************************
514 cout<<"**************"<<endl;
515 cout<<"**************"<<endl;
516 cout<<"test single tag "<<endl;
517
518 if( dtagTool.findSTag( EvtRecDTag::kD0toKPi , +1 ) )
519 cout<<" find single tag mode: "<< (*dtagTool.stag())->decayMode() <<endl;
520
521 //cosmic and lepton veto for 2 daughter decay modes, like D0->K pi
522 if( dtagTool.findSTag( EvtRecDTag::kD0toKPi , +1 ) && dtagTool.cosmicandleptonVeto() ){
523 cout<<"cosmic and lepton backgaround veto"<<endl;
524 cout<<" find single tag mode: "<< (*dtagTool.stag())->decayMode() <<endl;
525 }
526
527 //check double tag
528 //************************
529 cout<<"**************"<<endl;
530 cout<<"**************"<<endl;
531 cout<<"test double tag "<<endl;
532
533 //charm calculated automatically, and charge conjucation considered
534 //nameley, will consider D0->K- pi+ & D0_bar->K+ pi- pi0 pair
535 // or D0_bar->K+ pi- & D0->K- pi+ pi0 pair
536 bool dtagflag=dtagTool.findDTag( EvtRecDTag::kD0toKPi , EvtRecDTag::kD0toKPiPi0);
537 if( dtagflag){
538 cout<<" find double tag mode 1 :"<<endl;
539 dtagTool<<dtagTool.dtag1();
540 cout<<" find double tag mode 2: "<< endl;
541 dtagTool<<dtagTool.dtag2();
542 }
543 //no charge conjucation considered
544 //nameley, will only consider D0->K- pi+ & D0_bar->K+ pi- pi0 pair
545 dtagflag=dtagTool.findDTag( EvtRecDTag::kD0toKPi , +1, EvtRecDTag::kD0toKPiPi0, -1 );
546 if( dtagflag){
547 cout<<" find double tag mode 1 :"<<endl;
548 dtagTool<<dtagTool.dtag1();
549 cout<<" find double tag mode 2: "<< endl;
550 dtagTool<<dtagTool.dtag2();
551 }
552
553
554 //use invariant mass to select best double tag
555 dtagflag=dtagTool.findDTag( EvtRecDTag::kD0toKPi , +1, EvtRecDTag::kD0toKPiPi0, -1 ,"inv");
556 if( dtagflag){
557 cout<<" double tag by invariant mass:"<<endl;
558 cout<<" find double tag mode 1 :"<<endl;
559 dtagTool<<dtagTool.dtag1();
560 cout<<" find double tag mode 2: "<< endl;
561 dtagTool<<dtagTool.dtag2();
562 }
563
564 //return all valid double tag lists
565 dtagflag=dtagTool.findADTag( EvtRecDTag::kD0toKPi , +1, EvtRecDTag::kD0toKPiPi0, -1);
566 if( dtagflag){
567
568 vector<DTagToolIterator> vdtag1=dtagTool.vdtag1();
569 vector<DTagToolIterator> vdtag2=dtagTool.vdtag2();
570
571 cout<<" list of all doule tags:"<<endl;
572 for(int i=0;i<vdtag1.size();i++){
573 cout<<" find double tag mode 1 :"<<endl;
574 dtagTool<<vdtag1[i];
575 cout<<" find double tag mode 2: "<< endl;
576 dtagTool<<vdtag2[i];
577 }
578
579 }
580
581 dtagTool.clear();
582
583} //end of execute()
double sin(const BesAngle a)
Definition: BesAngle.h:210
double cos(const BesAngle a)
Definition: BesAngle.h:213
int runNo
Definition: DQA_TO_DB.cxx:12
EvtRecVeeVertexCol::iterator ksIterator
Definition: DTagTool.h:160
EvtRecPi0Col::iterator pi0Iterator
Definition: DTagTool.h:158
EvtRecDTagCol::iterator DTagToolIterator
Definition: DTagTool.h:157
EvtStreamInputIterator< typename Generator::result_type > iter(Generator gen, int N=0)
int eventNo
IMessageSvc * msgSvc()
vector< int > pi0Id(EvtRecDTagCol::iterator iter, int numpi0=1)
Definition: DTagTool.cxx:772
bool isPion(EvtRecTrack *trk)
Definition: DTagTool.cxx:985
EvtRecDTagCol::iterator modes_begin()
Definition: DTagTool.h:41
EvtRecDTagCol::iterator modes_end()
Definition: DTagTool.h:42
vector< int > Dpmodes()
Definition: DTagTool.h:52
void clear()
Definition: DTagTool.cxx:131
bool isKaon(EvtRecTrack *trk)
Definition: DTagTool.cxx:1000
EvtRecDTagCol::iterator dtag2()
Definition: DTagTool.h:77
vector< int > D0modes()
Definition: DTagTool.h:51
bool findDTag(EvtRecDTag::DecayMode mode1, EvtRecDTag::DecayMode mode2, string smass="mbc")
Definition: DTagTool.cxx:301
vector< int > mode(EvtRecDTag::DecayMode decaymode)
Definition: DTagTool.cxx:171
bool findSTag(EvtRecDTag::DecayMode mode, int tagcharm)
Definition: DTagTool.cxx:217
EvtRecPi0Col::iterator pi0_begin()
Definition: DTagTool.h:43
bool isDTagListEmpty()
Definition: DTagTool.h:36
vector< int > ksId(EvtRecDTagCol::iterator iter, int numks=1)
Definition: DTagTool.cxx:872
vector< int > Dsmodes()
Definition: DTagTool.h:53
vector< EvtRecDTagCol::iterator > vdtag1()
Definition: DTagTool.h:78
EvtRecDTagCol::iterator stag()
Definition: DTagTool.h:75
EvtRecVeeVertexCol::iterator ks_begin()
Definition: DTagTool.h:47
bool findADTag(EvtRecDTag::DecayMode mode1, EvtRecDTag::DecayMode mode2)
Definition: DTagTool.cxx:315
EvtRecDTagCol::iterator dtag1()
Definition: DTagTool.h:76
vector< EvtRecDTagCol::iterator > vdtag2()
Definition: DTagTool.h:79
bool cosmicandleptonVeto(bool emc=true)
Definition: DTagTool.cxx:1217
double energy() const
Definition: DstEmcShower.h:45
const int charge() const
const int charge() const
Definition: DstMdcTrack.h:53
const HepVector helix() const
......
const double z() const
Definition: DstMdcTrack.h:63
const double p() const
Definition: DstMdcTrack.h:58
const double y() const
Definition: DstMdcTrack.h:62
const double x() const
Definition: DstMdcTrack.h:61
int trackId() const
Definition: EvtRecTrack.h:32
RecEmcShower * emcShower()
Definition: EvtRecTrack.h:58
virtual bool isVertexValid()=0
virtual double * PrimaryVertex()=0
double double double * p4
Definition: qcdloop1.h:77
double double * p3
Definition: qcdloop1.h:76

◆ finalize()

StatusCode DDecay::finalize ( )

Definition at line 588 of file DDecay.cxx.

588 {
589 MsgStream log(msgSvc(), name());
590 log << MSG::INFO << "in finalize()" << endmsg;
591 return StatusCode::SUCCESS;
592}

◆ initialize()

StatusCode DDecay::initialize ( )

Definition at line 56 of file DDecay.cxx.

56 {
57
58 MsgStream log(msgSvc(), name());
59
60 log << MSG::INFO << "in initialize()" << endmsg;
61
62 StatusCode status;
63 NTuplePtr nt1(ntupleSvc(), "FILE1/vxyz");
64 if ( nt1 ) m_tuple1 = nt1;
65 else {
66 m_tuple1 = ntupleSvc()->book ("FILE1/vxyz", CLID_ColumnWiseTuple, "track N-Tuple example");
67 if ( m_tuple1 ) {
68 status = m_tuple1->addItem ("vx0", m_vx0);
69 status = m_tuple1->addItem ("vy0", m_vy0);
70 status = m_tuple1->addItem ("vz0", m_vz0);
71 status = m_tuple1->addItem ("vr0", m_vr0);
72 }
73 else {
74 log << MSG::ERROR << " Cannot book N-tuple:" << long(m_tuple1) << endmsg;
75 return StatusCode::FAILURE;
76 }
77 }
78
79 NTuplePtr nt2(ntupleSvc(), "FILE1/ks");
80 if ( nt2 ) m_tuple2 = nt2;
81 else {
82 m_tuple2 = ntupleSvc()->book ("FILE1/ks", CLID_ColumnWiseTuple, "ks N-Tuple example");
83 if ( m_tuple2 ) {
84 status = m_tuple2->addItem ("ksmass", m_ksmass);
85 status = m_tuple2->addItem ("ksd", m_ksd);
86 status = m_tuple2->addItem ("ksmode", m_ksmode);
87 }
88 else {
89 log << MSG::ERROR << " Cannot book N-tuple:" << long(m_tuple2) << endmsg;
90 return StatusCode::FAILURE;
91 }
92 }
93
94 NTuplePtr nt3(ntupleSvc(), "FILE1/pi0");
95 if ( nt3 ) m_tuple3 = nt3;
96 else {
97 m_tuple3 = ntupleSvc()->book ("FILE1/pi0", CLID_ColumnWiseTuple, "pi0 N-Tuple example");
98 if ( m_tuple3 ) {
99 status = m_tuple3->addItem ("pi0mass", m_pi0mass);
100 status = m_tuple3->addItem ("pi0mode", m_pi0mode);
101 }
102 else {
103 log << MSG::ERROR << " Cannot book N-tuple:" << long(m_tuple3) << endmsg;
104 return StatusCode::FAILURE;
105 }
106 }
107
108 NTuplePtr nt4(ntupleSvc(), "FILE1/tagD");
109 if ( nt4 ) m_tuple4 = nt4;
110 else {
111 m_tuple4 = ntupleSvc()->book ("FILE1/tagD", CLID_ColumnWiseTuple, "DTag N-Tuple example");
112 if ( m_tuple4 ) {
113 status = m_tuple4->addItem ("mode", m_mode);
114 status = m_tuple4->addItem ("type", m_type);
115 status = m_tuple4->addItem ("charge", m_charge);
116 status = m_tuple4->addItem ("charm", m_charm);
117 status = m_tuple4->addItem ("numofchildren", m_numofchildren);
118 status = m_tuple4->addItem ("mass", m_mass);
119 status = m_tuple4->addItem ("mBC", m_mBC);
120 status = m_tuple4->addItem ("deltaE", m_deltae);
121 status = m_tuple4->addItem ("E", m_e);
122 status = m_tuple4->addItem ("notherTrk", m_ntrk);
123 }
124 else {
125 log << MSG::ERROR << " Cannot book N-tuple:" << long(m_tuple4) << endmsg;
126 return StatusCode::FAILURE;
127 }
128 }
129
130
131 //
132 //--------end of book--------
133 //
134
135 log << MSG::INFO << "successfully return from initialize()" <<endmsg;
136 return StatusCode::SUCCESS;
137
138}
INTupleSvc * ntupleSvc()

The documentation for this class was generated from the following files: