StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StuObjPidReport.cxx
1 /***************************************************************************
2  *
3  * $Id: StuObjPidReport.cxx,v 1.1 2000/08/15 23:04:18 aihong Exp $
4  *
5  * Author:Aihong Tang. Kent State University
6  * Send questions to aihong@cnr.physics.kent.edu
7  ***************************************************************************
8  *
9  * An object to hold PID info. in a phase space so that it could be saved.
10  *
11  ***************************************************************************
12  *
13  * $Log: StuObjPidReport.cxx,v $
14  * Revision 1.1 2000/08/15 23:04:18 aihong
15  * speed it up by looking up table
16  *
17  *
18  **************************************************************************/
19 #include "StuObjPidReport.h"
20 
21 ClassImp(StuObjPidReport)
22 
24 
25  for (int i=0; i<3; i++){
26  PID[i]=-999;
27  mProb[i]=0.0;
28  }
29 
30  mExtrap=kFALSE;
31 }
32 
33 StuObjPidReport::StuObjPidReport(const StuObjPidReport& report){
34 
35  PID[0]=report.PID[0];
36  PID[1]=report.PID[1];
37  PID[2]=report.PID[2];
38 
39  mProb[0]=report.PID[0];
40  mProb[1]=report.PID[1];
41  mProb[2]=report.PID[2];
42  mExtrap =report.mExtrap;
43 
44 }
45 
46 
47 
48 
49 
50 
51 StuObjPidReport::StuObjPidReport(Int_t id0,Int_t id1, Int_t id2,Double_t prob0, Double_t prob1, Double_t prob2,Bool_t extrap){
52 
53  PID[0]=id0;
54  PID[1]=id1;
55  PID[2]=id2;
56 
57  mProb[0]=prob0;
58  mProb[1]=prob1;
59  mProb[2]=prob2;
60  mExtrap =extrap;
61 }
62 
63 StuObjPidReport::~StuObjPidReport(){}
64 
65 void StuObjPidReport::SetPID(Int_t* idAry){
66 
67  PID[0]=idAry[0];
68  PID[1]=idAry[1];
69  PID[2]=idAry[2];
70 }
71 
72 void StuObjPidReport::SetProb(Double_t* probAry){
73 
74  mProb[0]=probAry[0];
75  mProb[1]=probAry[1];
76  mProb[2]=probAry[2];
77 }
78 
79 
80 void StuObjPidReport::SetExtrap(Bool_t extrap){
81 
82  mExtrap=extrap;
83 }
84 
85 
86 
87 Int_t* StuObjPidReport::GetPIDArray(){ return &PID[0];}
88 Double_t* StuObjPidReport::GetProbArray(){ return &mProb[0];}
89 
90 
91 
92 Int_t StuObjPidReport::GetPID(Int_t idx){ return PID[idx];}
93 Double_t StuObjPidReport::GetProb(Int_t idx){ return mProb[idx];}
94 
95 
96 
97 Bool_t StuObjPidReport::GetExtrapTag(){ return mExtrap;}
98 
99 
100 
101 //following block for debugging purpose
102 /*
103 void StuObjPidReport::SetCharge(Int_t z){mCharge=z;}
104 void StuObjPidReport::SetDca(Double_t dca){mDca=dca;}
105 void StuObjPidReport::SetNHits(Int_t nhits){mNHits=nhits;}
106 void StuObjPidReport::SetPt(Double_t pt){mPt=pt;}
107 void StuObjPidReport::SetDedx(Double_t dedx){mDedx=dedx;}
108 void StuObjPidReport::SetRig(Double_t rig){mRig=rig;}
109 
110 
111 Int_t StuObjPidReport::GetCharge(){return mCharge;}
112 Double_t StuObjPidReport::GetDca(){return mDca;}
113 Int_t StuObjPidReport::GetNHits(){return mNHits;}
114 Double_t StuObjPidReport::GetPt(){return mPt;}
115 Double_t StuObjPidReport::GetDedx(){return mDedx;}
116 Double_t StuObjPidReport::GetRig(){return mRig;}
117 */
118