First implementation of EMCAL trigger QA from Nicola Arbor
[u/mrichter/AliRoot.git] / TOF / AliTOFRecoParam.cxx
index 0e6ad8e..25c2c39 100644 (file)
@@ -45,7 +45,9 @@ AliTOFRecoParam::AliTOFRecoParam():
   fMaxChi2(10.),
   fMaxChi2TRD(150.),
   fTimeResolution(80.),
-  fTimeNSigma(5.)
+  fTimeNSigma(5.),
+  fMaxDeltaTime(2),
+  fStartTimeType(1)// 1 -> AliESDpid::kTOF_T0
 {
   //
   // constructor
@@ -54,42 +56,27 @@ AliTOFRecoParam::AliTOFRecoParam():
 }
 //_____________________________________________________________________________
 AliTOFRecoParam::AliTOFRecoParam(const AliTOFRecoParam &p):
-  AliDetectorRecoParam(),       
-  fTimeZero(kFALSE),       
-  fTimeZerofromT0(kFALSE),       
-  fTimeZerofromTOF(kFALSE),       
-  fTimeWalkCorr(kFALSE),       
-  fApplyPbPbCuts(kFALSE),       
-  fWindowSizeMaxY(50.),
-  fWindowSizeMaxZ(35.),
-  fWindowScaleFact(5.),
-  fDistanceCut(3.),
-  fSensRadius(379.5),
-  fStepSize(0.1),
-  fMaxChi2(10.),
-  fMaxChi2TRD(150.),
-  fTimeResolution(80.),
-  fTimeNSigma(5.)
+  AliDetectorRecoParam(p),       
+  fTimeZero(p.fTimeZero),       
+  fTimeZerofromT0(p.fTimeZerofromT0),       
+  fTimeZerofromTOF(p.fTimeZerofromTOF),       
+  fTimeWalkCorr(p.fTimeWalkCorr),       
+  fApplyPbPbCuts(p.fApplyPbPbCuts),       
+  fWindowSizeMaxY(p.fWindowSizeMaxY),
+  fWindowSizeMaxZ(p.fWindowSizeMaxZ),
+  fWindowScaleFact(p.fWindowScaleFact),
+  fDistanceCut(p.fDistanceCut),
+  fSensRadius(p.fSensRadius),
+  fStepSize(p.fStepSize),
+  fMaxChi2(p.fMaxChi2),
+  fMaxChi2TRD(p.fMaxChi2TRD),
+  fTimeResolution(p.fTimeResolution),
+  fTimeNSigma(p.fTimeNSigma),
+  fMaxDeltaTime(p.fMaxDeltaTime),
+  fStartTimeType(p.fStartTimeType)
  { 
   //copy Ctor
 
-   fName = p.fName;
-   fTitle = p.fTitle;
-   fTimeZero=p.fTimeZero;       
-   fTimeZerofromT0=p.fTimeZerofromT0;
-   fTimeZerofromTOF=p.fTimeZerofromTOF;       
-   fTimeWalkCorr=p.fTimeWalkCorr;       
-   fApplyPbPbCuts=p.fApplyPbPbCuts;       
-   fWindowSizeMaxY=p.fWindowSizeMaxY;
-   fWindowSizeMaxZ=p.fWindowSizeMaxZ;
-   fWindowScaleFact=p.fWindowScaleFact;
-   fDistanceCut=p.fDistanceCut;
-   fSensRadius=p.fSensRadius;
-   fStepSize=p.fStepSize;
-   fMaxChi2=p.fMaxChi2;
-   fMaxChi2TRD=p.fMaxChi2TRD;
-   fTimeResolution=p.fTimeResolution;
-   fTimeNSigma=p.fTimeNSigma;   
 
 }
 //_____________________________________________________________________________
@@ -98,22 +85,29 @@ AliTOFRecoParam& AliTOFRecoParam::operator=(const AliTOFRecoParam &p)
   //
   // assign. operator
   //
