StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StSkimPionMaker.h
1 /*
2  StSkimPionMaker.h
3 
4 */
5 
6 #ifndef STAR_StSkimPionMaker
7 #define STAR_StSkimPionMaker
8 
9 #ifndef StMaker_H
10 #include "StMaker.h"
11 #include "TH1.h"
12 #include "TObjArray.h"
13 #endif
14 
15 #include "StThreeVectorF.hh"
16 
17 //StMuDstMaker
18 #include "StMuDSTMaker/COMMON/StMuDst.h"
19 #include "StMuDSTMaker/COMMON/StMuEvent.h"
20 #include "StMuDSTMaker/COMMON/StMuDstMaker.h"
21 #include "StMuDSTMaker/COMMON/StMuEmcCollection.h"
22 #include "StMuDSTMaker/COMMON/StMuDst.h"
23 #include "StMuDSTMaker/COMMON/StMuEmcUtil.h"
24 #include "StEmcRawMaker/defines.h"
25 #include "StEmcRawMaker/StBemcRaw.h"
26 #include "StEmcRawMaker/StBemcTables.h"
27 
28 #include "TSkimPionEvent.h"
29 
30 class TNtuple;
31 class TH2F;
32 class StChain;
33 class StPrimaryTrack;
34 class StPrimaryVertex;
35 class StEmcCollection;
36 class StEmcGeom;
37 class StEmcPoint;
38 
39 #define badrunidmax 200
40 #define ntower 4800
41 
42 class StSkimPionMaker : public StMaker
43 {
44 private:
45 protected:
46  Bool_t mDoTracks;
47  StChain* mChain;
48  const char* mFileName;
49 
52 
53  StBemcTables* mTables; // used to access EMC status and pedestal info
54 
55  float mPi;
56  float mPi0Mass;
57 
58  bool debug;
59 
60  bool mb;
61  bool httpl2;
62  bool httpl2_test;
63  Int_t mBBCTrig;
64  Int_t triggerTower;
65  Float_t mBBCVertexZ;
66 
67  Int_t badrunid[badrunidmax];
68  Int_t tower[ntower];
69  Float_t gain[ntower];
70  Float_t c_factors[4801];
71 
72  Int_t runN;
73  Int_t eventN;
74  Int_t fillN;
75  Int_t indicator;
76 
77  Int_t ievtot;
78  Int_t ievaccep;
79  Int_t inochainpt;
80  Int_t inoevpt;
81  Int_t ibadrun;
82  Int_t iemc;
83  Int_t inoprimvert;
84  Int_t itrig;
85  Int_t ievmix;
86  Int_t iWrittenEvents;
87  Int_t ii;
88  Double_t mField;
89  Float_t mHiTowerAdc6Bit;
90  // for HT1 triggers, this should be > 10
91 
92  TObjArray *photonlist;
93 
94  //Temp
95  Int_t startphoton1;
96  Int_t startphoton2;
97  Int_t fnummixed;
98 
99  TObjArray *mixedphoton1list;
100  TObjArray *mixedphoton2list;
101 
102  TFile* mFile;
103 
104  TTree* pi0Tree;
105  TSkimPionEvent* pi0Event;
106 
107  Float_t getHiTowerEt(StEmcCollection*);
108  Int_t doTrackPtHist(Float_t energy, Float_t threshold, TObjArray *photonlist);
109  Int_t associateTracksWithEmcPoints(StMaker* anyMaker);
110 
111  void getTowerHitInfo();
112  StThreeVectorF getPoint(StEmcPoint *p, Int_t&, Float_t&, Float_t&, Int_t&, Int_t&, Float_t&, Float_t&, Float_t&,Float_t&, Float_t&, Float_t&); //added info on SMD and Tower energy, size
113  void printPointInfo(StEmcPoint *p);
114  void getPhotonSpectra(TObjArray *photonlist, Int_t, Float_t, Int_t);
115  Float_t getNeutralEnergySum(TObjArray *photonlist);
116  Bool_t getMass(StThreeVectorF, StThreeVectorF, Float_t, Float_t, Double_t&, StThreeVectorF&, Float_t&, Float_t&, Float_t&, Float_t&);
117 
118  void getInvMass(Int_t, TObjArray *photonlist1, TObjArray *photonlist2, Float_t, StThreeVectorF, int[3], int[3]);
119 
120 public:
121 
122  StSkimPionMaker(const char *name="pi0AnaMaker", Bool_t mDoTracks=kTRUE, const char *mFileName="bla.root");
123  virtual ~StSkimPionMaker();
124 
125  virtual Int_t Init();
126  virtual Int_t InitRun(int);
127  virtual Int_t Make();
128  virtual Int_t Finish();
129  Bool_t readPointList();
130 
131  ClassDef(StSkimPionMaker, 1) //StAF chain virtual base class for Makers
132  };
133 #endif
virtual Int_t Make()
TObjArray * photonlist
used for MC trigger selection and offline trig definition
TObjArray * mixedphoton1list
number of mixed events
virtual Int_t Finish()
StMuDstMaker * mMuDstMaker
Pointer to the StMuDstMaker which provides the events to analyse.
StMuDst * mMuDst
Pointer to the StMuDst class, which holds all the events information. Will be updated in the event lo...