00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef STAR_St_StBemcBeamBckgFinderMaker_h
00011 #define STAR_St_StBemcBeamBckgFinderMaker_h
00012
00013
00014 #ifndef StMaker_H
00015 #include "StMaker.h"
00016 #endif
00017
00018 class TH2F;
00019 class TCanvas;
00020 class TStyle;
00021 class StEmcGeom;
00022 class TObjArray;
00023 class StEmcDecoder;
00024
00025 class StBemcBeamBckgFinderMaker : public StMaker {
00026
00027 private:
00028
00029
00030 StEmcGeom *mGeomB;
00031 StEmcDecoder *mMappB;
00032 TObjArray *mHList;
00033
00034 enum{mMaxH=8};
00035 enum{mMaxevtH=3};
00036 TH1F *mhisto[mMaxH];
00037 TH2F *mevtH[mMaxevtH];
00038
00039 enum{mxSoftId = 4800};
00040 enum{mxEta=40, mxPhi=120};
00041 enum{xmlocate = 10};
00042
00043
00044 Int_t GetNewStatus(int id, int rdo, int run);
00045 void FillAdc(float iadc,int ieta,int iphi,int isoft);
00046 Int_t CheckPatternType3(int &etaBegin, int &phiBegin, int &etaEnd, int &patternLength, float &sumAdc, float &AverageWeightedEta);
00047 void PlotOneEvent();
00048
00049 float mdb_btowPed[mxSoftId];
00050 int mdb_btowStat[mxSoftId];
00051
00052 int mdb_btowetaBin[mxSoftId];
00053 int mdb_btowphiBin[mxSoftId];
00054
00055 int mdb_btowRdo[mxSoftId];
00056 int mdb_btowSoftId[mxSoftId];
00057
00058 float mAdcArray[mxPhi][mxEta];
00059 int mSoftId[mxPhi][mxEta];
00060
00061 int mInpEve;
00062 int mAccEve;
00063 int mTrigId;
00064 int mRunNumber;
00065 int mDecision;
00066 char mLocation[xmlocate];
00067 int metaBegin;
00068 int metaEnd;
00069 int mphiBegin;
00070 int mpatternLength;
00071 float msumAdc;
00072 float mAvgEtaAdc;
00073 int mPattSoftId[mxSoftId];
00074
00075 int mAdcThreshold;
00076 float mAdcSumThreshold;
00077 int mpattern;
00078 int mMaxYesPlots;
00079 int mMaxNoPlots;
00080 bool mSearchDone;
00081
00082 public:
00083
00084
00085 void SetHList(TObjArray *x){mHList = x;}
00086
00087 StBemcBeamBckgFinderMaker(const char *name="BemcBckgFinder");
00088 ~StBemcBeamBckgFinderMaker();
00089 Int_t Init();
00090 Int_t Make();
00091 Int_t InitRun (int runumber);
00092 void Clear(const Option_t* = "");
00093 Int_t Finish();
00094 void SetTrigger(int x) {mTrigId=x;}
00095
00096 void SetAdcThreshold(int setadc) {mAdcThreshold=setadc;}
00097 void SetAdcSumThreshold(float setadcsum) {mAdcSumThreshold=setadcsum;}
00098 void SetPatternLength(int setpattern) {mpattern=setpattern;}
00099 void SetMaxYesPlots(int setyesplots) {mMaxYesPlots=setyesplots;}
00100 void SetMaxNoPlots(int setnoplots) {mMaxNoPlots=setnoplots;}
00101 void GetDecision(int &fDecision,int &eta1, int &phi1, int &eta2, int &patternleng, float &Adcsum);
00102 const int *GetSoftIdList(){return mPattSoftId;}
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112 virtual const char *GetCVS() const {
00113 static const char cvs[]="Tag $Name: $ $Id: StBemcBeamBckgFinderMaker.h,v 1.8 2006/06/27 15:41:30 qattan Exp $ built "__DATE__" "__TIME__ ;
00114 return cvs;
00115 }
00116
00117 ClassDef(StBemcBeamBckgFinderMaker,0)
00118 };
00119
00120 #endif
00121
00122
00123
00124
00125
00126
00127
00128
00129
00130
00131
00132
00133
00134
00135
00136
00137
00138
00139
00140
00141
00142
00143
00144
00145
00146
00147