StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StMuFilter.cxx
1 /***************************************************************************
2  *
3  * $Id: StMuFilter.cxx,v 1.7 2020/01/27 21:28:31 genevb Exp $
4  * Author: Frank Laue, BNL, laue@bnl.gov
5  *
6  ***************************************************************************/
7 
8 #include "StMuFilter.h"
9 #include "StEvent/StTrack.h"
10 #include "StEvent/StTrackGeometry.h"
11 #include "StEvent/StTrackDetectorInfo.h"
12 #include "StEvent/StContainers.h"
13 #include "StEvent/StDedxPidTraits.h"
14 #include "TMath.h"
15 #define __MIN_HITS__ 11
16 #define __MIN_HITS_TPC__ 11
17 #define __MIN_HITS_FTPC__ 5
18 #define __MIN_HITS_FTS__ 3
19 
20 
21 ClassImp(StMuFilter)
23 {
24  mMinHits = __MIN_HITS__;
25  mMinTpcHits = __MIN_HITS_TPC__;
26  mMinFTpcHits = __MIN_HITS_FTPC__;
27  mMinFtsHits = __MIN_HITS_FTS__;
28 }
29 
30 
31 bool StMuFilter::accept( const StEvent* e) { cout << "StMuFilter::accept( const StEvent* e) not overwritten, returning true" << endl; return true;}
32 bool StMuFilter::accept( const StV0Vertex* v) { cout << "StMuFilter::accept(const StV0Vertex* v) not overwritten, returning true" << endl; return true;}
33 bool StMuFilter::accept( const StXiVertex* x) { cout << "StMuFilter::accept(const StXiVertex* x) not overwritten, returning true" << endl; return true;}
34 bool StMuFilter::accept( const StKinkVertex* k) { cout << "StMuFilter::accept(const StKinkVertex* k) not overwritten, returning true" << endl; return true;}
35 bool StMuFilter::accept( const StV0MuDst* v) { cout << "StMuFilter::accept(const StV0MuDst* v) not overwritten, returning true" << endl; return true;}
36 bool StMuFilter::accept( const StXiMuDst* x) { cout << "StMuFilter::accept(const StXiMuDst* x) not overwritten, returning true" << endl; return true;}
37 bool StMuFilter::accept( const StKinkMuDst* k) { cout << "StMuFilter::accept(const StKinkMuDst* k) not overwritten, returning true" << endl; return true;}
38 
39 
40 
42 
46  bool method = false;
47  if (mEncodedMethods.size()) {
48  for ( UnsignedShortIterator iter = mEncodedMethods.begin(); iter!=mEncodedMethods.end(); iter++) {
49  // cout << *iter << " " << track->encodedMethod() << endl;
50  if (track->encodedMethod() == *iter) method=true;
51  }
52  if (!method) return false;
53  }
54 
55  if ( !track->detectorInfo() ) return false;
56  if ( TMath::Abs(track->flag())%100 == 11) return true;
57  if ( TMath::Abs(track->flag())%100 == 12) return true;
58  if ( track->detectorInfo()->numberOfPoints(kTpcId ) <mMinTpcHits &&
59 #ifdef kFtsIdentifier
60  track->detectorInfo()->numberOfPoints(kFtsId ) <mMinFtsHits &&
61 #endif
62  track->detectorInfo()->numberOfPoints(kFtpcWestId) <mMinFTpcHits &&
63  track->detectorInfo()->numberOfPoints(kFtpcEastId) <mMinFTpcHits
64  ) return false;
65 
66  return true;
67 }
68 
69 
70 /***************************************************************************
71  *
72  * $Log: StMuFilter.cxx,v $
73  * Revision 1.7 2020/01/27 21:28:31 genevb
74  * Add short tracks toward ETOF
75  *
76  * Revision 1.6 2015/11/13 00:25:16 perev
77  * Added changable constants and FTS
78  *
79  * Revision 1.5 2006/08/28 17:07:15 fisyak
80  * Don't applay no. fit points cut for short tracks pointing to EEMC (+x11)
81  *
82  * Revision 1.4 2002/09/11 21:02:41 laue
83  * added cut on track encoded method for ITTF
84  *
85  * Revision 1.3 2002/06/12 16:02:43 laue
86  * Change of the number of hits cut, so that also FTPC tracks are written out.
87  *
88  * Revision 1.2 2002/05/04 23:56:30 laue
89  * some documentation added
90  *
91  * Revision 1.1 2002/03/08 17:04:18 laue
92  * initial revision
93  *
94  *
95  **************************************************************************/
virtual bool accept(const StEvent *)
abstract cut function, has to be overwritten by derived class
Definition: StMuFilter.cxx:31