]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Coding conventions
authorhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 15 Nov 2005 21:30:27 +0000 (21:30 +0000)
committerhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 15 Nov 2005 21:30:27 +0000 (21:30 +0000)
20 files changed:
ANALYSIS/AliAODPairBaseCut.cxx
ANALYSIS/AliAODPairBaseCut.h
ANALYSIS/AliAODPairCut.cxx
ANALYSIS/AliAODPairCut.h
ANALYSIS/AliAODParticle.h
ANALYSIS/AliAODv0.cxx
ANALYSIS/AliAODv0.h
ANALYSIS/AliClusterMap.cxx
ANALYSIS/AliClusterMap.h
ANALYSIS/AliEventCut.cxx
ANALYSIS/AliEventCut.h
ANALYSIS/AliFlowAnalysis.cxx
ANALYSIS/AliFlowAnalysis.h
ANALYSIS/AliReaderESD.cxx
ANALYSIS/AliReaderESDTree.cxx
ANALYSIS/AliReaderESDTree.h
ANALYSIS/AliRunAnalysis.cxx
ANALYSIS/AliRunAnalysis.h
ANALYSIS/AliTrackPoints.cxx
ANALYSIS/AliVAODParticle.h

index 2516f863ebd822d68e7f80c5f2a1e8ab0bbd6bd0..0963581737f1aead7b30ca32c68285b68afec295 100644 (file)
@@ -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"
index 6680165b1dda178b3940ec00b0d59f4f796aa4fc..4953c964e3ffb00a6843e6f1d2cc7cd6cba6bc5e 100644 (file)
@@ -1,15 +1,39 @@
 #ifndef ALIAODPAIRBASECUT_H
 #define ALIAODPAIRBASECUT_H
-
-#include <TNamed.h> 
+// 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 <TObject.h> 
 #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
index 62c2907c2d21f5cd8ada909532d1f85754e84d42..08aa0e69bc252e02f54d101aa9ae4fdb0dd7621e 100644 (file)
@@ -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;
index 33c39f745d78006e28c0ea18d8811860476bc35e..b7c9066d580de1f3a2909b858d58d90b0db43c16 100644 (file)
@@ -7,6 +7,7 @@
 //Class implements cut on the pair of particles
 //
 //more info: http://aliweb.cern.ch/people/skowron/analyzer/index.html
+
 #include <TNamed.h> 
 #include "AliAODPairBaseCut.h"
 
index 8c1a455fb8a232b8ac7166897d256c5b399f800d..7802056310ce74cd6eea10155cee95d4bce53836 100644 (file)
@@ -17,8 +17,8 @@
 /////////////////////////////////////////////////////////////
 
 #include "AliVAODParticle.h"
-//#include <TLorentzVector.h>
-//#include <TMath.h>
+#include <TLorentzVector.h>
+#include <TMath.h>
 #include <TDatabasePDG.h>
 
 
index c10f5e552ec1add928cb63b2c62041e79af0b116..e153154c23507f2222af8353ad9b5de80854df58 100644 (file)
 
 //-------------------------------------------------------------------------
 //     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 <Riostream.h>
+
 #include <TMath.h>
 
 #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;
index ec4da59738c398d6bc6da1d3f2d9021361682f61..6a0ad43bf0b1268737f6581afccc215cb88d21b5 100644 (file)
@@ -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
 //-------------------------------------------------------------------------
 
