StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StHitFilterMaker.h
1 // $Id: StHitFilterMaker.h,v 1.6 2014/08/06 11:43:21 jeromel Exp $
2 
3 #ifndef STAR_StHitFilterMaker
4 #define STAR_StHitFilterMaker
5 
20 #ifndef StMaker_H
21 #include "StMaker.h"
22 #endif
23 
24 
25 
26 #include <vector>
27 #ifndef ST_NO_NAMESPACES
28 using std::vector;
29 #endif
30 class StTrackNode;
31 class StTrack;
32 class StHit;
33 
34 class StEvent;
35 
36 class StHitFilterMaker : public StMaker {
37  private:
38  // Currently Available Cuts. Negative == don't use.
39  Double_t mPtLowerCut;
40  Double_t mPtUpperCut;
41  Double_t mAbsEtaCut;
42  Double_t mAbsZVertCut;
43  Double_t mKeepWestHighEtaHits;
44 
45  protected:
46  // Protected method if any
47  Int_t checkHitTowardFgt(StHit* hit);
48 
49  public:
50  StHitFilterMaker(const char *name="StHitFilterMaker",Double_t ptLowerCut=1.5,Double_t ptUpperCut=-1, Double_t absEtaCut=1., Double_t absZVertCut=999., Double_t WestEtaCut=1.4);
51  virtual ~StHitFilterMaker();
52  virtual Int_t Init();
53  virtual Int_t Make();
54  bool accept(StEvent *);
55  bool accept(StTrack *);
56  bool accept(StHit *);
57 
58  bool removeTpcHitsNotOnTracks(StEvent *, vector<StTrackNode*>&);
59  bool removeSvtHitsNotOnTracks(StEvent *, vector<StTrackNode*>&);
60  bool removeBadSvtHits(StEvent *);
61  void setPtLowerCut(Double_t pt) {mPtLowerCut = pt;}
62  void setPtUpperCut(Double_t pt) {mPtUpperCut = pt;}
63  void setAbsEtaCut(Double_t eta) {mAbsEtaCut = eta;}
64  void setAbsZVertCut(Double_t zvert) {mAbsZVertCut = zvert;}
65  Double_t ptLowerCut() { return mPtLowerCut;}
66  Double_t ptUpperCut() { return mPtUpperCut;}
67  Double_t absEtaCut() { return mAbsEtaCut;}
68  Double_t absZVertCut() { return mAbsZVertCut;}
69 
70  void setKeepWestHighEtaHitsForFgt(Double_t v) {mKeepWestHighEtaHits=v;}
71 
72  // virtual Int_t InitRun (int runumber){return 0;}; // Overload empty StMaker::InitRun
73  // virtual Int_t FinishRun(int runumber){return 0;}; // Overload empty StMaker::FinishRun
74 
76  virtual const char *GetCVS() const {
77  static const char cvs[]="Tag $Name: $ $Id: StHitFilterMaker.h,v 1.6 2014/08/06 11:43:21 jeromel Exp $ built " __DATE__ " " __TIME__ ;
78  return cvs;
79  }
80 
81  //StAF chain virtual base class for Makers
82  ClassDef(StHitFilterMaker,0)
83 };
84 
85 #endif
86 
87 
88 // $Log: StHitFilterMaker.h,v $
89 // Revision 1.6 2014/08/06 11:43:21 jeromel
90 // Suffix on literals need to be space (later gcc compiler makes it an error) - first wave of fixes
91 //
92 // Revision 1.5 2013/05/07 18:37:43 jeromel
93 // Modified HitFilter takes a WestEta cut to keep hits in the FGT direction - requested Akio on behalf of the FGT effort
94 //
95 // Revision 1.4 2004/04/08 19:28:55 caines
96 // Make Hitfilter take out those SVT hits not on tracks defined in the constructor - same as TPC filtering
97 //
98 // Revision 1.3 2003/09/10 19:47:19 perev
99 // ansi corrs
100 //
101 // Revision 1.2 2003/07/30 15:27:00 caines
102 // Set options so you delete TPC and SVT hit if Zert >30. If ZVert<30cm save all good svt hits and TPC hits on tracks
103 //
104 // Revision 1.1 2003/02/07 02:16:15 jeromel
105 // First version of a generlized HitFilter/removal maker. Expeditious review
106 // done.
107 //
108 //
virtual ~StHitFilterMaker()
Dummy destructor.
bool removeTpcHitsNotOnTracks(StEvent *, vector< StTrackNode * > &)
Definition: StHit.h:125
StHitFilterMaker(const char *name="StHitFilterMaker", Double_t ptLowerCut=1.5, Double_t ptUpperCut=-1, Double_t absEtaCut=1., Double_t absZVertCut=999., Double_t WestEtaCut=1.4)
StHitFilterMaker constructor.
bool removeSvtHitsNotOnTracks(StEvent *, vector< StTrackNode * > &)
virtual const char * GetCVS() const
Displayed on session exit, leave it as-is please ...
virtual Int_t Init()
Init - is a first method the top level StChain calls to initialize all its makers.
virtual Int_t Make()
bool removeBadSvtHits(StEvent *)
Filters out TPC hits from StEvent on tracks that don&#39;t pass cuts. This is based on the StEventScaveng...