Coding conventions (Ruben)
authorhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 30 Jan 2012 08:24:36 +0000 (08:24 +0000)
committerhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 30 Jan 2012 08:24:36 +0000 (08:24 +0000)
PWG0/multVScentPbPb/AliITSMultRecBg.cxx
PWG0/multVScentPbPb/AliITSMultRecBg.h
PWG0/multVScentPbPb/AliTaskGlobVar.cxx
PWG0/multVScentPbPb/AliTaskGlobVar.h
PWG0/multVScentPbPb/AliTrackletTaskMulti.cxx
PWG0/multVScentPbPb/AliTrackletTaskMulti.h
PWG0/multVScentPbPb/AliTrackletTaskMultipp.cxx
PWG0/multVScentPbPb/AliTrackletTaskMultipp.h
PWG0/multVScentPbPb/AliTrackletTaskUni.cxx
PWG0/multVScentPbPb/AliTrackletTaskUni.h
PWG0/multVScentPbPb/SaveCanvas.h

index b868ad4..b6dbb90 100755 (executable)
@@ -8,6 +8,16 @@
 #include <TBits.h>
 #include <TClonesArray.h>
 
+///////////////////////////////////////////////////////////////////////////////
+//                                                                           //
+// Class for generating combinatorial backgroung                             //
+// for the SPD tracklets                                                     //
+//                                                                           //
+// Modes for "insertion", "rotation" and "mixing" are supported              //
+//                                                                           //
+///////////////////////////////////////////////////////////////////////////////
+
+
 ClassImp(AliITSMultRecBg)
 
 //_________________________________________________________________
@@ -40,6 +50,35 @@ AliITSMultRecBg::AliITSMultRecBg()
 }
 
 //_________________________________________________________________
+AliITSMultRecBg::AliITSMultRecBg(const AliTracker &AliITSMultRecBg) 
+: fRecType(kData),
+  fInjLr(0),
+  fInjStave(0),
+  fInjModule(0),
+  fInjModInStave(0),
+  fInjX(0),
+  fInjZ(0),
+  fInjHitsN(0),
+  fInjScale(1),
+  fInjCurrTrial(0),
+  fInjCluster(),
+  fInjBuffer(2*kTrNPar)
+  //
+{
+  // dummy copy c-tor
+  fCreateClustersCopy = kTRUE;
+  for (int i=0;i<2;i++) {
+    fAssociations[i] = 0;
+    fInjSPDOcc[i]    = 0;
+    fInjSPDPatt[i]   = 0;
+    fInjNTrials[i]   = 0;
+    fInjNSuccess[i]  = 0;    
+    for (int s=4;s--;) fInjModuleClStart[i][s] = fInjModuleClN[i][s] = 0;
+  }
+  //
+}
+
+//_________________________________________________________________
 AliITSMultRecBg::~AliITSMultRecBg()
 {
   // destructor
index 0b48e93..77d366a 100755 (executable)
@@ -1,6 +1,13 @@
 #ifndef ALIITSMULTRECBG_H
 #define ALIITSMULTRECBG_H
 
+///////////////////////////////////////////////////////////////////////////////
+//                                                                           //
+// Class for generating combinatorial backgroung                             //
+// for the SPD tracklets                                                     //
+//                                                                           //
+///////////////////////////////////////////////////////////////////////////////
+
 class TH2F;
 class TTree;
 #include <TArrayF.h>
@@ -34,6 +41,7 @@ class AliITSMultRecBg : public AliITSMultReconstructor
  protected:
   virtual void CreateMultiplicityObject();
   //
+  AliITSMultRecBg(const AliTracker &AliITSMultRecBg);
   //     Injection stuff
   void    GenInjBgSample(TTree* treeRP, Float_t *vtx);
   Bool_t  PrepareInjBgGenerator(Float_t *vtx);
@@ -45,14 +53,17 @@ class AliITSMultRecBg : public AliITSMultReconstructor
   Int_t   SearchInjTracklet(const Float_t *vtx);
   Int_t   GetPixelBitC(int stave, int chip,  int col, int row) const {return row+((col+((chip+stave*20)<<5))<<8);} // row + (col+ (chip + stave*20)*32)*256;
   Int_t   GetPixelBitL(int stave, int ladder,int col, int row) const {return row+((col+(ladder+(stave<<2))*32*5)<<8);} // row + (col + (ladder + stave*4)*32*5)*256
-  void    ExtractPixelL(int id, int &stave, int &ladder, int &col, int &row);
+  void    ExtractPixelL(int id, int &stave, int &ladder, int &col, int &row) const;
+
 
+ private: 
+  AliITSMultRecBg& operator=(const AliITSMultRecBg& src);
 
  protected:
   enum {kInjFakeLabel=-999};
   enum {kInjMaxNY=10, kInjMaxNZ=8};
   //
-  Int_t fRecType;
+  Int_t fRecType;                            // what to generate: normal reco, injection etc.
   //
   // method specific members
   //
@@ -82,8 +93,9 @@ class AliITSMultRecBg : public AliITSMultReconstructor
 };
 
 
