StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StBTofMatchEffMaker.h
1 /*******************************************************************
2  *
3  * $Id: StBTofMatchEffMaker.h,v 1.3 2015/07/28 22:50:03 smirnovd Exp $
4  *
5  * Author: Xin Dong
6  *****************************************************************
7  *
8  * Description: BTof Match Maker to do the matching between the
9  * fired celles and TPC tracks
10  *
11  *****************************************************************
12  *
13  * $Log: StBTofMatchEffMaker.h,v $
14  * Revision 1.3 2015/07/28 22:50:03 smirnovd
15  * C++11 requires a space between literal and identifier
16  *
17  * Revision 1.2 2010/01/28 18:17:53 perev
18  * WarningOff
19  *
20  * Revision 1.1 2009/02/26 21:23:17 dongx
21  * first release - example to calculate the TPC->TOF matching efficiency
22  *
23  *
24  *******************************************************************/
25 #ifndef STBTOFMATCHEFFMAKER_HH
26 #define STBTOFMATCHEFFMAKER_HH
27 #include "StMaker.h"
28 #include "StThreeVectorD.hh"
29 
30 #include <string>
31 #include <vector>
32 #ifndef ST_NO_NAMESPACES
33 using std::string;
34 using std::vector;
35 #endif
36 
37 class StEvent;
38 class StTrack;
39 class StPrimaryTrack;
40 class StHelix;
41 #include "StThreeVectorF.hh"
42 class StTrackGeometry;
43 class StBTofPidTraits;
44 class TH1D;
45 class TH2D;
46 class TTree;
47 
48 class StBTofMatchEffMaker : public StMaker {
49 public:
51  StBTofMatchEffMaker(const Char_t *name="btofMatch");
53 
54  // void Clear(Option_t *option="");
55  Int_t Init();
57  Int_t Make();
58  Int_t Finish();
59 
60  void setCreateHistoFlag(Bool_t histos=kTRUE);
61  void setMinFitPointsPerTrack(Int_t);
62  void setMinFitPointsOverMax(Float_t);
63  void setMaxDCA(Float_t);
64  void setHistoFileName(const Char_t*);
65 
66 private:
68  void bookHistograms();
69  void writeHistogramsToFile();
70 
72  Bool_t validEvent(StEvent *);
74  Bool_t validTrack(StTrack*);
75 
76 public:
77  Bool_t doPrintMemoryInfo;
78  Bool_t doPrintCpuInfo;
79 
80 private:
81  StEvent *mEvent;
82 
83  Bool_t mHisto;
84  string mHistoFileName;
85 
87  Int_t mEventCounter;
88  Int_t mAcceptedEventCounter;
89  Int_t mTofEventCounter;
90  Int_t mAcceptAndBeam;
91 
93  unsigned int mMinFitPointsPerTrack;
94  Float_t mMinFitPointsOverMax;
95  Float_t mMaxDCA;
96 
97  //
98 
100  TH1D* mEventCounterHisto;
101 
102  TH2D* mPionDen;
103  TH2D* mKaonDen;
104  TH2D* mProtonDen;
105  TH2D* mAntiPDen;
106 
107  TH2D* mPionNum;
108  TH2D* mKaonNum;
109  TH2D* mProtonNum;
110  TH2D* mAntiPNum;
111 
112  virtual const char *GetCVS() const
113  {static const char cvs[]="Tag $Name: $ $Id: StBTofMatchEffMaker.h,v 1.3 2015/07/28 22:50:03 smirnovd Exp $ built " __DATE__ " " __TIME__ ; return cvs;}
114 
115  ClassDef(StBTofMatchEffMaker,1)
116 };
117 
118 
119 inline void StBTofMatchEffMaker::setMinFitPointsPerTrack(Int_t nfitpnts){mMinFitPointsPerTrack=nfitpnts;}
120 
121 inline void StBTofMatchEffMaker::setMinFitPointsOverMax(Float_t ratio) {mMinFitPointsOverMax=ratio;}
122 
123 inline void StBTofMatchEffMaker::setMaxDCA(Float_t maxdca){mMaxDCA=maxdca;}
124 
125 inline void StBTofMatchEffMaker::setHistoFileName(const Char_t* filename){mHistoFileName=filename;}
126 
127 inline void StBTofMatchEffMaker::setCreateHistoFlag(Bool_t histos){mHisto = histos;}
128 
129 #endif
Int_t Make()
initial functions - DaqMap, Geometry Alignment, INL are extracted from db
StBTofMatchEffMaker(const Char_t *name="btofMatch")
Default constructor.