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
19 // Implementation of track cuts for analysis.
21 // author: A. Pulvirenti (email: alberto.pulvirenti@ct.infn.it)
22 //-------------------------------------------------------------------------
24 #include <Riostream.h>
26 #include "AliRsnDaughter.h"
27 #include "AliRsnDaughterCut.h"
29 ClassImp(AliRsnDaughterCut)
31 //--------------------------------------------------------------------------------------------------------
32 Bool_t AliRsnDaughterCut::Pass(AliRsnDaughter* /*track1*/, AliRsnDaughter* /*track2*/)
34 // Virtual method for cut passing.
35 // This function must be overridden and return kTRUE when cut is passed.
38 TObject::Error("Pass", "This method must be overridden!");
41 //--------------------------------------------------------------------------------------------------------
42 Bool_t AliRsnDaughterCutPtSingle::Pass(AliRsnDaughter *track1, AliRsnDaughter* /*track2*/)
44 // Cut on single track momentum.
47 if (!track1) return kFALSE;
48 if (track1->GetPt() < fPtMin) return kFALSE;
49 if (track1->GetPt() > fPtMax) return kFALSE;
53 //--------------------------------------------------------------------------------------------------------
54 Bool_t AliRsnDaughterCutPtPair::Pass(AliRsnDaughter *track1, AliRsnDaughter *track2)
56 // Cut on single track momentum.
59 if (!track1 || !track2) return kFALSE;
61 AliRsnDaughter sum = (*track1) + (*track2);
63 if (sum.GetPt() < fPtMin) return kFALSE;
64 if (sum.GetPt() > fPtMax) return kFALSE;