StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
ntuplePair.cxx
1 /***************************************************************************
2  *
3  *
4  * Author: Dominik Flierl, flierl@bnl.gov
5  ***************************************************************************
6  *
7  * Description:
8  * fill pair information into one huge ntuple
9  *
10  ***************************************************************************/
11 
12 
13 #include "StHbtMaker/CorrFctn/ntuplePair.h"
14 
15 #ifdef __ROOT__
16 ClassImp(ntuplePair)
17 //______________________________
18 ntuplePair::ntuplePair()
19 {
20  // create tree
21  mTree = new TTree("PairTree","A Tree with all pairs");
22  // create Branch
23  mTree->Branch("pair",&mPair,"qinv/F:kt/F:rap/F:entSep/F:qual/F");
24 }
25 //_____________________________
26 ntuplePair::~ntuplePair()
27 {
28  // clean up
29  delete mTree;
30 }
31 //________________________________
32 void ntuplePair::AddRealPair(const StHbtPair* Pair)
33 {
34  // extract Pair info and fill tree
35  mPair.qinv = Pair->qInv() ;
36  mPair.kt = Pair->kT() ;
37  mPair.rap = Pair->rap() ;
38  mPair.entSep = Pair->NominalTpcEntranceSeparation() ;
39  mPair.qual = Pair->quality() ;
40  // fill tree
41  mTree->Fill();
42 }
43 //________________________________
44 void ntuplePair::AddMixedPair(const StHbtPair* Pair)
45 {
46  // nothing to do here
47 }
48 //________________________________
49 void ntuplePair::Finish()
50 {
51  // nothing to do here
52 }
53 //________________________________
54 StHbtString ntuplePair::Report()
55 {
56  StHbtString t;
57  char Ctemp[100];
58  sprintf(Ctemp,"Ntuple pair filled.\n");
59  t+=Ctemp;
60  return t;
61 };
62 
63 #endif // ifdef ROOT
64