28 #include "StuCutEvent.hh"
29 #include "StuCutTrack.hh"
31 #include "StEventTypes.h"
32 #include "PhysicalConstants.h"
33 #include "SystemOfUnits.h"
34 #include "StThreeVectorF.hh"
35 #define PR(x) cout << "##### CutEvent: " << (#x) << " = " << (x) << endl;
42 Float_t StuCutEvent::mVertexXCuts[2] = {-1., 1.};
43 Float_t StuCutEvent::mVertexYCuts[2] = {-1., 1.};
44 Float_t StuCutEvent::mVertexZCuts[2] = {-30., 30.};
45 UInt_t StuCutEvent::mEventN = 0;
46 UInt_t StuCutEvent::mGoodEventN = 0;
47 UInt_t StuCutEvent::mMultCut = 0;
48 UInt_t StuCutEvent::mVertexXCut = 0;
49 UInt_t StuCutEvent::mVertexYCut = 0;
50 UInt_t StuCutEvent::mVertexZCut = 0;
51 Float_t StuCutEvent::mEtaSymCuts[2] = {-0.1, 0.1};
52 UInt_t StuCutEvent::mEtaSymCutN = 0;
56 StuCutEvent::StuCutEvent() {
62 StuCutEvent::~StuCutEvent() {
67 Int_t StuCutEvent::CheckEvent(
StEvent* pEvent) {
73 Long_t nvtx = pEvent->numberOfPrimaryVertices();
74 if (nvtx == 0)
return kFALSE;
80 if (!pVertex)
return kFALSE;
83 Long_t mult = pVertex->numberOfDaughters();
84 if (mMultCuts[1] > mMultCuts[0] &&
85 (mult < mMultCuts[0] || mult >= mMultCuts[1])) {
93 Float_t vertexX = vertex.x();
94 if (mVertexXCuts[1] > mVertexXCuts[0] &&
95 (vertexX < mVertexXCuts[0] || vertexX >= mVertexXCuts[1])) {
101 Float_t vertexY = vertex.y();
102 if (mVertexYCuts[1] > mVertexYCuts[0] &&
103 (vertexY < mVertexYCuts[0] || vertexY >= mVertexYCuts[1])) {
109 Float_t vertexZ = vertex.z();
110 if (mVertexZCuts[1] > mVertexZCuts[0] &&
111 (vertexZ < mVertexZCuts[0] || vertexZ >= mVertexZCuts[1])) {
122 Int_t StuCutEvent::CheckEtaSymmetry() {
127 Float_t mEtaSymPosN = (float)StuCutTrack::EtaSymPos();
128 Float_t mEtaSymNegN = (float)StuCutTrack::EtaSymNeg();
129 Float_t EtaSym = (mEtaSymPosN - mEtaSymNegN) /
130 (mEtaSymPosN + mEtaSymNegN);
131 StuCutTrack::EtaSymClear();
132 if (mEtaSymCuts[1] > mEtaSymCuts[0] &&
133 (EtaSym < mEtaSymCuts[0] || EtaSym >= mEtaSymCuts[1])) {
144 void StuCutEvent::PrintCutList() {
147 cout <<
"#######################################################" << endl;
148 cout <<
"# Total Events= " << mEventN << endl;
149 cout <<
"# Event Cut List:" << endl;
150 cout <<
"# Mult cuts= " << mMultCuts[0] <<
", " << mMultCuts[1]
151 <<
" :\t Events Cut= " << mMultCut << endl;
152 cout <<
"# VertexX cuts= " << mVertexXCuts[0] <<
", " << mVertexXCuts[1]
153 <<
" :\t Events Cut= " << mVertexXCut << endl;
154 cout <<
"# VertexY cuts= " << mVertexYCuts[0] <<
", " << mVertexYCuts[1]
155 <<
" :\t Events Cut= " << mVertexYCut << endl;
156 cout <<
"# VertexZ cuts= " << mVertexZCuts[0] <<
", " << mVertexZCuts[1]
157 <<
" :\t Events Cut= " << mVertexZCut << endl;
158 cout <<
"# Eta Symmetry cuts= " << mEtaSymCuts[0] <<
", " << mEtaSymCuts[1]
159 <<
" :\t " << setprecision(4) << (float)mEtaSymCutN/(
float)mEventN/perCent
161 cout <<
"# Good Events = " << mGoodEventN <<
", " << setprecision(4) <<
162 (float)mGoodEventN/(
float)mEventN/perCent <<
"%" << endl;
163 cout <<
"#######################################################" << endl;