add static functions for external configuration
authorrpreghen <rpreghen@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 14 Jun 2011 07:53:33 +0000 (07:53 +0000)
committerrpreghen <rpreghen@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 14 Jun 2011 07:53:33 +0000 (07:53 +0000)
TOF/AliTOFAnalysisTaskCalibPass0.cxx
TOF/AliTOFAnalysisTaskCalibPass0.h

index 95c615b..c2647dd 100644 (file)
@@ -52,8 +52,10 @@ ClassImp(AliTOFAnalysisTaskCalibPass0)
 //_______________________________________________________
 
 const Int_t AliTOFAnalysisTaskCalibPass0::fgkMaxNumberOfPoints = 10000; // max number of points
-const Double_t AliTOFAnalysisTaskCalibPass0::fgkMinVertexIntegral = 1000.;
-const Double_t AliTOFAnalysisTaskCalibPass0::fgkMinDeltatIntegral = 20000.;
+Double_t AliTOFAnalysisTaskCalibPass0::fgMinVertexIntegral = 100.;
+Double_t AliTOFAnalysisTaskCalibPass0::fgMinDeltatIntegral = 2000.;
+Double_t AliTOFAnalysisTaskCalibPass0::fgMinVertexIntegralSample = 1000.;
+Double_t AliTOFAnalysisTaskCalibPass0::fgMinDeltatIntegralSample = 20000.;
 
 //_______________________________________________________
   
@@ -525,14 +527,14 @@ AliTOFAnalysisTaskCalibPass0::CalibrateAndStore(TH2F *histoVertexTimestamp, TH2F
     /* define time window */
     Int_t startBin = ibin;
     Int_t endBin = ibin;
-    while(histoVertexTimestamppx->Integral(startBin, endBin) < fgkMinVertexIntegral ||
-         histoDeltatTimestamppx->Integral(startBin, endBin) < fgkMinDeltatIntegral) {
+    while(histoVertexTimestamppx->Integral(startBin, endBin) < fgMinVertexIntegralSample ||
+         histoDeltatTimestamppx->Integral(startBin, endBin) < fgMinDeltatIntegralSample) {
       if (endBin < maxBin) endBin++;
       else if (startBin > minBin) startBin--;
       else break;
     }
-    if (histoVertexTimestamppx->Integral(startBin, endBin) <= 0 ||
-        histoDeltatTimestamppx->Integral(startBin, endBin) <= 0) continue;
+    if (histoVertexTimestamppx->Integral(startBin, endBin) < fgMinVertexIntegral ||
+        histoDeltatTimestamppx->Integral(startBin, endBin) < fgMinDeltatIntegral) continue;
     Float_t startTime = histoVertexTimestamppx->GetBinLowEdge(startBin);
     Float_t endTime = histoVertexTimestamppx->GetBinLowEdge(endBin + 1);
     Float_t vertexIntegral = histoVertexTimestamppx->Integral(startBin, endBin);
index 1ce0841..a83c116 100644 (file)
@@ -49,6 +49,12 @@ public AliAnalysisTaskSE
 
   /* post-processing methods */
   Bool_t ProcessOutput(const Char_t *filename, const Char_t *dbString); // process output
+
+  /* static setters */
+  static void SetMinVertexIntegral(Double_t value) {fgMinVertexIntegral = value;}; // setter
+  static void SetMinDeltatIntegal(Double_t value) {fgMinDeltatIntegral = value;}; // setter
+  static void SetMinVertexIntegralSample (Double_t value) {fgMinVertexIntegralSample = value;}; // setter
+  static void SetMinDeltatIntegralSample (Double_t value) {fgMinDeltatIntegralSample = value;}; // setter
   
  protected:
 
@@ -100,8 +106,10 @@ public AliAnalysisTaskSE
 
   /* post-processing variables */
   static const Int_t fgkMaxNumberOfPoints; // max number of points
-  static const Double_t fgkMinVertexIntegral; // min vertex integral
-  static const Double_t fgkMinDeltatIntegral; // min vertex integral
+  static Double_t fgMinVertexIntegral; // min vertex integral
+  static Double_t fgMinDeltatIntegral; // min vertex integral
+  static Double_t fgMinVertexIntegralSample; // min vertex integral sample
+  static Double_t fgMinDeltatIntegralSample; // min vertex integral sample
 
 
   ClassDef(AliTOFAnalysisTaskCalibPass0, 1);