X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=TRD%2FAliTRDqaBlackEvents.h;h=02e167213f657661e52b369d0c8a8d8cfdd8e982;hb=b4b977f70edde287e24f18a09a8e9e70129edda4;hp=f90d3f82fe82333e47333869ddf9411909acf0f8;hpb=27fe785b3dfd5cf087061ec2b8c9ee22d45d05b9;p=u%2Fmrichter%2FAliRoot.git diff --git a/TRD/AliTRDqaBlackEvents.h b/TRD/AliTRDqaBlackEvents.h index f90d3f82fe8..02e167213f6 100644 --- a/TRD/AliTRDqaBlackEvents.h +++ b/TRD/AliTRDqaBlackEvents.h @@ -20,7 +20,10 @@ class TH1D; class TH2D; class TH2S; class TH3F; -class AliTRDrawStreamTB; +class TGraph; +class TObjArray; +class AliTRDrawStreamOld; +class AliRawReader; class AliTRDqaBlackEvents : public TObject { @@ -33,18 +36,25 @@ class AliTRDqaBlackEvents : public TObject { void Init(); void Reset(); - Int_t AddEvent(AliTRDrawStreamTB *data); + //Int_t AddEvent(AliTRDrawStream *data, AliRawReader *reader); + + void StartEvent(); + void AddBuffer(AliTRDrawStreamOld *data, AliRawReader * const reader); + void FinishEvent(); + void Process(const char* filename); //TH2D *GetChamberPedestal(Int_t sm, Int_t layer, Int_t stack) {return 0;} - TH2D *GetChamberPedestal(Int_t det) {return fChPed[det];} + TH2D *GetChamberPedestal(Int_t det) const {return fChPed[det];} //TH2D *GetChamberNoise(Int_t sm, Int_t layer, Int_t stack) {return 0;} - TH2D *GetChamberNoise(Int_t det) {return fChNoise[det];} + TH2D *GetChamberNoise(Int_t det) const {return fChNoise[det];} void SetNoiseLevel(Double_t min, Double_t max) {fMinNoise = min; fMaxNoise = max;} void SetFitMethod(Int_t fit) {fFitType = fit;} + void SetRefFile(const char *filename); + void DrawChamber(const char *filename, Int_t det, Int_t w=700, Int_t h=400); //void ScanChamber(const char *filename, Int_t first, Int_t last); void DrawSm(const char *filename, Int_t sm, Int_t w=900, Int_t h=700); @@ -62,6 +72,11 @@ class AliTRDqaBlackEvents : public TObject { Int_t fThresh; // threshold to analyze MCM data Int_t fCount; // minimum number of entries above threshold + Int_t fRefEv; // reference event number + + //Char_t fRefFileName[256]; // name of the file with reference distributions + const Char_t *fRefFileName; // name of the file with reference distributions + // geometry constants enum { kDET = 540, @@ -69,8 +84,10 @@ class AliTRDqaBlackEvents : public TObject { kMCM = 16, kADC = 21, kTB = 30, - kCOL = 16, - kPAD = 144 + kROW = 16, + kPAD = 144, + kSM = 18, + kCH = 50 }; // histograms per detector @@ -82,6 +99,7 @@ class AliTRDqaBlackEvents : public TObject { TH1D *fPed[kDET]; // reconstructed pedestals distribution (on hist per chamber) TH1D *fNoise[kDET]; // reconstructed noise distribution (on hist per chamber) + TH1D *fChPP[kDET]; // peak to peak for each chamber TH1D *fNPointDist[kDET]; // distributin of the number of points TH2D *fChPed[kDET]; // Some histograms TH2D *fChNoise[kDET]; // Some histograms @@ -91,18 +109,101 @@ class AliTRDqaBlackEvents : public TObject { TH2D *fnEntriesRM[kDET]; // number of entries for ROB - MCM TH1D *fnEntriesRMDist[kDET]; // distribtion of number of entries per ROB-MCM + // direct access to data + Float_t fDataDirect[kDET][kROW][kPAD][kCH]; // data array + Double_t fSignalDirect[kDET][kCH]; // signal array + + // after reference subtraction + TH2D *fChPedRes[kDET]; // histograms after reference subtraction + TH2D *fChNoiseRes[kDET]; // histograms after reference subtraction + + TH2D *fTBEvent; // coherent noise + + TH2D *fRefHistPed; // reference distributions + TH2D *fRefHistNoise; // reference distributions + TH2S *fFullSignal[kDET*kROB*kMCM]; // one histogram per MCM Short_t fFullCounter[kDET*kROB*kMCM]; // counts a number of entries with high signal - TH2D *fTBEvent; // coherent noise + // error codes + TH1D *fErrorHC; // number of errors HC + TH1D *fErrorMCM; // number of errors MCM + TH1D *fErrorADC; // number of errors ADC + + TH1D *fErrorSMHC; // number of errors in HC per SM + TH1D *fErrorSMMCM; // number of errors in MCM per SM + TH1D *fErrorSMADC; // number of errors in ADC per SM + + TH2D *fErrorLocHC[kDET]; // location of errors + TH2D *fErrorLocMCM[kDET]; // location + TH2D *fErrorLocADC[kDET]; // errors in ADC + + // error fraction + TGraph *fErrorGraphHC; // HC errors + TGraph *fErrorGraphMCM; // MCM errors + TGraph *fErrorGraphADC; // ADC errors + + TGraph *fGraphMCM; // number of strange MCMs detected + TGraph *fGraphPP[3]; // number of strange points + + + // mcm tracklets + TObjArray *fMcmTracks; // MCM tracklets + + // problematic MCMs + TH2D *fMapMCM; // map of problematic MCMs + TH1D *fFracMCM; // fraction of problematicc MCMs + + // full detector view + TH2D *fSMHCped; // full detector view of pedestals + TH2D *fSMHCerr; // full detector view of errors + TH2D *fSMLink[3]; // full detector view + TGraph *fGrLink[3]; // full detector view + + //TH1D *fZSsize; + + + // number of fired ADC channels in total and per SM + TGraph *fNumberADC[kSM+1]; + + //Int_t fChkDe + + TH1D *fNoiseTotal; // total noise + TH1D *fPP; // points + + TH1D *fSmNoiseRms[kSM]; // noise RMS + TH1D *fSmNoiseFit[kSM]; // noise fit + TH1D *fSmPP[kSM]; // points - Int_t fFitType; + TH1D *fEvNoDist[1000]; // event numbers + // Double_t fMinNoise; // Minimum noise Double_t fMaxNoise; // Maximum noise + Int_t fFitType; // fit type + + // variables keeping info in one event + Int_t fnErrorHC[2]; // 0 good, 1 error + Int_t fnErrorMCM[2]; // 0 good, 1 error + Int_t fnErrorADC[2]; // 0 good, 1 error + + Int_t fppThresh[3]; // thresholds for storing pp + Int_t fnPP[3]; // number of entries above the thershold + Int_t fnLink[3]; // links present, beaf-beaf, good + Int_t fnADCinSM[kSM+1]; // number of ADC channels in a SuperModule + // + + + + // private function + void ReadRefHists(Int_t det); + Int_t CheckMCM(Int_t index) const; + + Int_t FillBits(TH1D *hist, Int_t code, Int_t offset); + - ClassDef(AliTRDqaBlackEvents,0) // QA for black events + ClassDef(AliTRDqaBlackEvents,1) // QA for black events }; #endif