Go to the documentation of this file.00001 #ifndef TRICHPROC_H
00002 #define TRICHPROC_H
00003
00004 #include "TRocProc.h"
00005 #include "TTrbEvent.h"
00006 #include "TRICHEvent.h"
00007 #include "TTriglogEvent.h"
00008 #include "TBeamMonitorEvent.h"
00009 #include "TMbsCrateEvent.h"
00010 #include "TRICHParam.h"
00011 #include "TGo4Picture.h"
00012 #include "TH1.h"
00013 #include "TH2.h"
00014 #include "TGo4WinCond.h"
00015 #include "TGo4PolyCond.h"
00016 #include "TCBMBeamtimeProc.h"
00017 #include "MAPMT_Cell.h"
00018 #include "TEpicsEvent.h"
00019 #include "TFiberHodEvent.h"
00020
00021
00022 class CbmRichRingFitterCOP;
00023 class CbmRichRingFitterEllipseTau;
00024 class CbmRichRingFinderHoughImpl;
00025 class CbmRichRingLight;
00026 class CbmRichHitLight;
00027 class TEllipse;
00028 class TLatex;
00029
00030
00031 class TRICHProc : public TCBMBeamtimeProc {
00032 friend class TCBMBeamtimeProc;
00033
00034 public:
00035 TRICHProc();
00036 TRICHProc(const char* name);
00037 virtual ~TRICHProc();
00038
00039 virtual void InitEvent(TGo4EventElement*);
00040
00041
00042 virtual void FinalizeEvent();
00043
00044
00045 protected:
00046
00047 bool ReadMapmtGeometry(const char* fname);
00048 void ProcessRICH();
00049 void ProcessLedPulser();
00050
00051 void FillCircleFitHistograms(
00052 Int_t hIndex,
00053 CbmRichRingLight* ring,
00054 int nofEventHits);
00055
00056 void FillEllipseFitHistograms(
00057 Int_t hIndex,
00058 CbmRichRingLight* ring,
00059 int nofEventHits);
00060
00061 void DoAnalysis(
00062 const vector<CbmRichHitLight>&,
00063 bool isElectron,
00064 bool isPion,
00065 bool isMuon);
00066
00067 void DrawRingHits(
00068 CbmRichRingLight* ring,
00069 Int_t sedNum);
00070
00071 void DrawEventHits(
00072 const vector<CbmRichHitLight>&,
00073 Int_t sedNum);
00074
00075 void DrawCircles(
00076 const vector<CbmRichRingLight*>& rings,
00077 Int_t sedNum);
00078
00079 void DrawEllipses(
00080 const vector<CbmRichRingLight*>& rings,
00081 Int_t sedNum);
00082
00083 void SaveParameters();
00084
00085 void SetParticleIdentificationConditions();
00086
00087 void CrTalkResults();
00088
00089 void ReadGainPerPixel();
00090
00091 TRICHParam * fPar;
00092
00094 TRocEvent* fRocInputEvent;
00095 TTrbEvent* fTrbInputEvent;
00096 TRICHEvent* fOutputEvent;
00097 TFiberHodEvent* fHodo1;
00098 TFiberHodEvent* fHodo2;
00099 TTriglogEvent* fTriglogEvent;
00100 TBeamMonitorEvent* fBeamEvent;
00101 TMbsCrateEvent* fMbsEvent;
00102 TEpicsEvent* fEpicsEvent;
00103
00104
00105 CbmRichRingFitterCOP* fRingFitter;
00106 CbmRichRingFitterEllipseTau* fEllipseFitter;
00107 CbmRichRingFinderHoughImpl* fRingFinder;
00108
00109 TH2* hEntries2dIntegral;
00110 TH2* hEntries2dMean;
00111 TH1* hEntriesperPMT;
00112 TH2* hEntriesperPMT2D;
00113 TH1* hADCall;
00114
00115 TH1* hHittime;
00116 TH1* hHitMultperPMT[17];
00117
00118
00119
00120 TH1* hCircleFitRadius[4];
00121 TH1* hCircleFitRadius_cor[4];
00122 TH2* hCircleFitCenter[4];
00123 TH1* hCircleFitChi2[4];
00124 TH1* hCircleFitDR[4];
00125
00126
00127
00128 TH1* hEllipseFitAaxis[4];
00129 TH1* hEllipseFitBaxis[4];
00130 TH1* hEllipseFitPhi[4];
00131 TH1* hEllipseFitBoverA[4];
00132 TH2* hEllipseFitCenter[4];
00133 TH1* hEllipseFitChi2[4];
00134
00135
00136
00137 TH1* hNofHitsEvAll[4];
00138 TH1* hNofHitsEvRingFinder[4];
00139 TH1* hNofHitsEvCircleFit[4];
00140 TH1* hNofHitsEvEllipseFit[4];
00141 TH1* hNofHitsEvRingFinderEff[4];
00142 TH1* hNofHitsEvCircleFitEff[4];
00143 TH1* hNofHitsEvEllipseFitEff[4];
00144
00145 TH1* hNofHitsRingFinder[4];
00146 TH1* hNofHitsRingFinder_cor;
00147 TH1* hNofHitsRingFinder_cor2;
00148 TH1* hNofHitsRingFinder_cor3;
00149
00150 TH1* hNofHitsInHodo;
00151 TH2* hHodoADCvsNofHitInEv;
00152 TH2* hNotAssignedHitsXY;
00153
00154
00155
00156 TH2* hEntries2d[4];
00157
00158
00159 TH1* hNofFoundRings;
00160
00161 TH1* hTimespread;
00162
00163
00164 TH2* hMAPMT_hcor2d_s1;
00165 TH2* hMAPMT_hcor2d_s2;
00166 TH2* hMAPMT_hcor2d_s3;
00167 TH2* hMAPMT_hcor2d_s4;
00168 TH2* hMAPMT_hcor2d_s5;
00169
00170
00171 TGo4WinCond* fMAPMT_cond;
00172 TGo4WinCond* fMAPMT_tcond;
00173
00174
00175 TGo4PolyCond *fElectronCondc1c2;
00176 TGo4PolyCond *fMuonCondc1c2;
00177 TGo4PolyCond *fPionCondc1c2;
00178
00179
00180 vector<TGo4Picture*> fCirclePicture;
00181 vector<vector<TEllipse*> > fCircle;
00182 vector<TLatex*> fCircleText;
00183 vector<vector<TEllipse*> > fEllipse;
00184 vector<TLatex*> fEllipseText;
00185 vector<vector<TEllipse*> > fRingHits;
00186 vector<vector<TEllipse*> > fEventHits;
00187 vector<TH2*> hSED;
00188 const static int fMaxNofHitsInEventDraw = 100;
00189
00190
00191 MAPMT_Cell fMAPMTCells[NUM_MAPMP_CELLS];
00192
00194 MAPMT_Cell* fTRBindex[TRB_TDC3_NUMBOARDS*64];
00195 TH2* hMAP_from_TRB;
00196 TH2* hEntries_TRBROC;
00198
00200 TH1* hLedPulserEntriesPerChannel;
00201 TH2* hLedPulserEntries2d;
00202 TH2* hLedPulserHitVsMapmt;
00203 TH2* hLedPulserADCvsPixel[25];
00205
00206 TH1* hSinglePhotonSpectra[25];
00207
00208 int fEventNr;
00209 int fEventTime;
00210 Double_t fO2level;
00211 Double_t fH2Olevel;
00212 Double_t fTT1;
00213 Double_t fPTB;
00214 Double_t fPress0;
00215 Double_t fTemp0;
00216
00217 int fNrSED;
00218
00219
00220 TH1* hitPMT;
00221 TH1* hitPMTmore;
00222 TH1* hNEdge;
00223 TH1* hNCorner;
00224 TH1* hNCenter;
00225 TH1* hHitMultperPMT_CrTalk[25];
00226 TH2* hEntries2dperPMT[25];
00227 TH1* hHitDist[25];
00228 TH1* hHitDist_py[25];
00229 TH2* hCrTalkDist[25];
00230 TH2* hCrTalkDist_allPMTs;
00231 TH2* hEntries2dAll;
00232 int fEventNr_1stloop;
00233 int fEventNr_2ndloop;
00234 int nof2hitevents;
00235
00236 TH1* hHitDist_sim[25];
00237 TH1* hHitDist_sim_py[25];
00238
00239 TGo4Picture* pic_ct[25];
00240 TGo4Picture* pic_ct_zones[25];
00241
00242 TH1* hLEDPulserADC_1hit[25];
00243 TH2* hLEDPulserADC_1hit_perPixel[25];
00244 TH1* hLEDPulserADC_ctHits[25];
00245 TH1* hLEDPulserADC_nofph[25];
00246 TH2* hLEDPulserADC_nofphPP[25];
00247 TH1* hLEDPulserADC_nofph_mct[25];
00248 TH1* hLEDPulserADC_nofph_1hitpMA[25];
00249
00250 Double_t gain_per_pixel[25][65];
00251 Double_t gain_mean[25];
00252
00253 TH1* hLEDPulserADCcor_1hit[25];
00254
00255 TH1* SP_ADC_all[25];
00256 TH1* SP_ADC_ct[25];
00257 TH1* SP_ADC_1hit[25];
00258 TH1* SP_ADC_ctmain[25];
00259 TH1* SP_ADC_noct[25];
00260
00261 TH1* SP_norm_all[25];
00262 TH1* SP_norm_ct[25];
00263 TH1* SP_norm_1hit[25];
00264 TH1* SP_norm_ctmain[25];
00265 TH1* SP_norm_noct[25];
00266
00267 Int_t crosstalk[25][2];
00268 TH1* crosstalk_results[25];
00269
00270
00271
00272 ClassDef(TRICHProc,1)
00273
00274 };
00275
00276 #endif //TUNPACKPROCESSOR_H