-inline void AliITSMultRecBg::ExtractPixelL(int id, int &stave, int &ladder, int &col, int &row) 
+inline void AliITSMultRecBg::ExtractPixelL(int id, int &stave, int &ladder, int &col, int &row) const
 {
+  // get sensor data
   enum {kNRow=256,kNCol=32*5,kNLadd=4};
   row = id%kNRow;
   id /= kNRow;
index 5d11e91..a3bb688 100755 (executable)
 #include "AliGenEventHeader.h"
 #include "AliGenHijingEventHeader.h"
 #include "AliGenDPMjetEventHeader.h"
+#include "AliTriggerAnalysis.h" 
 
 
 ClassImp(AliTaskGlobVar)
 
 
-GloVars_t globVars;
-
 //________________________________________________________________________
 AliTaskGlobVar::AliTaskGlobVar(const char *name) 
   : AliAnalysisTaskSE(name), 
@@ -57,7 +56,8 @@ AliTaskGlobVar::AliTaskGlobVar(const char *name)
     fOutput(0), 
     fOutTree(0),
     fTrackCuts(0),
-    fTrackCuts1(0)
+  fTrackCuts1(0),
+  fGlobVars()
 {
   // Constructor
   DefineOutput(1, TList::Class());
@@ -73,7 +73,6 @@ AliTaskGlobVar::~AliTaskGlobVar()
   if (fOutput && !AliAnalysisManager::GetAnalysisManager()->IsProofMode()) {  //RRR
     printf("Deleteing output\n");
     delete fOutput;
-    fOutput = 0;
   }
   //
 }
@@ -81,16 +80,16 @@ AliTaskGlobVar::~AliTaskGlobVar()
 //________________________________________________________________________
 void AliTaskGlobVar::UserCreateOutputObjects() 
 {
-  //
+  // create ouptut
   fOutput = new TList();
   fOutput->SetOwner(); 
   //
   fOutTree = new TTree("globTree","globTree");
-  fOutTree->Branch("g",&globVars,"runID/I:timeStamp/i:zdcNA/F:zdcPA/F:zdcNC/F:zdcPC/F:zem1/F:zem2/F:zvSPD/F:zvTPC/F:chunk/S:flags/S"
+  fOutTree->Branch("g",&fGlobVars,"runID/I:timeStamp/i:zdcNA/F:zdcPA/F:zdcNC/F:zdcPC/F:zem1/F:zem2/F:zvSPD/F:zvTPC/F:chunk/S:flags/S"
                   ":spd1/S:spd2/S:ncontSPDV/S:ncontTPCV/S:nTrTPC/S:nTrTPCITS/S:nTracklets/S:v0A/S:v0C/S:v0Corr/S", 16777216);
 
   if (fUseMC) {
-    fOutTree->Branch("gmc",&globVars.mcZV,"mcZV/F:mcdNdEta/S:mcNPart/S:mcNBColl/S", 16777216);
+    fOutTree->Branch("gmc",&fGlobVars.mcZV,"mcZV/F:mcdNdEta/S:mcNPart/S:mcNBColl/S", 16777216);
   }
   fOutput->Add(fOutTree);
   //
@@ -128,45 +127,45 @@ void AliTaskGlobVar::UserExec(Option_t *)
   //  if (vtxESDTPC->GetNContributors()<1) return;
   //  if (vtxESDTPC->GetNContributors()<(-10.+0.25*multESD->GetNumberOfITSClusters(0))) return;
   //
-  globVars.runID = esd->GetRunNumber();
+  fGlobVars.runID = esd->GetRunNumber();
   TString rid = "";
-  rid +=  globVars.runID;
+  rid +=  fGlobVars.runID;
   TString flname        = hand->GetTree()->GetCurrentFile()->GetName();
-  globVars.chunk        = 0;
+  fGlobVars.chunk        = 0;
   int id = 0;
   while ( (id=flname.Index(rid))>=0 ) flname = flname.Data()+id+rid.Length();
   id = flname.First('.');
   if (id>=0) {
     flname = flname.Data() + id+1;
-    globVars.chunk = (Short_t)flname.Atoi();
+    fGlobVars.chunk = (Short_t)flname.Atoi();
   }
-  //  printf("%d %s\n",globVars.chunk,hand->GetTree()->GetCurrentFile()->GetName());
+  //  printf("%d %s\n",fGlobVars.chunk,hand->GetTree()->GetCurrentFile()->GetName());
   //
-  globVars.timeStamp    = esd->GetTimeStamp();
-  globVars.timeStamp    = esd->GetTimeStamp();
-  globVars.zvSPD        = vtxESD->GetZ(); 
-  globVars.zvTPC        = vtxESDTPC->GetZ(); 
-  globVars.ncontSPDV = (Short_t)vtxESD->GetNContributors();
-  globVars.ncontTPCV = (Short_t)vtxESDTPC->GetNContributors();
-  //  globVars.nTrTPC     = fTrackCuts ? (Short_t)fTrackCuts->GetReferenceMultiplicity(esd,kTRUE):-1;
-  globVars.nTrTPC       = fTrackCuts  ? (Short_t)fTrackCuts->CountAcceptedTracks(esd):-1;
-  globVars.nTrTPCITS    = fTrackCuts1 ? (Short_t)fTrackCuts1->CountAcceptedTracks(esd):-1;
-  globVars.nTracklets = multESD->GetNumberOfTracklets();
+  fGlobVars.timeStamp    = esd->GetTimeStamp();
+  fGlobVars.timeStamp    = esd->GetTimeStamp();
+  fGlobVars.zvSPD        = vtxESD->GetZ(); 
+  fGlobVars.zvTPC        = vtxESDTPC->GetZ(); 
+  fGlobVars.ncontSPDV = (Short_t)vtxESD->GetNContributors();
+  fGlobVars.ncontTPCV = (Short_t)vtxESDTPC->GetNContributors();
+  //  fGlobVars.nTrTPC     = fTrackCuts ? (Short_t)fTrackCuts->GetReferenceMultiplicity(esd,kTRUE):-1;
+  fGlobVars.nTrTPC       = fTrackCuts  ? (Short_t)fTrackCuts->CountAcceptedTracks(esd):-1;
+  fGlobVars.nTrTPCITS    = fTrackCuts1 ? (Short_t)fTrackCuts1->CountAcceptedTracks(esd):-1;
+  fGlobVars.nTracklets = multESD->GetNumberOfTracklets();
   //
   AliESDVZERO* esdV0 = esd->GetVZEROData();
   if (esdV0) {
-    globVars.v0A = (Short_t)esdV0->GetMTotV0A();
-    globVars.v0C = (Short_t)esdV0->GetMTotV0C();
+    fGlobVars.v0A = (Short_t)esdV0->GetMTotV0A();
+    fGlobVars.v0C = (Short_t)esdV0->GetMTotV0C();
   }
-  else globVars.v0A = globVars.v0C = 0;
+  else fGlobVars.v0A = fGlobVars.v0C = 0;
   //
-  globVars.spd1 = (Short_t)multESD->GetNumberOfITSClusters(0);
-  globVars.spd2 = (Short_t)multESD->GetNumberOfITSClusters(1);
+  fGlobVars.spd1 = (Short_t)multESD->GetNumberOfITSClusters(0);
+  fGlobVars.spd2 = (Short_t)multESD->GetNumberOfITSClusters(1);
   //
   float v0Corr,v0CorrR;
   v0Corr = GetCorrV0(esd,v0CorrR);
-  globVars.v0Corr = (Short_t)v0Corr;
-  //  globVars.v0CorrResc = (Short_t)v0CorrR;
+  fGlobVars.v0Corr = (Short_t)v0Corr;
+  //  fGlobVars.v0CorrResc = (Short_t)v0CorrR;
 
   //---------------------------------------------
   AliESDZDC *esdZDC = esd->GetESDZDC();
@@ -180,28 +179,28 @@ void AliTaskGlobVar::UserExec(Option_t *)
       }
     }
   }
-  globVars.flags = 0;
-  if ( tdc[12] ) globVars.flags |= GloVars_t::kTDCNA; //  Bool_t zdcNA = tdc[12];
-  if ( tdc[10] ) globVars.flags |= GloVars_t::kTDCNC; //  Bool_t zdcNC = tdc[10];
-  if ( tdc[13] ) globVars.flags |= GloVars_t::kTDCPA; //  Bool_t zdcPA = tdc[13];
-  if ( tdc[11] ) globVars.flags |= GloVars_t::kTDCPC; //  Bool_t zdcPC = tdc[11];
-  if ( vtxOK   ) globVars.flags |= GloVars_t::kSPDVTXOK;
+  fGlobVars.flags = 0;
+  if ( tdc[12] ) fGlobVars.flags |= GloVars_t::kTDCNA; //  Bool_t zdcNA = tdc[12];
+  if ( tdc[10] ) fGlobVars.flags |= GloVars_t::kTDCNC; //  Bool_t zdcNC = tdc[10];
+  if ( tdc[13] ) fGlobVars.flags |= GloVars_t::kTDCPA; //  Bool_t zdcPA = tdc[13];
+  if ( tdc[11] ) fGlobVars.flags |= GloVars_t::kTDCPC; //  Bool_t zdcPC = tdc[11];
+  if ( vtxOK   ) fGlobVars.flags |= GloVars_t::kSPDVTXOK;
   //
-  globVars.zdcNC = (Float_t) (esdZDC->GetZDCN1Energy()) /8.;
-  globVars.zdcPC = (Float_t) (esdZDC->GetZDCP1Energy()) /8.;
-  globVars.zdcNA = (Float_t) (esdZDC->GetZDCN2Energy()) /8.;
-  globVars.zdcPA = (Float_t) (esdZDC->GetZDCP2Energy()) /8.;
-  globVars.zem1  = (Float_t) (esdZDC->GetZDCEMEnergy(0)) /8.;
-  globVars.zem2  = (Float_t) (esdZDC->GetZDCEMEnergy(1)) /8.;
+  fGlobVars.zdcNC = (Float_t) (esdZDC->GetZDCN1Energy()) /8.;
+  fGlobVars.zdcPC = (Float_t) (esdZDC->GetZDCP1Energy()) /8.;
+  fGlobVars.zdcNA = (Float_t) (esdZDC->GetZDCN2Energy()) /8.;
+  fGlobVars.zdcPA = (Float_t) (esdZDC->GetZDCP2Energy()) /8.;
+  fGlobVars.zem1  = (Float_t) (esdZDC->GetZDCEMEnergy(0)) /8.;
+  fGlobVars.zem2  = (Float_t) (esdZDC->GetZDCEMEnergy(1)) /8.;
   //-----------------------------------------------
   //
   // ---------------------- MC ONLY -------------------------------
   AliMCEventHandler* eventHandler = (AliMCEventHandler*)anMan->GetMCtruthEventHandler();
   AliStack*    stack=0;
   AliMCEvent*  mcEvent=0;
