//_________________________________________________________________________________________________
AliRsnCutTrackQuality::AliRsnCutTrackQuality(const char *name) :
AliRsnCut(name, AliRsnCut::kDaughter, 0.0, 0.0),
- fFlagsOn(0xFFFFFFFF),
+ fFlagsOn(0x0),
fFlagsOff(0x0),
- fRejectKinkDaughter(kFALSE),
+ fRejectKinkDaughters(kTRUE),
fDCARfixed(kTRUE),
fDCARptFormula(""),
fDCARmax(fgkVeryBig),
AliRsnCut(copy),
fFlagsOn(copy.fFlagsOn),
fFlagsOff(copy.fFlagsOff),
- fRejectKinkDaughter(copy.fRejectKinkDaughter),
+ fRejectKinkDaughters(copy.fRejectKinkDaughters),
fDCARfixed(copy.fDCARfixed),
fDCARptFormula(copy.fDCARptFormula),
fDCARmax(copy.fDCARmax),
fFlagsOn = copy.fFlagsOn;
fFlagsOff = copy.fFlagsOff;
- fRejectKinkDaughter = copy.fRejectKinkDaughter;
+ fRejectKinkDaughters = copy.fRejectKinkDaughters;
fDCARfixed = copy.fDCARfixed;
fDCARptFormula = copy.fDCARptFormula;
fDCARmax = copy.fDCARmax;
// Disable all cuts
//
- fFlagsOn = 0xFFFFFFFF;
+ fFlagsOn = 0x0;
fFlagsOff = 0x0;
- fRejectKinkDaughter = kFALSE;
+ fRejectKinkDaughters = kFALSE;
fDCARfixed = kTRUE;
fDCARptFormula = "";
fDCARmax = fgkVeryBig;
// coherence check
if (!TargetOK(object)) return kFALSE;
- // status is checked in the same way for all tracks
+ // status is checked in the same way for all tracks, using AliVTrack
+ // as a convention, if a the collection of 'on' flags is '0x0', it
+ // is assumed that no flags are required, and this check is skipped;
+ // for the collection of 'off' flags this is not needed
AliVTrack *vtrack = dynamic_cast<AliVTrack*>(fDaughter->GetRef());
if (!vtrack)
{
ULong_t status = (ULong_t)vtrack->GetStatus();
ULong_t checkOn = status & fFlagsOn;
ULong_t checkOff = status & fFlagsOff;
- if (checkOn == 0)
+ if (fFlagsOn != 0x0 && checkOn != fFlagsOn)
{
AliDebug(AliLog::kDebug + 2, Form("Not all required flags are present: required %lx, track has %lx", fFlagsOn, status));
return kFALSE;
// longitudinal DCA cuts
if (fDCAZfixed)
- cuts.SetMaxDCAToVertexZ(fDCARmax);
+ cuts.SetMaxDCAToVertexZ(fDCAZmax);
else
cuts.SetMaxDCAToVertexZPtDep(fDCAZptFormula.Data());
- // these options are always disabled in currend version
+ // these options are always disabled in current version
cuts.SetDCAToVertex2D(kFALSE);
cuts.SetRequireSigmaToVertex(kFALSE);
// 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)
// step #3: reject kink daughters
AliAODVertex *vertex = track->GetProdVertex();
- if (vertex && fRejectKinkDaughter)
+ if (vertex && fRejectKinkDaughters)
{
if (vertex->GetType() == AliAODVertex::kKink)
{
// 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()));
+ }
+}