X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=FMD%2FAliFMDGainDA.h;h=0b4033f877b13153dddec89cd0394336413519fa;hb=21342833e8442b28566675c66c5102dec026383a;hp=21f7338adbcfc6f02ae262b3c0d78d5109dd00fa;hpb=ee3db409c26c34f50a596c986857622bc9d5d963;p=u%2Fmrichter%2FAliRoot.git diff --git a/FMD/AliFMDGainDA.h b/FMD/AliFMDGainDA.h index 21f7338adbc..0b4033f877b 100644 --- a/FMD/AliFMDGainDA.h +++ b/FMD/AliFMDGainDA.h @@ -11,48 +11,197 @@ #include "AliFMDBaseDA.h" -#include "TH1.h" +#include "TH1F.h" #include "TObjArray.h" -#include "TGraphErrors.h" +// #include "TGraphErrors.h" +class TGraphErrors; +class TH1S; -class AliFMDGainDA: public AliFMDBaseDA { - - public: - +class AliFMDGainDA: public AliFMDBaseDA +{ +public: + /** + * Constructor + * + */ AliFMDGainDA() ; + /** + * Copy constructor + * + * @param gainDA Object to copy from + */ AliFMDGainDA(const AliFMDGainDA & gainDA) ; - // AliFMDGainDA& operator = (const AliFMDGainDA & gainDA) ; + /** + * Assignment operator + * + * @param gainDA Object to assign from + */ + AliFMDGainDA& operator=(const AliFMDGainDA&) { return *this; } + /** + * Destructor + * + */ virtual ~AliFMDGainDA(); + /** + * Initialize + * + */ void Init(); - void SetPulseSize(Int_t pulseSize = 32) {fPulseSize = pulseSize; } + /** + * Set the maximum pulse size + * + * @param highPulse Maximum pulse size + */ void SetMaxPulse(Int_t highPulse = 256) {fHighPulse = highPulse; } - void SetPulseLength(Int_t pulseLength = 100) {fPulseLength = pulseLength; } + /** + * Set the number of strips per input channel + * + * @param nStrips Number of strips per channel + */ void SetNumberOfStrips(Int_t nStrips) {fNumberOfStripsPerChip = nStrips;} - protected: - - void AddChannelContainer(TObjArray* sectorArray, UShort_t det, Char_t ring, UShort_t sec, UShort_t strip); +protected: + /** + * Make a container for a channel + * + * @param sectorArray Sectors + * @param det Detector # + * @param ring Ring identifier + * @param sec Sector number + * @param strip Strip number + */ + void AddChannelContainer(TObjArray* sectorArray, + UShort_t det, Char_t ring, + UShort_t sec, UShort_t strip); + /** + * Add summary(s) for sectors + * + * @param secArray + * @param det + * @param ring + * @param sector + * @param nStrip + */ + virtual void AddSectorSummary(TObjArray* secArray, UShort_t det, + Char_t ring, UShort_t sector, + UShort_t nStrip); + /** + * Fill channel histogram + * + * @param digit Digit to fill from + */ void FillChannels(AliFMDDigit* digit); + /** + * Analyse the result + * + * @param det Detector # + * @param ring Ring identifier + * @param sec Sector number + * @param strip Strip number + * @param h Summary histogram with bins for sector and strip + */ void Analyse(UShort_t det, Char_t ring, UShort_t sec, UShort_t strip); + /** + * Write out the header + */ void WriteHeaderToFile(); - void UpdatePulseAndADC(UShort_t det, Char_t ring, UShort_t sec, UShort_t strip); + /** + * Go to the next sample + * + * @param det Detector # + * @param ring Ring identifier + * @param sec Sector number + * @param strip Strip number + */ + void UpdatePulseAndADC(UShort_t det, + Char_t ring, + UShort_t sec, + UShort_t strip); + /** + * Reset all + * + */ void ResetPulseAndUpdateChannel(); + /** + * End of event + * + */ void FinishEvent(); + /** + * End of job + * + * @param dummy Not used + */ + void Terminate(TFile* dummy); + /** + * Initialize container + * + * @param dir Directory to make containers in + */ + virtual void InitContainer(TDirectory* dir); + +private: + /** + * Get the channel histogram + * + * @param det Detector # + * @param ring Ring identifier + * @param sec Sector number + * @param va VA chip number + * + * @return Histogram + */ + TH1S* GetChannelHistogram(UShort_t det, Char_t ring, UShort_t sec, + UShort_t va); + /** + * Get strip graph + * + * @param det Detector # + * @param ring Ring identifier + * @param sec Sector number + * @param strip Strip number + * + * @return Graph + */ + TGraphErrors* GetChannel(UShort_t det, Char_t ring, + UShort_t sec, UShort_t strip); + /** + * Get the summary for a sector + * + * @param det Detector + * @param ring Ring + * @param sec Sector + * @param pedNotNoise Option + * + * @return histogram + */ + TH1F* GetSectorSummary(UShort_t det, Char_t ring, UShort_t sec); + Int_t fHighPulse; // Highest pulse + TArrayS fEventsPerChannel; // # of events per pulse step + TArrayS fCurrentPulse; // The current pulse size + TArrayS fCurrentChannel; // The current strip number + Int_t fNumberOfStripsPerChip; // Number of strips - private: - - TH1S* GetChannelHistogram(UShort_t det, Char_t ring, UShort_t sec, UShort_t strip); - TGraphErrors* GetChannel(UShort_t det, Char_t ring, UShort_t sec, UShort_t strip); - TObjArray fGainArray; - Int_t fPulseSize; - Int_t fHighPulse; - Int_t fPulseLength; - Int_t fEventsPerChannel; - Int_t fCurrentPulse; - Int_t fCurrentChannel; - Int_t fNumberOfStripsPerChip; + TH1F fSummaryGains; // Summary histogram + Int_t fCurrentSummaryStrip; // Current strip for summary + + void MakeSummary(UShort_t det, Char_t ring); + + TH2* fGainFMD1i; // AMORE DQM histogram + TH2* fGainFMD2i; // AMORE DQM histogram + TH2* fGainFMD2o; // AMORE DQM histogram + TH2* fGainFMD3i; // AMORE DQM histogram + TH2* fGainFMD3o; // AMORE DQM histogram + TH2* fChi2FMD1i; // AMORE DQM histogram + TH2* fChi2FMD2i; // AMORE DQM histogram + TH2* fChi2FMD2o; // AMORE DQM histogram + TH2* fChi2FMD3i; // AMORE DQM histogram + TH2* fChi2FMD3o; // AMORE DQM histogram - ClassDef(AliFMDGainDA,0) + ClassDef(AliFMDGainDA,0) // Detector algorithm for gain runs }; #endif +// Local Variables: +// mode: C++ +// End: