CGEM BOSS 6.6.5.h
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 50 of file DDecay.cxx.

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

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 140 of file DDecay.cxx.

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

◆ finalize()

StatusCode DDecay::finalize ( )

Definition at line 587 of file DDecay.cxx.

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

◆ initialize()

StatusCode DDecay::initialize ( )

Definition at line 55 of file DDecay.cxx.

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

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