StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StFcsMIPMaker.h
1 #ifndef STAR_StFcsMIPMaker
2 #define STAR_StFcsMIPMaker
3 
4 //#ifndef StMaker_H
5 //#include "StMaker.h"
6 
9 #include "StMaker.h"
10 #include <map>
11 
12 class StFcsDb;
13 class StFcsCollection;
14 class TH1F;
15 class TH2F;
16 
17 class StFcsMIPMaker : public StMaker {
18  public:
19  StFcsMIPMaker(const char *name="FcsMIP");
20  virtual ~StFcsMIPMaker();
21  virtual Int_t Init();
22  virtual Int_t Make();
23  virtual Int_t Finish();
24  void setPedSub(int v) {mPedSub=v;}
25  void setRun(int v) {mRun=v;}
26  void setSubRun(int v) {mSub=v;}
27 
28  // virtual Int_t InitRun (int runumber){return 0;}; // Overload empty StMaker::InitRun
29  // virtual Int_t FinishRun(int runumber){return 0;}; // Overload empty StMaker::FinishRun
30 
31  protected:
32 
33  private:
34  StFcsDb *mFcsDb=0;
35  StFcsCollection *mFcsCollection=0;
36  int mRun=0;
37  int mSub=0; //need this to get file name from .cxx
38  TFile *mFile=0;
39  char mFilename[100];
40  int mNTimeBins=160;
41  int mMinTB=210;
42  int mMaxTB=225;
43  int mMaxAdc=4096;
44  int mMaxAdcSum=7000;
45  int mPedSub=0;
46 
47  //Ecal & Hcal correlation map
48  std::map<int,int> MapofCals;
49 
50  int thresh=100; //set adc threshold
51  int Hcal_array[16];
52  int Hcaltowid;
53  int Ecaltowid;
54 
55  //declare variables for cluster correlation
56  float deltax;
57  float deltaxmin;
58  float deltay;
59  float deltaymin;
60  float deltar;
61  float deltarmin;
62  float matchHcalClusE;
63 
64  TH2F *mAdcTb2[kFcsNDet], *mAdcTbthresh2[kFcsNDet];
65  TH2F *mAdcTb[kFcsNDet][kFcsEcalMaxId], *mAdcTbthresh[kFcsNDet][kFcsEcalMaxId];
66  TH1F *maxAdc[kFcsNDet][kFcsEcalMaxId], *maxAdcthresh[kFcsNDet][kFcsEcalMaxId];
67  TH2F* mAdcId[kFcsNDet];
68  TH2F* mAdcSumId[kFcsNDet];
69  TH1F* mAdcSum[kFcsNDet][kFcsEcalMaxId];
70  TH1F* mNHit[kFcsNDet];
71  TH2F* mHitmap[kFcsNDet];
72 
73  //Variables for cluster making
74  TH1F* mNClu[kFcsNDet];
75  TH1F* mNTowClu[kFcsNDet];
76  TH1F* mNNeiClu[kFcsNDet];
77  TH2F* mNTowEClu[kFcsNDet][kFcsEcalMaxId];
78  TH2F* mNTowECluIso[kFcsNDet][kFcsEcalMaxId];
79  TH2F* mNTowECluIsoH[kFcsNDet][kFcsEcalMaxId];
80  //location of clusters
81  TH2F* mNClusX;
82  TH2F* mNClusY;
83  TH2F* mEcalClust;
84  TH2F* mHcalClust;
85 
86  //check deltarmin condition
87  TH2F* deltar_Ecaltow;
88  TH2F* HcalE_Ecaltow;
89 
90  TH1F* towenergy[kFcsNDet][kFcsEcalMaxId];
91  TH1F* towadcsum[kFcsNDet][kFcsEcalMaxId];
92  TH1F* nocut_towadcsum[kFcsNDet][kFcsEcalMaxId];
93  TH1F* hitsperevent;
94  TH1F* rcluster; // <-- spatial sep of Hcal clust and nearest Ecal clust
95  TH1F* rmincluster;
96  TH1F* hmatchHcalClusE;
97  TH1F* minbias_events;
98 
99  ClassDef(StFcsMIPMaker,1) //StAF chain virtual base class for Makers
100 };
101 
102 #endif
103 
104 
StFcsMIPMaker(const char *name="FcsMIP")
constructor
virtual Int_t Make()
Make - this method is called in loop for each event.
virtual Int_t Init()
Init - the top level StChain calls to initialize all its makers.
virtual ~StFcsMIPMaker()
destructor
virtual Int_t Finish()