From 0206ddfbd72b9ea691384e0645e541f665ee5fdc Mon Sep 17 00:00:00 2001 From: hristov Date: Tue, 15 Nov 2005 21:30:27 +0000 Subject: [PATCH] Coding conventions --- ANALYSIS/AliAODPairBaseCut.cxx | 28 ++++++++++++ ANALYSIS/AliAODPairBaseCut.h | 34 ++++++++++++--- ANALYSIS/AliAODPairCut.cxx | 8 ++-- ANALYSIS/AliAODPairCut.h | 1 + ANALYSIS/AliAODParticle.h | 4 +- ANALYSIS/AliAODv0.cxx | 13 +++--- ANALYSIS/AliAODv0.h | 2 - ANALYSIS/AliClusterMap.cxx | 19 +++----- ANALYSIS/AliClusterMap.h | 9 ++-- ANALYSIS/AliEventCut.cxx | 14 +++--- ANALYSIS/AliEventCut.h | 6 +-- ANALYSIS/AliFlowAnalysis.cxx | 18 ++------ ANALYSIS/AliFlowAnalysis.h | 11 ++--- ANALYSIS/AliReaderESD.cxx | 35 +++++---------- ANALYSIS/AliReaderESDTree.cxx | 11 ++--- ANALYSIS/AliReaderESDTree.h | 12 ++--- ANALYSIS/AliRunAnalysis.cxx | 36 +++------------ ANALYSIS/AliRunAnalysis.h | 11 ++--- ANALYSIS/AliTrackPoints.cxx | 80 +++++++++++++++++----------------- ANALYSIS/AliVAODParticle.h | 16 +++---- 20 files changed, 174 insertions(+), 194 deletions(-) diff --git a/ANALYSIS/AliAODPairBaseCut.cxx b/ANALYSIS/AliAODPairBaseCut.cxx index 2516f863ebd..0963581737f 100644 --- a/ANALYSIS/AliAODPairBaseCut.cxx +++ b/ANALYSIS/AliAODPairBaseCut.cxx @@ -1,3 +1,31 @@ +// Base class AliAODPairBaseCut: +// This class defines the range of some property - pure virtual +// Property is coded by AliAODCutTypes type +// Derived classes: +// AliAODQInvCut +// AliAODKtCut +// AliAODKStarCut +// AliAODKStarOutCut +// AliAODKStarSideCut +// AliAODKStarLongCut +// AliAODQSideLCMSCut +// AliAODQOutLCMSCut +// AliAODQLongLCMSCut +// AliAODDeltaECut +// AliAODDeltaPCut +// AliAODDeltaPvectorCut +// AliAODDeltaPhiCut +// AliAODDeltaThetaCut +// AliAODCluterOverlapCut +// AliAODAvSeparationCut +// AliAODSeparationCut +// AliAODITSSeparationCut +// AliAODOutSideSameSignCut +// AliAODOutSideDiffSignCut +// AliAODLogicalOperPairCut +// AliAODOrPairCut +// AliAODAndPairCut +// Author: Piotr.Skowronski@cern.ch #include "AliAODPairBaseCut.h" #include "AliTrackPoints.h" diff --git a/ANALYSIS/AliAODPairBaseCut.h b/ANALYSIS/AliAODPairBaseCut.h index 6680165b1dd..4953c964e3f 100644 --- a/ANALYSIS/AliAODPairBaseCut.h +++ b/ANALYSIS/AliAODPairBaseCut.h @@ -1,15 +1,39 @@ #ifndef ALIAODPAIRBASECUT_H #define ALIAODPAIRBASECUT_H - -#include +// Base class AliAODPairBaseCut: +// This class defines the range of some property - pure virtual +// Property is coded by AliAODCutTypes type +// Derived classes: +// AliAODQInvCut +// AliAODKtCut +// AliAODKStarCut +// AliAODKStarOutCut +// AliAODKStarSideCut +// AliAODKStarLongCut +// AliAODQSideLCMSCut +// AliAODQOutLCMSCut +// AliAODQLongLCMSCut +// AliAODDeltaECut +// AliAODDeltaPCut +// AliAODDeltaPvectorCut +// AliAODDeltaPhiCut +// AliAODDeltaThetaCut +// AliAODCluterOverlapCut +// AliAODAvSeparationCut +// AliAODSeparationCut +// AliAODITSSeparationCut +// AliAODOutSideSameSignCut +// AliAODOutSideDiffSignCut +// AliAODLogicalOperPairCut +// AliAODOrPairCut +// AliAODAndPairCut + +#include #include "AliAODPair.h" class AliAODPairBaseCut: public TObject { - //This class defines the range of some property - pure virtual - //Property is coded by AliAODCutTypes type - public: enum EAODPairCutProperty diff --git a/ANALYSIS/AliAODPairCut.cxx b/ANALYSIS/AliAODPairCut.cxx index 62c2907c2d2..08aa0e69bc2 100644 --- a/ANALYSIS/AliAODPairCut.cxx +++ b/ANALYSIS/AliAODPairCut.cxx @@ -1,18 +1,18 @@ #include "AliAODPairCut.h" /* $Id$ */ -//____________________________________ + ///////////////////////////////////////////////////////////////////////// // // Class AliAODPairCut: -// // implements cut on the pair of particles // more info: http://aliweb.cern.ch/people/skowron/analyzer/index.html // Author: Piotr.Skowronski@cern.ch //------------------------------------------------------------------- + #include "AliAODPair.h" #include "AliAODParticleCut.h" -#include "AliTrackPoints.h" -#include "AliClusterMap.h" +//#include "AliTrackPoints.h" +//#include "AliClusterMap.h" ClassImp(AliAODPairCut) const Int_t AliAODPairCut::fgkMaxCuts = 50; diff --git a/ANALYSIS/AliAODPairCut.h b/ANALYSIS/AliAODPairCut.h index 33c39f745d7..b7c9066d580 100644 --- a/ANALYSIS/AliAODPairCut.h +++ b/ANALYSIS/AliAODPairCut.h @@ -7,6 +7,7 @@ //Class implements cut on the pair of particles // //more info: http://aliweb.cern.ch/people/skowron/analyzer/index.html + #include #include "AliAODPairBaseCut.h" diff --git a/ANALYSIS/AliAODParticle.h b/ANALYSIS/AliAODParticle.h index 8c1a455fb8a..7802056310c 100644 --- a/ANALYSIS/AliAODParticle.h +++ b/ANALYSIS/AliAODParticle.h @@ -17,8 +17,8 @@ ///////////////////////////////////////////////////////////// #include "AliVAODParticle.h" -//#include -//#include +#include +#include #include diff --git a/ANALYSIS/AliAODv0.cxx b/ANALYSIS/AliAODv0.cxx index c10f5e552ec..e153154c235 100644 --- a/ANALYSIS/AliAODv0.cxx +++ b/ANALYSIS/AliAODv0.cxx @@ -15,13 +15,11 @@ //------------------------------------------------------------------------- // Implementation of the Analysis Oriented Data (AOD) V0 vertex class -// // Origin: B.Hippolyte, IReS, hippolyt@in2p3.fr // G.Van Buren, BNL, gene@bnl.gov (original STAR MuDsts) -// // Purpose: Having observables for physics available for V0s //------------------------------------------------------------------------- -#include + #include #include "AliESD.h" @@ -58,10 +56,8 @@ AliAODv0::AliAODv0(AliESDv0* rV0Vertex ,AliESD* rEvent){ this->Fill(rV0Vertex,rEvent); } -// AliAODv0::~AliAODv0(){ -// } - -void AliAODv0::Fill(AliESDv0* rV0Vertex ,AliESD* rEvent){// Filling method +void AliAODv0::Fill(AliESDv0* rV0Vertex ,AliESD* rEvent){ + // Fills the data memebers of the AOD fEvent=rEvent; Double_t tDecayVertexV0[3]; rV0Vertex->GetXYZ(tDecayVertexV0[0],tDecayVertexV0[1],tDecayVertexV0[2]); fDecayVertexV0X = tDecayVertexV0[0]; @@ -102,7 +98,8 @@ void AliAODv0::Fill(AliESDv0* rV0Vertex ,AliESD* rEvent){// Filling method fDcaNegToPrimVertex = TMath::Sqrt(tDcaNegToPrimVertex[0]*tDcaNegToPrimVertex[0]+tDcaNegToPrimVertex[1]*tDcaPosToPrimVertex[1]); } -void AliAODv0::ResetV0(){// Reset method +void AliAODv0::ResetV0(){ + // Sets the default values of the AOD data members fDecayVertexV0X = 999; fDecayVertexV0Y = 999; fDecayVertexV0Z = 999; diff --git a/ANALYSIS/AliAODv0.h b/ANALYSIS/AliAODv0.h index ec4da59738c..6a0ad43bf0b 100644 --- a/ANALYSIS/AliAODv0.h +++ b/ANALYSIS/AliAODv0.h @@ -6,10 +6,8 @@ //------------------------------------------------------------------------- // Implementation of the Analysis Oriented Data (AOD) V0 vertex class -// // Origin: B.Hippolyte, IReS, hippolyt@in2p3.fr // G.Van Buren, BNL, gene@bnl.gov (original STAR MuDsts) -// // Purpose: Having observables for physics available for V0s //------------------------------------------------------------------------- diff --git a/ANALYSIS/AliClusterMap.cxx b/ANALYSIS/AliClusterMap.cxx index 2ff5bac289b..711c1ba75a4 100644 --- a/ANALYSIS/AliClusterMap.cxx +++ b/ANALYSIS/AliClusterMap.cxx @@ -15,15 +15,11 @@ /* $Id$ */ -//_________________________________________________ -/////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////// // // class AliClusterMap -// // class that describes cluster occupation at TPC // Each padraw has a corresponding bit in fPadRawMap -// -// // more info: http://aliweb.cern.ch/people/skowron/analyzer/index.html // Piotr.Skowronski@cern.ch // @@ -35,21 +31,20 @@ #include "AliESDtrack.h" #include "AliLog.h" #include "AliTPCtrack.h" -#include "AliVAODParticle.h" -const Int_t AliClusterMap::fNPadRows = 159; +const Int_t AliClusterMap::fgkNPadRows = 159; ClassImp(AliClusterMap) AliClusterMap::AliClusterMap(): - fPadRawMap(fNPadRows) + fPadRawMap(fgkNPadRows) { //ctor } /***********************************************************************/ AliClusterMap::AliClusterMap(AliESDtrack* track): - fPadRawMap( (track)?track->GetTPCClusterMap():fNPadRows ) + fPadRawMap( (track)?track->GetTPCClusterMap():fgkNPadRows ) { //ctor @@ -59,7 +54,7 @@ AliClusterMap::AliClusterMap(AliESDtrack* track): /***********************************************************************/ AliClusterMap::AliClusterMap(AliTPCtrack* track): - fPadRawMap(fNPadRows) + fPadRawMap(fgkNPadRows) { //ctor @@ -117,7 +112,7 @@ void AliClusterMap::Print() const { //Prints the bit map TString msg; - for ( Int_t i = 0; i < fNPadRows; i++) + for ( Int_t i = 0; i < fgkNPadRows; i++) { if ( fPadRawMap.TestBitNumber(i) ) { @@ -147,7 +142,7 @@ Float_t AliClusterMap::GetOverlapFactor(const AliClusterMap& clmap) const Int_t nh = 0; Int_t an = 0; - for ( Int_t i = 0; i < fNPadRows; i++) + for ( Int_t i = 0; i < fgkNPadRows; i++) { Bool_t x = HasClAtPadRow(i); Bool_t y = clmap.HasClAtPadRow(i); diff --git a/ANALYSIS/AliClusterMap.h b/ANALYSIS/AliClusterMap.h index 6e49ff2e551..e382b46f6e3 100644 --- a/ANALYSIS/AliClusterMap.h +++ b/ANALYSIS/AliClusterMap.h @@ -1,14 +1,11 @@ #ifndef ALICLUSTERMAP_H #define ALICLUSTERMAP_H -//_________________________________________________ -/////////////////////////////////////////////////// + +/////////////////////////////////////////////////////////////////////////// // // class AliClusterMap -// // class that describes cluster occupation at TPC // Each padraw has a corresponding bit in fPadRawMap -// -// // more info: http://aliweb.cern.ch/people/skowron/analyzer/index.html // Piotr.Skowronski@cern.ch // @@ -36,7 +33,7 @@ class AliClusterMap: public TObject protected: private: TBits fPadRawMap;//bit vector of length 150 correspondind to total number of padraws in TPC - static const Int_t fNPadRows; + static const Int_t fgkNPadRows; // Number of pad rows ClassDef(AliClusterMap,1) }; diff --git a/ANALYSIS/AliEventCut.cxx b/ANALYSIS/AliEventCut.cxx index 421c6c7dbd9..447787c06b2 100644 --- a/ANALYSIS/AliEventCut.cxx +++ b/ANALYSIS/AliEventCut.cxx @@ -1,16 +1,16 @@ #include "AliEventCut.h" -//________________________________ + /////////////////////////////////////////////////////////// // -// class AliRunAnalysis -// -// -// +// class AliEventCut // +// Event cut. It has list of base event cuts. +// Each of base event cut checks only one property. +// Logical base cuts also exists that point to other base cuts. +// Using them one can build complicated cut with binary tree structure +// Author: Piotr.Skowronski@cern.ch /////////////////////////////////////////////////////////// -#include - #include "AliEventBaseCut.h" ClassImp(AliEventCut) diff --git a/ANALYSIS/AliEventCut.h b/ANALYSIS/AliEventCut.h index 68473a5b0ae..198fd5b0069 100644 --- a/ANALYSIS/AliEventCut.h +++ b/ANALYSIS/AliEventCut.h @@ -1,6 +1,6 @@ #ifndef ALIEVENTCUT_H #define ALIEVENTCUT_H -//________________________________ + /////////////////////////////////////////////////////////// // // class AliEventCut @@ -9,7 +9,7 @@ // Each of base event cut checks only one property. // Logical base cuts also exists that point to other base cuts. // Using them one can build complicated cut with binary tree structure -// +// Author: Piotr.Skowronski@cern.ch /////////////////////////////////////////////////////////// #include @@ -36,7 +36,7 @@ class AliEventCut: public TObject protected: AliEventBaseCut* FindCut(AliEventBaseCut::EEventCutProperty prop); - TObjArray fBaseCuts; + TObjArray fBaseCuts; // Array of cuts private: ClassDef(AliEventCut,1) }; diff --git a/ANALYSIS/AliFlowAnalysis.cxx b/ANALYSIS/AliFlowAnalysis.cxx index c596cd2d016..e5ddd3cea3e 100644 --- a/ANALYSIS/AliFlowAnalysis.cxx +++ b/ANALYSIS/AliFlowAnalysis.cxx @@ -1,22 +1,12 @@ #include "AliFlowAnalysis.h" -//________________________________ -/////////////////////////////////////////////////////////// -// + +//********************************************************* // class AliFlowAnalysis -// // Flow Analysis -// -// // S.Radomski@gsi.de // Piotr.Skowronski@cern.ch -// -/////////////////////////////////////////////////////////// -/*********************************************************/ - -#include -#include +//********************************************************* -#include #include #include #include @@ -50,7 +40,7 @@ Int_t AliFlowAnalysis::Init() Int_t AliFlowAnalysis::ProcessEvent(AliAOD* aodrec, AliAOD* aodsim) { - + // Process AOD events containing the reconstructed and simulated information Info("ProcessEvent","Sim AOD address %#x",aodsim); Double_t psi = 0, v2 = 0; if (aodrec) diff --git a/ANALYSIS/AliFlowAnalysis.h b/ANALYSIS/AliFlowAnalysis.h index f20dcb3fe14..455cc90a4e2 100644 --- a/ANALYSIS/AliFlowAnalysis.h +++ b/ANALYSIS/AliFlowAnalysis.h @@ -1,17 +1,12 @@ #ifndef ALIFLOWANALYSIS_H #define ALIFLOWANALYSIS_H -//________________________________ -/////////////////////////////////////////////////////////// -// + +//********************************************************* // class AliFlowAnalysis -// // Flow Analysis -// -// // S.Radomski@gsi.de // Piotr.Skowronski@cern.ch -// -/////////////////////////////////////////////////////////// +//********************************************************* #include "AliAnalysis.h" diff --git a/ANALYSIS/AliReaderESD.cxx b/ANALYSIS/AliReaderESD.cxx index 09cf7971f90..8f3756f1803 100644 --- a/ANALYSIS/AliReaderESD.cxx +++ b/ANALYSIS/AliReaderESD.cxx @@ -29,28 +29,17 @@ #include #include #include -#include -#include #include #include #include -#include - -#include "AliAnalysis.h" -#include "AliAODRun.h" #include "AliAOD.h" #include "AliAODParticle.h" -#include "AliAODParticleCut.h" -#include "AliAODRun.h" -#include "AliAnalysis.h" #include "AliClusterMap.h" #include "AliESD.h" #include "AliESDtrack.h" -#include "AliKalmanTrack.h" #include "AliLog.h" #include "AliReaderESD.h" -#include "AliRun.h" #include "AliRunLoader.h" #include "AliStack.h" @@ -243,7 +232,7 @@ Int_t AliReaderESD::ReadESD(AliESD* esd) Int_t AliReaderESD::ReadESDCentral(AliESD* esd) { //****** Tentative particle type "concentrations" - static const Double_t concentr[5]={0.05, 0., 0.85, 0.10, 0.05}; + static const Double_t kConcentr[5]={0.05, 0., 0.85, 0.10, 0.05}; Double_t pidtable[kNSpecies];//array used for reading pid probabilities from ESD track Double_t w[kNSpecies]; @@ -378,14 +367,14 @@ Int_t AliReaderESD::ReadESDCentral(AliESD* esd) //Here we apply Bayes' formula Double_t rc=0.; - for (Int_t s=0; s 4) { @@ -566,7 +555,7 @@ Int_t AliReaderESD::ReadESDCentral(AliESD* esd) /**********************************************************/ Int_t AliReaderESD::ReadESDMuon(AliESD* esd) { - + // Reads the muon tracks from the ESD Double_t vertexpos[3];//vertex position, assuming no secondary decay const AliESDVertex* vertex = esd->GetVertex(); @@ -585,13 +574,13 @@ Int_t AliReaderESD::ReadESDMuon(AliESD* esd) AliDebug(1,Form("Reading Event %d \nFound %d tracks.",fCurrentEvent,nTracks)); // settings - Float_t Chi2Cut = 100.; - Float_t PtCutMin = 1.; - Float_t PtCutMax = 10000.; + Float_t chi2Cut = 100.; + Float_t ptCutMin = 1.; + Float_t ptCutMax = 10000.; Float_t muonMass = 0.105658389; Int_t pdgcode = -13; Double_t thetaX, thetaY, pYZ; - Double_t pxRec1, pyRec1, pzRec1, E1; + Double_t pxRec1, pyRec1, pzRec1, e1; Int_t charge; Int_t ntrackhits; @@ -611,8 +600,8 @@ Int_t AliReaderESD::ReadESDMuon(AliESD* esd) pxRec1 = pzRec1 * TMath::Tan(thetaX); pyRec1 = pzRec1 * TMath::Tan(thetaY); charge = Int_t(TMath::Sign(1.,muonTrack->GetInverseBendingMomentum())); - E1 = TMath::Sqrt(muonMass * muonMass + pxRec1 * pxRec1 + pyRec1 * pyRec1 + pzRec1 * pzRec1); - fV1.SetPxPyPzE(pxRec1, pyRec1, pzRec1, E1); + e1 = TMath::Sqrt(muonMass * muonMass + pxRec1 * pxRec1 + pyRec1 * pyRec1 + pzRec1 * pzRec1); + fV1.SetPxPyPzE(pxRec1, pyRec1, pzRec1, e1); ntrackhits = muonTrack->GetNHit(); fitfmin = muonTrack->GetChi2(); @@ -623,9 +612,9 @@ Int_t AliReaderESD::ReadESDMuon(AliESD* esd) // chi2 per d.o.f. Float_t ch1 = fitfmin / (2.0 * ntrackhits - 5); - if ((ch1 < Chi2Cut) && (pt1 > PtCutMin) && (pt1 < PtCutMax)) { + if ((ch1 < chi2Cut) && (pt1 > ptCutMin) && (pt1 < ptCutMax)) { AliAODParticle* track = new AliAODParticle(pdgcode*charge,1,iTrack, - pxRec1, pyRec1,pzRec1, E1, + pxRec1, pyRec1,pzRec1, e1, vertexpos[0], vertexpos[1], vertexpos[2], 0.); fEventRec->AddParticle(track); } diff --git a/ANALYSIS/AliReaderESDTree.cxx b/ANALYSIS/AliReaderESDTree.cxx index 5fc641180e4..fba42416399 100644 --- a/ANALYSIS/AliReaderESDTree.cxx +++ b/ANALYSIS/AliReaderESDTree.cxx @@ -15,16 +15,11 @@ /* $Id$ */ -//_______________________________________________________________________ -///////////////////////////////////////////////////////////////////////// -// +//*********************************************************************** // class AliReaderESDTree -// // Reader for MUON ESD Tree (only for rec) -// // finck@subatech.in2p3.fr -// -///////////////////////////////////////////////////////////////////////// +//*********************************************************************** #include #include @@ -34,9 +29,9 @@ #include "AliESD.h" #include "AliLog.h" #include "AliReaderESDTree.h" -#include "AliRun.h" #include "AliRunLoader.h" + ClassImp(AliReaderESDTree) AliReaderESDTree::AliReaderESDTree(const Char_t* esdfilename, const Char_t* galfilename): diff --git a/ANALYSIS/AliReaderESDTree.h b/ANALYSIS/AliReaderESDTree.h index 9c55b2bb7ff..3f4ebc2a924 100644 --- a/ANALYSIS/AliReaderESDTree.h +++ b/ANALYSIS/AliReaderESDTree.h @@ -1,17 +1,13 @@ #ifndef AliReaderESDTree_H #define AliReaderESDTree_H -//_______________________________________________________________________ -///////////////////////////////////////////////////////////////////////// -// + +//*********************************************************************** // class AliReaderESDTree -// // Reader for ESD Tree -// // Ch. Finck -// -///////////////////////////////////////////////////////////////////////// +//*********************************************************************** + #include "AliReaderESD.h" -#include class TFile; class TTree; diff --git a/ANALYSIS/AliRunAnalysis.cxx b/ANALYSIS/AliRunAnalysis.cxx index e0e26df92ac..48be0c367d6 100644 --- a/ANALYSIS/AliRunAnalysis.cxx +++ b/ANALYSIS/AliRunAnalysis.cxx @@ -15,39 +15,17 @@ /* $Id$ */ +//******************************************************** +// class AliRunAnalysis * +// Analysis manager * +// Author: Piotr.Skowronski@cern.ch * +//******************************************************** + #include "AliRunAnalysis.h" #include "AliLog.h" - -//________________________________ -/////////////////////////////////////////////////////////// -// -// class AliRunAnalysis -// -// -// -// Piotr.Skowronski@cern.ch -// -/////////////////////////////////////////////////////////// - -#include - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - - +#include "AliAnalysis.h" #include "AliEventCut.h" #include "AliReader.h" -#include "AliVAODParticle.h" ClassImp(AliRunAnalysis) diff --git a/ANALYSIS/AliRunAnalysis.h b/ANALYSIS/AliRunAnalysis.h index 06f78af2231..6ec41a21815 100644 --- a/ANALYSIS/AliRunAnalysis.h +++ b/ANALYSIS/AliRunAnalysis.h @@ -1,24 +1,21 @@ #ifndef ALIRUNANALYSIS_H #define ALIRUNANALYSIS_H -//________________________________ + /////////////////////////////////////////////////////////// // // class AliRunAnalysis -// // Analysis manager -// -// -// Piotr.Skowronski@cern.ch +// Author: Piotr.Skowronski@cern.ch // /////////////////////////////////////////////////////////// #include #include -#include "AliAnalysis.h" class AliEventCut; -class TFile; class AliReader; +class AliAnalysis; +class AliAOD; class AliRunAnalysis: public TTask { diff --git a/ANALYSIS/AliTrackPoints.cxx b/ANALYSIS/AliTrackPoints.cxx index 1a6c6c6b0e6..cd0945a903b 100644 --- a/ANALYSIS/AliTrackPoints.cxx +++ b/ANALYSIS/AliTrackPoints.cxx @@ -15,10 +15,6 @@ /* $Id$ */ -#include "AliTrackPoints.h" -#include "AliLog.h" - -//_________________________________ //////////////////////////////////////////////////////////// // // // class AliTrackPoints // @@ -32,6 +28,9 @@ // // //////////////////////////////////////////////////////////// +#include "AliTrackPoints.h" +#include "AliLog.h" + #include #include #include @@ -41,6 +40,14 @@ #include "AliTrackReference.h" #include "AliITStrackV2.h" +#include "AliRun.h" +#include "AliESD.h" +#include "AliRunLoader.h" +#include "AliTPCtrack.h" +#include "TTree.h" +#include "TBranch.h" +#include "TH2D.h" + ClassImp(AliTrackPoints) Int_t AliTrackPoints::fgDebug = 0; @@ -53,6 +60,7 @@ AliTrackPoints::AliTrackPoints(): { //constructor } + /***************************************************************/ AliTrackPoints::AliTrackPoints(AliTrackPoints::ETypes type, AliESDtrack* track, Float_t mf): @@ -87,6 +95,7 @@ AliTrackPoints::AliTrackPoints(AliTrackPoints::ETypes type, AliESDtrack* track, } } + /***************************************************************/ AliTrackPoints::AliTrackPoints(Int_t n, AliESDtrack* track, Float_t mf, Float_t dr, Float_t r0): @@ -147,6 +156,7 @@ AliTrackPoints::AliTrackPoints(Int_t n, AliESDtrack* track, Float_t mf, Float_t MakePoints(dr,r0,x,par,c,alpha); } + /***************************************************************/ AliTrackPoints::AliTrackPoints(Int_t n, AliTPCtrack* track, Float_t dr, Float_t r0): @@ -184,7 +194,8 @@ AliTrackPoints::AliTrackPoints(Int_t n, AliTPCtrack* track, Float_t dr, Float_t Double_t alpha = track->GetAlpha(); Double_t c=track->GetC(); MakePoints(dr,r0,x,par,c,alpha); -} +} + /***************************************************************/ AliTrackPoints::~AliTrackPoints() @@ -194,6 +205,7 @@ AliTrackPoints::~AliTrackPoints() delete [] fY; delete [] fZ; } + /***************************************************************/ void AliTrackPoints::MakePoints( Float_t dr, Float_t r0, Double_t x, Double_t* par, Double_t c, Double_t alpha) @@ -287,6 +299,7 @@ void AliTrackPoints::MakePoints( Float_t dr, Float_t r0, Double_t x, Double_t* p fX[i],fY[i],fZ[i],rc,TMath::Hypot(fX[i],fY[i]))); } } + /***************************************************************/ void AliTrackPoints::MakeITSPoints(AliESDtrack* track) @@ -295,10 +308,10 @@ void AliTrackPoints::MakeITSPoints(AliESDtrack* track) // z=R*Pz/Pt AliITStrackV2 itstrack(*track,kTRUE); Double_t x,y,z; - static const Double_t r[6] = {4.0, 7.0, 14.9, 23.8, 39.1, 43.6}; + static const Double_t kR[6] = {4.0, 7.0, 14.9, 23.8, 39.1, 43.6}; for (Int_t i = 0; i < 6; i++) { - itstrack.GetGlobalXYZat(r[i],x,y,z); + itstrack.GetGlobalXYZat(kR[i],x,y,z); fX[i] = x; fY[i] = y; fZ[i] = z; @@ -309,40 +322,40 @@ void AliTrackPoints::MakeITSPoints(AliESDtrack* track) } /***************************************************************/ + void AliTrackPoints::MakeITSPointsInnerFromVertexOuterFromTPC(AliESDtrack* track, Float_t mf) { //makes trackpoints for ITS //for 3 inner layers calculates out of the vector at vertex //for 3 outer ---------------//------------------ at inner TPC - static const Double_t r[6] = {4.0, 7.0, 14.9, 23.8, 39.1, 43.6}; + static const Double_t kR[6] = {4.0, 7.0, 14.9, 23.8, 39.1, 43.6}; AliITStrackV2 itstrack(*track,kTRUE); Double_t x,y,z; for (Int_t i = 0; i < 3; i++) { - itstrack.GetGlobalXYZat(r[i],x,y,z); + itstrack.GetGlobalXYZat(kR[i],x,y,z); fX[i] = x; fY[i] = y; fZ[i] = z; AliDebug(3,Form("X %f Y %f Z %f R asked %f R obtained %f", - fX[i],fY[i],fZ[i],r[i],TMath::Hypot(fX[i],fY[i]))); + fX[i],fY[i],fZ[i],kR[i],TMath::Hypot(fX[i],fY[i]))); } for (Int_t i = 3; i < 6; i++) { Float_t ax,ay,az; - AliTrackPoints tmptp(1,track,mf,0,r[i]); + AliTrackPoints tmptp(1,track,mf,0,kR[i]); tmptp.PositionAt(0,ax,ay,az); fX[i] = ax; fY[i] = ay; fZ[i] = az; AliDebug(3,Form("X %f Y %f Z %f R asked %f R obtained %f", - fX[i],fY[i],fZ[i],r[i],TMath::Hypot(fX[i],fY[i]))); + fX[i],fY[i],fZ[i],kR[i],TMath::Hypot(fX[i],fY[i]))); } } - /***************************************************************/ void AliTrackPoints::PositionAt(Int_t n, Float_t &x,Float_t &y,Float_t &z) @@ -360,6 +373,7 @@ void AliTrackPoints::PositionAt(Int_t n, Float_t &x,Float_t &y,Float_t &z) AliDebug(2,Form("n %d; X %f; Y %f; Z %f",n,x,y,z)); } + /***************************************************************/ void AliTrackPoints::Move(Float_t x, Float_t y, Float_t z) @@ -372,6 +386,7 @@ void AliTrackPoints::Move(Float_t x, Float_t y, Float_t z) fZ[i]+=z; } } + /***************************************************************/ Double_t AliTrackPoints::AvarageDistance(const AliTrackPoints& tr) @@ -413,11 +428,12 @@ Double_t AliTrackPoints::AvarageDistance(const AliTrackPoints& tr) return retval; } + /***************************************************************/ void AliTrackPoints::Print(Option_t* /*option*/) const { - + // Prints the coordinates of the track points Info("Print","There is %d points",fN); for(Int_t i = 0; i < fN; i++) { @@ -427,27 +443,11 @@ void AliTrackPoints::Print(Option_t* /*option*/) const } /***************************************************************/ -/***************************************************************/ -/***************************************************************/ -/***************************************************************/ -/***************************************************************/ -/***************************************************************/ - -#include "AliRun.h" -#include "AliESD.h" -#include "AliRunLoader.h" -#include "AliTPCtrack.h" -#include "TTree.h" -#include "TBranch.h" -#include "TH2D.h" -#include "TCanvas.h" -#include "AliMagF.h" - - - void AliTrackPoints::Testesd(Int_t entr,const char* fname ) { + // This is a former macro converted to member function. + // It is used to test the functionality of the class using ESD tracks delete gAlice; gAlice = 0x0; AliRunLoader* rl = AliRunLoader::Open(); @@ -472,8 +472,8 @@ void AliTrackPoints::Testesd(Int_t entr,const char* fname ) } - Int_t N = 170; - AliTrackPoints* tp = new AliTrackPoints(N,t,mf,1.); + Int_t nTrackPoints = 170; + AliTrackPoints* tp = new AliTrackPoints(nTrackPoints,t,mf,1.); Float_t xmin = -250; Float_t xmax = 250; @@ -502,7 +502,7 @@ void AliTrackPoints::Testesd(Int_t entr,const char* fname ) Float_t x,y,z; - for (Int_t i = 0;iPositionAt(i,x,y,z); @@ -568,12 +568,12 @@ void AliTrackPoints::Testesd(Int_t entr,const char* fname ) delete rl; } -/***************************************************************/ -/***************************************************************/ /***************************************************************/ void AliTrackPoints::Testtpc(Int_t entr) { + // This is a former macro converted to member function. + // It is used to test the functionality of the class using TPC tracks delete gAlice; gAlice = 0x0; AliRunLoader* rl = AliRunLoader::Open(); @@ -585,8 +585,8 @@ void AliTrackPoints::Testtpc(Int_t entr) TBranch* b=l->TreeT()->GetBranch("tracks"); b->SetAddress(&t); l->TreeT()->GetEntry(entr); - Int_t N = 160; - AliTrackPoints* tp = new AliTrackPoints(N,t,1.); + Int_t nTrackPoints = 160; + AliTrackPoints* tp = new AliTrackPoints(nTrackPoints,t,1.); Float_t xmin = -250; Float_t xmax = 250; @@ -615,7 +615,7 @@ void AliTrackPoints::Testtpc(Int_t entr) Float_t x,y,z; - for (Int_t i = 0;iPositionAt(i,x,y,z); diff --git a/ANALYSIS/AliVAODParticle.h b/ANALYSIS/AliVAODParticle.h index 91556ee27d8..ba474acac1b 100644 --- a/ANALYSIS/AliVAODParticle.h +++ b/ANALYSIS/AliVAODParticle.h @@ -5,14 +5,14 @@ /* $Id$ */ -///////////////////////////////////////////////////////////// -// +//*********************************************************** +// Class AliVAODParticle // base class for AOD particles -// -///////////////////////////////////////////////////////////// +// Author: Piotr.Skowronski@cern.ch +//*********************************************************** #include -#include +//#include #include class AliTrackPoints; @@ -74,9 +74,9 @@ public: //twise, f.g. as a pion and as a kaon than both have the same UID) virtual void SetUID(Int_t /*id*/){/* *this */} // type information - virtual Bool_t IsSimulated() {return kFALSE;}; - virtual Bool_t IsTrack() {return kFALSE;}; - virtual Bool_t IsCluster() {return kFALSE;}; + virtual Bool_t IsSimulated() const {return kFALSE;}; + virtual Bool_t IsTrack() const {return kFALSE;}; + virtual Bool_t IsCluster() const {return kFALSE;}; //HBT specific virtual AliTrackPoints* GetTPCTrackPoints() const {return 0x0;} -- 2.39.3