]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG2/RESONANCES/AliRsnDaughterCut.cxx
fixed coding conventions violations
[u/mrichter/AliRoot.git] / PWG2 / RESONANCES / AliRsnDaughterCut.cxx
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 "AliRsnDaughterCut.h"
31
32 ClassImp(AliRsnDaughterCut)
33
34 //--------------------------------------------------------------------------------------------------------
35 Bool_t AliRsnDaughterCut::Pass(AliRsnDaughter* /*track1*/, AliRsnDaughter* /*track2*/) const
36 {
37 // 
38 // Virtual method for cut passing.
39 // This function must be overridden and return kTRUE when cut is passed.
40 // 
41         TObject::Error("Pass", "This method must be overridden!");
42         return kFALSE;
43 }
44 //--------------------------------------------------------------------------------------------------------
45 Bool_t AliRsnDaughterCutPtSingle::Pass(AliRsnDaughter *track1, AliRsnDaughter* /*track2*/) const
46 {
47 // 
48 // Cut on single track momentum.
49 //
50         if (!track1) return kFALSE;
51         if (track1->GetPt() < fPtMin) return kFALSE;
52         if (track1->GetPt() > fPtMax) return kFALSE;
53         
54         return kTRUE;
55 }
56 //--------------------------------------------------------------------------------------------------------
57 Bool_t AliRsnDaughterCutPtPair::Pass(AliRsnDaughter *track1, AliRsnDaughter *track2) const
58 {
59 // 
60 // Cut on single track momentum.
61 // 
62         if (!track1 || !track2) return kFALSE;
63         
64         AliRsnDaughter sum = AliRsnDaughter::Sum(*track1, *track2);
65         
66         if (sum.GetPt() < fPtMin) return kFALSE;
67         if (sum.GetPt() > fPtMax) return kFALSE;
68         
69         return kTRUE;
70 }