StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
CutMc.cxx
1 #include "CutMc.h"
3 
4 bool
5 CutMc::AcceptTrackHalf(StTinyRcTrack* track, float vtxZ)
6 {
7 
8  if(VertexSkipOn() &&
9  !IsOutSide(track->mFirstZ,track->mLastZ,mVertexZSkip)) return false;
10  if(mHitAvoid &&
11  !IsOutSide(track->mFirstZ,track->mLastZ,mHitAvoid)) return false;
12  if(Half() && !IsSameSide(vtxZ,track->mFirstZ,track->mLastZ)) return false;
13  if(HitHalf() && !IsHitSameSide(track->mFirstZ,track->mLastZ))
14  return false;
15  if(GeomHalf() && !IsGeomSameSide(vtxZ,atan2(track->mPzGl,track->mPtGl)))
16  return false;
17 
18  return true;
19 }
20 
21 bool
22 CutMc::AcceptCent(StMiniMcEvent* event)
23 {
24  bool acceptCent = false;
25  if(mDoFlowCent) acceptCent=AcceptFlowCent(event);
26  else if(mDoZdcCtbCent) acceptCent=AcceptZdcCtbCent(event);
27  else if(mDoHMinusCent) acceptCent=AcceptHMinusCent(event);
28  else if(mDoNchCent || mDoNchCentKludge) acceptCent=AcceptNchCent(event);
29 
30  return acceptCent;
31 }
32 
33 bool
34 CutMc::Accept(StMiniMcEvent* event)
35 {
36 
37  return(
38  AcceptVertexZ(event) && AcceptCent(event)
39  );
40 }
41 
42 bool
43 CutMc::AcceptFlowCent(StMiniMcEvent* event)
44 {
45  return (
46  event->mCentrality >= mFlowCent[0] &&
47  event->mCentrality <= mFlowCent[1]
48  );
49 }
50 
51 bool
52 CutMc::AcceptZdcCtbCent(StMiniMcEvent* event)
53 {
54  double zdcSum = event->mZDCe + event->mZDCw;
55  double ctb = event->mCTB;
56  NchCentrality zdcCent = centrality(zdcSum,ctb);
57 
58  return(
59  zdcCent >= mZdcCtbCent[1] && // less central has higher value
60  zdcCent <= mZdcCtbCent[0]
61  );
62 }
63 
64 bool
65 CutMc::AcceptHMinusCent(StMiniMcEvent* event)
66 {
67  int nHMinus = event->mNUncorrectedNegativePrimaries;
68  NchCentrality cent = centralityHMinus(nHMinus);
69 
70  return(
71  cent >= mHMinusCent[1] && // less central has higher value
72  cent <= mHMinusCent[0]
73  );
74 }
75 
76 bool
77 CutMc::AcceptNchCent(StMiniMcEvent* event)
78 {
79  int nCh = event->mNUncorrectedPrimaries;
80  NchCentrality cent = centralityNch(nCh);
81  if(mDoNchCentKludge) cent = centralityNchKludge(nCh);
82 
83  return(
84  cent >= mNchCent[1] && // less central has higher value
85  cent <= mNchCent[0]
86  );
87 }
88 
89 
90 bool
91 CutMc::AcceptVertexZ(StMiniMcEvent* event)
92 {
93 
94  return(
95  event->mVertexZ >= mVertexZ[0] &&
96  event->mVertexZ <= mVertexZ[1] &&
97  ( (!mVertexZSkip) ? true : fabs(event->mVertexZ)>mVertexZSkip )
98  );
99 }
100 
101 
102 
103 //
104 // uses the mc eta cut
105 //
106 
107 bool
108 CutMc::Accept(StMiniMcPair* track)
109 {
110  return (
111  track &&
112  AcceptFitPts(track) &&
113  AcceptEtaMc(track) &&
114  AcceptSDcaGl(track)
115  );
116 }
117 
118 bool
119 CutMc::AcceptNoEta(StTinyRcTrack* track)
120 {
121  return (
122  track &&
123  AcceptFitPts(track) &&
124  AcceptSDcaGl(track)
125  );
126 }
127 
128 bool
129 CutMc::AcceptFitPts(StTinyRcTrack* track)
130 {
131  return(
132  track->mFitPts >= mFitPts[0] &&
133  track->mFitPts <= mFitPts[1]
134  );
135 }
136 
137 bool
138 CutMc::AcceptMcPts(StTinyMcTrack* track)
139 {
140  return(
141  track->mNHitMc >= mMcPts[0] &&
142  track->mNHitMc <= mMcPts[1]
143  );
144 }
145 
146 bool
147 CutMc::AcceptEtaPr(StTinyRcTrack* track)
148 {
149  return(
150  track->mEtaPr >= mEta[0] &&
151  track->mEtaPr <= mEta[1]
152  );
153 }
154 
155 
156 bool
157 CutMc::AcceptEtaMc(StTinyMcTrack* track)
158 {
159  return(
160  track->mEtaMc >= mEta[0] &&
161  track->mEtaMc <= mEta[1]
162  );
163 }
164 
165 bool
166 CutMc::AcceptEtaMcTight(StTinyMcTrack* track)
167 {
168  return(
169  track->mEtaMc >= mEtaTight[0] &&
170  track->mEtaMc <= mEtaTight[1]
171  );
172 }
173 
174 
175 bool
176 CutMc::AcceptSDcaGl(StTinyRcTrack* track)
177 {
178  return(
179  track->mDcaGl >= mSDcaGl[0] &&
180  track->mDcaGl <= mSDcaGl[1]
181  );
182 }
Top level class for the MiniMcTree, containing event-wise information and the McTrack, and all TrackPair collections.