-   this->fTimeZero=p.fTimeZero;       
-   this->fTimeZerofromT0=p.fTimeZerofromT0;
-   this->fTimeZerofromTOF=p.fTimeZerofromTOF;       
-   this->fTimeWalkCorr=p.fTimeWalkCorr;       
-   this->fApplyPbPbCuts=p.fApplyPbPbCuts;       
-   this->fWindowSizeMaxY=p.fWindowSizeMaxY;
-   this->fWindowSizeMaxZ=p.fWindowSizeMaxZ;
-   this->fDistanceCut=p.fDistanceCut;
-   this->fWindowScaleFact=p.fWindowScaleFact;
-   this->fStepSize=p.fStepSize;
-   this->fSensRadius=p.fSensRadius;
-   this->fMaxChi2=p.fMaxChi2;
-   this->fMaxChi2TRD=p.fMaxChi2TRD;
-   this->fTimeResolution=p.fTimeResolution;
-   this->fTimeNSigma=p.fTimeNSigma;   
-   return *this;
+
+  if (this == &p)
+    return *this;
+  
+  AliDetectorRecoParam::operator=(p);
+  fTimeZero=p.fTimeZero;       
+  fTimeZerofromT0=p.fTimeZerofromT0;
+  fTimeZerofromTOF=p.fTimeZerofromTOF;       
+  fTimeWalkCorr=p.fTimeWalkCorr;       
+  fApplyPbPbCuts=p.fApplyPbPbCuts;       
+  fWindowSizeMaxY=p.fWindowSizeMaxY;
+  fWindowSizeMaxZ=p.fWindowSizeMaxZ;
+  fDistanceCut=p.fDistanceCut;
+  fWindowScaleFact=p.fWindowScaleFact;
+  fStepSize=p.fStepSize;
+  fSensRadius=p.fSensRadius;
+  fMaxChi2=p.fMaxChi2;
+  fMaxChi2TRD=p.fMaxChi2TRD;
+  fTimeResolution=p.fTimeResolution;
+  fTimeNSigma=p.fTimeNSigma;   
+  fMaxDeltaTime=p.fMaxDeltaTime;
+  fStartTimeType=p.fStartTimeType;
+  return *this;
 }
 //_____________________________________________________________________________
 AliTOFRecoParam::~AliTOFRecoParam() 
@@ -132,6 +126,7 @@ AliTOFRecoParam *AliTOFRecoParam::GetPbPbparam(){
   param->fApplyPbPbCuts = kTRUE;
   param->fWindowScaleFact = 5.;
   param->fDistanceCut = 3.;
+  param->fMaxDeltaTime = 2;
   return param;
 }
 
@@ -144,18 +139,7 @@ AliTOFRecoParam *AliTOFRecoParam::GetPPparam(){
   param->fApplyPbPbCuts = kFALSE;
   param->fWindowScaleFact = 5.;
   param->fDistanceCut = 10.;
-  return param;
-}
-
-//_____________________________________________________________________________
-AliTOFRecoParam *AliTOFRecoParam::GetCosmicMuonParam(){
-  //
-  // set default reconstruction parameters for cosmic muon run
-  //
-  AliTOFRecoParam *param = new AliTOFRecoParam();
-  param->fApplyPbPbCuts = kFALSE;
-  param->fWindowScaleFact = 5.;
-  param->fDistanceCut = 10.;
+  param->fMaxDeltaTime = 2;
   return param;
 }
 
@@ -186,7 +170,12 @@ void AliTOFRecoParam::PrintParameters() const
   AliInfo(Form(" Maximum X2 track-tof clusters (TRD): %f", fMaxChi2TRD));
   AliInfo(Form(" Time resolution for responce function in PID: %f ps",
               fTimeResolution));
-  AliInfo(Form("  N-Sigma Range used for responce function in PID: %f",
+  AliInfo(Form(" N-Sigma Range used for responce function in PID: %f",
               fTimeNSigma));
+  AliInfo(Form(" Max time difference between two (or more) time measurements"
+              " coming from two (or more) neighbouring pads"
+              " to define if they are coming from the same ionization event"
+              " or not: %2d bins -> %f ps",
+              fMaxDeltaTime, fMaxDeltaTime*AliTOFGeometry::TdcBinWidth()));
 
 }