-  globVars.mcdNdEta = 0;
-  globVars.mcNPart  = 0;
-  globVars.mcNBColl = 0;
+  fGlobVars.mcdNdEta = 0;
+  fGlobVars.mcNPart  = 0;
+  fGlobVars.mcNBColl = 0;
   if (fUseMC && eventHandler && (mcEvent=eventHandler->MCEvent()) && (stack=mcEvent->Stack())) {
     int ntr = stack->GetNtrack();
     for (int itr=ntr;itr--;) {
@@ -210,25 +209,25 @@ void AliTaskGlobVar::UserExec(Option_t *)
       if (!part || !part->Charge()) continue;
       Float_t eta = part->Eta();
       if (TMath::Abs(eta)>0.5) continue;
-      globVars.mcdNdEta++;
+      fGlobVars.mcdNdEta++;
     }
     //
     AliGenEventHeader* mcGenH = mcEvent->GenEventHeader();
     if (mcGenH->InheritsFrom(AliGenHijingEventHeader::Class())) {
       AliGenHijingEventHeader* hHijing = (AliGenHijingEventHeader*)mcGenH;
-      globVars.mcNPart  = (hHijing->ProjectileParticipants()+hHijing->TargetParticipants())/2.;
-      globVars.mcNBColl = hHijing->NN()+hHijing->NNw()+hHijing->NwN()+hHijing->NwNw();
+      fGlobVars.mcNPart  = (hHijing->ProjectileParticipants()+hHijing->TargetParticipants())/2.;
+      fGlobVars.mcNBColl = hHijing->NN()+hHijing->NNw()+hHijing->NwN()+hHijing->NwNw();
     }
     else if (mcGenH->InheritsFrom(AliGenDPMjetEventHeader::Class())) {
       AliGenDPMjetEventHeader* hDpmJet = (AliGenDPMjetEventHeader*)mcGenH;
-      globVars.mcNPart  = (hDpmJet->ProjectileParticipants()+hDpmJet->TargetParticipants())/2.;
-      globVars.mcNBColl = hDpmJet->NN()+hDpmJet->NNw()+hDpmJet->NwN()+hDpmJet->NwNw();
+      fGlobVars.mcNPart  = (hDpmJet->ProjectileParticipants()+hDpmJet->TargetParticipants())/2.;
+      fGlobVars.mcNBColl = hDpmJet->NN()+hDpmJet->NNw()+hDpmJet->NwN()+hDpmJet->NwNw();
     }
     else {} // unknown generator
     //
     TArrayF vtxMC;
     mcGenH->PrimaryVertex(vtxMC);
-    globVars.mcZV = vtxMC[2];
+    fGlobVars.mcZV = vtxMC[2];
   }
   //
   fOutTree->Fill();
@@ -237,6 +236,7 @@ void AliTaskGlobVar::UserExec(Option_t *)
 //________________________________________________________________________
 void AliTaskGlobVar::Terminate(Option_t *) 
 {
+  // print itself
   Printf("Terminating...");
   //  AliAnalysisTaskSE::Terminate();
 }
index de286fb..62f0dbf 100755 (executable)
@@ -1,5 +1,5 @@
-#ifndef ALIGLOBVAR_H
-#define ALIGLOBVAR_H
+#ifndef ALITASKGLOBVAR_H
+#define ALITASKGLOBVAR_H
 
 ///////////////////////////////////////////////////////////////////////////
 // Analysis task to extract global variables to the tree                 //
@@ -8,37 +8,8 @@
 class AliESDEvent;
 class TList;
 class AliESDtrackCuts;
+class AliTriggerAnalysis;
 #include "AliAnalysisTaskSE.h"
