13 #ifndef __STESTRUCTTRACKCUTS__H
14 #define __STESTRUCTTRACKCUTS__H
17 #include "StEStructCuts.h"
61 float mhijingFragment[2];
62 char mFragmentType[1024];
75 virtual bool loadBaseCuts(
const char* name,
const char** vals,
int nvals);
76 virtual void loadUserCuts(
const char* name,
const char** vals,
int nvals);
77 virtual void printCutStats(ostream& ofs);
80 bool goodCharge(
int c);
81 bool goodNFitPoints(
int n);
82 bool goodNFitNMax(
float r);
83 bool goodGlobalDCA(
float g);
84 bool goodChi2(
float x);
85 bool gooddPtByPt(
float x);
89 bool goodPhi(
float p);
90 bool goodEta(
float e);
91 bool goodTOFEMass(
float e);
92 bool goodElectron(
float e);
93 bool hasElectronCut();
94 bool goodPion(
float p);
95 bool goodKaon(
float k);
96 bool goodProton(
float p);
97 bool goodFragment(
int ifragtype);
104 inline void StEStructTrackCuts::loadUserCuts(
const char* name,
const char** vals,
int nvals){ }
106 inline bool StEStructTrackCuts::goodFlag(
int f){
107 mvalues[mflagName.idx] =(float)f;
108 return ( (mflag[0]==mflag[1] && mflag[0]==0) ||
109 (f>=mflag[0] && f<=mflag[1]) ) ;
113 inline bool StEStructTrackCuts::goodCharge(
int c){
114 mvalues[mchargeName.idx] =(float)c;
115 return ( (mcharge[0]==mcharge[1] && mcharge[0]==0) ||
116 (c>=mcharge[0] && c<=mcharge[1]) ) ;
120 inline bool StEStructTrackCuts::goodNFitPoints(
int c){
121 mvalues[mnfitpointsName.idx] =(float)c;
122 return ( (mnfitpoints[0]==mnfitpoints[1] && mnfitpoints[0]==0) ||
123 (c>=mnfitpoints[0] && c<=mnfitpoints[1]) ) ;
127 inline bool StEStructTrackCuts::goodNFitNMax(
float c){
128 mvalues[mnfitnmaxName.idx] =c;
129 return ( (mnfitnmax[0]==mnfitnmax[1] && mnfitnmax[0]==0) ||
130 (c>=mnfitnmax[0] && c<=mnfitnmax[1]) ) ;
134 inline bool StEStructTrackCuts::goodGlobalDCA(
float c){
135 mvalues[mglobalDCAName.idx] =c;
136 return ( (mglobalDCA[0]==mglobalDCA[1] && mglobalDCA[0]==0) ||
137 (c>=mglobalDCA[0] && c<=mglobalDCA[1]) ) ;
141 inline bool StEStructTrackCuts::goodChi2(
float c){
142 mvalues[mchi2Name.idx] =c;
143 return ( (mchi2[0]==mchi2[1] && mchi2[0]==0) ||
144 (c>=mchi2[0] && c<=mchi2[1]) ) ;
148 inline bool StEStructTrackCuts::goodPt(
float c){
149 mvalues[mptName.idx] =c;
150 return ( (mpt[0]==mpt[1] && mpt[0]==0) ||
151 (c>=mpt[0] && c<=mpt[1]) ) ;
155 inline bool StEStructTrackCuts::goodYt(
float c){
156 mvalues[mytName.idx] =c;
157 return ( (myt[0]==myt[1] && myt[0]==0) ||
158 (c>=myt[0] && c<=myt[1]) ) ;
162 inline bool StEStructTrackCuts::goodXt(
float c){
163 mvalues[mxtName.idx] =c;
164 return ( (mxt[0]==mxt[1] && mxt[0]==0) ||
165 (c>=mxt[0] && c<=mxt[1]) ) ;
170 inline bool StEStructTrackCuts::goodPhi(
float c){
171 mvalues[mphiName.idx] =c;
172 return ( (mphi[0]==mphi[1] && mphi[0]==0) ||
173 (c>=mphi[0] && c<=mphi[1]) ) ;
177 inline bool StEStructTrackCuts::goodEta(
float c){
178 mvalues[metaName.idx] =c;
179 return ( (meta[0]==meta[1] && meta[0]==0) ||
180 (c>=meta[0] && c<=meta[1]) ) ;
184 inline bool StEStructTrackCuts::goodTOFEMass(
float c){
185 mvalues[mTOFEMassName.idx] =c;
186 return ( (mTOFEMass[0]==mTOFEMass[1] && mTOFEMass[0]==0) ||
187 (c>=mTOFEMass[0] && c<=mTOFEMass[1]) ) ;
202 inline bool StEStructTrackCuts::goodElectron(
float c){
203 mvalues[mnsigmaEName.idx] =c;
204 return ( (mnsigmaE[0]==mnsigmaE[1] && mnsigmaE[0]==0) ||
205 (c>=mnsigmaE[0] && c<=mnsigmaE[1]) ) ;
208 inline bool StEStructTrackCuts::hasElectronCut() {
209 return ( mnsigmaE[0] != mnsigmaE[1] ) ;
212 inline bool StEStructTrackCuts::goodPion(
float c){
213 mvalues[mnsigmaPiName.idx] =c;
214 return ( (mnsigmaPi[0]==mnsigmaPi[1] && mnsigmaPi[0]==0) ||
215 (c>=mnsigmaPi[0] && c<=mnsigmaPi[1]) ) ;
219 inline bool StEStructTrackCuts::goodKaon(
float c){
220 mvalues[mnsigmaKName.idx] =c;
221 return ( (mnsigmaK[0]==mnsigmaK[1] && mnsigmaK[0]==0) ||
222 (c>=mnsigmaK[0] && c<=mnsigmaK[1]) ) ;
226 inline bool StEStructTrackCuts::goodProton(
float c){
227 mvalues[mnsigmaPName.idx] =c;
228 return ( (mnsigmaP[0]==mnsigmaP[1] && mnsigmaP[0]==0) ||
229 (c>=mnsigmaP[0] && c<=mnsigmaP[1]) ) ;