From b960c7eb3b709d2888c95c0509134887a1fdf6e5 Mon Sep 17 00:00:00 2001 From: gconesab Date: Sun, 12 Feb 2012 10:46:51 +0000 Subject: [PATCH] cosmetics --- PWG/CaloTrackCorrBase/AliFiducialCut.cxx | 266 ++++++++---------- PWG/CaloTrackCorrBase/AliFiducialCut.h | 26 +- PWG/CaloTrackCorrBase/AliIsolationCut.cxx | 123 +++++--- PWG/CaloTrackCorrBase/AliIsolationCut.h | 10 +- .../AliNeutralMesonSelection.cxx | 102 ++++--- .../AliNeutralMesonSelection.h | 3 +- 6 files changed, 275 insertions(+), 255 deletions(-) diff --git a/PWG/CaloTrackCorrBase/AliFiducialCut.cxx b/PWG/CaloTrackCorrBase/AliFiducialCut.cxx index 60ee7fe84f1..83014096c85 100755 --- a/PWG/CaloTrackCorrBase/AliFiducialCut.cxx +++ b/PWG/CaloTrackCorrBase/AliFiducialCut.cxx @@ -12,7 +12,6 @@ * about the suitability of this software for any purpose. It is * * provided "as is" without express or implied warranty. * **************************************************************************/ -/* $Id: AliFiducialCut.cxx 21839 2007-10-29 13:49:42Z gustavo $ */ //_________________________________________________________________________ // Class for track/cluster acceptance selection @@ -29,7 +28,6 @@ #include #include #include -//#include //---- ANALYSIS system ---- #include "AliFiducialCut.h" @@ -37,137 +35,103 @@ ClassImp(AliFiducialCut) -//____________________________________________________________________________ +//________________________________ AliFiducialCut::AliFiducialCut() : - TObject(), - fEMCALFiducialCut(0), fPHOSFiducialCut(0), fCTSFiducialCut(0), - fCTSFidCutMinEta(0x0),fCTSFidCutMinPhi(0x0),fCTSFidCutMaxEta(0x0), fCTSFidCutMaxPhi(0x0), - fEMCALFidCutMinEta(0x0),fEMCALFidCutMinPhi(0x0),fEMCALFidCutMaxEta(0x0), fEMCALFidCutMaxPhi(0x0), - fPHOSFidCutMinEta(0x0),fPHOSFidCutMinPhi(0x0),fPHOSFidCutMaxEta(0x0), fPHOSFidCutMaxPhi(0x0) +TObject(), +fEMCALFiducialCut(0), fPHOSFiducialCut(0), fCTSFiducialCut(0), +fCTSFidCutMinEta(0x0), fCTSFidCutMinPhi(0x0), fCTSFidCutMaxEta(0x0), fCTSFidCutMaxPhi(0x0), +fEMCALFidCutMinEta(0x0),fEMCALFidCutMinPhi(0x0),fEMCALFidCutMaxEta(0x0), fEMCALFidCutMaxPhi(0x0), +fPHOSFidCutMinEta(0x0), fPHOSFidCutMinPhi(0x0), fPHOSFidCutMaxEta(0x0), fPHOSFidCutMaxPhi(0x0) { //Ctor - + //Initialize parameters InitParameters(); -} -/* -//____________________________________________________________________________ -AliFiducialCut::AliFiducialCut(const AliFiducialCut & g) : - TObject(g), - fEMCALFiducialCut(g.fEMCALFiducialCut), fPHOSFiducialCut(g.fPHOSFiducialCut), fCTSFiducialCut(g. fCTSFiducialCut), - fCTSFidCutMinEta(g.fCTSFidCutMinEta?new TArrayF(*g.fCTSFidCutMinEta):0x0), - fCTSFidCutMinPhi(g.fCTSFidCutMinPhi?new TArrayF(*g.fCTSFidCutMinPhi):0x0), - fCTSFidCutMaxEta(g.fCTSFidCutMaxEta?new TArrayF(*g.fCTSFidCutMaxEta):0x0), - fCTSFidCutMaxPhi(g.fCTSFidCutMaxPhi?new TArrayF(*g.fCTSFidCutMaxPhi):0x0), - fEMCALFidCutMinEta(g.fEMCALFidCutMinEta?new TArrayF(*g.fEMCALFidCutMinEta):0x0), - fEMCALFidCutMinPhi(g.fEMCALFidCutMinPhi?new TArrayF(*g.fEMCALFidCutMinPhi):0x0), - fEMCALFidCutMaxEta(g.fEMCALFidCutMaxEta?new TArrayF(*g.fEMCALFidCutMaxEta):0x0), - fEMCALFidCutMaxPhi(g.fEMCALFidCutMaxPhi?new TArrayF(*g.fEMCALFidCutMaxPhi):0x0), - fPHOSFidCutMinEta(g.fPHOSFidCutMinEta?new TArrayF(*g.fPHOSFidCutMinEta):0x0), - fPHOSFidCutMinPhi(g.fPHOSFidCutMinPhi?new TArrayF(*g.fPHOSFidCutMinPhi):0x0), - fPHOSFidCutMaxEta(g.fPHOSFidCutMaxEta?new TArrayF(*g.fPHOSFidCutMaxEta):0x0), - fPHOSFidCutMaxPhi(g.fPHOSFidCutMaxPhi?new TArrayF(*g.fPHOSFidCutMaxPhi):0x0) - -{ - // cpy ctor - + } -//_________________________________________________________________________ -AliFiducialCut & AliFiducialCut::operator = (const AliFiducialCut & source) +//_______________________________ +AliFiducialCut::~AliFiducialCut() { - // assignment operator - - if(&source == this) return *this; - - fEMCALFiducialCut = source.fEMCALFiducialCut; - fPHOSFiducialCut = source.fPHOSFiducialCut; - fCTSFiducialCut = source.fCTSFiducialCut; - - fCTSFidCutMinEta = source.fCTSFidCutMinEta?new TArrayF(*source.fCTSFidCutMinEta):0x0; - fCTSFidCutMinPhi = source.fCTSFidCutMinPhi?new TArrayF(*source.fCTSFidCutMinPhi):0x0; - fCTSFidCutMaxEta = source.fCTSFidCutMaxEta?new TArrayF(*source.fCTSFidCutMaxEta):0x0; - fCTSFidCutMaxPhi = source.fCTSFidCutMaxPhi?new TArrayF(*source.fCTSFidCutMaxPhi):0x0; - fEMCALFidCutMinEta = source.fEMCALFidCutMinEta?new TArrayF(*source.fEMCALFidCutMinEta):0x0; - fEMCALFidCutMinPhi = source.fEMCALFidCutMinPhi?new TArrayF(*source.fEMCALFidCutMinPhi):0x0; - fEMCALFidCutMaxEta = source.fEMCALFidCutMaxEta?new TArrayF(*source.fEMCALFidCutMaxEta):0x0; - fEMCALFidCutMaxPhi = source.fEMCALFidCutMaxPhi?new TArrayF(*source.fEMCALFidCutMaxPhi):0x0; - fPHOSFidCutMinEta = source.fPHOSFidCutMinEta?new TArrayF(*source.fPHOSFidCutMinEta):0x0; - fPHOSFidCutMinPhi = source.fPHOSFidCutMinPhi?new TArrayF(*source.fPHOSFidCutMinPhi):0x0; - fPHOSFidCutMaxEta = source.fPHOSFidCutMaxEta?new TArrayF(*source.fPHOSFidCutMaxEta):0x0; - fPHOSFidCutMaxPhi = source.fPHOSFidCutMaxPhi?new TArrayF(*source.fPHOSFidCutMaxPhi):0x0; - - return *this; - -} -*/ -//_________________________________ -AliFiducialCut::~AliFiducialCut() { //Dtor - - if(fCTSFidCutMinEta)delete fCTSFidCutMinEta ; - if(fCTSFidCutMinPhi)delete fCTSFidCutMinPhi ; - if(fCTSFidCutMaxEta)delete fCTSFidCutMaxEta ; - if(fCTSFidCutMaxPhi)delete fCTSFidCutMaxPhi ; - - if(fEMCALFidCutMinEta)delete fEMCALFidCutMinEta ; - if(fEMCALFidCutMinPhi)delete fEMCALFidCutMinPhi ; - if(fEMCALFidCutMaxEta)delete fEMCALFidCutMaxEta ; - if(fEMCALFidCutMaxPhi)delete fEMCALFidCutMaxPhi ; - - if(fPHOSFidCutMinEta)delete fPHOSFidCutMinEta ; - if(fPHOSFidCutMinPhi)delete fPHOSFidCutMinPhi ; - if(fPHOSFidCutMaxEta)delete fPHOSFidCutMaxEta ; - if(fPHOSFidCutMaxPhi)delete fPHOSFidCutMaxPhi ; - + + if(fCTSFidCutMinEta) delete fCTSFidCutMinEta ; + if(fCTSFidCutMinPhi) delete fCTSFidCutMinPhi ; + if(fCTSFidCutMaxEta) delete fCTSFidCutMaxEta ; + if(fCTSFidCutMaxPhi) delete fCTSFidCutMaxPhi ; + + if(fEMCALFidCutMinEta) delete fEMCALFidCutMinEta ; + if(fEMCALFidCutMinPhi) delete fEMCALFidCutMinPhi ; + if(fEMCALFidCutMaxEta) delete fEMCALFidCutMaxEta ; + if(fEMCALFidCutMaxPhi) delete fEMCALFidCutMaxPhi ; + + if(fPHOSFidCutMinEta) delete fPHOSFidCutMinEta ; + if(fPHOSFidCutMinPhi) delete fPHOSFidCutMinPhi ; + if(fPHOSFidCutMaxEta) delete fPHOSFidCutMaxEta ; + if(fPHOSFidCutMaxPhi) delete fPHOSFidCutMaxPhi ; + } -//_______________________________________________________________ -Bool_t AliFiducialCut::IsInFiducialCut(const TLorentzVector momentum, const TString det) const +//___________________________________________________________________ +Bool_t AliFiducialCut::IsInFiducialCut(const TLorentzVector momentum, + const TString det) const { //Selects EMCAL or PHOS cluster or CTS track if it is inside eta-phi defined regions - - if(det == "CTS"){ - if(!fCTSFiducialCut) return kTRUE; //Fiducial cut not requested, accept all tracks - else return CheckFiducialRegion(momentum, fCTSFidCutMinPhi , fCTSFidCutMaxPhi , fCTSFidCutMinEta , fCTSFidCutMaxEta ); + + if(det == "CTS") + { + if(!fCTSFiducialCut) + return kTRUE; //Fiducial cut not requested, accept all tracks + else + return CheckFiducialRegion(momentum, fCTSFidCutMinPhi , fCTSFidCutMaxPhi , fCTSFidCutMinEta , fCTSFidCutMaxEta ); } - else if(det == "EMCAL") { - if(!fEMCALFiducialCut) return kTRUE; //Fiducial cut not requested, accept all clusters - else return CheckFiducialRegion(momentum, fEMCALFidCutMinPhi, fEMCALFidCutMaxPhi, fEMCALFidCutMinEta, fEMCALFidCutMaxEta); + else if(det == "EMCAL") + { + if(!fEMCALFiducialCut) + return kTRUE; //Fiducial cut not requested, accept all clusters + else + return CheckFiducialRegion(momentum, fEMCALFidCutMinPhi, fEMCALFidCutMaxPhi, fEMCALFidCutMinEta, fEMCALFidCutMaxEta); } - else if(det == "PHOS") { - if(!fPHOSFiducialCut) return kTRUE; //Fiducial cut not requested, accept all clusters - else return CheckFiducialRegion(momentum, fPHOSFidCutMinPhi , fPHOSFidCutMaxPhi , fPHOSFidCutMinEta , fPHOSFidCutMaxEta ); + else if(det == "PHOS") + { + if(!fPHOSFiducialCut) + return kTRUE; //Fiducial cut not requested, accept all clusters + else + return CheckFiducialRegion(momentum, fPHOSFidCutMinPhi , fPHOSFidCutMaxPhi , fPHOSFidCutMinEta , fPHOSFidCutMaxEta ); } - else{ + else + { printf("AliFiducialCut::IsInFiducialCut() - Wrong detector name = %s\n", det.Data()); return kFALSE; } - + } -//_______________________________________________________________ -Bool_t AliFiducialCut::CheckFiducialRegion(const TLorentzVector momentum, const TArrayF* minphi, const TArrayF* maxphi, const TArrayF* mineta, const TArrayF* maxeta) const { +//___________________________________________________________________________________________ +Bool_t AliFiducialCut::CheckFiducialRegion(const TLorentzVector momentum, + const TArrayF* minphi, const TArrayF* maxphi, + const TArrayF* mineta, const TArrayF* maxeta) const +{ //Given the selection regions in Eta and Phi, check if particle is in this region. - - Double_t phi = momentum.Phi(); + + Double_t phi = momentum.Phi(); if(phi < 0) phi+=TMath::TwoPi() ; Double_t eta = momentum.Eta(); //printf("IsInFiducialCut::Det: %s, phi = %f, eta = %f\n", det.Data(),phi*TMath::RadToDeg(), eta); - - Int_t netaregions = maxeta->GetSize(); - Int_t nphiregions = maxphi->GetSize(); - if(netaregions != mineta->GetSize() || nphiregions != minphi->GetSize()) + + Int_t netaregions = maxeta->GetSize(); + Int_t nphiregions = maxphi->GetSize(); + if(netaregions != mineta->GetSize() || nphiregions != minphi->GetSize()) printf("AliFiducialCut::IsInFiducialCut() - Wrong number of fiducial cut regions: nmaxeta %d != nmineta %d; nmaxphi %d != nminphi %d\n", - netaregions, mineta->GetSize(), nphiregions, minphi->GetSize()); + netaregions, mineta->GetSize(), nphiregions, minphi->GetSize()); //Eta fiducial cut Bool_t bInEtaFidCut = kFALSE; for(Int_t ieta = 0; ieta < netaregions; ieta++) if(eta > mineta->GetAt(ieta) && eta < maxeta->GetAt(ieta)) bInEtaFidCut = kTRUE; - + if(bInEtaFidCut){ //printf("Eta cut passed\n"); //Phi fiducial cut @@ -190,57 +154,58 @@ Bool_t AliFiducialCut::CheckFiducialRegion(const TLorentzVector momentum, const //_______________________________________________________________ void AliFiducialCut::InitParameters() { - + //Initialize the parameters of the analysis. - + fEMCALFiducialCut = kTRUE ; - fPHOSFiducialCut = kTRUE ; - fCTSFiducialCut = kTRUE ; - + fPHOSFiducialCut = kTRUE ; + fCTSFiducialCut = kTRUE ; + fCTSFidCutMinEta = new TArrayF(1); fCTSFidCutMinEta->SetAt(-0.9,0); fCTSFidCutMaxEta = new TArrayF(1); - fCTSFidCutMaxEta->SetAt(0.9,0); - + fCTSFidCutMaxEta->SetAt( 0.9,0); + fCTSFidCutMinPhi = new TArrayF(1); - fCTSFidCutMinPhi->SetAt(0,0); + fCTSFidCutMinPhi->SetAt(0. ,0); fCTSFidCutMaxPhi = new TArrayF(1); fCTSFidCutMaxPhi->SetAt(360.,0); - + fEMCALFidCutMinEta = new TArrayF(1); fEMCALFidCutMinEta->SetAt(-0.7,0); fEMCALFidCutMaxEta = new TArrayF(1); - fEMCALFidCutMaxEta->SetAt(0.7,0); - + fEMCALFidCutMaxEta->SetAt( 0.7,0); + fEMCALFidCutMinPhi = new TArrayF(1); fEMCALFidCutMinPhi->SetAt(80.,0); fEMCALFidCutMaxPhi = new TArrayF(1); - fEMCALFidCutMaxPhi->SetAt(190.,0); - + fEMCALFidCutMaxPhi->SetAt(187.,0); + fPHOSFidCutMinEta = new TArrayF(1); fPHOSFidCutMinEta->SetAt(-0.13,0); fPHOSFidCutMaxEta = new TArrayF(1); - fPHOSFidCutMaxEta->SetAt(0.13,0); - + fPHOSFidCutMaxEta->SetAt( 0.13,0); + fPHOSFidCutMinPhi = new TArrayF(1); - fPHOSFidCutMinPhi->SetAt(220.,0); + fPHOSFidCutMinPhi->SetAt(260.,0); fPHOSFidCutMaxPhi = new TArrayF(1); fPHOSFidCutMaxPhi->SetAt(320.,0); - + } //________________________________________________________________ void AliFiducialCut::Print(const Option_t * opt) const { - + //Print some relevant parameters set for the analysis if(! opt) return; - + printf("***** Print: %s %s ******\n", GetName(), GetTitle() ) ; - - if(fCTSFiducialCut){ + + if(fCTSFiducialCut) + { Int_t netaregions = fCTSFidCutMaxEta->GetSize(); Int_t nphiregions = fCTSFidCutMaxPhi->GetSize(); printf(">> CTS Fiducial regions : phi %d eta %d\n", netaregions, nphiregions) ; @@ -250,8 +215,9 @@ void AliFiducialCut::Print(const Option_t * opt) const printf(" region %d : %3.1f < phi < %3.1f\n", iphi, fCTSFidCutMinPhi->GetAt(iphi), fCTSFidCutMaxPhi->GetAt(iphi)) ; } else printf(">>No fiducial cuts in CTS\n"); - - if(fEMCALFiducialCut){ + + if(fEMCALFiducialCut) + { Int_t netaregions = fEMCALFidCutMaxEta->GetSize(); Int_t nphiregions = fEMCALFidCutMaxPhi->GetSize(); printf(">>EMCAL Fiducial regions : phi %d eta %d\n", netaregions, nphiregions) ; @@ -261,8 +227,9 @@ void AliFiducialCut::Print(const Option_t * opt) const printf(" region %d : %3.1f < phi < %3.1f\n", iphi, fEMCALFidCutMinPhi->GetAt(iphi), fEMCALFidCutMaxPhi->GetAt(iphi)) ; } else printf(">>No fiducial cuts in EMCAL\n"); - - if(fPHOSFiducialCut){ + + if(fPHOSFiducialCut) + { Int_t netaregions = fPHOSFidCutMaxEta->GetSize(); Int_t nphiregions = fPHOSFidCutMaxPhi->GetSize(); printf(">>PHOS Fiducial regions : phi %d eta %d\n", netaregions, nphiregions) ; @@ -273,57 +240,64 @@ void AliFiducialCut::Print(const Option_t * opt) const } else printf(">>No fiducial cuts in PHOS\n"); printf(" \n") ; + } - //_______________________________________________________________ -void AliFiducialCut::SetSimpleCTSFiducialCut(const Float_t eta, const Float_t minphi, const Float_t maxphi){ - +void AliFiducialCut::SetSimpleCTSFiducialCut(const Float_t eta, + const Float_t minphi, + const Float_t maxphi) +{ + //Method to set simple acceptance cut to CTS + fCTSFidCutMinEta->Set(1); fCTSFidCutMaxEta->Set(1); fCTSFidCutMinPhi->Set(1); fCTSFidCutMaxPhi->Set(1); - + fCTSFidCutMinEta->SetAt(-eta,0); - fCTSFidCutMaxEta->SetAt(eta,0); + fCTSFidCutMaxEta->SetAt( eta,0); fCTSFidCutMinPhi->SetAt(minphi,0); fCTSFidCutMaxPhi->SetAt(maxphi,0); - - + } - -//_______________________________________________________________ -void AliFiducialCut::SetSimpleEMCALFiducialCut(const Float_t eta, const Float_t minphi, const Float_t maxphi){ +//__________________________________________________________________ +void AliFiducialCut::SetSimpleEMCALFiducialCut(const Float_t eta, + const Float_t minphi, + const Float_t maxphi) +{ //Method to set simple acceptance cut to EMCAL - + fEMCALFidCutMinEta->Set(1); fEMCALFidCutMaxEta->Set(1); fEMCALFidCutMinPhi->Set(1); fEMCALFidCutMaxPhi->Set(1); - + fEMCALFidCutMinEta->SetAt(-eta,0); - fEMCALFidCutMaxEta->SetAt(eta,0); + fEMCALFidCutMaxEta->SetAt( eta,0); fEMCALFidCutMinPhi->SetAt(minphi,0); fEMCALFidCutMaxPhi->SetAt(maxphi,0); - - + + } -//_______________________________________________________________ -void AliFiducialCut::SetSimplePHOSFiducialCut(const Float_t eta, const Float_t minphi, const Float_t maxphi){ - +//_________________________________________________________________ +void AliFiducialCut::SetSimplePHOSFiducialCut(const Float_t eta, + const Float_t minphi, + const Float_t maxphi) +{ //Method to set simple acceptance cut to PHOS + fPHOSFidCutMinEta->Set(1); fPHOSFidCutMaxEta->Set(1); fPHOSFidCutMinPhi->Set(1); fPHOSFidCutMaxPhi->Set(1); - + fPHOSFidCutMinEta->SetAt(-eta,0); fPHOSFidCutMaxEta->SetAt(eta,0); fPHOSFidCutMinPhi->SetAt(minphi,0); fPHOSFidCutMaxPhi->SetAt(maxphi,0); - - + } diff --git a/PWG/CaloTrackCorrBase/AliFiducialCut.h b/PWG/CaloTrackCorrBase/AliFiducialCut.h index a9e7745b3ec..5bd1f5cf4ae 100755 --- a/PWG/CaloTrackCorrBase/AliFiducialCut.h +++ b/PWG/CaloTrackCorrBase/AliFiducialCut.h @@ -2,7 +2,6 @@ #define ALIFIDUCIALCUT_H /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * * See cxx source for full Copyright notice */ -/* $Id: $ */ //_________________________________________________________________________ // Class for track/cluster acceptance selection @@ -20,8 +19,6 @@ class TString ; class TLorentzVector ; -//--- AliRoot system --- - class AliFiducialCut : public TObject { @@ -37,20 +34,19 @@ public: Bool_t IsInFiducialCut (const TLorentzVector lv, const TString det) const ; - void DoCTSFiducialCut (Bool_t b) {fCTSFiducialCut = b ; } - void DoEMCALFiducialCut(Bool_t b) {fEMCALFiducialCut = b ; } - void DoPHOSFiducialCut (Bool_t b) {fPHOSFiducialCut = b ; } + void DoCTSFiducialCut (Bool_t b) { fCTSFiducialCut = b ; } + void DoEMCALFiducialCut(Bool_t b) { fEMCALFiducialCut = b ; } + void DoPHOSFiducialCut (Bool_t b) { fPHOSFiducialCut = b ; } - Bool_t GetCTSFiducialCutStatus() const {return fCTSFiducialCut ; } - Bool_t GetEMCALFiducialCut() const {return fEMCALFiducialCut ; } - Bool_t GetPHOSFiducialCutStatus() const {return fPHOSFiducialCut ; } + Bool_t GetCTSFiducialCutStatus() const { return fCTSFiducialCut ; } + Bool_t GetEMCALFiducialCut() const { return fEMCALFiducialCut ; } + Bool_t GetPHOSFiducialCutStatus() const { return fPHOSFiducialCut ; } void SetSimpleCTSFiducialCut (const Float_t abseta, const Float_t phimin, const Float_t phimax) ; void SetSimpleEMCALFiducialCut(const Float_t abseta, const Float_t phimin, const Float_t phimax) ; void SetSimplePHOSFiducialCut (const Float_t abseta, const Float_t phimin, const Float_t phimax) ; void Print(const Option_t * opt)const; - void AddCTSFidCutMaxEtaArray(Int_t size, Float_t* array) { fCTSFidCutMaxEta->Set(size,array) ; } @@ -100,12 +96,12 @@ public: { fPHOSFidCutMinPhi->Set(size,array) ; } TArrayF * GetPHOSFidCutMinPhiArray() const { return fPHOSFidCutMinPhi ; } -protected: +private: //Detector acceptance cuts Bool_t fEMCALFiducialCut ; // Apply fiducial cuts to EMCAL clusters - Bool_t fPHOSFiducialCut ; // Apply fiducial cuts to PHOS clusters - Bool_t fCTSFiducialCut ; // Apply fiducial cuts to CTS tracks + Bool_t fPHOSFiducialCut ; // Apply fiducial cuts to PHOS clusters + Bool_t fCTSFiducialCut ; // Apply fiducial cuts to CTS tracks TArrayF * fCTSFidCutMinEta ; // Take particles in CTS with eta > fCTSFidCutMinEta TArrayF * fCTSFidCutMinPhi ; // Take particles in CTS with phi > fCTSFidCutMinPhi @@ -122,8 +118,8 @@ protected: TArrayF * fPHOSFidCutMaxEta ; // Take particles in PHOS with eta < fPHOSFidCutMaxEta TArrayF * fPHOSFidCutMaxPhi ; // Take particles in PHOS with phi > fPHOSFidCutMaxPhi - AliFiducialCut(const AliFiducialCut & g) ; // cpy ctor - AliFiducialCut & operator = (const AliFiducialCut & g) ;// cpy assignment + AliFiducialCut( const AliFiducialCut & g) ; // cpy ctor + AliFiducialCut & operator = (const AliFiducialCut & g) ; // cpy assignment ClassDef(AliFiducialCut,1) diff --git a/PWG/CaloTrackCorrBase/AliIsolationCut.cxx b/PWG/CaloTrackCorrBase/AliIsolationCut.cxx index a46fb9c67c7..502ab179186 100755 --- a/PWG/CaloTrackCorrBase/AliIsolationCut.cxx +++ b/PWG/CaloTrackCorrBase/AliIsolationCut.cxx @@ -12,7 +12,6 @@ * about the suitability of this software for any purpose. It is * * provided "as is" without express or implied warranty. * **************************************************************************/ -/* $Id: $ */ //_________________________________________________________________________ // Class containing methods for the isolation cut. @@ -53,7 +52,6 @@ fSumPtThreshold(0.), fPtFraction(0.), fICMethod(0), fPartInCone(0) - { //default ctor @@ -109,10 +107,10 @@ void AliIsolationCut::MakeIsolationCut(const TObjArray * plCTS, const Bool_t bFillAOD, AliAODPWG4ParticleCorrelation *pCandidate, const TString & aodArrayRefName, - Int_t & n, - Int_t & nfrac, - Float_t &coneptsum, - Bool_t &isolated) const + Int_t & n, + Int_t & nfrac, + Float_t & coneptsum, + Bool_t & isolated) const { //Search in cone around a candidate particle if it is isolated Float_t phiC = pCandidate->Phi() ; @@ -136,32 +134,42 @@ void AliIsolationCut::MakeIsolationCut(const TObjArray * plCTS, Int_t nclusterrefs = 0; //Check charged particles in cone. - if(plCTS && (fPartInCone==kOnlyCharged || fPartInCone==kNeutralAndCharged)){ + if(plCTS && + (fPartInCone==kOnlyCharged || fPartInCone==kNeutralAndCharged)) + { TVector3 p3; - for(Int_t ipr = 0;ipr < plCTS->GetEntries() ; ipr ++ ){ + for(Int_t ipr = 0;ipr < plCTS->GetEntries() ; ipr ++ ) + { + AliAODTrack* track = (AliAODTrack *)(plCTS->At(ipr)) ; + //Do not count the candidate (pion, conversion photon) or the daughters of the candidate - if(track->GetID() == pCandidate->GetTrackLabel(0) || track->GetID() == pCandidate->GetTrackLabel(1) - || track->GetID() == pCandidate->GetTrackLabel(2) || track->GetID() == pCandidate->GetTrackLabel(3) - ) continue ; + if(track->GetID() == pCandidate->GetTrackLabel(0) || track->GetID() == pCandidate->GetTrackLabel(1) || + track->GetID() == pCandidate->GetTrackLabel(2) || track->GetID() == pCandidate->GetTrackLabel(3) ) continue ; + p3.SetXYZ(track->Px(),track->Py(),track->Pz()); pt = p3.Pt(); eta = p3.Eta(); phi = p3.Phi() ; if(phi<0) phi+=TMath::TwoPi(); - //only loop the particle at the same side of candidate + // Only loop the particle at the same side of candidate if(TMath::Abs(phi-phiC)>TMath::PiOver2()) continue ; - //if at the same side has particle larger than candidate, then candidate can not be the leading, skip such events - if(pt > ptC){ + + // If at the same side has particle larger than candidate, + // then candidate can not be the leading, skip such events + if(pt > ptC) + { n = -1; nfrac = -1; coneptsum = -1; isolated = kFALSE; - if(bFillAOD && reftracks) { + if(bFillAOD && reftracks) + { reftracks->Clear(); delete reftracks; } + return ; } @@ -169,10 +177,13 @@ void AliIsolationCut::MakeIsolationCut(const TObjArray * plCTS, rad = Radius(etaC, phiC, eta, phi); - if(rad < fConeSize){ - if(bFillAOD) { + if(rad < fConeSize) + { + if(bFillAOD) + { ntrackrefs++; - if(ntrackrefs == 1){ + if(ntrackrefs == 1) + { reftracks = new TObjArray(0); //reftracks->SetName(Form("Tracks%s",aodArrayRefName.Data())); TString tempo(aodArrayRefName) ; @@ -182,31 +193,35 @@ void AliIsolationCut::MakeIsolationCut(const TObjArray * plCTS, } reftracks->Add(track); } + //printf("charged in isolation cone pt %f, phi %f, eta %f, R %f \n",pt,phi,eta,rad); coneptsum+=pt; if(pt > fPtThreshold ) n++; if(pt > fPtFraction*ptC ) nfrac++; + } // Inside cone }// charged particle loop }//Tracks //Check neutral particles in cone. - if(plNe && (fPartInCone==kOnlyNeutral || fPartInCone==kNeutralAndCharged)){ - - + if(plNe && + (fPartInCone==kOnlyNeutral || fPartInCone==kNeutralAndCharged)) + { TLorentzVector mom ; - for(Int_t ipr = 0;ipr < plNe->GetEntries() ; ipr ++ ){ + + for(Int_t ipr = 0;ipr < plNe->GetEntries() ; ipr ++ ) + { AliVCluster * calo = (AliVCluster *)(plNe->At(ipr)) ; //Get the index where the cluster comes, to retrieve the corresponding vertex Int_t evtIndex = 0 ; - if (reader->GetMixedEvent()) { + if (reader->GetMixedEvent()) evtIndex=reader->GetMixedEvent()->EventIndexForCaloCluster(calo->GetID()) ; - } + //Do not count the candidate (photon or pi0) or the daughters of the candidate if(calo->GetID() == pCandidate->GetCaloLabel(0) || - calo->GetID() == pCandidate->GetCaloLabel(1)) continue ; + calo->GetID() == pCandidate->GetCaloLabel(1) ) continue ; //Skip matched clusters with tracks if( pid->IsTrackMatched(calo,reader->GetCaloUtils(),reader->GetInputEvent()) ) continue ; @@ -218,22 +233,29 @@ void AliIsolationCut::MakeIsolationCut(const TObjArray * plCTS, eta = mom.Eta(); phi = mom.Phi() ; if(phi<0) phi+=TMath::TwoPi(); - //only loop the particle at the same side of candidate - //if at the same side has particle larger than candidate, then candidate can not be the leading, skip such events + // Only loop the particle at the same side of candidate if(TMath::Abs(phi-phiC)>TMath::PiOver2()) continue ; - if(pt > ptC){ + // If at the same side has particle larger than candidate, + // then candidate can not be the leading, skip such events + if(pt > ptC) + { n = -1; nfrac = -1; coneptsum = -1; isolated = kFALSE; - if(bFillAOD){ - if(reftracks){ + + if(bFillAOD) + { + if(reftracks) + { reftracks ->Clear(); delete reftracks; } - if(refclusters){ + + if(refclusters) + { refclusters->Clear(); delete refclusters; } @@ -245,10 +267,13 @@ void AliIsolationCut::MakeIsolationCut(const TObjArray * plCTS, rad = Radius(etaC, phiC, eta, phi); - if(rad < fConeSize){ - if(bFillAOD) { + if(rad < fConeSize) + { + if(bFillAOD) + { nclusterrefs++; - if(nclusterrefs==1){ + if(nclusterrefs==1) + { refclusters = new TObjArray(0); //refclusters->SetName(Form("Clusters%s",aodArrayRefName.Data())); TString tempo(aodArrayRefName) ; @@ -258,39 +283,51 @@ void AliIsolationCut::MakeIsolationCut(const TObjArray * plCTS, } refclusters->Add(calo); } + //printf("neutral in isolation cone pt %f, phi %f, eta %f, R %f \n",pt,phi,eta,rad); coneptsum+=pt; - if(pt > fPtThreshold ) n++; + if(pt > fPtThreshold ) n++; //if fPtFraction*ptCfPtThreshold) nfrac++ ; } - else { + else + { if(pt>fPtFraction*ptC) nfrac++; } + }//in cone + }// neutral particle loop + }//neutrals //printf("Isolation Cut: in cone with: pT>pTthres %d, pT > pTfrac*pTcandidate %d \n",n,nfrac); //Add reference arrays to AOD when filling AODs only - if(bFillAOD) { + if(bFillAOD) + { if(refclusters) pCandidate->AddObjArray(refclusters); if(reftracks) pCandidate->AddObjArray(reftracks); } - //Check isolation, depending on method. - if( fICMethod == kPtThresIC){ + + //Check isolation, depending on selected isolation criteria + if( fICMethod == kPtThresIC) + { if(n==0) isolated = kTRUE ; } - else if( fICMethod == kSumPtIC){ + else if( fICMethod == kSumPtIC) + { if(coneptsum < fSumPtThreshold) isolated = kTRUE ; } - else if( fICMethod == kPtFracIC){ + else if( fICMethod == kPtFracIC) + { if(nfrac==0) isolated = kTRUE ; } - else if( fICMethod == kSumPtFracIC){ + else if( fICMethod == kSumPtFracIC) + { //when the fPtFraction*ptC < fSumPtThreshold then consider the later case if(fPtFraction*ptC < fSumPtThreshold && coneptsum < fSumPtThreshold) isolated = kTRUE ; if(fPtFraction*ptC > fSumPtThreshold && coneptsum < fPtFraction*ptC) isolated = kTRUE ; diff --git a/PWG/CaloTrackCorrBase/AliIsolationCut.h b/PWG/CaloTrackCorrBase/AliIsolationCut.h index 348dfa66a1b..0fc53a18f75 100755 --- a/PWG/CaloTrackCorrBase/AliIsolationCut.h +++ b/PWG/CaloTrackCorrBase/AliIsolationCut.h @@ -2,7 +2,6 @@ #define ALIISOLATIONCUT_H /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * * See cxx source for full Copyright notice */ -/* $Id: */ //_________________________________________________________________________ // Class containing methods for the isolation cut. @@ -10,11 +9,9 @@ // is passed. Look in a cone around the candidate and study // the hadronic activity inside to decide if the candidate is isolated // -// -// // -- Author: Gustavo Conesa (INFN-LNF) - -//-Yaxian Mao (add the possibility for different IC method with different pt range, 01/10/2010) +// +// -- Yaxian Mao (add the possibility for different IC method with different pt range, 01/10/2010) // --- ROOT system --- #include @@ -24,6 +21,7 @@ class TObjArray ; class AliAODPWG4ParticleCorrelation ; class AliCaloTrackReader ; class AliCaloPID; + class AliIsolationCut : public TObject { public: @@ -83,7 +81,7 @@ class AliIsolationCut : public TObject { Int_t fPartInCone; // Type of particles inside cone: // kNeutralAndCharged, kOnlyNeutral, kOnlyCharged - AliIsolationCut(const AliIsolationCut & g) ; // cpy ctor + AliIsolationCut( const AliIsolationCut & g) ; // cpy ctor AliIsolationCut & operator = (const AliIsolationCut & g) ; // cpy assignment ClassDef(AliIsolationCut,4) diff --git a/PWG/CaloTrackCorrBase/AliNeutralMesonSelection.cxx b/PWG/CaloTrackCorrBase/AliNeutralMesonSelection.cxx index 44cbc837a05..0af02ccaf3e 100755 --- a/PWG/CaloTrackCorrBase/AliNeutralMesonSelection.cxx +++ b/PWG/CaloTrackCorrBase/AliNeutralMesonSelection.cxx @@ -12,7 +12,6 @@ * about the suitability of this software for any purpose. It is * * provided "as is" without express or implied warranty. * **************************************************************************/ -/* $Id: AliNeutralMesonSelection.cxx 27413 2008-07-18 13:28:12Z gconesab $ */ //_________________________________________________________________________ // Class that contains methods to select candidate pairs to neutral meson @@ -31,7 +30,7 @@ ClassImp(AliNeutralMesonSelection) -//____________________________________________________________________________ +//______________________________________________________ AliNeutralMesonSelection::AliNeutralMesonSelection() : TObject(), fAsymmetryCut(1), fUseAsymmetryCut(0), fM(0), fInvMassMaxCut(0.), fInvMassMinCut(0.), fInvMassMaxCutParam(), @@ -50,7 +49,7 @@ ClassImp(AliNeutralMesonSelection) InitParameters(); } -//________________________________________________________________________ +//_________________________________________________________ TList * AliNeutralMesonSelection::GetCreateOutputObjects() { // Create histograms to be saved in output file and @@ -163,7 +162,7 @@ TList * AliNeutralMesonSelection::GetCreateOutputObjects() } -//____________________________________________________________________________ +//_____________________________________________ void AliNeutralMesonSelection::InitParameters() { @@ -184,8 +183,9 @@ void AliNeutralMesonSelection::InitParameters() } -//__________________________________________________________________________- -Bool_t AliNeutralMesonSelection::IsAngleInWindow(const Float_t angle,const Float_t e) const +//_____________________________________________________________________ +Bool_t AliNeutralMesonSelection::IsAngleInWindow(const Float_t angle, + const Float_t e) const { // Check if the opening angle of the candidate pairs is inside @@ -204,8 +204,10 @@ Bool_t AliNeutralMesonSelection::IsAngleInWindow(const Float_t angle,const Float } -//____________________________________________________________________________ -Bool_t AliNeutralMesonSelection::SelectPair(TLorentzVector gammai, TLorentzVector gammaj, TString calo) +//_________________________________________________________________ +Bool_t AliNeutralMesonSelection::SelectPair(TLorentzVector gammai, + TLorentzVector gammaj, + TString calo) { //Search for the neutral pion within selection cuts @@ -214,22 +216,27 @@ Bool_t AliNeutralMesonSelection::SelectPair(TLorentzVector gammai, TLorentzVect Double_t phi = (gammai+gammaj).Phi(); if(phi < 0) phi+=TMath::TwoPi(); + Double_t invmass = (gammai+gammaj).M(); Double_t angle = gammaj.Angle(gammai.Vect()); Double_t e = (gammai+gammaj).E(); Double_t asy = TMath::Abs((gammai-gammaj).E())/(gammai+gammaj).E(); //Fill histograms with no cuts applied. - if(fKeepNeutralMesonHistos){ + if(fKeepNeutralMesonHistos) + { fhAnglePairNoCut ->Fill(e,angle); fhInvMassPairNoCut->Fill(e,invmass); fhAsymmetryNoCut ->Fill(e,asy); } //Cut on the aperture of the pair - if(fUseAngleCut){ - if(IsAngleInWindow(angle,e)){ - if(fKeepNeutralMesonHistos ){ + if(fUseAngleCut) + { + if(IsAngleInWindow(angle,e)) + { + if(fKeepNeutralMesonHistos ) + { fhAnglePairOpeningAngleCut ->Fill(e,angle); fhInvMassPairOpeningAngleCut->Fill(e,invmass); fhAsymmetryOpeningAngleCut ->Fill(e,asy); @@ -239,9 +246,12 @@ Bool_t AliNeutralMesonSelection::SelectPair(TLorentzVector gammai, TLorentzVect } // Asymmetry cut - if(fUseAsymmetryCut){ - if(fAsymmetryCut > asy){ - if(fKeepNeutralMesonHistos){ + if(fUseAsymmetryCut) + { + if(fAsymmetryCut > asy) + { + if(fKeepNeutralMesonHistos) + { fhInvMassPairAsymmetryCut->Fill(e,invmass); fhAnglePairAsymmetryCut ->Fill(e,angle); } @@ -252,15 +262,18 @@ Bool_t AliNeutralMesonSelection::SelectPair(TLorentzVector gammai, TLorentzVect //Cut on the invariant mass of the pair Float_t invmassmaxcut = fInvMassMaxCut; - if(calo=="EMCAL" && e > 6.){ // for EMCAL, pi0s, mass depends strongly with energy for e > 6, loose max cut + if(calo=="EMCAL" && e > 6.) + { // for EMCAL, pi0s, mass depends strongly with energy for e > 6, loose max cut invmassmaxcut = (fInvMassMaxCutParam[0]+fInvMassMaxCut)+fInvMassMaxCutParam[1]*e+fInvMassMaxCutParam[2]*e*e; //printf("e %f, max cut %f, p00 %f,p0 %f,p1 %f,p2 %f\n", // e,invmassmaxcut,fInvMassMaxCut,fInvMassMaxCutParam[0],fInvMassMaxCutParam[1],fInvMassMaxCutParam[2]); } - if((invmass > fInvMassMinCut) && (invmass < invmassmaxcut)){ - if(fKeepNeutralMesonHistos){ + if( (invmass > fInvMassMinCut) && (invmass < invmassmaxcut) ) + { + if(fKeepNeutralMesonHistos) + { fhInvMassPairAllCut->Fill(e,invmass); fhAnglePairAllCut ->Fill(e,angle); fhAsymmetryAllCut ->Fill(e,asy); @@ -270,57 +283,60 @@ Bool_t AliNeutralMesonSelection::SelectPair(TLorentzVector gammai, TLorentzVect return kTRUE; }//(invmass>0.125) && (invmass<0.145) - else return kFALSE; + else + return kFALSE; } -//____________________________________________________________________________ -void AliNeutralMesonSelection::SetParticle(TString particleName){ +//_______________________________________________________________ +void AliNeutralMesonSelection::SetParticle(TString particleName) +{ // Set some default parameters for selection of pi0 or eta - if(particleName=="Pi0"){ + if(particleName=="Pi0") + { + fHistoNIMBins = 150 ; + fHistoIMMax = 0.3 ; + fHistoIMMin = 0. ; - fM = 0.135 ; // GeV - fInvMassMaxCut = 0.16 ; // GeV - fInvMassMinCut = 0.11 ; // GeV + fM = 0.135 ; // GeV + fInvMassMaxCut = 0.16 ; // GeV + fInvMassMinCut = 0.11 ; // GeV fInvMassMaxCutParam[0] = 0.0 ; fInvMassMaxCutParam[1] =-7.e-5 ; fInvMassMaxCutParam[2] = 8.e-5 ; - fShiftMinAngle[0] =-0.03 ; - fShiftMinAngle[1] = 0.0025; + fShiftMinAngle[0] =-0.03 ; + fShiftMinAngle[1] = 0.0025; fAngleMaxParam.AddAt( 0.8, 0) ; fAngleMaxParam.AddAt(-1, 1) ; fAngleMaxParam.AddAt( 0.09, 2) ; //for pi0 shift, for eta maybe 0.09 fAngleMaxParam.AddAt(-2.e-3,3) ; - - fHistoNIMBins = 150 ; - fHistoIMMax = 0.3 ; - fHistoIMMin = 0. ; - - }else if(particleName=="Eta"){ - fM = 0.547 ; // GeV - fInvMassMaxCut = 0.590 ; // GeV - fInvMassMinCut = 0.510 ; // GeV + } + else if(particleName=="Eta") + { + fHistoNIMBins = 200 ; // GeV + fHistoIMMax = 0.75 ; // GeV + fHistoIMMin = 0.35 ; // GeV + + fM = 0.547 ; // GeV + fInvMassMaxCut = 0.590 ; // GeV + fInvMassMinCut = 0.510 ; // GeV fInvMassMaxCutParam[0] = 0.0 ; fInvMassMaxCutParam[1] = 0.0 ; fInvMassMaxCutParam[2] = 0.0 ; - fShiftMinAngle[0] =-0.03 ; - fShiftMinAngle[0] = 0.00 ; + fShiftMinAngle[0] =-0.03 ; + fShiftMinAngle[0] = 0.00 ; fAngleMaxParam.AddAt( 0.80, 0) ; // Same as pi0 fAngleMaxParam.AddAt(-0.25, 1) ; // Same as pi0 fAngleMaxParam.AddAt( 0.12, 2) ; // Shifted with respect to pi0 fAngleMaxParam.AddAt(-5.e-4, 3) ; // Same as pi0 - - fHistoNIMBins = 200 ; // GeV - fHistoIMMax = 0.75 ; // GeV - fHistoIMMin = 0.35 ; // GeV } else @@ -329,7 +345,7 @@ void AliNeutralMesonSelection::SetParticle(TString particleName){ } -//__________________________________________________________________ +//______________________________________________________________ void AliNeutralMesonSelection::Print(const Option_t * opt) const { diff --git a/PWG/CaloTrackCorrBase/AliNeutralMesonSelection.h b/PWG/CaloTrackCorrBase/AliNeutralMesonSelection.h index 80795bd40fd..44cc0fc3695 100755 --- a/PWG/CaloTrackCorrBase/AliNeutralMesonSelection.h +++ b/PWG/CaloTrackCorrBase/AliNeutralMesonSelection.h @@ -2,7 +2,6 @@ #define ALINEUTRALMESONSELECTION_H /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * * See cxx source for full Copyright notice */ -/* $Id: AliNeutralMesonSelection.h 27413 2008-07-18 13:28:12Z gconesab $ */ //_________________________________________________________________________ // Class that contains methods to select candidate pairs to neutral meson @@ -156,7 +155,7 @@ class AliNeutralMesonSelection : public TObject { Float_t fHistoIMMax ; // Maximum value of Invariant Mass histogram range Float_t fHistoIMMin ; // Minimum value of Invariant Mass histogram range - AliNeutralMesonSelection(const AliNeutralMesonSelection & g) ; // cpy ctor + AliNeutralMesonSelection( const AliNeutralMesonSelection & g) ; // cpy ctor AliNeutralMesonSelection & operator = (const AliNeutralMesonSelection & g) ; // cpy assignment ClassDef(AliNeutralMesonSelection,6) -- 2.39.3