Skip to content

Commit

Permalink
Add threshold on cluster charge
Browse files Browse the repository at this point in the history
  • Loading branch information
cblume authored and cblume committed Feb 9, 2015
1 parent 2dec047 commit 855129b
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 18 deletions.
7 changes: 6 additions & 1 deletion TRD/TRDbase/AliTRDclusterizer.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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;
Expand All @@ -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
Expand Down
3 changes: 3 additions & 0 deletions TRD/TRDbase/AliTRDrecoParam.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ AliTRDrecoParam::AliTRDrecoParam()
,fClusSigThresh(3.5)
,fTCnexp(1)
,fRecEveryNTB(1)
,fClusterQmin(0)
,fNumberOfPresamples(0)
,fNumberOfPostsamples(0)
{
Expand Down Expand Up @@ -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)
{
Expand Down Expand Up @@ -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;

Expand Down
38 changes: 21 additions & 17 deletions TRD/TRDbase/AliTRDrecoParam.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class AliTRDrecoParam : public AliDetectorRecoParam
kTRDreconstructionTasks = 3
};
enum ETRDflags {
kDriftGas
kDriftGas
,kVertexConstraint
,kTailCancelation
,kImproveTracklet
Expand All @@ -56,8 +56,8 @@ class AliTRDrecoParam : public AliDetectorRecoParam
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; }
Expand All @@ -80,16 +80,18 @@ class AliTRDrecoParam : public AliDetectorRecoParam
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];}
Expand Down Expand Up @@ -124,7 +126,7 @@ class AliTRDrecoParam : public AliDetectorRecoParam
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);}
Expand All @@ -136,8 +138,8 @@ class AliTRDrecoParam : public AliDetectorRecoParam
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;}
Expand All @@ -157,6 +159,7 @@ class AliTRDrecoParam : public AliDetectorRecoParam
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
Expand Down Expand Up @@ -215,12 +218,13 @@ class AliTRDrecoParam : public AliDetectorRecoParam
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

};

Expand Down

0 comments on commit 855129b

Please sign in to comment.