StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StPidAmpChannelInfoOut.cxx
1 /***************************************************************************
2  *
3  * $Id: StPidAmpChannelInfoOut.cxx,v 1.2 2000/08/16 12:46:01 aihong Exp $
4  *
5  * Author: Aihong Tang & Richard Witt (FORTRAN Version),Kent State U.
6  * Send questions to aihong@cnr.physics.kent.edu
7  ***************************************************************************
8  *
9  * Description:part of StPidAmpMaker package
10  * TObject version of StPidAmpChannelInfo
11  ***************************************************************************
12  *
13  * $Log: StPidAmpChannelInfoOut.cxx,v $
14  * Revision 1.2 2000/08/16 12:46:01 aihong
15  * bug killed
16  *
17  * Revision 1.1 2000/07/22 22:27:14 aihong
18  * move files from StPidAmpMaker to StEventUtilities
19  *
20  * Revision 1.3 2000/04/09 16:36:42 aihong
21  * change for adapting NHitDcaNet added
22  *
23  * Revision 1.2 2000/03/24 15:11:14 aihong
24  * add PrintContent()
25  *
26  * Revision 1.1.1.1 2000/03/09 17:48:33 aihong
27  * Installation of package
28  *
29  **************************************************************************/
30 
31 
32 #include "StPidAmpChannelInfoOut.h"
33 
34 ClassImp(StPidAmpChannelInfoOut)
35 
37 StPidAmpChannelInfoOut::StPidAmpChannelInfoOut(const StPidAmpChannelInfoOut& infoOut){
38  mNHitsStart=infoOut.mNHitsStart;
39  mNHitsEnd =infoOut.mNHitsEnd;
40  mPtStart =infoOut.mPtStart;
41  mPtEnd =infoOut.mPtEnd;
42  mDcaStart =infoOut.mDcaStart;
43  mDcaEnd =infoOut.mDcaEnd;
44 }
45 
46 
47 StPidAmpChannelInfoOut::StPidAmpChannelInfoOut(Int_t nhitsStart, Int_t nhitsEnd, Double_t ptStart, Double_t ptEnd){
48 
49  mNHitsStart=nhitsStart;
50  mNHitsEnd =nhitsEnd;
51  mPtStart =ptStart;
52  mPtEnd =ptEnd;
53 }
54 
55 StPidAmpChannelInfoOut::~StPidAmpChannelInfoOut(){}
56 
57 StPidAmpChannelInfoOut::StPidAmpChannelInfoOut(Int_t nhitsStart, Int_t nhitsEnd, Double_t ptStart, Double_t ptEnd, Double_t dcaStart, Double_t dcaEnd){
58 
59  mNHitsStart = nhitsStart;
60  mNHitsEnd = nhitsEnd;
61  mPtStart = ptStart;
62  mPtEnd = ptEnd;
63  mDcaStart = dcaStart;
64  mDcaEnd = dcaEnd;
65 }
66 
67 void StPidAmpChannelInfoOut::SetNHitsRange(Int_t nhitsStart, Int_t nhitsEnd){
68  mNHitsStart=nhitsStart;
69  mNHitsEnd =nhitsEnd;
70 }
71 
72 void StPidAmpChannelInfoOut::SetPtRange(Double_t ptStart, Double_t ptEnd){
73  mPtStart = ptStart;
74  mPtEnd = ptEnd;
75 }
76 
77 void StPidAmpChannelInfoOut::SetDcaRange(Double_t dcaStart, Double_t dcaEnd){
78  mDcaStart =dcaStart;
79  mDcaEnd =dcaEnd;
80 }
81 
82 Int_t StPidAmpChannelInfoOut::NHitsStart() const {return mNHitsStart;}
83 
84 
85 
86 Int_t StPidAmpChannelInfoOut::NHitsEnd() const {return mNHitsEnd;}
87 
88 
89 
90 Double_t StPidAmpChannelInfoOut::PtStart() const {return mPtStart;}
91 
92 
93 
94 Double_t StPidAmpChannelInfoOut::PtEnd() const {return mPtEnd;}
95 
96 
97 
98 Double_t StPidAmpChannelInfoOut::DcaStart() const {return mDcaStart;}
99 Double_t StPidAmpChannelInfoOut::DcaEnd() const {return mDcaEnd;}
100 
101 Bool_t StPidAmpChannelInfoOut::IsInChannel(Int_t nhits,Double_t pt){
102 
103  return ((nhits<mNHitsEnd)&&(nhits>=mNHitsStart)&&(pt<mPtEnd)&&(pt>=mPtStart));
104 }
105 
106 Bool_t StPidAmpChannelInfoOut::IsInChannel(Int_t nhits,Double_t pt,Double_t dca){
107 
108  return ((nhits<mNHitsEnd)&&(nhits>=mNHitsStart)&&(pt<mPtEnd)&&(pt>=mPtStart)&&(dca<mDcaEnd)&&(dca>=mDcaStart));
109 }
110 
111 void StPidAmpChannelInfoOut::PrintContent(){
112  cout<<"NHitsStart: "<<NHitsStart()<<" NHitsEnd: "<<NHitsEnd()<<endl;
113  cout<<"PtStart: "<<PtStart() <<" PtEnd: "<<PtEnd()<<endl;
114  cout<<"DcaStart: "<<DcaStart() <<" DcaEnd: "<<DcaEnd()<<endl;
115  cout<<endl;
116 }
117 
118 
119 ostream& operator<<(ostream& s, const StPidAmpChannelInfoOut& infoOut){
120 
121  s<<"NHitsStart: "<<infoOut.NHitsStart()<<" NHitsEnd: "<<infoOut.NHitsEnd()<<endl;
122  s<<"PtStart: "<<infoOut.PtStart() <<" PtEnd: "<<infoOut.PtEnd()<<endl;
123 
124  s<<"DcaStart: "<<infoOut.DcaStart() <<" DcaEnd: "<<infoOut.DcaEnd()<<endl;
125  s<<endl;
126  return s;
127 }