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