2 // $Id: AliHLTJETTrackCuts.cxx $
3 /**************************************************************************
4 * This file is property of and copyright by the ALICE HLT Project *
5 * ALICE Experiment at CERN, All rights reserved. *
7 * Primary Authors: Jochen Thaeder <thaeder@kip.uni-heidelberg.de> *
8 * for The ALICE HLT Project. *
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 **************************************************************************/
19 /** @file AliHLTJETTrackCuts.h
20 @author Jochen Thaeder
22 @brief Cuts for jet input tracks
25 // see header file for class documentation
27 // refer to README to build package
29 // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
35 #include "AliHLTJETTrackCuts.h"
36 #include <TDatabasePDG.h>
38 /** ROOT macro for the implementation of ROOT specific class methods */
39 ClassImp(AliHLTJETTrackCuts)
42 * ---------------------------------------------------------------------------------
43 * Constructor / Destructor
44 * ---------------------------------------------------------------------------------
47 // #################################################################################
48 AliHLTJETTrackCuts::AliHLTJETTrackCuts(const Char_t* name, const Char_t* title )
50 AliAnalysisCuts(name, title),
57 // see header file for class documentation
59 // refer to README to build package
61 // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
65 // #################################################################################
66 AliHLTJETTrackCuts::~AliHLTJETTrackCuts() {
67 // see header file for class documentation
72 * ---------------------------------------------------------------------------------
74 * ---------------------------------------------------------------------------------
77 // #################################################################################
78 Bool_t AliHLTJETTrackCuts::IsSelected( TObject *obj ) {
79 // see header file for class documentation
81 Bool_t bResult = kTRUE;
83 if ( ! strcmp(obj->ClassName(),"TParticle") )
84 bResult = IsSelected( dynamic_cast<TParticle*> (obj));
85 else if ( ! strcmp(obj->ClassName(),"AliESDtrack") )
86 bResult = IsSelected( dynamic_cast<AliESDtrack*> (obj));
88 HLTError("Unknown object type %s", obj->ClassName() );
92 HLTError("Unknown object dd type %s", obj->ClassName() );
97 // #################################################################################
98 Bool_t AliHLTJETTrackCuts::IsSelected( TParticle *particle ) {
99 // see header file for class documentation
101 // ----------------------------------
102 // Applied before in AliHLTMCEvent:
103 // - Is Physical Primary
104 // stack->IsPhysicalPrimary(iter)
106 // particle->GetNDaughters() == 0
107 // ----------------------------------
109 Bool_t bResult = kTRUE;
111 Int_t status = particle->GetStatusCode();
112 Int_t pdgCode = TMath::Abs( particle->GetPdgCode() );
114 // -- Skip non-final state particles (status != 1), neutrinos (12,14,16)
115 if ( (status != 1) || (pdgCode == 12 || pdgCode == 14 || pdgCode == 16) )
118 // -- Charged particles only
119 if ( fChargedOnly && !particle->GetPDG()->Charge() )
123 if ( particle->Pt() < fPtMin )
126 // -- cut on eta acceptance
127 if ( ( particle->Eta() < fEtaMin ) || ( particle->Eta() > fEtaMax ) )
130 // -- cut on phi acceptance
131 if ( ( particle->Phi() < fPhiMin ) || ( particle->Phi() > fPhiMax ) )
137 // #################################################################################
138 Bool_t AliHLTJETTrackCuts::IsSelected( AliESDtrack *esdTrack ) {
139 // see header file for class documentation
141 Bool_t bResult = kTRUE;
144 if ( esdTrack->Pt() < fPtMin )
147 // -- cut on eta acceptance
148 if ( ( esdTrack->Eta() < fEtaMin ) || ( esdTrack->Eta() > fEtaMax ) )
151 cout << esdTrack->Phi() << endl;
153 // -- cut on phi acceptance
154 if ( ( esdTrack->Phi() < fPhiMin ) || ( esdTrack->Phi() > fPhiMax ) )