StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StFmsFilterMaker.h
1 // $Id: StFmsFilterMaker.h,v 1.1 2018/05/22 19:55:42 akio Exp $
2 
3 #ifndef STAR_StFmsFilterMaker
4 #define STAR_StFmsFilterMaker
5 
20 #ifndef StMaker_H
21 #include "StMaker.h"
22 #endif
23 
24 class TH1F;
25 class StFmsDbMaker;
26 class StFmsCollection;
27 
28 //class FmsGeomSimple;
29 //class StFmsTower;
30 
31 class StFmsFilterMaker : public StMaker {
32  private:
33  enum {kUnknown=1, kUseFixedVertex, kUseRecoVertex};
34  int myMode;
35  int nInpEve, nRecVert,nZverOK, nAccEve;
36  TH1F * mH0;
37  // FmsGeomSimple* mGeomE;
38  // Float_t transverseNRG(Float_t vertexPosZ, StFmsTower * tower);
39  Int_t triggerCondition();// Float_t vertexPosZ, StFmsTower *highTow, Float_t &patchEt);
40  float par_E_thres, par_Z0_vert, par_delZ_vert;
41 
42 
43  StFmsDbMaker* mFmsDbMaker;
44  StFmsCollection* mFmsColl;
45 
46 
47  public:
48  void setEThres(float x) { par_E_thres=x;}
49  void setZvertCut(float z0, float dz) { par_Z0_vert=z0; par_delZ_vert=dz;myMode=kUseRecoVertex;}
50  void setFixedVertex(float z0) { par_Z0_vert=z0; myMode=kUseFixedVertex;}
51 
52  StFmsFilterMaker(const char *name="FmsFilter");
53  virtual ~StFmsFilterMaker();
54  virtual Int_t Init();
55  virtual Int_t Make();
56 
57  // virtual Int_t InitRun (int runumber){return 0;}; // Overload empty StMaker::InitRun
58  virtual Int_t FinishRun(int runumber);
59 
61  virtual const char *GetCVS() const {
62  static const char cvs[]="Tag $Name: $ $Id: StFmsFilterMaker.h,v 1.1 2018/05/22 19:55:42 akio Exp $ built " __DATE__ " " __TIME__ ;
63  return cvs;
64  }
65 
66  ClassDef(StFmsFilterMaker,0)
67 };
68 
69 #endif
70 
71 
72 /* ===================================
73 
74 #if 1
75  gSystem->Load("StFmsA2EMaker");
76  gSystem->Load("StFmsPoolFmsFilterMaker");
77 
78  StFmsA2EMaker *EEa2eMK=new StFmsA2EMaker("EE_A2E");
79  EEa2eMK->database("eeDb"); // sets db connection
80  EEa2eMK->source("StEventMaker",2);
81  EEa2eMK->scale(1.0); // scale reco Endcap energy by a factor
82 
83  // this filter-1 _assumes_ fixed Zvertex,
84  // needs only Endcap slow simu
85  StFmsFilterMaker *eeFlt1Mk=new StFmsFilterMaker("FmsFilterPreTPC");
86  eeFlt1Mk->setEtThres(14.);// (GeV), event-eta used
87  eeFlt1Mk->setFixedVertex(-60.); // (cm), Z0
88 
89  // this filter-2 requires reco vertex
90  StFmsFilterMaker *eeFlt2Mk=new StFmsFilterMaker("FmsFilterPostTPC");
91  eeFlt2Mk->setEtThres(16.);// (GeV), event-eta used
92  eeFlt2Mk->setZvertCut(-60.,15.); // (cm), Z0, delatZ
93 
94  // position makers at the right location in the chain
95  // WARN, order of operations below is important
96  StMaker *tpcMk = chain->GetMaker("tpcChain");
97  chain->AddAfter("eefs",tpcMk); // now TPC-chain is after EMC-makers
98 
99  chain->AddAfter("eefs",eeFlt1Mk);
100  chain->AddAfter("eefs",EEa2eMK); // filter 1 is before TPC-chain
101  chain->AddBefore("MuDst",eeFlt2Mk); // filter 2 is after vertex finder
102  chain->ls(3);
103  #endif
104 
105 
106  ========================== */
107 // $Log: StFmsFilterMaker.h,v $
108 // Revision 1.1 2018/05/22 19:55:42 akio
109 // Initial version of after GEANT filter for FMS by Mriganka
110 //
111 // Revision 1.5 2014/08/06 11:42:57 jeromel
112 // Suffix on literals need to be space (later gcc compiler makes it an error) - first wave of fixes
113 //
114 // Revision 1.4 2008/05/12 15:33:01 balewski
115 // *** empty log message ***
116 //
117 // Revision 1.3 2008/05/11 18:49:18 balewski
118 // merged 2 makers, now one can us it before and after TPC tracking, run 2 independent copies
119 //
120 // Revision 1.2 2008/05/09 22:14:35 balewski
121 // new there are 2 filters
122 //
123 // Revision 1.1 2008/04/21 15:47:09 balewski
124 // star
125 //
virtual Int_t Make()
virtual const char * GetCVS() const
Displayed on session exit, leave it as-is please ...
virtual ~StFmsFilterMaker()
This is destructor.
aborts events based on Endcap response cuts: reco vertex in some Z-range and EEMC 2x1 cluster event-e...