]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliITSOnlineSDDInjectors.h
Another histos for lumi
[u/mrichter/AliRoot.git] / ITS / AliITSOnlineSDDInjectors.h
index 331508d341d12c477eb17eea0a35ffaaff622f40..e49459b8e9e29210b3ae5e645eea698d30abb28e 100644 (file)
@@ -25,26 +25,21 @@ class AliITSOnlineSDDInjectors : public AliITSOnlineSDD {
   virtual ~AliITSOnlineSDDInjectors();
 
 
-  void SetThresholds(Float_t tl, Float_t th){
-    fLowThreshold=tl;
-    fHighThreshold=th;
+  void SetThresholds(Int_t ilin, Float_t tl, Float_t th){
+    fLowThreshold[ilin]=tl;
+    fHighThreshold[ilin]=th;
   }
+  void SetMaxNumberOfCellsPerAnode(Int_t maxc=40){
+    fMaxCellsAboveThreshold=maxc;
+  }
+
   void SetInjLineRange(Int_t jlin, Int_t tbmin, Int_t tbmax){
     fTbMin[jlin]=tbmin;
     fTbMax[jlin]=tbmax;
   }
-  void Set20MHzConfig(){
-    SetInjLineRange(0,10,20);
-    SetInjLineRange(1,50,70);
-    SetInjLineRange(2,100,120);
-    SetTimeStep(50.);
-  }
-  void Set40MHzConfig(){
-    SetInjLineRange(0,20,50);
-    SetInjLineRange(1,90,160);
-    SetInjLineRange(2,170,240);
-    SetTimeStep(25.);
-  }
+  void Set20MHzConfig();
+  void Set40MHzConfig();
+
   void SetPolDegree(Int_t n){fPolDegree=n;}
   void SetMinDriftSpeed(Float_t vmin){fMinDriftSpeed=vmin;}
   void SetMaxDriftSpeed(Float_t vmax){fMaxDriftSpeed=vmax;}
@@ -109,10 +104,19 @@ class AliITSOnlineSDDInjectors : public AliITSOnlineSDD {
   void FitDriftSpeedVsAnode();
   void PolyFit(Int_t degree=3);
   Double_t GetMeanDriftSpeed(Int_t ipad) const{
-    if(fNEvents==0) return 0.;
-    return fSumDriftSpeed[ipad]/(Double_t)fNEvents;
+    if(fNEventsInPad[ipad]==0) return 0.;
+    return fSumDriftSpeed[ipad]/(Double_t)fNEventsInPad[ipad];
   }
   Double_t GetRMSDriftSpeed(Int_t ipad) const;
+  Double_t GetMeanPadStatusCut(Int_t ipad) const{
+    if(fNEventsInPad[ipad]==0) return 0.;
+    return (Double_t)fSumPadStatusCut[ipad]/(Double_t)fNEventsInPad[ipad];
+  }
+  Double_t GetMeanPadStatus(Int_t ipad) const{
+    if(fNEvents==0) return 0.;
+    return (Double_t)fSumPadStatus[ipad]/(Double_t)fNEvents;
+  }
+
   void FitMeanDriftSpeedVsAnode();
 
  protected:
@@ -126,7 +130,9 @@ class AliITSOnlineSDDInjectors : public AliITSOnlineSDD {
   AliITSOnlineSDDInjectors& operator = (const AliITSOnlineSDDInjectors& source);
   static const Float_t fgkSaturation;        // ADC saturation value (1008)
   static const Float_t fgkDefaultLThreshold;  // Default for fLowThreshold
+  static const Float_t fgkDefaultLThreshold1;  // Default for fLowThreshold
   static const Float_t fgkDefaultHThreshold;  // Default for fHighThreshold
+  static const Float_t fgkDefaultHThreshold1;  // Default for fHighThreshold
   static const Float_t fgkDefaultMinSpeed;   // Default for fMinDriftSpeed
   static const Float_t fgkDefaultMaxSpeed;   // Default for fMaxDriftSpeed
   static const Float_t fgkDefaultMaxErr;     // Default for fMaxDriftSpeedErr
@@ -140,36 +146,41 @@ class AliITSOnlineSDDInjectors : public AliITSOnlineSDD {
   Double_t fTbZero;                           // Time zero for injector event
   Double_t fRMSTbZero;                        // Error on time zero 
   Double_t fPosition[kInjLines];              // Coordinates of injector lines
-  UShort_t fTbMin[kInjLines];                // Minimum time bin for each line
-  UShort_t fTbMax[kInjLines];                // Maximum time bin for each line
-  Bool_t fGoodInj[kInjPads][kInjLines];      // array of good injectors
+  UShort_t fTbMin[kInjLines];                 // Minimum time bin for each line
+  UShort_t fTbMax[kInjLines];                 // Maximum time bin for each line
+  Bool_t fGoodInj[kInjPads][kInjLines];       // array of good injectors
   Double_t fCentroid[kInjPads][kInjLines];    // array of time bin centroids
   Double_t fRMSCentroid[kInjPads][kInjLines]; // array of time rms of injectors
   Double_t fDriftSpeed[kInjPads];             // drift speed  
   Double_t fDriftSpeedErr[kInjPads];          // error on drift speed
-  Int_t fNEvents;                            // number of events
+  Int_t fNEvents;                             // number of events
+  Int_t fNEventsInPad[kInjPads];              // number of events per pad
   Double_t fSumDriftSpeed[kInjPads];          // drift speed summed over events  
   Double_t fSumSqDriftSpeed[kInjPads];        // drift speed^2 sum
+  Int_t fSumPadStatus[kInjPads];              // pad status sum
+  Int_t fSumPadStatusCut[kInjPads];           // pad status (> cut) sum
   
-  Double_t *fParam;                           // parameters of polinomial fit to
+  Double_t *fParam;                          // parameters of polinomial fit to
                                              // drift speed vs. anode number
-  Int_t fPolDegree;                   // Degree of polynomial fit
-  Int_t fActualPolDegree;             // Degree actually used (<=fPolDegree)
+  Int_t fPolDegree;                  // Degree of polynomial fit
+  Int_t fActualPolDegree;            // Degree actually used (<=fPolDegree)
   Float_t fMinDriftSpeed;            // Minimum value for drift speed
   Float_t fMaxDriftSpeed;            // Maximum value for drift speed
   Float_t fMaxDriftSpeedErr;         // Maximum value for error on drift speed
-  Float_t fLowThreshold;             // Low threshold for injector signal
-  Float_t fHighThreshold;            // High threshold for injector signal
+  Float_t fLowThreshold[kInjLines];  // Low threshold for injector signal
+  Float_t fHighThreshold[kInjLines]; // High threshold for injector signal
 
   Bool_t fUseLine[kInjLines];        // Flag to use/not use a line
   Int_t fFirstPadForFit;             // first injector pad used in fit
   Int_t fLastPadForFit;              // last injector pad used in fit
   Int_t fPadStatusCutForFit;         // minimum value of pad status for fit
 
-  Double_t fTimeStep;                 // time bin value (25 or 50 ns)
+  Double_t fTimeStep;                // time bin value (25 or 50 ns)
   Bool_t fUseTimeZeroSignal;         // flag for usage of time zero signal
                                      // in drift speed calculation
 
-  ClassDef(AliITSOnlineSDDInjectors,7)
+  Int_t fMaxCellsAboveThreshold;     // cut to remove noisy anodes
+
+  ClassDef(AliITSOnlineSDDInjectors,9)
 };
 #endif