]>
Commit | Line | Data |
---|---|---|
8ec9c365 | 1 | /************************************************************************** |
2 | * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
3 | * * | |
4 | * Author: The ALICE Off-line Project. * | |
5 | * Contributors are mentioned in the code where appropriate. * | |
6 | * * | |
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 | **************************************************************************/ | |
15 | ||
16 | //------------------------------------------------------------------------- | |
17 | // Class AliRsnDaughterCut | |
18 | // | |
19 | // Implementation of track cuts for analysis. | |
20 | // | |
21 | // author: A. Pulvirenti (email: alberto.pulvirenti@ct.infn.it) | |
22 | //------------------------------------------------------------------------- | |
23 | ||
24 | #include <Riostream.h> | |
25 | ||
26 | #include "AliRsnDaughter.h" | |
27 | #include "AliRsnDaughterCut.h" | |
28 | ||
29 | ClassImp(AliRsnDaughterCut) | |
30 | ||
31 | //-------------------------------------------------------------------------------------------------------- | |
32 | Bool_t AliRsnDaughterCut::Pass(AliRsnDaughter* /*track1*/, AliRsnDaughter* /*track2*/) | |
33 | // | |
34 | // Virtual method for cut passing. | |
35 | // This function must be overridden and return kTRUE when cut is passed. | |
36 | // | |
37 | { | |
38 | TObject::Error("Pass", "This method must be overridden!"); | |
39 | return kFALSE; | |
40 | } | |
41 | //-------------------------------------------------------------------------------------------------------- | |
42 | Bool_t AliRsnDaughterCutPtSingle::Pass(AliRsnDaughter *track1, AliRsnDaughter* /*track2*/) | |
43 | // | |
44 | // Cut on single track momentum. | |
45 | // | |
46 | { | |
47 | if (!track1) return kFALSE; | |
48 | if (track1->GetPt() < fPtMin) return kFALSE; | |
49 | if (track1->GetPt() > fPtMax) return kFALSE; | |
50 | ||
51 | return kTRUE; | |
52 | } | |
53 | //-------------------------------------------------------------------------------------------------------- | |
54 | Bool_t AliRsnDaughterCutPtPair::Pass(AliRsnDaughter *track1, AliRsnDaughter *track2) | |
55 | // | |
56 | // Cut on single track momentum. | |
57 | // | |
58 | { | |
59 | if (!track1 || !track2) return kFALSE; | |
60 | ||
61 | AliRsnDaughter sum = (*track1) + (*track2); | |
62 | ||
63 | if (sum.GetPt() < fPtMin) return kFALSE; | |
64 | if (sum.GetPt() > fPtMax) return kFALSE; | |
65 | ||
66 | return kTRUE; | |
67 | } |