-#include "AliTriggerAnalysis.h" 
-
-class AliTaskGlobVar : public AliAnalysisTaskSE {
-  //
- public:
-  AliTaskGlobVar(const char *name = "AliTaskGlobVar");
-  virtual ~AliTaskGlobVar(); 
-  virtual void  UserCreateOutputObjects();
-  virtual void  UserExec(Option_t *option);
-  virtual void  Terminate(Option_t *);
-  //
-  void    SetUseMC(Bool_t mc=kTRUE)                                   {fUseMC = mc;}
-  Float_t GetCorrV0(const AliESDEvent* esd, float &v0CorrResc) const;
-  Bool_t  ZDCTimeTrigger(const AliESDEvent *aEsd) const;
-  AliESDtrackCuts* CreatedNdPtTrackCuts(Int_t cutMode, Bool_t fieldOn=kTRUE);
-  //
- protected:
-  Bool_t       fUseMC;                    // do we use MC info
-  TList*       fOutput;                   // output list send on output slot 1 
-  //
-  TTree*       fOutTree;                   // output tree
-  AliESDtrackCuts* fTrackCuts;             //! optional track cuts
-  AliESDtrackCuts* fTrackCuts1;            //! optional track cuts
-  //
- private:    
-  AliTaskGlobVar(const AliTaskGlobVar&); // not implemented
-  AliTaskGlobVar& operator=(const AliTaskGlobVar&); // not implemented 
-  
-  ClassDef(AliTaskGlobVar, 1);  
-};
 
 
 typedef struct {
@@ -73,4 +44,36 @@ typedef struct {
   Short_t mcNBColl;
 } GloVars_t;
 
+
+class AliTaskGlobVar : public AliAnalysisTaskSE {
+  //
+ public:
+  AliTaskGlobVar(const char *name = "AliTaskGlobVar");
+  virtual ~AliTaskGlobVar(); 
+  virtual void  UserCreateOutputObjects();
+  virtual void  UserExec(Option_t *option);
+  virtual void  Terminate(Option_t *);
+  //
+  void    SetUseMC(Bool_t mc=kTRUE)                                   {fUseMC = mc;}
+  Float_t GetCorrV0(const AliESDEvent* esd, float &v0CorrResc) const;
+  Bool_t  ZDCTimeTrigger(const AliESDEvent *aEsd) const;
+  AliESDtrackCuts* CreatedNdPtTrackCuts(Int_t cutMode, Bool_t fieldOn=kTRUE);
+  //
+ protected:
+  Bool_t       fUseMC;                    // do we use MC info
+  TList*       fOutput;                   // output list send on output slot 1 
+  //
+  TTree*       fOutTree;                   // output tree
+  AliESDtrackCuts* fTrackCuts;             //! optional track cuts
+  AliESDtrackCuts* fTrackCuts1;            //! optional track cuts
+  //
+  GloVars_t fGlobVars;                     // data container
+ private:    
+  AliTaskGlobVar(const AliTaskGlobVar&); // not implemented
+  AliTaskGlobVar& operator=(const AliTaskGlobVar&); // not implemented 
+  
+  ClassDef(AliTaskGlobVar, 1);  
+};
+
+
 #endif
index 6e17d6a..7c4e3e5 100755 (executable)
@@ -63,7 +63,7 @@
 #include "../ITS/AliITSRecPoint.h"
 #include "../ITS/AliITSgeomTGeo.h"
 #include "../ITS/AliITSMultReconstructor.h" 
-
+#include "../ITS/AliITSsegmentationSPD.h"
 #include "AliLog.h"
 
 #include "AliPhysicsSelection.h"
@@ -81,7 +81,7 @@ const Float_t  AliTrackletTaskMulti::fgkCentPerc[] = {0,100};//{0,5,10,20,30};
 //const Float_t  AliTrackletTaskMulti::fgkCentPerc[] = {0,5,10,20,30,40};
   //{0,10,20,30,40,50,60,70,80,90,95,101};
 
-const char* AliTrackletTaskMulti::fgCentSelName[] = {"V0M","FMD","TRK","TKL","CL0","CL1","V0MvsFMD","TKLvsV0M","ZENvsZDC"};
+const char* AliTrackletTaskMulti::fgkCentSelName[] = {"V0M","FMD","TRK","TKL","CL0","CL1","V0MvsFMD","TKLvsV0M","ZENvsZDC"};
 
 const char*  AliTrackletTaskMulti::fgkPDGNames[] = {
 "#pi^{+}",
@@ -243,7 +243,7 @@ AliTrackletTaskMulti::AliTrackletTaskMulti(const char *name)
   fRPTree(0),
   fRPTreeMix(0),
   fStack(0),
-  fMCEvent(0),
+  fMCevent(0),
   //
   fNPart(0),
   fNBColl(0),
@@ -273,10 +273,9 @@ AliTrackletTaskMulti::~AliTrackletTaskMulti()
   // Destructor
   // histograms are in the output list and deleted when the output
   // list is deleted by the TSelector dtor
-  if (fOutput && !AliAnalysisManager::GetAnalysisManager()->IsProofMode()) {  //RRR
+  if (!AliAnalysisManager::GetAnalysisManager()->IsProofMode()) {  //RRR
     printf("Deleteing output\n");
     delete fOutput;
-    fOutput = 0;
   }
   //
   delete fMultReco;
@@ -298,7 +297,7 @@ AliTrackletTaskMulti::~AliTrackletTaskMulti()
 //________________________________________________________________________
 void AliTrackletTaskMulti::UserCreateOutputObjects() 
 {
-  //
+  // create output
   fOutput = new TList();
   fOutput->SetOwner(); 
   //
@@ -367,7 +366,7 @@ void AliTrackletTaskMulti::UserCreateOutputObjects()
     printf("Wrong centrality type %d\n",fUseCentralityVar);
     exit(1);
   }
-  AliInfo(Form("Centrality type selected: %s\n",fgCentSelName[fUseCentralityVar]));
+  AliInfo(Form("Centrality type selected: %s\n",fgkCentSelName[fUseCentralityVar]));
   PostData(1, fOutput);
   //
 }
@@ -443,7 +442,7 @@ void AliTrackletTaskMulti::UserExec(Option_t *)
   }
   ((TH2*)fHistosCustom->UncheckedAt(kHZDCZEMNoSel))->Fill(zemEnergy,zdcEnergy);
   //
-  Float_t centPercentile = centrality->GetCentralityPercentileUnchecked(fgCentSelName[fUseCentralityVar]);
+  Float_t centPercentile = centrality->GetCentralityPercentileUnchecked(fgkCentSelName[fUseCentralityVar]);
 
   // temporary >>>>>>>>>>>>>>>>>>>>>>>>
   if (fUseCentralityVar==kCentZEMvsZDC) {
@@ -474,15 +473,15 @@ void AliTrackletTaskMulti::UserExec(Option_t *)
   ((TH1*)fHistosCustom->UncheckedAt(kHStatCent))->Fill(centPercentile);
   //
   AliMCEventHandler* eventHandler = 0;
-  fMCEvent = 0;
+  fMCevent = 0;
   fStack = 0;
   //
   if (fUseMC) {
     eventHandler = (AliMCEventHandler*)anMan->GetMCtruthEventHandler();
     if (!eventHandler) { printf("ERROR: Could not retrieve MC event handler\n"); return; }
-    fMCEvent = eventHandler->MCEvent();
-    if (!fMCEvent) { printf("ERROR: Could not retrieve MC event\n"); return; }
-    fStack = fMCEvent->Stack();
+    fMCevent = eventHandler->MCEvent();
+    if (!fMCevent) { printf("ERROR: Could not retrieve MC event\n"); return; }
+    fStack = fMCevent->Stack();
     if (!fStack) { printf("Stack not available\n"); return; }
   }
   //
@@ -497,7 +496,7 @@ void AliTrackletTaskMulti::UserExec(Option_t *)
   fNPart  = 0;
   fNBColl = 0;
   if (fUseMC) {
-    mcGenH = fMCEvent->GenEventHeader();
+    mcGenH = fMCevent->GenEventHeader();
     if (mcGenH->InheritsFrom(AliGenHijingEventHeader::Class())) {
       AliGenHijingEventHeader* hHijing = (AliGenHijingEventHeader*)mcGenH;
       fNPart  = (hHijing->ProjectileParticipants()+hHijing->TargetParticipants())/2.;
@@ -673,7 +672,7 @@ TObjArray* AliTrackletTaskMulti::BookCustomHistos()
   hstat->GetXaxis()->SetBinLabel(kOneUnit,"ScaleMerge");
   hstat->GetXaxis()->SetBinLabel(kNWorkers,"Workers");
   //
-  hstat->GetXaxis()->SetBinLabel(kCentVar,  fgCentSelName[fUseCentralityVar]);
+  hstat->GetXaxis()->SetBinLabel(kCentVar,  fgkCentSelName[fUseCentralityVar]);
   hstat->GetXaxis()->SetBinLabel(kDPhi,  "#Delta#varphi");
   hstat->GetXaxis()->SetBinLabel(kDTht,  "#Delta#theta");
   hstat->GetXaxis()->SetBinLabel(kNStd,  "N.std");
@@ -1007,7 +1006,7 @@ void AliTrackletTaskMulti::FillHistos(Int_t type, const AliMultiplicity* mlt)
   AliGenHijingEventHeader* pyHeader = 0;
   //
   if (fUseMC) {
-    pyHeader = (AliGenHijingEventHeader*) fMCEvent->GenEventHeader();//header->GenEventHeader();
+    pyHeader = (AliGenHijingEventHeader*) fMCevent->GenEventHeader();//header->GenEventHeader();
     pyHeader->PrimaryVertex(vtxMC);
   }
   //---------------------------------------- CHECK ------------------------------<<<
@@ -1103,14 +1102,14 @@ void AliTrackletTaskMulti::FillHistos(Int_t type, const AliMultiplicity* mlt)
 void AliTrackletTaskMulti::FillMCPrimaries()
 {
   // fill all MC primaries Zv vs Eta
-  if (!fStack || !fMCEvent) return;
+  if (!fStack || !fMCevent) return;
 
   //---------------------------------------- CHECK ------------------------------>>>
   TArrayF vtxMC;
   AliGenHijingEventHeader* pyHeader = 0;
   //
   if (fUseMC) {
-    pyHeader = (AliGenHijingEventHeader*) fMCEvent->GenEventHeader();//header->GenEventHeader();
+    pyHeader = (AliGenHijingEventHeader*) fMCevent->GenEventHeader();//header->GenEventHeader();
     pyHeader->PrimaryVertex(vtxMC);
   }
   //---------------------------------------- CHECK ------------------------------<<<
@@ -1120,7 +1119,7 @@ void AliTrackletTaskMulti::FillMCPrimaries()
   int nprim = 0;
   for (int itr=ntr;itr--;) {
     if (!fStack->IsPhysicalPrimary(itr)) continue;
-    AliMCParticle *part  = (AliMCParticle*)fMCEvent->GetTrack(itr);
+    AliMCParticle *part  = (AliMCParticle*)fMCevent->GetTrack(itr);
     if (!part->Charge()) continue;
     //
     //---------------------------------------- CHECK ------------------------------>>>
index b4ebd7b..19e628c 100755 (executable)
@@ -18,8 +18,8 @@ class TNtuple;
 class AliMCParticle;
 class AliITSMultRecBg;
 class AliESDTrackCuts;
+class AliITSsegmentationSPD;
 
-#include "../ITS/AliITSsegmentationSPD.h"
 #include "AliAnalysisTaskSE.h"
 #include "AliTriggerAnalysis.h" 
 #include <TMath.h>
@@ -189,8 +189,8 @@ class AliTrackletTaskMulti : public AliAnalysisTaskSE {
   Bool_t       fDoRotation;                // do rotation
   Bool_t       fDoMixing;                  // do mixing
   //
-  Bool_t       fUseMC; 
-  Bool_t       fCheckReconstructables;
+  Bool_t       fUseMC;                     // flag of MC processing
+  Bool_t       fCheckReconstructables;     // request check
   //
   TObjArray*   fHistosTrData;              //! all tracklets in data
   TObjArray*   fHistosTrInj;               //! injected
@@ -233,7 +233,7 @@ class AliTrackletTaskMulti : public AliAnalysisTaskSE {
   TTree*       fRPTree;                    //! tree of recpoints
   TTree*       fRPTreeMix;                 //! tree of recpoints for mixing
   AliStack*    fStack;                     //! MC stack
-  AliMCEvent*  fMCEvent;                   //! MC Event
+  AliMCEvent*  fMCevent;                   //! MC Event
   Float_t      fESDVtx[3];                 //  ESD vertex
   //
   Float_t fNPart;                          // number of participant pairs from MC
@@ -244,7 +244,7 @@ class AliTrackletTaskMulti : public AliAnalysisTaskSE {
   //
   static const Float_t fgkCentPerc[];               //! centrality in percentiles
   //
-  static const char*  fgCentSelName[];              //!centrality types
+  static const char*  fgkCentSelName[];             //!centrality types
   static const char*  fgkPDGNames[];                //!pdg names
   static const Int_t  fgkPDGCodes[];                //!pdg codes
   //
index c9f0eb5..ef1b309 100755 (executable)
@@ -14,7 +14,7 @@
 **************************************************************************/
 
 ///////////////////////////////////////////////////////////////////////////
-// Class AliTrackletTaskMulti                                            //
+// Class AliTrackletTaskMultipp                                            //
 // Analysis task to produce data and MC histos needed for tracklets      //
 // dNdEta extraction in multiple bins in one go                          //
 // Author:  ruben.shahoyan@cern.ch                                       //
 #include "../ITS/AliITSRecPoint.h"
 #include "../ITS/AliITSgeomTGeo.h"
 #include "../ITS/AliITSMultReconstructor.h" 
+#include "../ITS/AliITSsegmentationSPD.h"
 
 #include "AliLog.h"
 
 #include "AliPhysicsSelection.h"
-#include "AliTrackletTaskMulti.h"
+#include "AliTrackletTaskMultipp.h"
 #include "AliITSMultRecBg.h"
 #include "AliGenEventHeader.h"
 #include "AliGenHijingEventHeader.h"
 #include "AliGenDPMjetEventHeader.h"
 #include "AliESDtrackCuts.h"
 
-ClassImp(AliTrackletTaskMulti)
+ClassImp(AliTrackletTaskMultipp)
 
 // centrality percentile (inverted: 100% - most central)
-const Float_t  AliTrackletTaskMulti::fgkCentPerc[] = {0,100};//{0,5,10,20,30};
-//const Float_t  AliTrackletTaskMulti::fgkCentPerc[] = {0,5,10,20,30,40};
+const Float_t  AliTrackletTaskMultipp::fgkCentPerc[] = {0,100};//{0,5,10,20,30};
+//const Float_t  AliTrackletTaskMultipp::fgkCentPerc[] = {0,5,10,20,30,40};
   //{0,10,20,30,40,50,60,70,80,90,95,101};
 
-const char* AliTrackletTaskMulti::fgCentSelName[] = {"V0M","FMD","TRK","TKL","CL0","CL1","V0MvsFMD","TKLvsV0M","ZENvsZDC"};
+const char* AliTrackletTaskMultipp::fgkCentSelName[] = {"V0M","FMD","TRK","TKL","CL0","CL1","V0MvsFMD","TKLvsV0M","ZENvsZDC"};
 
-const char*  AliTrackletTaskMulti::fgkPDGNames[] = {
+const char*  AliTrackletTaskMultipp::fgkPDGNames[] = {
 "#pi^{+}",
 "p",
 "K^{+}",
@@ -134,7 +135,7 @@ const char*  AliTrackletTaskMulti::fgkPDGNames[] = {
 "Others"
 };
 
-const int AliTrackletTaskMulti::fgkPDGCodes[] = {
+const int AliTrackletTaskMultipp::fgkPDGCodes[] = {
   211,
  2212, 
   321, 
@@ -187,11 +188,11 @@ const int AliTrackletTaskMulti::fgkPDGCodes[] = {
 
 //________________________________________________________________________
 /*//Default constructor
-AliTrackletTaskMulti::AliTrackletTaskMulti(const char *name)
+AliTrackletTaskMultipp::AliTrackletTaskMultipp(const char *name)
   : AliAnalysisTaskSE(name),
 */  
 //________________________________________________________________________
-AliTrackletTaskMulti::AliTrackletTaskMulti(const char *name) 
+AliTrackletTaskMultipp::AliTrackletTaskMultipp(const char *name) 
   : AliAnalysisTaskSE(name), 
 //
   fOutput(0), 
@@ -243,7 +244,7 @@ AliTrackletTaskMulti::AliTrackletTaskMulti(const char *name)
   fRPTree(0),
   fRPTreeMix(0),
   fStack(0),
-  fMCEvent(0),
+  fMCevent(0),
   //
   fNPart(0),
   fNBColl(0),
@@ -268,15 +269,14 @@ AliTrackletTaskMulti::AliTrackletTaskMulti(const char *name)
 }
 
 //________________________________________________________________________
-AliTrackletTaskMulti::~AliTrackletTaskMulti()
+AliTrackletTaskMultipp::~AliTrackletTaskMultipp()
 {
   // Destructor
   // histograms are in the output list and deleted when the output
   // list is deleted by the TSelector dtor
-  if (fOutput && !AliAnalysisManager::GetAnalysisManager()->IsProofMode()) {  //RRR
+  if (!AliAnalysisManager::GetAnalysisManager()->IsProofMode()) {  //RRR
     printf("Deleteing output\n");
     delete fOutput;
-    fOutput = 0;
   }
   //
   delete fMultReco;
@@ -296,9 +296,9 @@ AliTrackletTaskMulti::~AliTrackletTaskMulti()
 }
 
 //________________________________________________________________________
-void AliTrackletTaskMulti::UserCreateOutputObjects() 
+void AliTrackletTaskMultipp::UserCreateOutputObjects() 
 {
-  //
+  //  create output
   fOutput = new TList();
   fOutput->SetOwner(); 
   //
@@ -367,13 +367,13 @@ void AliTrackletTaskMulti::UserCreateOutputObjects()
     printf("Wrong centrality type %d\n",fUseCentralityVar);
     exit(1);
   }
-  AliInfo(Form("Centrality type selected: %s\n",fgCentSelName[fUseCentralityVar]));
+  AliInfo(Form("Centrality type selected: %s\n",fgkCentSelName[fUseCentralityVar]));
   PostData(1, fOutput);
   //
 }
 
 //________________________________________________________________________
-void AliTrackletTaskMulti::UserExec(Option_t *) 
+void AliTrackletTaskMultipp::UserExec(Option_t *) 
 {
   // Main loop
   //
@@ -443,7 +443,7 @@ void AliTrackletTaskMulti::UserExec(Option_t *)
   }
   ((TH2*)fHistosCustom->UncheckedAt(kHZDCZEMNoSel))->Fill(zemEnergy,zdcEnergy);
   //
-  Float_t centPercentile = centrality->GetCentralityPercentileUnchecked(fgCentSelName[fUseCentralityVar]);
+  Float_t centPercentile = centrality->GetCentralityPercentileUnchecked(fgkCentSelName[fUseCentralityVar]);
 
   // temporary >>>>>>>>>>>>>>>>>>>>>>>>
   if (fUseCentralityVar==kCentZEMvsZDC) {
@@ -474,15 +474,15 @@ void AliTrackletTaskMulti::UserExec(Option_t *)
   ((TH1*)fHistosCustom->UncheckedAt(kHStatCent))->Fill(centPercentile);
   //
   AliMCEventHandler* eventHandler = 0;
-  fMCEvent = 0;
+  fMCevent = 0;
   fStack = 0;
   //
   if (fUseMC) {
     eventHandler = (AliMCEventHandler*)anMan->GetMCtruthEventHandler();
     if (!eventHandler) { printf("ERROR: Could not retrieve MC event handler\n"); return; }
-    fMCEvent = eventHandler->MCEvent();
-    if (!fMCEvent) { printf("ERROR: Could not retrieve MC event\n"); return; }
-    fStack = fMCEvent->Stack();
+    fMCevent = eventHandler->MCEvent();
+    if (!fMCevent) { printf("ERROR: Could not retrieve MC event\n"); return; }
+    fStack = fMCevent->Stack();
     if (!fStack) { printf("Stack not available\n"); return; }
   }
   //
@@ -497,7 +497,7 @@ void AliTrackletTaskMulti::UserExec(Option_t *)
   fNPart  = 0;
   fNBColl = 0;
   if (fUseMC) {
-    mcGenH = fMCEvent->GenEventHeader();
+    mcGenH = fMCevent->GenEventHeader();
     if (mcGenH->InheritsFrom(AliGenHijingEventHeader::Class())) {
       AliGenHijingEventHeader* hHijing = (AliGenHijingEventHeader*)mcGenH;
       fNPart  = (hHijing->ProjectileParticipants()+hHijing->TargetParticipants())/2.;
@@ -601,8 +601,9 @@ void AliTrackletTaskMulti::UserExec(Option_t *)
 
 
 //________________________________________________________________________
-void AliTrackletTaskMulti::Terminate(Option_t *) 
+void AliTrackletTaskMultipp::Terminate(Option_t *) 
 {
+  // finish processing
   Printf("Terminating...");
   TH1* hstat;
   TList *lst = dynamic_cast<TList*>(GetOutputData(1));
@@ -640,7 +641,7 @@ void AliTrackletTaskMulti::Terminate(Option_t *)
 
 
 //_________________________________________________________________________
-void AliTrackletTaskMulti::InitMultReco()
+void AliTrackletTaskMultipp::InitMultReco()
 {
   // create mult reconstructor
   if (fMultReco) delete fMultReco;
@@ -659,7 +660,7 @@ void AliTrackletTaskMulti::InitMultReco()
 }
 
 //_________________________________________________________________________
-TObjArray* AliTrackletTaskMulti::BookCustomHistos()
+TObjArray* AliTrackletTaskMultipp::BookCustomHistos()
 {
   // book custom histos, not related to specific tracklet type
   TObjArray* histos = new TObjArray();
@@ -674,7 +675,7 @@ TObjArray* AliTrackletTaskMulti::BookCustomHistos()
   hstat->GetXaxis()->SetBinLabel(kOneUnit,"ScaleMerge");
   hstat->GetXaxis()->SetBinLabel(kNWorkers,"Workers");
   //
-  hstat->GetXaxis()->SetBinLabel(kCentVar,  fgCentSelName[fUseCentralityVar]);
+  hstat->GetXaxis()->SetBinLabel(kCentVar,  fgkCentSelName[fUseCentralityVar]);
   hstat->GetXaxis()->SetBinLabel(kDPhi,  "#Delta#varphi");
   hstat->GetXaxis()->SetBinLabel(kDTht,  "#Delta#theta");
   hstat->GetXaxis()->SetBinLabel(kNStd,  "N.std");
@@ -912,7 +913,7 @@ TObjArray* AliTrackletTaskMulti::BookCustomHistos()
 }
 
 //_________________________________________________________________________
-TObjArray* AliTrackletTaskMulti::BookHistosSet(const char* pref, UInt_t selHistos) 
+TObjArray* AliTrackletTaskMultipp::BookHistosSet(const char* pref, UInt_t selHistos) 
 {
   // book standard set of histos attaching the pref in front of the name/title
   //
@@ -991,7 +992,7 @@ TObjArray* AliTrackletTaskMulti::BookHistosSet(const char* pref, UInt_t selHisto
 }
 
 //_________________________________________________________________________
-void AliTrackletTaskMulti::AddHisto(TObjArray* histos, TObject* h, Int_t at)
+void AliTrackletTaskMultipp::AddHisto(TObjArray* histos, TObject* h, Int_t at)
 {
   // add single histo to the set
   if (at>=0) histos->AddAtAndExpand(h,at);
@@ -1000,7 +1001,7 @@ void AliTrackletTaskMulti::AddHisto(TObjArray* histos, TObject* h, Int_t at)
 }
 
 //_________________________________________________________________________
-void AliTrackletTaskMulti::FillHistos(Int_t type, const AliMultiplicity* mlt)
+void AliTrackletTaskMultipp::FillHistos(Int_t type, const AliMultiplicity* mlt)
 {
   // fill histos of given type
   if (!mlt) return;
@@ -1019,7 +1020,7 @@ void AliTrackletTaskMulti::FillHistos(Int_t type, const AliMultiplicity* mlt)
   AliGenHijingEventHeader* pyHeader = 0;
   //
   if (fUseMC) {
-    pyHeader = (AliGenHijingEventHeader*) fMCEvent->GenEventHeader();//header->GenEventHeader();
+    pyHeader = (AliGenHijingEventHeader*) fMCevent->GenEventHeader();//header->GenEventHeader();
     pyHeader->PrimaryVertex(vtxMC);
   }
   //---------------------------------------- CHECK ------------------------------<<<
@@ -1112,17 +1113,17 @@ void AliTrackletTaskMulti::FillHistos(Int_t type, const AliMultiplicity* mlt)
 }
 
 //_________________________________________________________________________
-void AliTrackletTaskMulti::FillMCPrimaries()
+void AliTrackletTaskMultipp::FillMCPrimaries()
 {
   // fill all MC primaries Zv vs Eta
-  if (!fStack || !fMCEvent) return;
+  if (!fStack || !fMCevent) return;
 
   //---------------------------------------- CHECK ------------------------------>>>
   TArrayF vtxMC;
   AliGenHijingEventHeader* pyHeader = 0;
   //
   if (fUseMC) {
-    pyHeader = (AliGenHijingEventHeader*) fMCEvent->GenEventHeader();//header->GenEventHeader();
+    pyHeader = (AliGenHijingEventHeader*) fMCevent->GenEventHeader();//header->GenEventHeader();
     pyHeader->PrimaryVertex(vtxMC);
   }
   //---------------------------------------- CHECK ------------------------------<<<
@@ -1132,7 +1133,7 @@ void AliTrackletTaskMulti::FillMCPrimaries()
   int nprim = 0;
   for (int itr=ntr;itr--;) {
     if (!fStack->IsPhysicalPrimary(itr)) continue;
-    AliMCParticle *part  = (AliMCParticle*)fMCEvent->GetTrack(itr);
+    AliMCParticle *part  = (AliMCParticle*)fMCevent->GetTrack(itr);
     if (!part->Charge()) continue;
     //
     //---------------------------------------- CHECK ------------------------------>>>
@@ -1167,7 +1168,7 @@ void AliTrackletTaskMulti::FillMCPrimaries()
 }
 
 //_________________________________________________________________________
- void AliTrackletTaskMulti::FillHistosSet(TObjArray* histos, double eta,
+ void AliTrackletTaskMultipp::FillHistosSet(TObjArray* histos, double eta,
                                          //double /*phi*/,double /*theta*/,
                                          double dphi,double dtheta,double dThetaX,
                                          double dist) 
@@ -1195,7 +1196,7 @@ void AliTrackletTaskMulti::FillMCPrimaries()
 }
  
 //__________________________________________________________________
-void AliTrackletTaskMulti::FillSpecies(Int_t primsec, Int_t id)
+void AliTrackletTaskMultipp::FillSpecies(Int_t primsec, Int_t id)
 {
   // fill PDGcode 
   TH1 *hPart=0,*hParent=0;
@@ -1228,7 +1229,7 @@ void AliTrackletTaskMulti::FillSpecies(Int_t primsec, Int_t id)
 }
 
 //_________________________________________________________________________
-Int_t AliTrackletTaskMulti::GetCentralityBin(Float_t perc) const
+Int_t AliTrackletTaskMultipp::GetCentralityBin(Float_t perc) const
 {
   // calculate centrality bin
   for (int i=0;i<fNCentBins;i++) if (perc>=fgkCentPerc[i] && perc<=fgkCentPerc[i+1]) return i;
@@ -1236,7 +1237,7 @@ Int_t AliTrackletTaskMulti::GetCentralityBin(Float_t perc) const
 }
 
 //_________________________________________________________________________
-Int_t AliTrackletTaskMulti::GetPdgBin(Int_t pdgCode)
+Int_t AliTrackletTaskMultipp::GetPdgBin(Int_t pdgCode)
 {
   // return my pdg bin
   int ncodes = sizeof(fgkPDGCodes)/sizeof(int);
@@ -1250,7 +1251,7 @@ Int_t AliTrackletTaskMulti::GetPdgBin(Int_t pdgCode)
 }
 
 //_________________________________________________________________________
-Bool_t AliTrackletTaskMulti::HaveCommonParent(const float* clLabs0,const float* clLabs1)
+Bool_t AliTrackletTaskMultipp::HaveCommonParent(const float* clLabs0,const float* clLabs1)
 {
   // do 2 clusters have common parrent
   const int kMaxPar = 50;
@@ -1286,7 +1287,7 @@ Bool_t AliTrackletTaskMulti::HaveCommonParent(const float* clLabs0,const float*
 
 
 //_________________________________________________________________________
-void AliTrackletTaskMulti::CheckReconstructables()
+void AliTrackletTaskMultipp::CheckReconstructables()
 {
   // fill reconstructable tracklets hitsos
   static TArrayI trInd;
@@ -1421,7 +1422,7 @@ void AliTrackletTaskMulti::CheckReconstructables()
 }
 
 //_________________________________________________________________________
-void AliTrackletTaskMulti::FillClusterInfo()
+void AliTrackletTaskMultipp::FillClusterInfo()
 {
   // fill info on clusters associated to good tracklets
   if (!fMultReco) return;
@@ -1451,7 +1452,7 @@ void AliTrackletTaskMulti::FillClusterInfo()
 }
 
 //_________________________________________________________________________
-void AliTrackletTaskMulti::FillClusterInfoFromMult(const AliMultiplicity* mlt, double zVertex)
+void AliTrackletTaskMultipp::FillClusterInfoFromMult(const AliMultiplicity* mlt, double zVertex)
 {
   // fill info on clusters taking them from Multiplicity object
   const double kRSPD1 = 3.9;
@@ -1478,7 +1479,7 @@ void AliTrackletTaskMulti::FillClusterInfoFromMult(const AliMultiplicity* mlt, d
 }
 
 //_________________________________________________________________________
-void AliTrackletTaskMulti::FillClusterAutoCorrelationFromMult(const AliMultiplicity* mlt, double zVertex)
+void AliTrackletTaskMultipp::FillClusterAutoCorrelationFromMult(const AliMultiplicity* mlt, double zVertex)
 {
   // fill mutual distance between SPD1 clusters
   const double kRSPD1 = 3.9;
index ed47382..3b77e81 100755 (executable)
@@ -1,8 +1,8 @@
-#ifndef ALITRACKLETTASKMULTI_H
-#define ALITRACKLETTASKMULTI_H
+#ifndef ALITRACKLETTASKMULTIPP_H
+#define ALITRACKLETTASKMULTIPP_H
 
 ///////////////////////////////////////////////////////////////////////////
-// Class AliTrackletTaskMulti                                            //
+// Class AliTrackletTaskMultipp                                            //
 // Analysis task to produce data and MC histos needed for tracklets      //
 // dNdEta extraction in multiple bins in one go                          //
 // Author:  ruben.shahoyan@cern.ch                                       //
@@ -18,13 +18,12 @@ class TNtuple;
 class AliMCParticle;
 class AliITSMultRecBg;
 class AliESDTrackCuts;
-
-#include "../ITS/AliITSsegmentationSPD.h"
+class AliITSsegmentationSPD;
 #include "AliAnalysisTaskSE.h"
 #include "AliTriggerAnalysis.h" 
 #include <TMath.h>
 
-class AliTrackletTaskMulti : public AliAnalysisTaskSE {
+class AliTrackletTaskMultipp : public AliAnalysisTaskSE {
  public:
   enum {kData,kBgInj,kBgRot,kBgMix,kMC};
   enum {kCentV0M,kCentFMD,kCentTRK,kCentTKL,kCentCL0,kCentCL1,kCentV0MvsFMD,kCentTKLvsV0,kCentZEMvsZDC,kNCentTypes}; // what is used to define centrality
@@ -127,8 +126,8 @@ class AliTrackletTaskMulti : public AliAnalysisTaskSE {
   };
 
   //
-  AliTrackletTaskMulti(const char *name = "AliTrackletTaskMulti");
-  virtual ~AliTrackletTaskMulti(); 
+  AliTrackletTaskMultipp(const char *name = "AliTrackletTaskMultipp");
+  virtual ~AliTrackletTaskMultipp(); 
   
   virtual void  UserCreateOutputObjects();
   virtual void  UserExec(Option_t *option);
@@ -196,8 +195,8 @@ class AliTrackletTaskMulti : public AliAnalysisTaskSE {
   Bool_t       fDoRotation;                // do rotation
   Bool_t       fDoMixing;                  // do mixing
   //
-  Bool_t       fUseMC; 
-  Bool_t       fCheckReconstructables;
+  Bool_t       fUseMC;                     // flag of MC processing
+  Bool_t       fCheckReconstructables;     // request check
   //
   TObjArray*   fHistosTrData;              //! all tracklets in data
   TObjArray*   fHistosTrInj;               //! injected
@@ -240,7 +239,7 @@ class AliTrackletTaskMulti : public AliAnalysisTaskSE {
   TTree*       fRPTree;                    //! tree of recpoints
   TTree*       fRPTreeMix;                 //! tree of recpoints for mixing
   AliStack*    fStack;                     //! MC stack
-  AliMCEvent*  fMCEvent;                   //! MC Event
+  AliMCEvent*  fMCevent;                   //! MC Event
   Float_t      fESDVtx[3];                 //  ESD vertex
   //
   Float_t fNPart;                          // number of participant pairs from MC
@@ -251,15 +250,15 @@ class AliTrackletTaskMulti : public AliAnalysisTaskSE {
   //
   static const Float_t fgkCentPerc[];               //! centrality in percentiles
   //
-  static const char*  fgCentSelName[];              //!centrality types
+  static const char*  fgkCentSelName[];             //!centrality types
   static const char*  fgkPDGNames[];                //!pdg names
   static const Int_t  fgkPDGCodes[];                //!pdg codes
   //
  private:    
-  AliTrackletTaskMulti(const AliTrackletTaskMulti&); // not implemented
-  AliTrackletTaskMulti& operator=(const AliTrackletTaskMulti&); // not implemented 
+  AliTrackletTaskMultipp(const AliTrackletTaskMultipp&); // not implemented
+  AliTrackletTaskMultipp& operator=(const AliTrackletTaskMultipp&); // not implemented 
   
-  ClassDef(AliTrackletTaskMulti, 1);  
+  ClassDef(AliTrackletTaskMultipp, 1);  
 };
 
 
index 0fdf9ea..265959f 100755 (executable)
@@ -57,7 +57,7 @@
 #include "../ITS/AliITSRecPoint.h"
 #include "../ITS/AliITSgeomTGeo.h"
 #include "../ITS/AliITSMultReconstructor.h" 
-
+#include "../ITS/AliITSsegmentationSPD.h"
 #include "AliLog.h"
 
 #include "AliPhysicsSelection.h"
@@ -228,7 +228,7 @@ AliTrackletTaskUni::AliTrackletTaskUni(const char *name)
   fRPTree(0),
   fRPTreeMix(0),
   fStack(0),
-  fMCEvent(0),
+  fMCevent(0),
   fDontMerge(kFALSE)    
   /*
   ,
@@ -260,10 +260,9 @@ AliTrackletTaskUni::~AliTrackletTaskUni()
   // Destructor
   // histograms are in the output list and deleted when the output
   // list is deleted by the TSelector dtor
-  if (fOutput && !AliAnalysisManager::GetAnalysisManager()->IsProofMode()) {  //RRR
+  if (!AliAnalysisManager::GetAnalysisManager()->IsProofMode()) {  //RRR
     printf("Deleteing output\n");
     delete fOutput;
-    fOutput = 0;
   }
   //
   delete fMultReco;
@@ -285,7 +284,7 @@ AliTrackletTaskUni::~AliTrackletTaskUni()
 //________________________________________________________________________
 void AliTrackletTaskUni::UserCreateOutputObjects() 
 {
-  //
+  // create output
 
   if (fDontMerge) {
     OpenFile(1);
@@ -372,6 +371,7 @@ void AliTrackletTaskUni::UserCreateOutputObjects()
 //________________________________________________________________________
 void AliTrackletTaskUni::RegisterStat() 
 {
+  // account conditions
   static Bool_t done = kFALSE;
   if (done) return;
   TH1* hstat;
@@ -526,15 +526,15 @@ void AliTrackletTaskUni::UserExec(Option_t *)
   //  multESD->Print();
   //
   AliMCEventHandler* eventHandler = 0;
-  fMCEvent = 0;
+  fMCevent = 0;
   fStack = 0;
   //
   if (fUseMC) {
     eventHandler = (AliMCEventHandler*)anMan->GetMCtruthEventHandler();
     if (!eventHandler) { printf("ERROR: Could not retrieve MC event handler\n"); return; }
-    fMCEvent = eventHandler->MCEvent();
-    if (!fMCEvent) { printf("ERROR: Could not retrieve MC event\n"); return; }
-    fStack = fMCEvent->Stack();
+    fMCevent = eventHandler->MCEvent();
+    if (!fMCevent) { printf("ERROR: Could not retrieve MC event\n"); return; }
+    fStack = fMCevent->Stack();
     if (!fStack) { printf("Stack not available\n"); return; }
   }
   //
@@ -637,6 +637,7 @@ void AliTrackletTaskUni::UserExec(Option_t *)
 //________________________________________________________________________
 void AliTrackletTaskUni::Terminate(Option_t *) 
 {
+  // print itself
   Printf("Terminating...");
   RegisterStat();
   //  AliAnalysisTaskSE::Terminate();
@@ -1003,7 +1004,7 @@ void AliTrackletTaskUni::FillHistos(Int_t type, const AliMultiplicity* mlt)
   AliGenHijingEventHeader* pyHeader = 0;
   //
   if (fUseMC) {
-    pyHeader = (AliGenHijingEventHeader*) fMCEvent->GenEventHeader();//header->GenEventHeader();
+    pyHeader = (AliGenHijingEventHeader*) fMCevent->GenEventHeader();//header->GenEventHeader();
     pyHeader->PrimaryVertex(vtxMC);
   }
   //---------------------------------------- CHECK ------------------------------<<<
@@ -1071,14 +1072,14 @@ void AliTrackletTaskUni::FillHistos(Int_t type, const AliMultiplicity* mlt)
 void AliTrackletTaskUni::FillMCPrimaries(TH2F* hetaz)
 {
   // fill all MC primaries Zv vs Eta
-  if (!fStack || !fMCEvent) return;
+  if (!fStack || !fMCevent) return;
 
   //---------------------------------------- CHECK ------------------------------>>>
   TArrayF vtxMC;
   AliGenHijingEventHeader* pyHeader = 0;
   //
   if (fUseMC) {
-    pyHeader = (AliGenHijingEventHeader*) fMCEvent->GenEventHeader();//header->GenEventHeader();
+    pyHeader = (AliGenHijingEventHeader*) fMCevent->GenEventHeader();//header->GenEventHeader();
     pyHeader->PrimaryVertex(vtxMC);
   }
   //---------------------------------------- CHECK ------------------------------<<<
@@ -1088,7 +1089,7 @@ void AliTrackletTaskUni::FillMCPrimaries(TH2F* hetaz)
   int ntr = fStack->GetNtrack();
   for (int itr=ntr;itr--;) {
     if (!fStack->IsPhysicalPrimary(itr)) continue;
-    AliMCParticle *part  = (AliMCParticle*)fMCEvent->GetTrack(itr);
+    AliMCParticle *part  = (AliMCParticle*)fMCevent->GetTrack(itr);
     if (!part->Charge()) continue;
     //
     //---------------------------------------- CHECK ------------------------------>>>
index f30ca6c..59f2ecb 100755 (executable)
@@ -17,8 +17,7 @@ class TNtuple;
 
 class AliMCParticle;
 class AliITSMultRecBg;
-
-#include "../ITS/AliITSsegmentationSPD.h"
+class AliITSsegmentationSPD;
 #include "AliAnalysisTaskSE.h"
 #include "AliTriggerAnalysis.h" 
 
@@ -174,8 +173,8 @@ class AliTrackletTaskUni : public AliAnalysisTaskSE {
   Bool_t       fDoRotation;                // do rotation
   Bool_t       fDoMixing;                  // do mixing
   //
-  Bool_t       fUseMC; 
-  Bool_t       fCheckReconstructables;
+  Bool_t       fUseMC;                     // flag of MC processing
+  Bool_t       fCheckReconstructables;     // request check
   //
   TObjArray*   fHistosTrData;              //! all tracklets in data
   TObjArray*   fHistosTrInj;               //! injected
@@ -217,7 +216,7 @@ class AliTrackletTaskUni : public AliAnalysisTaskSE {
   TTree*       fRPTree;                    //! tree of recpoints
   TTree*       fRPTreeMix;                 //! tree of recpoints for mixing
   AliStack*    fStack;                     //! MC stack
-  AliMCEvent*  fMCEvent;                   //! MC Event
+  AliMCEvent*  fMCevent;                   //! MC Event
   Float_t      fESDVtx[3];                 //  ESD vertex
   //
   /*
index 27cdfa4..e959a79 100644 (file)
@@ -1,3 +1,12 @@
+/**************************************************************/
+/*                                                            */
+/* Set of methods to manipulate with canvas                   */
+/* its elements etc.                                          */
+/* Author:                                                    */
+/* ruben.shahoyan@cern.ch                                     */
+/*                                                            */
+/**************************************************************/
+
 #if !defined(__CINT__) || defined(__MAKECINT__)
 #include <TCanvas.h>
 #include <TString.h>