StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StLuminosityMaker.h
1 #ifndef STAR_StLuminosityMaker
2 #define STAR_StLuminosityMaker
3 
4 #ifndef StMaker_H
5 #include "StMaker.h"
6 #include "StMuDSTMaker/COMMON/StMuDstMaker.h"
7 #endif
8 
9 #include "TClonesArray.h"
10 #include "StTriggerUtilities/StTriggerSimuMaker.h"
11 #include "StLuminosityHolder.h"
12 
13 using namespace std;
14 
15 class StLuminosityMaker : public StMaker {
16  private:
17  vector<unsigned int> mTriggers;
18  vector<unsigned int> mNTotal;
19  vector<unsigned int> mNVertex;
20  vector<unsigned int> mNCuts;
21  vector<unsigned int> mNSoftTrig;
22  vector<float> mLumTotal;
23  vector<float> mLumCuts;
24  vector<float> mLumVertex;
25  vector<float> mLumSoftTrig;
26  vector<float> mPrescales;
27  StMuDstMaker* muDstMaker;
28  StTriggerSimuMaker* mTriggerSimuMaker;
29  TClonesArray* mLumHolder;
30 
31  const char* runMode;
32  float mXsec;
33  int runNumber;
34  float mVertexCut;
35  int mOverrideMode;
36  unsigned int mFilterMode;
37 
38  void printOutput();
39  void saveOutput();
40 
41  public:
42  StLuminosityMaker(const char *name="Luminosity");
43  virtual ~StLuminosityMaker() {}
44  virtual Int_t Init();
45  virtual Int_t InitRun(int run);
46  virtual Int_t Make();
47  virtual Int_t Finish();
48 
49  void getTriggersFromFilterMaker(const char* filtername="triggerFilter");
50 
51  void setFilterMode(unsigned int flag=1) {mFilterMode = flag;}
52  void addTrigger(unsigned int trigId);
53  void setMode(const char* newMode);
54  void setCrossSectionNB(float newXsec, int overRideMode = 1);
55  void setVertexCutcm(float newcut){mVertexCut = newcut;}
56  const float getCrossSectionNB() const {return mXsec;}
57  const float getVertexCutcm() const {return mVertexCut;}
58  const TClonesArray* getHolder() const {return mLumHolder;}
59  const vector<float> getLumTotal() const {return mLumTotal;}
60  const vector<float> getLumCuts() const {return mLumCuts;}
61  const vector<float> getLumVertex() const {return mLumVertex;}
62  const vector<float> getLumSoftTrig() const {return mLumSoftTrig;}
63  const vector<float> getPrescales() const {return mPrescales;}
64  const vector<unsigned int> getTriggers() const {return mTriggers;}
65  const vector<unsigned int> getNTotal() const {return mNTotal;}
66  const vector<unsigned int> getNCuts() const {return mNCuts;}
67  const vector<unsigned int> getNVertex() const {return mNVertex;}
68  const vector<unsigned int> getNSoftTrig() const {return mNSoftTrig;}
69 
70  virtual const char *GetCVS() const
71  {static const char cvs[]="Tag $Name: $ $Id: StLuminosityMaker.h,v 1.4 2014/08/06 11:43:39 jeromel Exp $ built " __DATE__ " " __TIME__ ; return cvs;}
72 
73  ClassDef(StLuminosityMaker,0) //StAF chain virtual base class for Makers
74 };
75 
76 #endif