From a909ffad6ebb3c62fe8e6c3f493fd25b410c19ba Mon Sep 17 00:00:00 2001 From: pulvir Date: Thu, 27 Jan 2011 13:26:38 +0000 Subject: [PATCH] Added some cut configuration printout for checks --- PWG2/RESONANCES/AliRsnCutPIDITS.cxx | 2 +- PWG2/RESONANCES/AliRsnCutPIDTOF.cxx | 12 ++++ PWG2/RESONANCES/AliRsnCutPIDTOF.h | 1 + PWG2/RESONANCES/AliRsnCutPIDTPC.cxx | 2 +- PWG2/RESONANCES/AliRsnCutTrackQuality.cxx | 49 +++++++++++---- PWG2/RESONANCES/AliRsnCutTrackQuality.h | 73 ++++++++++++----------- 6 files changed, 92 insertions(+), 47 deletions(-) diff --git a/PWG2/RESONANCES/AliRsnCutPIDITS.cxx b/PWG2/RESONANCES/AliRsnCutPIDITS.cxx index 14904239f91..28c4056e5c3 100644 --- a/PWG2/RESONANCES/AliRsnCutPIDITS.cxx +++ b/PWG2/RESONANCES/AliRsnCutPIDITS.cxx @@ -203,5 +203,5 @@ void AliRsnCutPIDITS::Print(const Option_t *) const // AliInfo(Form("Cut name, type : %s %s", GetName(), ClassName())); - AliInfo(Form("ITS PID cut: limit, large, small: %.3ff %.3ff %.3ff", fMomentumLimit, fLargeCut, fSmallCut)); + AliInfo(Form("ITS PID cut: limit, large, small: %.3f %.3f %.3f", fMomentumLimit, fLargeCut, fSmallCut)); } diff --git a/PWG2/RESONANCES/AliRsnCutPIDTOF.cxx b/PWG2/RESONANCES/AliRsnCutPIDTOF.cxx index b5632da41c4..6a20fc17e05 100644 --- a/PWG2/RESONANCES/AliRsnCutPIDTOF.cxx +++ b/PWG2/RESONANCES/AliRsnCutPIDTOF.cxx @@ -241,3 +241,15 @@ Bool_t AliRsnCutPIDTOF::CheckAOD(AliAODTrack *track) fCutValueD = (Double_t)fAODpid.NumberOfSigmasTOF(track, fPIDtype); return OkRangeD(); } + +//_________________________________________________________________________________________________ +void AliRsnCutPIDTOF::Print(const Option_t *) const +{ +// +// Print information on this cut +// + + AliInfo(Form("Cut name, type : %s %s", GetName(), ClassName())); + AliInfo(Form("TOF PID cut range (sigmas): %.3f %.3f", fMinD, fMaxD)); + AliInfo(Form("Unmatched tracks are : %s", (fForceMatching ? "rejected" : "accepted"))); +} diff --git a/PWG2/RESONANCES/AliRsnCutPIDTOF.h b/PWG2/RESONANCES/AliRsnCutPIDTOF.h index 13cf4652424..803f22769cc 100644 --- a/PWG2/RESONANCES/AliRsnCutPIDTOF.h +++ b/PWG2/RESONANCES/AliRsnCutPIDTOF.h @@ -34,6 +34,7 @@ class AliRsnCutPIDTOF : public AliRsnCut void SetMC(Bool_t yn = kTRUE) {fIsMC = yn;} virtual Bool_t IsSelected(TObject *object); + virtual void Print(const Option_t *option = "") const; protected: diff --git a/PWG2/RESONANCES/AliRsnCutPIDTPC.cxx b/PWG2/RESONANCES/AliRsnCutPIDTPC.cxx index 191e893cebc..bf1d6058fb7 100644 --- a/PWG2/RESONANCES/AliRsnCutPIDTPC.cxx +++ b/PWG2/RESONANCES/AliRsnCutPIDTPC.cxx @@ -171,5 +171,5 @@ void AliRsnCutPIDTPC::Print(const Option_t *) const // AliInfo(Form("Cut name, type : %s %s", GetName(), ClassName())); - AliInfo(Form("TPC PID cut: limit, large, small: %.3ff %.3ff %.3ff", fMomentumLimit, fLargeCut, fSmallCut)); + AliInfo(Form("TPC PID cut: limit, large, small: %.3f %.3f %.3f", fMomentumLimit, fLargeCut, fSmallCut)); } diff --git a/PWG2/RESONANCES/AliRsnCutTrackQuality.cxx b/PWG2/RESONANCES/AliRsnCutTrackQuality.cxx index 3e60683fd46..2c18a66540f 100644 --- a/PWG2/RESONANCES/AliRsnCutTrackQuality.cxx +++ b/PWG2/RESONANCES/AliRsnCutTrackQuality.cxx @@ -36,7 +36,7 @@ AliRsnCutTrackQuality::AliRsnCutTrackQuality(const char *name) : AliRsnCut(name, AliRsnCut::kDaughter, 0.0, 0.0), fFlagsOn(0x0), fFlagsOff(0x0), - fRejectKinkDaughter(kFALSE), + fRejectKinkDaughters(kTRUE), fDCARfixed(kTRUE), fDCARptFormula(""), fDCARmax(fgkVeryBig), @@ -63,7 +63,7 @@ AliRsnCutTrackQuality::AliRsnCutTrackQuality(const AliRsnCutTrackQuality ©) AliRsnCut(copy), fFlagsOn(copy.fFlagsOn), fFlagsOff(copy.fFlagsOff), - fRejectKinkDaughter(copy.fRejectKinkDaughter), + fRejectKinkDaughters(copy.fRejectKinkDaughters), fDCARfixed(copy.fDCARfixed), fDCARptFormula(copy.fDCARptFormula), fDCARmax(copy.fDCARmax), @@ -96,7 +96,7 @@ AliRsnCutTrackQuality& AliRsnCutTrackQuality::operator=(const AliRsnCutTrackQual fFlagsOn = copy.fFlagsOn; fFlagsOff = copy.fFlagsOff; - fRejectKinkDaughter = copy.fRejectKinkDaughter; + fRejectKinkDaughters = copy.fRejectKinkDaughters; fDCARfixed = copy.fDCARfixed; fDCARptFormula = copy.fDCARptFormula; fDCARmax = copy.fDCARmax; @@ -124,7 +124,7 @@ void AliRsnCutTrackQuality::DisableAll() fFlagsOn = 0x0; fFlagsOff = 0x0; - fRejectKinkDaughter = kFALSE; + fRejectKinkDaughters = kFALSE; fDCARfixed = kTRUE; fDCARptFormula = ""; fDCARmax = fgkVeryBig; @@ -212,10 +212,6 @@ Bool_t AliRsnCutTrackQuality::CheckESD(AliESDtrack *track) cuts.SetPtRange (fPt[0], fPt[1]); cuts.SetEtaRange(fEta[0], fEta[1]); - // status flags - //if ((fFlagsOn & AliESDtrack::kITSrefit) != 0) cuts.SetRequireITSRefit(kTRUE); - //if ((fFlagsOn & AliESDtrack::kTPCrefit) != 0) cuts.SetRequireTPCRefit(kTRUE); - // transverse DCA cuts if (fDCARfixed) cuts.SetMaxDCAToVertexXY(fDCARmax); @@ -235,7 +231,7 @@ Bool_t AliRsnCutTrackQuality::CheckESD(AliESDtrack *track) // TPC related cuts for TPC+ITS tracks cuts.SetMinNClustersTPC(fTPCminNClusters); cuts.SetMaxChi2PerClusterTPC(fTPCmaxChi2); - cuts.SetAcceptKinkDaughters(!fRejectKinkDaughter); + cuts.SetAcceptKinkDaughters(!fRejectKinkDaughters); // ITS related cuts for TPC+ITS tracks if (fSPDminNClusters > 0) @@ -290,7 +286,7 @@ Bool_t AliRsnCutTrackQuality::CheckAOD(AliAODTrack *track) // step #3: reject kink daughters AliAODVertex *vertex = track->GetProdVertex(); - if (vertex && fRejectKinkDaughter) + if (vertex && fRejectKinkDaughters) { if (vertex->GetType() == AliAODVertex::kKink) { @@ -359,3 +355,36 @@ Bool_t AliRsnCutTrackQuality::CheckAOD(AliAODTrack *track) // if we are here, all cuts were passed and no exit point was got return kTRUE; } + +//_________________________________________________________________________________________________ +void AliRsnCutTrackQuality::Print(const Option_t *) const +{ +// +// Print information on this cut +// + + AliInfo(Form("Cut name : %s", GetName())); + AliInfo(Form("Required flags (off, on): %lx %lx", fFlagsOn, fFlagsOff)); + AliInfo(Form("Ranges in eta, pt : %.2f - %.2f, %.2f - %.2f", fEta[0], fEta[1], fPt[0], fPt[1])); + AliInfo(Form("Kink daughters are : %s", (fRejectKinkDaughters ? "rejected" : "accepted"))); + AliInfo(Form("TPC requirements : min. cluster = %d, max chi2 = %f", fTPCminNClusters, fTPCmaxChi2)); + AliInfo(Form("ITS requirements : min. cluster = %d (all), %d (SPD), max chi2 = %f", fITSminNClusters, fSPDminNClusters, fITSmaxChi2)); + + if (fDCARfixed) + { + AliInfo(Form("DCA r cut : fixed to %f cm", fDCARmax)); + } + else + { + AliInfo(Form("DCA r cut formula : %s", fDCARptFormula.Data())); + } + + if (fDCAZfixed) + { + AliInfo(Form("DCA z cut : fixed to %f cm", fDCAZmax)); + } + else + { + AliInfo(Form("DCA z cut formula : %s", fDCAZptFormula.Data())); + } +} diff --git a/PWG2/RESONANCES/AliRsnCutTrackQuality.h b/PWG2/RESONANCES/AliRsnCutTrackQuality.h index 9a6f3e70eff..7b66e5f7be0 100644 --- a/PWG2/RESONANCES/AliRsnCutTrackQuality.h +++ b/PWG2/RESONANCES/AliRsnCutTrackQuality.h @@ -31,50 +31,53 @@ class AliRsnCutTrackQuality : public AliRsnCut void DisableAll(); - void AddStatusFlag(ULong_t f, Bool_t on) {if (on) fFlagsOn = fFlagsOn | f; else fFlagsOff = fFlagsOff | f;} - void SetStatusFlags(ULong_t f, Bool_t on) {if (on) fFlagsOn = f; else fFlagsOff = f;} - void SetPtRange(Double_t a, Double_t b) {fPt[0] = TMath::Min(a, b); fPt[1] = TMath::Max(a, b);} - void SetEtaRange(Double_t a, Double_t b) {fEta[0] = TMath::Min(a, b); fEta[1] = TMath::Max(a, b);} + void AddStatusFlag(ULong_t f, Bool_t on) {if (on) fFlagsOn = fFlagsOn | f; else fFlagsOff = fFlagsOff | f;} + void SetStatusFlags(ULong_t f, Bool_t on) {if (on) fFlagsOn = f; else fFlagsOff = f;} + void SetPtRange(Double_t a, Double_t b) {fPt[0] = TMath::Min(a, b); fPt[1] = TMath::Max(a, b);} + void SetEtaRange(Double_t a, Double_t b) {fEta[0] = TMath::Min(a, b); fEta[1] = TMath::Max(a, b);} + + void SetDCARPtFormula(const char *formula) {fDCARptFormula = formula; fDCARfixed = kFALSE;} + void SetDCARmax(Double_t value) {fDCARmax = value; fDCARptFormula = ""; fDCARfixed = kTRUE;} + void SetDCAZPtFormula(const char *formula) {fDCAZptFormula = formula; fDCAZfixed = kFALSE;} + void SetDCAZmax(Double_t value) {fDCAZmax = value; fDCAZptFormula = ""; fDCAZfixed = kTRUE;} + + void SetSPDminNClusters(Int_t value) {fSPDminNClusters = value;} + void SetITSminNClusters(Int_t value) {fITSminNClusters = value;} + void SetITSmaxChi2(Double_t value) {fITSmaxChi2 = value;} + + void SetTPCminNClusters(Int_t value) {fTPCminNClusters = value;} + void SetTPCmaxChi2(Double_t value) {fTPCmaxChi2 = value;} - void SetDCARPtFormula(const char *formula) {fDCARptFormula = formula; fDCARfixed = kFALSE;} - void SetDCARmax(Double_t value) {fDCARmax = value; fDCARptFormula = ""; fDCARfixed = kTRUE;} - void SetDCAZPtFormula(const char *formula) {fDCAZptFormula = formula; fDCAZfixed = kFALSE;} - void SetDCAZmax(Double_t value) {fDCAZmax = value; fDCAZptFormula = ""; fDCAZfixed = kTRUE;} - - void SetSPDminNClusters(Int_t value) {fSPDminNClusters = value;} - void SetITSminNClusters(Int_t value) {fITSminNClusters = value;} - void SetITSmaxChi2(Double_t value) {fITSmaxChi2 = value;} - - void SetTPCminNClusters(Int_t value) {fTPCminNClusters = value;} - void SetTPCmaxChi2(Double_t value) {fTPCmaxChi2 = value;} + void SetRejectKinkDaughters(Bool_t yn = kTRUE) {fRejectKinkDaughters = yn;} virtual Bool_t IsSelected(TObject *obj); + virtual void Print(const Option_t *option = "") const; protected: Bool_t CheckESD(AliESDtrack *track); Bool_t CheckAOD(AliAODTrack *track); - ULong_t fFlagsOn; // status flags which must be ON (used AliESDtrack ones, connected with '|') - ULong_t fFlagsOff; // status flags which must be OFF (used AliESDtrack ones, connected with '|') - Double_t fPt[2]; // pt range - Double_t fEta[2]; // eta range - Bool_t fRejectKinkDaughter; // switch to kTRUE if daughters of kinks must be rejected - - Bool_t fDCARfixed; // flag to switch between fixed and pt-dependent DCA cut - TString fDCARptFormula; // expression to compute transverse DCA sigma w.r. to pt - Double_t fDCARmax; // maximum value for transverse DCA - - Bool_t fDCAZfixed; // flag to switch between fixed and pt-dependent DCA cut - TString fDCAZptFormula; // expression to compute longitudinal DCA sigma w.r. to pt - Double_t fDCAZmax; // maximum value for longitudinal DCA - - Int_t fSPDminNClusters; // minimum number of required clusters in SPD - Int_t fITSminNClusters; // minimum number of required clusters in ITS - Double_t fITSmaxChi2; // maximum chi2 / number of clusters in ITS - - Int_t fTPCminNClusters; // minimum number of required clusters in TPC - Double_t fTPCmaxChi2; // maximum chi2 / number of clusters in TPC + ULong_t fFlagsOn; // status flags which must be ON (used AliESDtrack ones, connected with '|') + ULong_t fFlagsOff; // status flags which must be OFF (used AliESDtrack ones, connected with '|') + Double_t fPt[2]; // pt range + Double_t fEta[2]; // eta range + Bool_t fRejectKinkDaughters; // switch to kTRUE if daughters of kinks must be rejected + + Bool_t fDCARfixed; // flag to switch between fixed and pt-dependent DCA cut + TString fDCARptFormula; // expression to compute transverse DCA sigma w.r. to pt + Double_t fDCARmax; // maximum value for transverse DCA + + Bool_t fDCAZfixed; // flag to switch between fixed and pt-dependent DCA cut + TString fDCAZptFormula; // expression to compute longitudinal DCA sigma w.r. to pt + Double_t fDCAZmax; // maximum value for longitudinal DCA + + Int_t fSPDminNClusters; // minimum number of required clusters in SPD + Int_t fITSminNClusters; // minimum number of required clusters in ITS + Double_t fITSmaxChi2; // maximum chi2 / number of clusters in ITS + + Int_t fTPCminNClusters; // minimum number of required clusters in TPC + Double_t fTPCmaxChi2; // maximum chi2 / number of clusters in TPC ClassDef(AliRsnCutTrackQuality, 1) }; -- 2.43.0