index 2ff5bac289bfdf580eb377ffe13c1ff18162ddb4..711c1ba75a4275778ae134711b4667cfbd1bce09 100644 (file)
 
 /* $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
 //
 #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);
index 6e49ff2e551592d82f48dc7f585f49eb92ab6451..e382b46f6e3d4f3d6f46455876180019c58bb837 100644 (file)
@@ -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)
 };
 
index 421c6c7dbd90627a3157d7cc45ae8aefe3f5b1f6..447787c06b2ed28dc4c0ebf519a5cefc71efc62e 100644 (file)
@@ -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 <TObjArray.h>
-
 #include "AliEventBaseCut.h"
 
 ClassImp(AliEventCut)
index 68473a5b0aec8edc2b3b6f1bd61d0bbb51ca9511..198fd5b00694a930731c7d9db4330ec98ac7c6c8 100644 (file)
@@ -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 <TObject.h>
@@ -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)
 };
index c596cd2d016bcf2daae621afb12d6c2ba13b0830..e5ddd3cea3e908d9c827bcd32fad7c060be35064 100644 (file)
@@ -1,22 +1,12 @@
 #include "AliFlowAnalysis.h"
-//________________________________
-///////////////////////////////////////////////////////////
-//
+
+//*********************************************************
 // class AliFlowAnalysis
-//
 // Flow Analysis
-//
-//
 // S.Radomski@gsi.de
 // Piotr.Skowronski@cern.ch
-//
-///////////////////////////////////////////////////////////
-/*********************************************************/
-
-#include <TString.h>
-#include <TParticle.h>
+//*********************************************************
 
-#include <AliStack.h>
 #include <AliAOD.h>
 #include <AliVAODParticle.h>
 #include <AliAODParticleCut.h>
@@ -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)
index f20dcb3fe14d446eb6f899e256447c8aa3df4e0b..455cc90a4e21d1f14d967a210c8edbe510c3a4d1 100644 (file)
@@ -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"
 
index 09cf7971f90a21311ce4ad2925a1bb6f6e9ee5bc..8f3756f18031e6c892d33cc8306c914bee50e0ee 100644 (file)
 #include <TFile.h>
 #include <TGliteXmlEventlist.h>
 #include <TH1.h>
-#include <TKey.h>
-#include <TObjString.h>
 #include <TPDGCode.h>
 #include <TParticle.h>
 #include <TString.h>
-#include <TTree.h>
-
-#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<AliPID::kSPECIES; s++) rc+=concentr[s]*pidtable[s];
+     for (Int_t s=0; s<AliPID::kSPECIES; s++) rc+=kConcentr[s]*pidtable[s];
      if (rc==0.0) 
       {
         AliDebug(3,"Particle rejected since total bayessian PID probab. is zero.");
         continue;
       }
 
-     for (Int_t s=0; s<AliPID::kSPECIES; s++) w[s]=concentr[s]*pidtable[s]/rc;
+     for (Int_t s=0; s<AliPID::kSPECIES; s++) w[s]=kConcentr[s]*pidtable[s]/rc;
 
      if (AliDebugLevel() > 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);
       }
index 5fc641180e4af12edd24917a02df130204e9c67a..fba42416399236ad12a0fcf226d5bb04a58bbd7f 100644 (file)
 
 /* $Id$ */
 
-//_______________________________________________________________________
-/////////////////////////////////////////////////////////////////////////
-//
+//***********************************************************************
 // class AliReaderESDTree
-//
 // Reader for MUON ESD Tree (only for rec)
-//
 // finck@subatech.in2p3.fr
-//
-/////////////////////////////////////////////////////////////////////////
+//***********************************************************************
 
 #include <TString.h>
 #include <TTree.h>
@@ -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):
index 9c55b2bb7ff95db4f42fd1df5275ec91b08aabc5..3f4ebc2a924605d23cf406726e1f6ec70da2da48 100644 (file)
@@ -1,17 +1,13 @@
 #ifndef AliReaderESDTree_H
 #define AliReaderESDTree_H
-//_______________________________________________________________________
-/////////////////////////////////////////////////////////////////////////
-//
+
+//***********************************************************************
 // class AliReaderESDTree
-//
 // Reader for ESD Tree 
-//
 // Ch. Finck
-//
-/////////////////////////////////////////////////////////////////////////
+//***********************************************************************
+
 #include "AliReaderESD.h"
