]>
Commit | Line | Data |
---|---|---|
7c3c85cd | 1 | //-*- Mode: C++ -*- |
2 | // $Id: AliHLTJETJetCuts.cxx $ | |
3 | /************************************************************************** | |
4 | * This file is property of and copyright by the ALICE HLT Project * | |
5 | * ALICE Experiment at CERN, All rights reserved. * | |
6 | * * | |
7 | * Primary Authors: Jochen Thaeder <thaeder@kip.uni-heidelberg.de> * | |
8 | * for The ALICE HLT Project. * | |
9 | * * | |
10 | * Permission to use, copy, modify and distribute this software and its * | |
11 | * documentation strictly for non-commercial purposes is hereby granted * | |
12 | * without fee, provided that the above copyright notice appears in all * | |
13 | * copies and that both the copyright notice and this permission notice * | |
14 | * appear in the supporting documentation. The authors make no claims * | |
15 | * about the suitability of this software for any purpose. It is * | |
16 | * provided "as is" without express or implied warranty. * | |
17 | **************************************************************************/ | |
18 | ||
19 | /** @file AliHLTJETJetCuts.h | |
20 | @author Jochen Thaeder | |
21 | @date | |
22 | @brief Cuts for jet input tracks | |
23 | */ | |
24 | ||
25 | // see header file for class documentation | |
26 | // or | |
27 | // refer to README to build package | |
28 | // or | |
29 | // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt | |
30 | ||
31 | #if __GNUC__ >= 3 | |
32 | using namespace std; | |
33 | #endif | |
34 | ||
35 | #include "AliHLTJETJetCuts.h" | |
36 | ||
37 | /** ROOT macro for the implementation of ROOT specific class methods */ | |
38 | ClassImp(AliHLTJETJetCuts) | |
39 | ||
40 | /* | |
41 | * --------------------------------------------------------------------------------- | |
42 | * Constructor / Destructor | |
43 | * --------------------------------------------------------------------------------- | |
44 | */ | |
45 | ||
46 | // ################################################################################# | |
47 | AliHLTJETJetCuts::AliHLTJETJetCuts(const Char_t* name, const Char_t* title ) | |
48 | : | |
49 | AliAnalysisCuts(name, title), | |
50 | fEtMin(0.) { | |
51 | // see header file for class documentation | |
52 | // or | |
53 | // refer to README to build package | |
54 | // or | |
55 | // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt | |
56 | ||
57 | } | |
58 | ||
59 | // ################################################################################# | |
60 | AliHLTJETJetCuts::~AliHLTJETJetCuts() { | |
61 | // see header file for class documentation | |
62 | ||
63 | } | |
64 | ||
65 | /* | |
66 | * --------------------------------------------------------------------------------- | |
67 | * Selection | |
68 | * --------------------------------------------------------------------------------- | |
69 | */ | |
70 | ||
71 | // ################################################################################# | |
9eeae5d5 | 72 | Bool_t AliHLTJETJetCuts::IsSelected( TObject *obj ) { |
7c3c85cd | 73 | // see header file for class documentation |
74 | ||
75 | Bool_t bResult = kTRUE; | |
76 | ||
77 | if ( ! strcmp(obj->ClassName(),"AliHLTJETConeJetCandidate") ) | |
78 | bResult = IsSelected( dynamic_cast<AliHLTJETConeJetCandidate*> (obj)); | |
79 | else if ( ! strcmp(obj->ClassName(),"AliAODJet") ) | |
80 | bResult = IsSelected( dynamic_cast<AliAODJet*> (obj)); | |
81 | else { | |
82 | HLTError("Unknown object type %s", obj->ClassName() ); | |
83 | bResult = kFALSE; | |
84 | } | |
85 | ||
86 | HLTError("Unknown object dd type %s", obj->ClassName() ); | |
87 | ||
88 | return bResult; | |
89 | } | |
90 | ||
91 | // ################################################################################# | |
92 | Bool_t AliHLTJETJetCuts::IsSelected( AliHLTJETConeJetCandidate* jet ) { | |
93 | // see header file for class documentation | |
94 | ||
95 | Bool_t bResult = kTRUE; | |
96 | ||
97 | // -- cut on min Pt | |
98 | if ( jet->GetEt() < fEtMin ) | |
99 | bResult = kFALSE; | |
100 | ||
101 | return bResult; | |
102 | } | |
103 | ||
104 | // ################################################################################# | |
105 | Bool_t AliHLTJETJetCuts::IsSelected( AliAODJet* jet ) { | |
106 | // see header file for class documentation | |
107 | ||
108 | Bool_t bResult = kTRUE; | |
109 | ||
110 | // -- cut on min Pt | |
111 | if ( jet->Pt() < fEtMin ) | |
112 | bResult = kFALSE; | |
113 | ||
114 | return bResult; | |
115 | } |