ATO-17 - adding switch - correction for signal below threshold in the crosstalk corre...
authormivanov <marian.ivanov@cern.ch>
Tue, 15 Jul 2014 17:11:57 +0000 (19:11 +0200)
committermivanov <marian.ivanov@cern.ch>
Tue, 15 Jul 2014 17:11:57 +0000 (19:11 +0200)
TPC/Rec/AliTPCRecoParam.cxx
TPC/Rec/AliTPCRecoParam.h
TPC/Rec/AliTPCtracker.cxx

index 61853ff..bd4f104 100644 (file)
@@ -102,8 +102,9 @@ AliTPCRecoParam::AliTPCRecoParam():
   fUseMultiplicityCorrectionDedx(kTRUE), // use Dedx multiplicity correction
   fUseAlignmentTime(kTRUE),              // use time dependent alignment correction
   fUseIonTailCorrection(0),   // no ion tail correction for now
-  fCrosstalkCorrection(0),   // crosstalk correction factor (fro each signal substracted by (mean signal in wite patch)xfCrosstalkCorrection) - Effect important only after removing oc capacitors in 2012
-  //
+  fCrosstalkCorrection(0),   // crosstalk correction factor (from each signal substracted by (mean signal in wite patch)xfCrosstalkCorrection) - Effect important only after removing oc capacitors in 2012
+  fCrosstalkCorrectionMissingCharge(1),   // crosstalk correction factor - missing charge (from each signal substracted by (mean signal in wite patch)xfCrosstalkCorrection) - Effect important only after removing oc capacitors in 2012
+ //
   fUseTotCharge(kTRUE),          // switch use total or max charge
   fMinFraction(0.01),           // truncated mean - lower threshold
   fMaxFaction(0.7),            // truncated mean - upper threshold
index eba548e..f040209 100644 (file)
@@ -108,7 +108,8 @@ class AliTPCRecoParam : public AliDetectorRecoParam
   void  SetUseTOFCorrection(Bool_t flag) {fUseTOFCorrection = flag;}
   void  SetUseIonTailCorrection(Int_t flag) {fUseIonTailCorrection = flag;}
   void  SetCrosstalkCorrection(Float_t crosstalkCorrection) {fCrosstalkCorrection= crosstalkCorrection; }
-  //
+  void  SetCrosstalkCorrectionMissingCharge(Float_t crosstalkCorrection) {fCrosstalkCorrectionMissingCharge= crosstalkCorrection; }
+ //
   Int_t GetUseFieldCorrection() const {return fUseFieldCorrection;}
   Int_t GetUseComposedCorrection() const {return fUseComposedCorrection;}
   Int_t GetUseRPHICorrection() const {return fUseRPHICorrection;}
@@ -122,6 +123,7 @@ class AliTPCRecoParam : public AliDetectorRecoParam
   Bool_t GetUseTOFCorrection() {return fUseTOFCorrection;}
   Int_t GetUseIonTailCorrection() const {return fUseIonTailCorrection;}
   Double_t GetCrosstalkCorrection() const {return fCrosstalkCorrection;}
+ Double_t GetCrosstalkCorrectionMissingCharge() const {return fCrosstalkCorrectionMissingCharge;}
 
   Bool_t GetUseMultiplicityCorrectionDedx() const {return fUseMultiplicityCorrectionDedx;}
   Int_t  GetGainCorrectionHVandPTMode() const  { return   fGainCorrectionHVandPTMode;}
@@ -208,7 +210,8 @@ class AliTPCRecoParam : public AliDetectorRecoParam
   Bool_t fUseAlignmentTime;              // use time dependent alignment correction
   Int_t fUseIonTailCorrection;   // use ion tail correction
   Double_t fCrosstalkCorrection;   // crosstalk correction factor (fro each signal substracted by (mean signal in wite patch)xfCrosstalkCorrection) - Effect important only after removing oc capacitors in 2012
-  //
+  Double_t fCrosstalkCorrectionMissingCharge;   // crosstalk correction factor - missing charge factor (from each signal substracted by (mean signal in wite patch)xfCrosstalkCorrection) - Effect important only after removing  capacitors in 2012
+ //
   // dEdx switches
   //
   Bool_t   fUseTotCharge;          // switch use total or max charge
index 0a603cf..f091d51 100644 (file)
@@ -1380,6 +1380,7 @@ Int_t  AliTPCtracker::LoadClusters()
     Float_t nPadsPerSegment = (Float_t)(fkParam->GetNPadsPerSegment(wireSegmentID));
     TMatrixD &crossTalkSignal =  *((TMatrixD*)fCrossTalkSignalArray->At(sec));
     Int_t nCols=crossTalkSignal.GetNcols();
+    Double_t missingChargeFactor= AliTPCReconstructor::GetRecoParam()->GetCrosstalkCorrectionMissingCharge();
     for (Int_t icl=0; icl<clrow->GetArray()->GetEntriesFast(); icl++){
       AliTPCclusterMI *clXtalk= static_cast<AliTPCclusterMI*>(clrow->GetArray()->At(icl));
       Transform((AliTPCclusterMI*)(clXtalk));
@@ -1387,10 +1388,20 @@ Int_t  AliTPCtracker::LoadClusters()
       Int_t timeBinXtalk = clXtalk->GetTimeBin();
       Double_t qTotXtalk = 0.;   
       Double_t rmsTime2   = clXtalk->GetSigmaZ2()/(fkParam->GetZWidth()*fkParam->GetZWidth()); 
+      Double_t rmsPad2    = clXtalk->GetSigmaY2()/(fkParam->GetPadPitchWidth(sec)*fkParam->GetPadPitchWidth(sec)); 
+
       Double_t norm= 2.*TMath::Exp(-1.0/(2.*rmsTime2))+2.*TMath::Exp(-4.0/(2.*rmsTime2))+1.;
       for (Int_t itb=timeBinXtalk-2, idelta=-2; itb<=timeBinXtalk+2; itb++,idelta++) {        
         if (itb<0 || itb>=nCols) continue;
-        qTotXtalk = clXtalk->GetQ()*TMath::Exp(-idelta*idelta/(2*rmsTime2))/norm;
+        Double_t missingCharge=0;
+       Double_t trf= TMath::Exp(-idelta*idelta/(2.*rmsTime2));
+        if (missingChargeFactor>0) for (Int_t dpad=-2; dpad<=2; dpad++){
+         Double_t qPad =   clXtalk->GetMax()*TMath::Exp(-dpad*dpad/(2*rmsPad2));
+          if (qPad*trf<fkParam->GetZeroSup()){
+           missingCharge+=qPad*missingChargeFactor;
+         }
+       }
+        qTotXtalk = (clXtalk->GetQ()+missingCharge)*trf/norm;
         crossTalkSignal[wireSegmentID][itb]+= qTotXtalk/nPadsPerSegment; 
       }       
     }