]>
Commit | Line | Data |
---|---|---|
c37c6481 | 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 | // These cuts must be added to the AliRsnAnalysis | |
21 | // object in order to make cut on single particles | |
22 | // or on pairs of particles. | |
23 | // | |
24 | // author: A. Pulvirenti (email: alberto.pulvirenti@ct.infn.it) | |
25 | //------------------------------------------------------------------------- | |
26 | ||
27 | #include <Riostream.h> | |
28 | ||
29 | #include "AliRsnDaughter.h" | |
30 | #include "AliRsnDaughterCutPair.h" | |
31 | ||
32 | ClassImp(AliRsnDaughterCutPair) | |
33 | ||
34 | //-------------------------------------------------------------------------------------------------------- | |
35 | Bool_t AliRsnDaughterCutPair::Pass(AliRsnDaughter *track1, AliRsnDaughter *track2) const | |
36 | { | |
37 | // | |
38 | // Virtual method for cut passing. | |
39 | // This function checks only that the two arguments are not NULL. | |
40 | // | |
41 | if (!track1 || !track2) return kFALSE; | |
42 | ||
43 | return kTRUE; | |
44 | } | |
45 | //-------------------------------------------------------------------------------------------------------- | |
46 | Bool_t AliRsnDaughterCutPairPt::Pass(AliRsnDaughter *track1, AliRsnDaughter *track2) const | |
47 | { | |
48 | // | |
49 | // Cut on single track momentum. | |
50 | // | |
51 | if (!AliRsnDaughterCutPair::Pass(track1, track2)) return kFALSE; | |
52 | ||
53 | AliRsnDaughter sum = AliRsnDaughter::Sum(*track1, *track2); | |
54 | ||
55 | if (sum.GetPt() < fPtMin) return kFALSE; | |
56 | if (sum.GetPt() > fPtMax) return kFALSE; | |
57 | ||
58 | return kTRUE; | |
59 | } | |
60 | //-------------------------------------------------------------------------------------------------------- | |
61 | void AliRsnDaughterCutPairArmenteros::Compute(AliRsnDaughter *track1, AliRsnDaughter *track2, Double_t &qt, Double_t &alpha) const | |
62 | { | |
63 | // | |
64 | // Compute variables for Armenteros plot. | |
65 | // Put as separate method to allow some monitoring | |
66 | // | |
67 | ||
68 | if (!AliRsnDaughterCutPair::Pass(track1, track2)) return; | |
69 | ||
70 | AliRsnDaughter sum = AliRsnDaughter::Sum(*track1, *track2); | |
71 | ||
72 | // compute projection of both track momenta along mother's one | |
73 | Double_t qLpos = 0.0, qLneg = 0.0, qL1 = 0.0; | |
74 | if (track1->GetSign() > 0) { | |
75 | qLpos = track1->GetPx()*sum.GetPx() + track1->GetPy()*sum.GetPy() + track1->GetPz()*sum.GetPz(); | |
76 | qLneg = track2->GetPx()*sum.GetPx() + track2->GetPy()*sum.GetPy() + track2->GetPz()*sum.GetPz(); | |
77 | qL1 = qLpos; | |
78 | } else { | |
79 | qLneg = track1->GetPx()*sum.GetPx() + track1->GetPy()*sum.GetPy() + track1->GetPz()*sum.GetPz(); | |
80 | qLpos = track2->GetPx()*sum.GetPx() + track2->GetPy()*sum.GetPy() + track2->GetPz()*sum.GetPz(); | |
81 | qL1 = qLneg; | |
82 | } | |
83 | qLpos /= sum.GetP(); | |
84 | qLneg /= sum.GetP(); | |
85 | ||
86 | // compute Qt | |
87 | qt = TMath::Sqrt(track1->GetP2() - qL1*qL1); | |
88 | ||
89 | // compute alpha | |
90 | alpha = (qLpos - qLneg) / (qLpos + qLneg); | |
91 | } | |
92 | //-------------------------------------------------------------------------------------------------------- | |
93 | Bool_t AliRsnDaughterCutPairArmenteros::Pass(AliRsnDaughter *track1, AliRsnDaughter *track2) const | |
94 | { | |
95 | // | |
96 | // Check Armenteros variables | |
97 | // | |
98 | if (!AliRsnDaughterCutPair::Pass(track1, track2)) return kFALSE; | |
99 | ||
100 | Double_t qt, alpha; | |
101 | Compute(track1, track2, qt, alpha); | |
102 | ||
103 | if (qt < fQtMin || qt > fQtMax) return kFALSE; | |
104 | if (alpha < fAlphaMin || alpha > fAlphaMax) return kFALSE; | |
105 | return kTRUE; | |
106 | } |