]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TPC/AliTPCCalibPulser.h
Updated flags for low flux case (A. Dainese)
[u/mrichter/AliRoot.git] / TPC / AliTPCCalibPulser.h
index ea6a2068a67d04e0049edf72ebff2a3e991e0aef..5e064a94779295059fa03fa66c50f2cd5f1112b7 100644 (file)
 /////////////////////////////////////////////////////////////////////////////////////////
 
 #include <TVectorT.h>
-class TObjArray;
+#include <TObject.h>
+#include <TObjArray.h>
 class TH2S;
+class TH2F;
 class TTreeSRedirector;
 class AliTPCCalPad;
 class AliTPCROC;
@@ -20,6 +22,9 @@ class AliTPCParam;
 class AliRawReader;
 class AliTPCRawStream;
 class AliTPCRawStreamFast;
+class AliTPCAltroMapping;
+class TMap;
+
 struct eventHeaderStruct;
 
 class AliTPCCalibPulser : public TObject {
@@ -27,6 +32,7 @@ class AliTPCCalibPulser : public TObject {
 public:
     AliTPCCalibPulser();
     AliTPCCalibPulser(const AliTPCCalibPulser &sig);
+    AliTPCCalibPulser(const TMap *config);
     virtual ~AliTPCCalibPulser();
 
     void Reset();
@@ -44,6 +50,9 @@ public:
     Int_t Update(const Int_t isector, const Int_t iRow, const Int_t iPad,
               const Int_t iTimeBin, const Float_t signal);
     void Analyse();
+     //
+    AliTPCAltroMapping **GetAltroMapping() { return fMapping; };
+    void  SetAltroMapping(AliTPCAltroMapping **mapp) { fMapping = mapp; };
     //
     AliTPCCalROC* GetCalRocT0 (Int_t sector, Bool_t force=kFALSE);  // get calibration object - sector
     AliTPCCalROC* GetCalRocQ  (Int_t sector, Bool_t force=kFALSE);  // get calibration object - sector
@@ -59,6 +68,11 @@ public:
     TH2S* GetHistoT0 (Int_t sector, Bool_t force=kFALSE);           // get refernce histogram
     TH2S* GetHistoRMS(Int_t sector, Bool_t force=kFALSE);           // get refernce histogram
 
+    TH2F* GetHistoTSec();                                        // mean abs time distribution histogram
+
+    Float_t GetMeanTimeSector(Int_t sector) const {return fVMeanTimeSector[sector];}
+    const TVectorF* GetMeanTimeSectorArray() const {return &fVMeanTimeSector;}
+
     Short_t GetDebugLevel()     const { return fDebugLevel;    }
     //
     void  SetRangeTime (Int_t firstTimeBin, Int_t lastTimeBin) { fFirstTimeBin=firstTimeBin;   fLastTimeBin=lastTimeBin;  } //Set range in which the pulser signal is expected
@@ -67,16 +81,18 @@ public:
     void  SetRangeRefT0 (Int_t nBins, Float_t xMin, Float_t xMax){ fNbinsT0  = nBins; fXminT0  = xMin; fXmaxT0  = xMax; }   //Set range for T0 reference histograms
     void  SetRangeRefRMS(Int_t nBins, Float_t xMin, Float_t xMax){ fNbinsRMS = nBins; fXminRMS = xMin; fXmaxRMS = xMax; }   //Set range for T0 reference histograms
 
-    void  SetOldRCUformat(Bool_t format=kTRUE){ fOldRCUformat = format; }
-
     void  SetDebugLevel(Short_t debug=1){ fDebugLevel = debug;}
 
+    void  SetIsZeroSuppressed(Bool_t zs=kTRUE){ fIsZeroSuppressed=zs;}
+
     void  SetPedestalDatabase(AliTPCCalPad *pedestalTPC, AliTPCCalPad *padNoiseTPC) {fPedestalTPC = pedestalTPC; fPadNoiseTPC = padNoiseTPC;}
     void  SetOutliers(AliTPCCalPad *outliers)  {fOutliers = outliers;}
 
     Int_t GetFirstTimeBin()   const { return fFirstTimeBin;  }
     Int_t GetLastTimeBin()    const { return fLastTimeBin;   }
 
+    Bool_t GetIsZeroSupperssed() const { return fIsZeroSuppressed; }
+
     void Merge(AliTPCCalibPulser *sig);
 
     void DumpToFile(const Char_t *filename, const Char_t *dir="", Bool_t append=kFALSE);
@@ -99,11 +115,13 @@ private:
     Float_t fXminRMS;                 //  xmin   of T0 reference histogram
     Float_t fXmaxRMS;                 //  xmax   of T0 reference histogram
 
+    Bool_t  fIsZeroSuppressed;        //  if data is zero suppressed
+
     Int_t     fLastSector;            //! Last sector processed
 
-    Bool_t  fOldRCUformat;            //! Should we use the old RCU format for data reading
 
-    AliTPCROC   *fROC;                //! ROC information
+    AliTPCROC   *fROC;                //! ROC information  
+    AliTPCAltroMapping **fMapping;    //! Altro Mapping object
     AliTPCParam *fParam;              //! TPC information
 
     AliTPCCalPad *fPedestalTPC;       //! Pedestal Information
@@ -123,6 +141,9 @@ private:
     TObjArray fHistoT0Array;          //  Calibration histograms for Time0  distribution
     TObjArray fHistoRMSArray;         //  Calibration histograms for signal width distribution
 
+    TH2F *fHMeanTimeSector;           //  Timing distribution per sector
+    TVectorF  fVMeanTimeSector;       //  Mean time per sector from analysis of fHMeanTimeSector
+
     TObjArray fPadTimesArrayEvent;    //! Pad Times for the event, before mean Time0 corrections
     TObjArray fPadQArrayEvent;        //! Charge for the event, only needed for debugging streamer
     TObjArray fPadRMSArrayEvent;      //! Signal width for the event, only needed for debugging streamer
@@ -131,6 +152,7 @@ private:
     Int_t     fCurrentChannel;         //! current channel processed
     Int_t     fCurrentSector;          //! current sector processed
     Int_t     fCurrentRow;             //! current row processed
+    Int_t     fCurrentPad;             //! current pad processed
     Float_t   fMaxPadSignal;           //! maximum bin of current pad
     Int_t     fMaxTimeBin;             //! time bin with maximum value
     TVectorF  fPadSignal;              //! signal of current Pad
@@ -140,6 +162,7 @@ private:
     TVectorF  fVTime0Offset;          //!  Time0 Offset from preprocessing for each sector;
     TVectorF  fVTime0OffsetCounter;   //!  Time0 Offset from preprocessing for each sector;
 
+
     //debugging
 //    Int_t fEvent;                      //  Number of events processed
     TTreeSRedirector *fDebugStreamer;  //! debug streamer
@@ -152,13 +175,15 @@ private:
 
     TH2S* GetHisto(Int_t sector, TObjArray *arr,
                   Int_t nbinsY, Float_t ymin, Float_t ymax,
-                  Char_t *type, Bool_t force);
+                  const Char_t *type, Bool_t force);
 
 
     AliTPCCalROC* GetCalRoc(Int_t sector, TObjArray* arr, Bool_t force) const;
 
     TVectorF* GetPadTimesEvent(Int_t sector, Bool_t force=kFALSE);
 
+    Bool_t IsEdgePad(Int_t sector, Int_t row, Int_t pad);
+
     void ResetEvent();
     void ResetPad();
     void ProcessPad();
@@ -172,7 +197,8 @@ private:
     TVectorF* GetPadPedestalEvent(Int_t sector, Bool_t force=kFALSE);
 
 
-  ClassDef(AliTPCCalibPulser,1)           //Implementation of the TPC pulser calibration
+
+  ClassDef(AliTPCCalibPulser,4)           //Implementation of the TPC pulser calibration
 };