1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
16 //-------------------------------------------------------------------------
17 // Class AliRsnDaughterCut
18 // -------------------------
19 // Implementation of track cuts for analysis.
20 // These cuts must be added to the AliRsnAnalysis
21 // object in order to make cut on single particles
22 // or on pairs of particles.
24 // author: A. Pulvirenti (email: alberto.pulvirenti@ct.infn.it)
25 //-------------------------------------------------------------------------
27 #include <Riostream.h>
29 #include "AliRsnDaughter.h"
30 #include "AliRsnDaughterCut.h"
32 ClassImp(AliRsnDaughterCut)
34 //--------------------------------------------------------------------------------------------------------
35 Bool_t AliRsnDaughterCut::Pass(AliRsnDaughter* /*track1*/, AliRsnDaughter* /*track2*/) const
38 // Virtual method for cut passing.
39 // This function must be overridden and return kTRUE when cut is passed.
41 TObject::Error("Pass", "This method must be overridden!");
44 //--------------------------------------------------------------------------------------------------------
45 Bool_t AliRsnDaughterCutPtSingle::Pass(AliRsnDaughter *track1, AliRsnDaughter* /*track2*/) const
48 // Cut on single track momentum.
50 if (!track1) return kFALSE;
51 if (track1->GetPt() < fPtMin) return kFALSE;
52 if (track1->GetPt() > fPtMax) return kFALSE;
56 //--------------------------------------------------------------------------------------------------------
57 Bool_t AliRsnDaughterCutPtPair::Pass(AliRsnDaughter *track1, AliRsnDaughter *track2) const
60 // Cut on single track momentum.
62 if (!track1 || !track2) return kFALSE;
64 AliRsnDaughter sum = AliRsnDaughter::Sum(*track1, *track2);
66 if (sum.GetPt() < fPtMin) return kFALSE;
67 if (sum.GetPt() > fPtMax) return kFALSE;