Fixes for coding violations
authoresicking <esicking@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 31 Mar 2011 08:32:59 +0000 (08:32 +0000)
committeresicking <esicking@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 31 Mar 2011 08:32:59 +0000 (08:32 +0000)
PWG4/JetTasks/AliAnalysisTaskMinijet.cxx
PWG4/JetTasks/AliAnalysisTaskMinijet.h

index d5ca7a9..d2f942e 100644 (file)
 
 #include "AliAnalysisTaskMinijet.h"
 
-// Analysis Task for mini jet activity analysis
-// Authors: Eva Sicking
+// Analysis task for two-particle correlations using all particles over pt threshold
+// pt_trig threshold for trigger particle (event axis) and pt_assoc for possible associated particles.
+// Extract mini-jet yield and fragmentation properties via Delta-Phi histograms of these correlations
+// post processing of analysis output via macro plot3and2Gaus.C
+// Can use ESD or AOD, reconstructed and Monte Carlo data as input
+// Author: Eva Sicking
+
 
 ClassImp(AliAnalysisTaskMinijet)
 
@@ -58,9 +63,11 @@ ClassImp(AliAnalysisTaskMinijet)
       fHistPt(0),
       fHistPtMC(0),
       fNmcNch(0),
-      pNmcNch(0),
+      fPNmcNch(0),
       fChargedPi0(0)
 {
+  //Constructor
+
   for(Int_t i = 0;i< 4;i++){
     fVertexZ[i]               =  0;
  
@@ -88,10 +95,10 @@ ClassImp(AliAnalysisTaskMinijet)
     fTriggerTracklet[i]       =  0;
     
     fNch07Nch[i]              =  0;
-    pNch07Nch[i]              =  0;
+    fPNch07Nch[i]              =  0;
     fNch07Tracklet[i]         =  0;
     fNchTracklet[i]           =  0;
-    pNch07Tracklet[i]         =  0;
+    fPNch07Tracklet[i]         =  0;
     fDPhiEventAxis[i]   = 0;
     for(Int_t j=0;j<150;j++){
       fDPhiEventAxisNchBin[i][j]   = 0;
@@ -132,7 +139,7 @@ void AliAnalysisTaskMinijet::UserCreateOutputObjects()
     fHistPtMC->SetMarkerStyle(kFullCircle);
 
     fNmcNch = new TH2F("fNmcNch", "fNmcNch", 100,-0.5,99.5,100,-0.5,99.5);
-    pNmcNch = new TProfile("pNmcNch", "pNmcNch", 100,-0.5,99.5);
+    fPNmcNch = new TProfile("pNmcNch", "pNmcNch", 100,-0.5,99.5);
 
   }
 
@@ -203,7 +210,7 @@ void AliAnalysisTaskMinijet::UserCreateOutputObjects()
     fNch07Nch[i]                 = new TH2F(Form("fNch07Nch%s",labels[i].Data()),
                                            Form("fNch07Nch%s",labels[i].Data()) ,  
                                            250, -2.5, 247.5,250, -2.5, 247.5);
-    pNch07Nch[i]                 = new TProfile(Form("pNch07Nch%s",labels[i].Data()),
+    fPNch07Nch[i]                 = new TProfile(Form("pNch07Nch%s",labels[i].Data()),
                                                Form("pNch07Nch%s",labels[i].Data()) ,  
                                                250, -2.5, 247.5);
     fNch07Tracklet[i]            = new TH2F(Form("fNch07Tracklet%s",labels[i].Data()),
@@ -212,7 +219,7 @@ void AliAnalysisTaskMinijet::UserCreateOutputObjects()
     fNchTracklet[i]              = new TH2F(Form("fNchTracklet%s",labels[i].Data()),
                                            Form("fNchTracklet%s",labels[i].Data()) ,  
                                            250, -2.5, 247.5,250, -2.5, 247.5);
-    pNch07Tracklet[i]            = new TProfile(Form("pNch07Tracklet%s",labels[i].Data()),
+    fPNch07Tracklet[i]            = new TProfile(Form("pNch07Tracklet%s",labels[i].Data()),
                                                Form("pNch07Tracklet%s",labels[i].Data()) ,  
                                                250, -2.5, 247.5);
     fDPhiEventAxis[i]          = new TH1F(Form("fDPhiEventAxis%s",
@@ -254,7 +261,7 @@ void AliAnalysisTaskMinijet::UserCreateOutputObjects()
   if(fUseMC){
     fHists->Add(fHistPtMC); 
     fHists->Add(fNmcNch); 
-    fHists->Add(pNmcNch); 
+    fHists->Add(fPNmcNch); 
   }
   fHists->Add(fChargedPi0);
 
@@ -279,10 +286,10 @@ void AliAnalysisTaskMinijet::UserCreateOutputObjects()
     fHists->Add(fTriggerNchSeeds[i]);
     fHists->Add(fTriggerTracklet[i]);
     fHists->Add(fNch07Nch[i]);
-    fHists->Add(pNch07Nch[i]);
+    fHists->Add(fPNch07Nch[i]);
     fHists->Add(fNch07Tracklet[i]);
     fHists->Add(fNchTracklet[i]);
-    fHists->Add(pNch07Tracklet[i]);
+    fHists->Add(fPNch07Tracklet[i]);
     fHists->Add(fDPhiEventAxis[i]);
     for(Int_t j=0;j<150;j++){
       fHists->Add(fDPhiEventAxisNchBin[i][j]);
@@ -557,7 +564,7 @@ Int_t AliAnalysisTaskMinijet::LoopESD(Float_t **ptArray, Float_t ** etaArray,
     //Printf("Number of MC particles from ESDMC = %d",fNMcPrimAccept);
     //Printf("Number of tracks from ESD = %d",nAcceptedTracks);
     fNmcNch->Fill(fNMcPrimAccept,nAcceptedTracks);
-    pNmcNch->Fill(fNMcPrimAccept,nAcceptedTracks);
+    fPNmcNch->Fill(fNMcPrimAccept,nAcceptedTracks);
     return fNMcPrimAccept; // also possible to use reconstructed Nch ->  return nAcceptedTracks;
   }
   else{
@@ -940,8 +947,8 @@ Int_t AliAnalysisTaskMinijet::LoopAODMC(Float_t **ptArray, Float_t ** etaArray,
 } 
 
 //________________________________________________________________________
-void AliAnalysisTaskMinijet::Analyse(Float_t *pt, Float_t *eta, Float_t *phi, 
-                                    Short_t *charge,Int_t ntracksCharged, 
+void AliAnalysisTaskMinijet::Analyse(const Float_t *pt, const Float_t *eta, const Float_t *phi, 
+                                    const Short_t *charge, Int_t ntracksCharged, 
                                     Int_t ntracklets, Int_t nAll, Int_t mode)
 {
 
@@ -1017,11 +1024,11 @@ void AliAnalysisTaskMinijet::Analyse(Float_t *pt, Float_t *eta, Float_t *phi,
 
   //  plot of multiplicity distributions
   fNch07Nch[mode]->Fill(ntracksCharged, highPtTracksInnerEta);     
-  pNch07Nch[mode]->Fill(ntracksCharged, highPtTracksInnerEta);     
+  fPNch07Nch[mode]->Fill(ntracksCharged, highPtTracksInnerEta);     
   if(ntracklets){
     fNch07Tracklet[mode]->Fill(ntracklets, highPtTracksInnerEta);//only counts tracks which can be used as seeds
     fNchTracklet[mode]->Fill(ntracklets, ntracksCharged);      
-    pNch07Tracklet[mode]->Fill(ntracklets, highPtTracksInnerEta);//only counts tracks which can be used as seeds
+    fPNch07Tracklet[mode]->Fill(ntracklets, highPtTracksInnerEta);//only counts tracks which can be used as seeds
   }
  
   //analysis can only be performed with event axis, defined by high pt track
@@ -1159,7 +1166,7 @@ void AliAnalysisTaskMinijet::Terminate(Option_t*)
 }
 
 //________________________________________________________________________
-Bool_t AliAnalysisTaskMinijet::SelectParticlePlusCharged(Short_t charge, Int_t pdg, Bool_t prim)
+const Bool_t AliAnalysisTaskMinijet::SelectParticlePlusCharged(Short_t charge, Int_t pdg, Bool_t prim)
 {
   //selection of mc particle
   //fSelectParticles=0: use charged primaries and pi0 and k0
@@ -1193,7 +1200,7 @@ Bool_t AliAnalysisTaskMinijet::SelectParticlePlusCharged(Short_t charge, Int_t p
 }
 
 //________________________________________________________________________
-Bool_t AliAnalysisTaskMinijet::SelectParticle(Short_t charge, Int_t pdg, Bool_t prim)
+const Bool_t AliAnalysisTaskMinijet::SelectParticle(Short_t charge, Int_t pdg, Bool_t prim)
 {
   //selection of mc particle
   //fSelectParticles=0: use charged primaries and pi0 and k0
@@ -1226,8 +1233,11 @@ Bool_t AliAnalysisTaskMinijet::SelectParticle(Short_t charge, Int_t pdg, Bool_t
 }
 
 //________________________________________________________________________
-void AliAnalysisTaskMinijet::CleanArrays(Float_t* pt, Float_t* eta, Float_t* phi, 
-                                        Short_t * charge, Int_t* nTracksTracklets)
+const void AliAnalysisTaskMinijet::CleanArrays(const Float_t* pt, 
+                                              const Float_t* eta, 
+                                              const Float_t* phi, 
+                                              const Short_t * charge, 
+                                              const Int_t* nTracksTracklets)
 {
   //clean up of memory used for arrays of track properties
 
index df8af3b..7b7d5f6 100644 (file)
@@ -1,7 +1,9 @@
 #ifndef ALIANALYSISTASKMINIJET_H\r
 #define ALIANALYSISTASKMINIJET_H\r
 \r
-// analysis task performing mini jet analysis (use ESD or AOD as input)\r
+// Two-particle correlations using all particles over pt threshold\r
+// Extract mini-jet yield and fragmentation properties via Delta-Phi histograms\r
+// Can use ESD or AOD, reconstructed and Monte Carlo data as input\r
 // Author: eva.sicking@cern.ch\r
 \r
 class TList;\r
@@ -27,10 +29,10 @@ class AliAnalysisTaskMinijet : public AliAnalysisTaskSE {
   Int_t LoopESDMC(Float_t **pt, Float_t **eta, Float_t **phi, Short_t **charge,  Int_t **nTracksTracklets);\r
   Int_t LoopAOD  (Float_t **pt, Float_t **eta, Float_t **phi, Short_t **charge,  Int_t **nTracksTracklets);\r
   Int_t LoopAODMC(Float_t **pt, Float_t **eta, Float_t **phi, Short_t **charge,  Int_t **nTracksTracklets);\r
-  void  Analyse  (Float_t* pt, Float_t* eta, Float_t* phi,  Short_t *charge, Int_t ntacks, Int_t ntacklets=0,Int_t nAll=0, Int_t mode=0);\r
-  void  CleanArrays(Float_t* pt, Float_t* eta, Float_t* phi,  Short_t *charge, Int_t* nTracksTracklets=0);\r
-  Bool_t SelectParticlePlusCharged(Short_t charge, Int_t pdg, Bool_t prim);\r
-  Bool_t SelectParticle(Short_t charge, Int_t pdg, Bool_t prim);\r
+  void  Analyse  (const Float_t* pt, const Float_t* eta, const Float_t* phi,  const Short_t *charge, Int_t ntacks, Int_t ntacklets=0,Int_t nAll=0, Int_t mode=0);\r
+  const void  CleanArrays(const Float_t *pt, const Float_t *eta, const Float_t *phi, const Short_t *charge, const Int_t *nTracksTracklets=0);\r
+  const Bool_t SelectParticlePlusCharged(Short_t charge, Int_t pdg, Bool_t prim);\r
+  const Bool_t SelectParticle(Short_t charge, Int_t pdg, Bool_t prim);\r
 \r
 \r
   void UseMC(Bool_t useMC=kTRUE, Bool_t mcOnly=kFALSE)    {fUseMC = useMC; fMcOnly=mcOnly;}\r
@@ -52,8 +54,8 @@ class AliAnalysisTaskMinijet : public AliAnalysisTaskSE {
 \r
  private:\r
 \r
-  Bool_t       fUseMC;\r
-  Bool_t       fMcOnly;\r
+  Bool_t       fUseMC;                      // flag for Monte Carlo usages\r
+  Bool_t       fMcOnly;                     // flag defines, if only MC data is used in analysis or also reconstructed data\r
   AliESDtrackCuts* fCuts;                   // List of cuts for ESDs\r
   Float_t      fRadiusCut;                  // radius cut \r
   Float_t      fTriggerPtCut;               // cut on particle pt used as event axis\r
@@ -75,7 +77,7 @@ class AliAnalysisTaskMinijet : public AliAnalysisTaskSE {
   TH1F       *fHistPt;                     // Pt spectrum ESD\r
   TH1F       *fHistPtMC;                   // Pt spectrum MC\r
   TH2F       *fNmcNch;                     // N mc - N ch rec\r
-  TProfile   *pNmcNch;                     // N mc - N ch rec\r
+  TProfile   *fPNmcNch;                     // N mc - N ch rec\r
   TH2F       *fChargedPi0;                 // charged versus charged+Pi0\r
   TH1F       * fVertexZ[4];                 // z of vertex\r
 \r
@@ -102,10 +104,10 @@ class AliAnalysisTaskMinijet : public AliAnalysisTaskSE {
   TH2F       * fTriggerNchSeeds[4];         // number of triggers with accepted-track number\r
   TH1F       * fTriggerTracklet[4];         // number of triggers with accepted-tracklet number\r
   TH2F       * fNch07Nch[4];                // nCharged with pT>fTriggerPtCut vs nCharged\r
-  TProfile   * pNch07Nch[4];                // nCharged with pT>fTriggerPtCut vs nCharged\r
+  TProfile   * fPNch07Nch[4];                // nCharged with pT>fTriggerPtCut vs nCharged\r
   TH2F       * fNch07Tracklet[4];           // nCharged with pT>fTriggerPtCut vs nTracklet\r
   TH2F       * fNchTracklet[4];             // nCharged vs nTracklet\r
-  TProfile   * pNch07Tracklet[4];           // nCharged with pT>fTriggerPtCut vs nTracklet\r
+  TProfile   * fPNch07Tracklet[4];           // nCharged with pT>fTriggerPtCut vs nTracklet\r
 \r
   TH1F       * fDPhiEventAxis[4];           // delta phi of associate tracks to event axis\r
   TH1F       * fDPhiEventAxisNchBin[4][150];// delta phi of associate tracks to event axis per Nch bin\r