00001 #ifndef STAR_StBarrelMonitorMaker
00002 #define STAR_StBarrelMonitorMaker
00003
00004
00005
00006
00007
00008
00009
00010
00011 #ifndef StMaker_H
00012 #include "StMaker.h"
00013 #endif
00014
00015 class TObjArray ;
00016 class StMuDstMaker;
00017 class StEmcDecoder;
00018 class TH3F;
00019 class TH2F;
00020 class TH2D;
00021 class TH2I;
00022 class TH1I;
00023 class BprsCapPolygraph;
00024 class BarrelMipCalib;
00025
00026 #include "JanBarrelConst.h"
00027 #include "JanBarrelEvent.h"
00028 #include "JanBprsEveA.h"
00029
00030 class StEmcGeom;
00031 class StMuDstMaker;
00032 class StJanBarrelDbMaker;
00033
00034
00035 class StBarrelMonitorMaker : public StMaker {
00036
00037 private:
00038
00039 JanBarrelEvent janEve;
00040 JanBprsEveA janBprsEveA[mxBprsCrate];
00041 BprsCapPolygraph *bprsPolygraph;
00042 BarrelMipCalib * mipCalib;
00043
00044 int nTrigEve, nAcceptEve,nCorrEve;
00045 int trigID;
00046 int nInpEve;
00047 int eventID;
00048 int mGeantEveInp;
00049 StMuDstMaker *mMuDstMaker;
00050 StJanBarrelDbMaker *mJanDbMaker;
00051
00052
00053 int isMC;
00054
00055
00056 enum {kPassPedSub=0x1, kPassCapFix=0x2};
00057 int par_calibPass;
00058 int par_bprsHisto;
00059
00060 char cTile[mxBTile];
00061 const char *cTile4[mxBTile];
00062
00063
00064 TH1 *hTile[mxBTile];
00065 TH1 *hBprsA[mxBprsCrate];
00066 TH3F *hBprs3D;
00067 TH2D *hTonko0,*hTonko1, *hTonko2;
00068
00069 TObjArray *HList;
00070
00071 void initHistos();
00072 void initHistosTiles(int ibp);
00073 void initAuxBprsHistos();
00074 TH1F *addBprsEveHisto(int *cap);
00075
00076 void unpackStTiles(int ibp);
00077
00078 void calibrateTiles(int ibp);
00079 void populateBprsEveA();
00080 void doTonkosBprsPeds();
00081 void test1();
00082
00083 StEmcGeom *mBtowGeom, *mBprsGeom, * mSmdEGeom, * mSmdPGeom;
00084 StEmcDecoder* mMappB;
00085
00086 public:
00087 StBarrelMonitorMaker(const char *self="janBarrelMonitor");
00088 virtual ~StBarrelMonitorMaker();
00089 virtual Int_t Init();
00090 virtual Int_t InitRun(int);
00091 virtual void Clear(const Option_t* = "");
00092 virtual Int_t Finish();
00093 virtual Int_t Make();
00094 void setHList(TObjArray * x){HList=x;}
00095 void saveHisto(TString fname="fixMe3");
00096 void uploadJanCalib(char* path);
00097 void setTrigIdFilter(int id) {trigID=id;}
00098 void setMC(int x){isMC=x;}
00099
00100 void setBprsHisto(int i) {par_bprsHisto=i;}
00101 void setCalibPass(int i) {par_calibPass=i;}
00102
00104 virtual const char *GetCVS() const {
00105 static const char cvs[]="Tag $Name: $ $Id: StBarrelMonitorMaker.h,v 1.2 2009/08/25 16:08:04 fine Exp $ built "__DATE__" "__TIME__ ;
00106 return cvs;
00107 }
00108
00109 ClassDef(StBarrelMonitorMaker, 1)
00110 };
00111
00112 #endif
00113
00114
00115
00116
00117
00118
00119
00120
00121
00122
00123
00124
00125
00126
00127
00128
00129
00130
00131
00132
00133 #if 0
00134
00135
00136 float smdAdc[mxBSmd][mxBStrips];
00137 float smdEne[mxBSmd][mxBStrips];
00138 float smdDE[mxBSmd][mxBStrips] ;
00139 int smdUsed[mxBSmd][mxBStrips] ;
00140 unsigned int smdKill[mxBSmd][mxBStrips];
00141
00142
00143 float btowAdc[mxBTail][mxBtow];
00144 float btowEne[mxBTail][mxBtow];
00145 unsigned int btowKill[mxBTail][mxBtow];
00146 float btowDE[mxBTail][mxBtow] ;
00147 #endif
00148
00149
00150 #if 0
00151
00152 bool jhOK;
00153 TH1F *jhGCorr[mxBSmd];
00154 TH1I *jhStat[mxBSmd];
00155 TH2I *jhMap2id[mxBSmd];
00156 TH1I *jhMapid2[mxBSmd];
00157 TH1F *jhS2Tmap[mxBSmd];
00158 TH1F *jhSped[mxBSmd];
00159 float calibC0data, *calibC1;
00160 enum {mxTw20=20};
00161 float calibTdata[mxTw20];
00162 #endif
00163
00164 #if 0 // iso-gamma params
00165 int par_strWinLen;
00166 float par_strEneThr;
00167 float par_cluEneThr;
00168 float par_isoMinT3x3adc;
00169 float par_isoMaxT3x3adc;
00170 float par_isoTowerEneR;
00171 float par_isoRms;
00172 int par_isoStripMargin;
00173 float par_kSigPed;
00174
00175 enum{ mxhS=16, mxhC=256};
00176 TH1 *hS[mxBSmd][mxhS];
00177 char cPlane[mxBSmd];
00178 TH1 *hC[mxhC];
00179 TH1 *hStrip[mxCutH][mxBSmd];
00180 TH2F *hX;
00181
00182 void initHistosSMD(int iep,int modID);
00183 void initHistosIsoSmdCluster();
00184 void initHistosStrips(int iep,int iCut);
00185
00186 void scanSmdEtaModule(int modID);
00187 void scanSmdPhiBand(int iEtaBin_bsmdP);
00188 bool scanStrips(char plane, int mxStr, float *eneA, int *usedA, unsigned int *killA, int *idA, BsmdCluster1D &cluster);
00189 void pickIsoSmdCluster();
00190 float sum3x3towerADC(int towID,int size);
00191 void sete3x3TwoAdc(float x, float y) {par_isoMinT3x3adc=x; par_isoMaxT3x3adc=y;}
00192 #endif