-#include <TString.h>
 
 class TFile;
 class TTree;
index e0e26df92ac99d24270ab71c17965be461903a27..48be0c367d62b2c3aa501d5bfce6bf43d0af1ddc 100644 (file)
 
 /* $Id$ */
 
+//********************************************************
+// class AliRunAnalysis                                  *
+// Analysis manager                                      *
+// Author: Piotr.Skowronski@cern.ch                      *
+//********************************************************
+
 #include "AliRunAnalysis.h"
 #include "AliLog.h"
-
-//________________________________
-///////////////////////////////////////////////////////////
-//
-// class AliRunAnalysis
-//
-//
-//
-// Piotr.Skowronski@cern.ch
-//
-///////////////////////////////////////////////////////////
-
-#include <stdlib.h>
-
-#include <TString.h>
-#include <TObjString.h>
-#include <TClass.h>
-#include <TFile.h>
-#include <TKey.h>
-#include <TObjArray.h>
-
-#include <AliRun.h>
-#include <AliRunLoader.h>
-#include <AliStack.h>
-#include <AliESDtrack.h>
-#include <AliESD.h>
-
-
+#include "AliAnalysis.h"
 #include "AliEventCut.h"
 #include "AliReader.h"
-#include "AliVAODParticle.h"
 
 
 ClassImp(AliRunAnalysis)
index 06f78af2231bf5481e0575b56312610354c52929..6ec41a2181560a019da2b5998166103380a7e83c 100644 (file)
@@ -1,24 +1,21 @@
 #ifndef ALIRUNANALYSIS_H
 #define ALIRUNANALYSIS_H
-//________________________________
+
 ///////////////////////////////////////////////////////////
 //
 // class AliRunAnalysis
-//
 // Analysis manager
-//
-//
-// Piotr.Skowronski@cern.ch
+// Author: Piotr.Skowronski@cern.ch
 //
 ///////////////////////////////////////////////////////////
 
 #include <TTask.h>
 #include <TObjArray.h>
-#include "AliAnalysis.h"
 
 class AliEventCut;
-class TFile;
 class AliReader;
+class AliAnalysis;
+class AliAOD;
 
 class AliRunAnalysis: public TTask
 {
index 1a6c6c6b0e643d6350b58a1a30160ca26b1d478c..cd0945a903b808ea7c10663bd5d78e1c6ff6e17a 100644 (file)
 
 /* $Id$ */
 
-#include "AliTrackPoints.h"
-#include "AliLog.h"
-
-//_________________________________
 ////////////////////////////////////////////////////////////
 //                                                        //
 // class AliTrackPoints                                //
@@ -32,6 +28,9 @@
 //                                                        //
 ////////////////////////////////////////////////////////////
 
+#include "AliTrackPoints.h"
+#include "AliLog.h"
+
 #include <TClonesArray.h>
 #include <TFile.h>
 #include <TMath.h>
 #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;i<N;i++)
+  for (Int_t i = 0;i<nTrackPoints;i++)
    {  
       Double_t r = 84.1+i;
       tp->PositionAt(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;i<N;i++)
+  for (Int_t i = 0;i<nTrackPoints;i++)
    {  
       Double_t r = 84.1+i;
       tp->PositionAt(i,x,y,z);
index 91556ee27d8771625324a3e5c18c348fea7008d4..ba474acac1b02fd67f21aad906ba33493e4a4a44 100644 (file)
@@ -5,14 +5,14 @@
 
 /* $Id$ */
 
-/////////////////////////////////////////////////////////////
-//
+//***********************************************************
+// Class AliVAODParticle
 // base class for AOD particles
-//
-/////////////////////////////////////////////////////////////
+// Author: Piotr.Skowronski@cern.ch
+//***********************************************************
 
 #include <TObject.h>
-#include <TLorentzVector.h>
+//#include <TLorentzVector.h>
 #include <TVector3.h>
 
 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;}