Add threshold on cluster charge
authorcblume <Christoph.Blume@cern.ch>
Mon, 9 Feb 2015 08:31:42 +0000 (09:31 +0100)
committercblume <Christoph.Blume@cern.ch>
Mon, 9 Feb 2015 08:32:51 +0000 (09:32 +0100)
TRD/TRDbase/AliTRDclusterizer.cxx
TRD/TRDbase/AliTRDrecoParam.cxx
TRD/TRDbase/AliTRDrecoParam.h

index 32baaa4..1e13a17 100644 (file)
@@ -402,6 +402,8 @@ Bool_t AliTRDclusterizer::WriteClusters(Int_t det)
   Int_t nRecPoints = RecPoints()->GetEntriesFast();
   if(!nRecPoints) return kTRUE;
 
+  const AliTRDrecoParam *const recoParam = fReconstructor->GetRecoParam();
+
   TObjArray *ioArray = new TObjArray(400);
   TBranch *branch = fClusterTree->GetBranch("TRDcluster");
   if (!branch) {
@@ -417,7 +419,8 @@ Bool_t AliTRDclusterizer::WriteClusters(Int_t det)
     }
     fClusterTree->Fill();
     ioArray->Clear();
-  } else {
+  } 
+  else {
     if(!(c = (AliTRDcluster*)RecPoints()->UncheckedAt(0))){
       AliError("Missing first cluster.");
       delete ioArray;
@@ -427,6 +430,8 @@ Bool_t AliTRDclusterizer::WriteClusters(Int_t det)
     ioArray->AddLast(c);
     for (Int_t i(1); i<nRecPoints; i++) {
       if(!(c = (AliTRDcluster *) RecPoints()->UncheckedAt(i))) continue;
+      // Check on total cluster charge
+      if (c->GetQ() < recoParam->GetClusterQmin()) continue;
       if(c->GetDetector() != detOld){
         nw += ioArray->GetEntriesFast();
         // fill & clear previously detector set of clusters
index 0439443..d9a3371 100644 (file)
@@ -70,6 +70,7 @@ AliTRDrecoParam::AliTRDrecoParam()
   ,fClusSigThresh(3.5)
   ,fTCnexp(1)
   ,fRecEveryNTB(1)
+  ,fClusterQmin(0)
   ,fNumberOfPresamples(0)
   ,fNumberOfPostsamples(0)
 {
@@ -142,6 +143,7 @@ AliTRDrecoParam::AliTRDrecoParam(const AliTRDrecoParam &ref)
   ,fClusSigThresh(ref.fClusSigThresh)
   ,fTCnexp(ref.fTCnexp)
   ,fRecEveryNTB(ref.fRecEveryNTB)
+  ,fClusterQmin(ref.fClusterQmin)
   ,fNumberOfPresamples(ref.fNumberOfPresamples)
   ,fNumberOfPostsamples(ref.fNumberOfPostsamples)
 {
@@ -204,6 +206,7 @@ AliTRDrecoParam& AliTRDrecoParam::operator=(const AliTRDrecoParam &ref)
   fClusSigThresh        = ref.fClusSigThresh;
   fTCnexp               = ref.fTCnexp;
   fRecEveryNTB          = ref.fRecEveryNTB;
+  fClusterQmin          = ref.fClusterQmin;
   fNumberOfPresamples   = ref.fNumberOfPresamples;
   fNumberOfPostsamples  = ref.fNumberOfPostsamples;
 
index 9edca2b..e162f7d 100644 (file)
@@ -35,7 +35,7 @@ public:
     kTRDreconstructionTasks = 3
   };
   enum ETRDflags {
-    kDriftGas
+     kDriftGas
     ,kVertexConstraint
     ,kTailCancelation
     ,kImproveTracklet
@@ -56,8 +56,8 @@ public:
   Double_t GetChi2Z() const                 { return fkChi2Z;    }
   Double_t GetChi2YSlope() const            { return fkChi2YSlope; }
   Double_t GetChi2ZSlope() const            { return fkChi2ZSlope; }
-       Double_t GetChi2Cut() const              { return fChi2Cut; }
-       Double_t GetChi2YCut() const              { return fkChi2YCut; }
+  Double_t GetChi2Cut() const               { return fChi2Cut; }
+  Double_t GetChi2YCut() const              { return fkChi2YCut; }
   Double_t GetPhiSlope() const              { return fkPhiSlope;   }
   Float_t  GetNClusters() const;
   Double_t GetNMeanClusters() const         { return fkNMeanClusters; }
@@ -80,16 +80,18 @@ public:
   void GetSysCovMatrix(Double_t *sys) const;  
   void GetTCParams(Double_t *par) const;
   Int_t GetStreamLevel(ETRDReconstructionTask task) const;
-  const TString *GetRawStreamVersion() const{ return &fRawStreamVersion; };
-  Double_t GetMinMaxCutSigma() const        { return fMinMaxCutSigma;     };
-  Double_t GetMinLeftRightCutSigma() const  { return fMinLeftRightCutSigma;  };
-  Double_t GetClusMaxThresh() const         { return fClusMaxThresh;   };
-  Double_t GetClusSigThresh() const         { return fClusSigThresh;   };
-  Int_t    GetTCnexp() const                { return fTCnexp;          };
-  Int_t    GetNumberOfPresamples()  const   { return fNumberOfPresamples;}
-  Int_t    GetNumberOfPostsamples() const   { return fNumberOfPostsamples;}
-  Int_t    GetNumberOfSeedConfigs() const   { return fNumberOfConfigs;}
-  Int_t    GetRecEveryNTB() const           { return fRecEveryNTB; }
+  const TString *GetRawStreamVersion() const{ return &fRawStreamVersion;    };
+  Double_t GetMinMaxCutSigma() const        { return fMinMaxCutSigma;       };
+  Double_t GetMinLeftRightCutSigma() const  { return fMinLeftRightCutSigma; };
+  Double_t GetClusMaxThresh() const         { return fClusMaxThresh;        };
+  Double_t GetClusSigThresh() const         { return fClusSigThresh;        };
+  Int_t    GetTCnexp() const                { return fTCnexp;               };
+  Int_t    GetNumberOfPresamples()  const   { return fNumberOfPresamples;   };
+  Int_t    GetNumberOfPostsamples() const   { return fNumberOfPostsamples;  };
+  Int_t    GetNumberOfSeedConfigs() const   { return fNumberOfConfigs;      };
+  Int_t    GetRecEveryNTB() const           { return fRecEveryNTB;          };
+  Double_t GetClusterQmin() const           { return fClusterQmin;          };
+
   // Tracklet parameters
   Double_t GetCorrDZDXbiasRC(Bool_t dzdx) const { return fdzdxCorrRCbias[dzdx];}
   Double_t GetCorrDZDX(Bool_t rc) const     { return fdzdxCorrFactor[rc];}
@@ -124,7 +126,7 @@ public:
   void     SetLUT(Bool_t b=kTRUE)                             {if(b) SETBIT(fFlags, kLUT); else CLRBIT(fFlags, kLUT);}
   void     SetGAUS(Bool_t b=kTRUE)                            {if(b) SETBIT(fFlags, kGAUS); else CLRBIT(fFlags, kGAUS);}
   void     SetPIDNeuralNetwork(Bool_t b=kTRUE)                {if(b) SETBIT(fFlags, kSteerPID); else CLRBIT(fFlags, kSteerPID);}
-  void  SetPIDmethod(AliTRDPIDResponse::ETRDPIDMethod method);
+  void     SetPIDmethod(AliTRDPIDResponse::ETRDPIDMethod method);
   void     SetPIDLQslices(Int_t s);
   void     SetTailCancelation(Bool_t b=kTRUE)                 {if(b) SETBIT(fFlags, kTailCancelation); else CLRBIT(fFlags, kTailCancelation);}
   void     SetXenon(Bool_t b = kTRUE)                         {if(b) CLRBIT(fFlags, kDriftGas); else SETBIT(fFlags, kDriftGas);}
@@ -136,8 +138,8 @@ public:
   void     SetChi2Z(Double_t chi2)                            {fkChi2Z = chi2;}
   void     SetChi2YSlope(Double_t chi2YSlope)                 {fkChi2YSlope = chi2YSlope;}
   void     SetChi2ZSlope(Double_t chi2ZSlope)                 {fkChi2ZSlope = chi2ZSlope;}
-       void       SetChi2Cut(Double_t chi2Cut)                      {fChi2Cut = chi2Cut; }
-       void       SetChi2YCut(Double_t chi2Cut)                      {fkChi2YCut = chi2Cut; }
+  void    SetChi2Cut(Double_t chi2Cut)                       {fChi2Cut = chi2Cut; }
+  void    SetChi2YCut(Double_t chi2Cut)                      {fkChi2YCut = chi2Cut; }
   void     SetPhiSlope(Double_t phiSlope)                     {fkPhiSlope = phiSlope;}
   void     SetNMeanClusters(Double_t meanNclusters)           {fkNMeanClusters = meanNclusters;}
   void     SetNSigmaClusters(Double_t sigmaNclusters)         {fkNSigmaClusters = sigmaNclusters;} 
@@ -157,6 +159,7 @@ public:
   void     SetNumberOfPresamples(Int_t n)                     { fNumberOfPresamples = n;}
   void     SetNumberOfPostsamples(Int_t n)                    { fNumberOfPostsamples = n;}
   void     SetRecEveryTwoTB()                                 { fRecEveryNTB = 2; fkNMeanClusters = 10; }
+  void     SetClusterQmin(Double_t min)                       { fClusterQmin = min; };
 
 private:
   // Physics reference values for TRD
@@ -215,12 +218,13 @@ private:
   Int_t     fTCnexp;                 // Number of exponentials, digital filter
   Double_t  fTCParams[8];            // Tail Cancellation parameters for drift gases 
   Int_t     fRecEveryNTB;            // Reconstruct each nth timebin
+  Double_t  fClusterQmin;            // Threshold for the total cluster charge to be written to recPoints file
 
   // ADC parameter
   Int_t     fNumberOfPresamples;     // number of presamples 
   Int_t     fNumberOfPostsamples;     // number of postsamples 
 
-  ClassDef(AliTRDrecoParam, 13)       // Reconstruction parameters for TRD detector
+  ClassDef(AliTRDrecoParam, 14)       // Reconstruction parameters for TRD detector
 
 };