From d29ba07827fe586b895b31720cc01d6a98e64490 Mon Sep 17 00:00:00 2001 From: snelling Date: Fri, 19 Dec 2008 22:13:08 +0000 Subject: [PATCH] Added new class to make simple kinematic cuts --- PWG2/CMake_libPWG2flow.txt | 1 + PWG2/FLOW/AliFlowEventSimple.cxx | 2 +- PWG2/FLOW/AliFlowEventSimple.h | 2 +- PWG2/FLOW/AliFlowTrackSimpleCuts.cxx | 84 ++++++++++++++++++++++++++++ PWG2/FLOW/AliFlowTrackSimpleCuts.h | 55 ++++++++++++++++++ PWG2/PWG2flowLinkDef.h | 1 + PWG2/libPWG2flow.pkg | 1 + 7 files changed, 144 insertions(+), 2 deletions(-) create mode 100644 PWG2/FLOW/AliFlowTrackSimpleCuts.cxx create mode 100644 PWG2/FLOW/AliFlowTrackSimpleCuts.h diff --git a/PWG2/CMake_libPWG2flow.txt b/PWG2/CMake_libPWG2flow.txt index 3252a73db9f..b93d5427430 100644 --- a/PWG2/CMake_libPWG2flow.txt +++ b/PWG2/CMake_libPWG2flow.txt @@ -3,6 +3,7 @@ set(SRCS FLOW/AliFlowEventSimple.cxx FLOW/AliFlowTrackSimple.cxx + FLOW/AliFlowTrackSimpleCuts.cxx FLOW/AliFlowCommonConstants.cxx FLOW/AliFlowLYZConstants.cxx FLOW/AliFlowCumuConstants.cxx diff --git a/PWG2/FLOW/AliFlowEventSimple.cxx b/PWG2/FLOW/AliFlowEventSimple.cxx index 0e7c6642f85..7acd6722cab 100644 --- a/PWG2/FLOW/AliFlowEventSimple.cxx +++ b/PWG2/FLOW/AliFlowEventSimple.cxx @@ -32,7 +32,7 @@ ClassImp(AliFlowEventSimple) //----------------------------------------------------------------------- AliFlowEventSimple::AliFlowEventSimple(Int_t aLenght): - fTrackCollection(0), + fTrackCollection(NULL), fNumberOfTracks(0), fEventNSelTracksIntFlow(0) { diff --git a/PWG2/FLOW/AliFlowEventSimple.h b/PWG2/FLOW/AliFlowEventSimple.h index 905d101bb27..64194f65910 100644 --- a/PWG2/FLOW/AliFlowEventSimple.h +++ b/PWG2/FLOW/AliFlowEventSimple.h @@ -35,7 +35,7 @@ class AliFlowEventSimple: public TObject { Int_t fNumberOfTracks; // number of tracks Int_t fEventNSelTracksIntFlow; // number of tracks selected for integrated flow calculation - ClassDef(AliFlowEventSimple,0) // macro for rootcint + ClassDef(AliFlowEventSimple,1) // macro for rootcint }; #endif diff --git a/PWG2/FLOW/AliFlowTrackSimpleCuts.cxx b/PWG2/FLOW/AliFlowTrackSimpleCuts.cxx new file mode 100644 index 00000000000..6ac2b4c1d58 --- /dev/null +++ b/PWG2/FLOW/AliFlowTrackSimpleCuts.cxx @@ -0,0 +1,84 @@ +/************************************************************************** + * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * + * * + * Author: The ALICE Off-line Project. * + * Contributors are mentioned in the code where appropriate. * + * * + * Permission to use, copy, modify and distribute this software and its * + * documentation strictly for non-commercial purposes is hereby granted * + * without fee, provided that the above copyright notice appears in all * + * copies and that both the copyright notice and this permission notice * + * appear in the supporting documentation. The authors make no claims * + * about the suitability of this software for any purpose. It is * + * provided "as is" without express or implied warranty. * + **************************************************************************/ + +/* $Id$ */ +#include "TObject.h" +#include "AliFlowTrackSimpleCuts.h" + + +// AliFlowTrackSimpleCuts: +// A simple track cut class to the the AliFlowTrackSimple +// for basic kinematic cuts +// +// author: N. van der Kolk (kolk@nikhef.nl) + + +ClassImp(AliFlowTrackSimpleCuts) + +//----------------------------------------------------------------------- + +AliFlowTrackSimpleCuts::AliFlowTrackSimpleCuts(): + fPtMax(0.), + fPtMin(0.), + fEtaMax(0.), + fEtaMin(0.), + fPhiMax(0.), + fPhiMin(0.), + fPID(0) + +{ + //constructor + +} + +//----------------------------------------------------------------------- + +AliFlowTrackSimpleCuts::AliFlowTrackSimpleCuts(const AliFlowTrackSimpleCuts& someCuts): + TObject(), + fPtMax(someCuts.fPtMax), + fPtMin(someCuts.fPtMin), + fEtaMax(someCuts.fEtaMax), + fEtaMin(someCuts.fEtaMin), + fPhiMax(someCuts.fPhiMax), + fPhiMin(someCuts.fPhiMin), + fPID(someCuts.fPID) +{ + //copy constructor +} + +//----------------------------------------------------------------------- + +AliFlowTrackSimpleCuts& AliFlowTrackSimpleCuts::operator=(const AliFlowTrackSimpleCuts& someCuts) +{ + fPtMax = someCuts.fPtMax; + fPtMin = someCuts.fPtMin; + fEtaMax = someCuts.fEtaMax; + fEtaMin = someCuts.fEtaMin; + fPhiMax = someCuts.fPhiMax; + fPhiMin = someCuts.fPhiMin; + fPID = someCuts.fPID; + + return *this; + +} + + +//----------------------------------------------------------------------- + +AliFlowTrackSimpleCuts::~AliFlowTrackSimpleCuts() +{ + //destructor + +} diff --git a/PWG2/FLOW/AliFlowTrackSimpleCuts.h b/PWG2/FLOW/AliFlowTrackSimpleCuts.h new file mode 100644 index 00000000000..2496922f60b --- /dev/null +++ b/PWG2/FLOW/AliFlowTrackSimpleCuts.h @@ -0,0 +1,55 @@ +/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. */ +/* See cxx source for full Copyright notice */ +/* $Id$ */ + +// AliFlowTrackSimpleCuts: +// A simple track cut class to the the AliFlowTrackSimple for basic +// kinematic cuts +// author: N. van der Kolk (kolk@nikhef.nl) + +#ifndef AliFlowTrackSimpleCuts_H +#define AliFlowTrackSimpleCuts_H + +class TObject; + +class AliFlowTrackSimpleCuts : public TObject { + + public: + AliFlowTrackSimpleCuts(); + AliFlowTrackSimpleCuts(const AliFlowTrackSimpleCuts& someCuts); + AliFlowTrackSimpleCuts& operator=(const AliFlowTrackSimpleCuts& someCuts); + virtual ~AliFlowTrackSimpleCuts(); + + //setters + void SetPtMax(Double_t max) {this->fPtMax = max; } + void SetPtMin(Double_t min) {this->fPtMin = min; } + void SetEtaMax(Double_t max) {this->fEtaMax = max; } + void SetEtaMin(Double_t min) {this->fEtaMin = min; } + void SetPhiMax(Double_t max) {this->fPhiMax = max; } + void SetPhiMin(Double_t min) {this->fPhiMin = min; } + void SetPID(Int_t pid) {this->fPID = pid; } + + //getters + Double_t GetPtMax() const {return this->fPtMax; } + Double_t GetPtMin() const {return this->fPtMin; } + Double_t GetEtaMax() const {return this->fEtaMax; } + Double_t GetEtaMin() const {return this->fEtaMin; } + Double_t GetPhiMax() const {return this->fPhiMax; } + Double_t GetPhiMin() const {return this->fPhiMin; } + Int_t GetPID() const {return this->fPID; } + + private: + Double_t fPtMax; + Double_t fPtMin; + Double_t fEtaMax; + Double_t fEtaMin; + Double_t fPhiMax; + Double_t fPhiMin; + Int_t fPID; + + ClassDef(AliFlowTrackSimpleCuts,1) +}; + +#endif + + diff --git a/PWG2/PWG2flowLinkDef.h b/PWG2/PWG2flowLinkDef.h index ae0879ba396..7b006b73b64 100644 --- a/PWG2/PWG2flowLinkDef.h +++ b/PWG2/PWG2flowLinkDef.h @@ -10,6 +10,7 @@ #pragma link C++ class AliFlowEventSimple+; #pragma link C++ class AliFlowTrackSimple+; +#pragma link C++ class AliFlowTrackSimpleCuts+; #pragma link C++ class AliFlowCommonHist+; #pragma link C++ class AliFlowCommonHistResults+; #pragma link C++ class AliFlowLYZHist1+; diff --git a/PWG2/libPWG2flow.pkg b/PWG2/libPWG2flow.pkg index 06392dd9bf1..5c95855c5d3 100644 --- a/PWG2/libPWG2flow.pkg +++ b/PWG2/libPWG2flow.pkg @@ -2,6 +2,7 @@ SRCS= FLOW/AliFlowEventSimple.cxx \ FLOW/AliFlowTrackSimple.cxx \ + FLOW/AliFlowTrackSimpleCuts.cxx \ FLOW/AliFlowVector.cxx \ FLOW/AliFlowCommonConstants.cxx \ FLOW/AliFlowLYZConstants.cxx \ -- 2.39.3