JetCorrel correction of coding violations, and other style and memory consumption...
authorgconesab <gconesab@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 18 Mar 2010 20:55:22 +0000 (20:55 +0000)
committergconesab <gconesab@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 18 Mar 2010 20:55:22 +0000 (20:55 +0000)
25 files changed:
PWG4/JetCorrel/AliAnalysisTaskJetCorrel.cxx
PWG4/JetCorrel/AliAnalysisTaskJetCorrel.h
PWG4/JetCorrel/AliJetCorrelMaker.cxx
PWG4/JetCorrel/AliJetCorrelMaker.h
PWG4/JetCorrel/AliJetCorrelMixer.cxx
PWG4/JetCorrel/AliJetCorrelMixer.h
PWG4/JetCorrel/AliJetCorrelReader.cxx
PWG4/JetCorrel/AliJetCorrelReader.h
PWG4/JetCorrel/AliJetCorrelSelector.cxx
PWG4/JetCorrel/AliJetCorrelSelector.h
PWG4/JetCorrel/AliJetCorrelWriter.cxx
PWG4/JetCorrel/AliJetCorrelWriter.h
PWG4/JetCorrel/CorrelDefs.h
PWG4/JetCorrel/CorrelKFTrack.cxx
PWG4/JetCorrel/CorrelKFTrack.h
PWG4/JetCorrel/CorrelList.cxx
PWG4/JetCorrel/CorrelList.h
PWG4/JetCorrel/CorrelParticle.cxx
PWG4/JetCorrel/CorrelParticle.h
PWG4/JetCorrel/CorrelRecoParent.cxx
PWG4/JetCorrel/CorrelRecoParent.h
PWG4/JetCorrel/CorrelTrack.cxx
PWG4/JetCorrel/CorrelTrack.h
PWG4/PWG4JetCorrelLinkDef.h
PWG4/macros/ConfigJetCorrel.C

index 36e37aa..968ba20 100644 (file)
@@ -28,7 +28,7 @@ using namespace std;
 ClassImp(AliAnalysisTaskJetCorrel)
 
 AliAnalysisTaskJetCorrel::AliAnalysisTaskJetCorrel() : 
-  AliAnalysisTaskSE("JetCorrelTask"), jcESD(NULL), fOutputContainer(new TList),
+  AliAnalysisTaskSE("JetCorrelTask"), fjcESD(NULL), fOutputContainer(new TList),
   fSelector(new AliJetCorrelSelector), fNumCorrel(0), fNumTrigg(0), fNumAssoc(0), fNumEvts(0),
   fMaker(new AliJetCorrelMaker), fWriter(new AliJetCorrelWriter), fReader(new AliJetCorrelReader),
   fMixer(new AliJetCorrelMixer), fTriggList(NULL), fAssocList(NULL) {
@@ -36,7 +36,7 @@ AliAnalysisTaskJetCorrel::AliAnalysisTaskJetCorrel() :
 }
 
 AliAnalysisTaskJetCorrel::AliAnalysisTaskJetCorrel(AliJetCorrelSelector *s) : 
-  AliAnalysisTaskSE("JetCorrelTask"), jcESD(NULL), fOutputContainer(new TList),
+  AliAnalysisTaskSE("JetCorrelTask"), fjcESD(NULL), fOutputContainer(new TList),
   fSelector(s), fNumCorrel(0), fNumTrigg(0), fNumAssoc(0), fNumEvts(0),
   fMaker(new AliJetCorrelMaker), fWriter(new AliJetCorrelWriter), fReader(new AliJetCorrelReader),
   fMixer(new AliJetCorrelMixer), fTriggList(NULL), fAssocList(NULL) {
@@ -77,8 +77,8 @@ void AliAnalysisTaskJetCorrel::ConnectInputData(Option_t *) {
   if(tree){
     AliESDInputHandler *esdH = dynamic_cast<AliESDInputHandler*>(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler());
     if(esdH){
-      jcESD = dynamic_cast<AliESDEvent*>(esdH->GetEvent());
-      if(!jcESD) {std::cerr<<"AliAnalysisTaskJetCorrel::ConnectInputData - ERROR: no event"<<std::endl; exit(-1);}
+      fjcESD = dynamic_cast<AliESDEvent*>(esdH->GetEvent());
+      if(!fjcESD) {std::cerr<<"AliAnalysisTaskJetCorrel::ConnectInputData - ERROR: no event"<<std::endl; exit(-1);}
     } else {std::cerr<<"AliAnalysisTaskJetCorrel::ConnectInputData - ERROR: no ESD Input"<<std::endl; exit(-1);}
   } else {std::cerr<<"AliAnalysisTaskJetCorrel::ConnectInputData - ERROR: no input tree"<<std::endl; exit(-1);}
 }
@@ -94,13 +94,13 @@ void AliAnalysisTaskJetCorrel::CreateOutputObjects(){
 
 void AliAnalysisTaskJetCorrel::Exec(Option_t */*option*/){
   // get the event and pass it to the data reader object
-  //jcESD = dynamic_cast<AliESDEvent*>(InputEvent());
-  if(!jcESD)
+  //fjcESD = dynamic_cast<AliESDEvent*>(InputEvent());
+  if(!fjcESD)
     {std::cerr<<"AliAnalysisTaskJetCorrel::Exec() - ERROR: Cannot get event "<<fNumEvts<<std::endl; exit(-1);}
-  fReader->SetEvent(jcESD);
+  fReader->SetEvent(fjcESD);
 
   // get global event pars and apply global cuts
-  if(!fSelector->SelectedEvtTrigger(jcESD)) return;
+  if(!fSelector->SelectedEvtTrigger(fjcESD)) return;
   Float_t cent = fReader->GetMultiplicity(); // use multiplicity in p-p
   Float_t zvtx = fReader->GetVertex();
   Int_t cBin = fSelector->GetBin(centr,cent);
index 47cee43..67e188c 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef __ALIANALYSISTASKJETCORREL_H__
-#define __ALIANALYSISTASKJETCORREL_H__
+#ifndef ALIANALYSISTASKJETCORREL_H
+#define ALIANALYSISTASKJETCORREL_H
 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
  * See cxx source for full Copyright notice     */
 /* $Id:  $ */
@@ -31,7 +31,7 @@ class AliAnalysisTaskJetCorrel : public AliAnalysisTaskSE {
   virtual void Terminate(Option_t *option);
   
  private:
-  AliESDEvent *jcESD;
+  AliESDEvent *fjcESD;
   TList *fOutputContainer;                           // Histogram container
   AliJetCorrelSelector *fSelector;                   // User selection object
   UInt_t fNumCorrel, fNumTrigg, fNumAssoc, fNumEvts; // counters
@@ -41,7 +41,8 @@ class AliAnalysisTaskJetCorrel : public AliAnalysisTaskSE {
   AliJetCorrelMixer *fMixer;                         // Event mixing object
   CorrelList_t *fTriggList, *fAssocList;             // Trigger&Associated particle lists
   
-  void CrossCorrelate(CorrelList_t * const TriggList,CorrelList_t * const AssocList, UInt_t cBin, UInt_t vBin, UInt_t iCor);
+  void CrossCorrelate(CorrelList_t * const TriggList, CorrelList_t * const AssocList,
+                     UInt_t cBin, UInt_t vBin, UInt_t iCor);
   
   // disable (make private) copy constructor and assignment operator:
   AliAnalysisTaskJetCorrel(const AliAnalysisTaskJetCorrel&);
index 5593eec..becb75b 100644 (file)
@@ -129,7 +129,7 @@ Bool_t AliJetCorrelMaker::Init(UInt_t s, UInt_t * const v){
   return kTRUE;
 }
 
-Bool_t AliJetCorrelMaker::Check(){
+Bool_t AliJetCorrelMaker::Check() const {
   // performs initialization sanity checks
   if(fNumTrigg<1 || fNumAssoc<1) return kFALSE;
   if(fNumTrigg>fNumCorrel || fNumAssoc>fNumCorrel) return kFALSE;
@@ -182,7 +182,7 @@ Bool_t AliJetCorrelMaker::RecoTrigger() const {
   return kFALSE;
 }
 
-void AliJetCorrelMaker::Show(){
+void AliJetCorrelMaker::Show() const {
   // print out whole correlation setup
   std::cout<<"Number of Correlations:"<<fNumCorrel
           <<" Triggers:"<<fNumTrigg<<" Associated:"<<fNumAssoc<<std::endl;
index a9de220..2d65837 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef __ALIJETCORRELMAKER_H__
-#define __ALIJETCORRELMAKER_H__
+#ifndef ALIJETCORRELMAKER_H
+#define ALIJETCORRELMAKER_H
 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
  * See cxx source for full Copyright notice     */
 /* $Id:  $ */
@@ -18,8 +18,8 @@ class AliJetCorrelMaker : public TObject {
   ~AliJetCorrelMaker();
   
   Bool_t Init(UInt_t s, UInt_t * const v);
-  Bool_t Check();
-  void Show();
+  Bool_t Check() const;
+  void Show()const;
   
   UInt_t NoOfCorrel() const {return fNumCorrel;}
   UInt_t NoOfTrigg()  const {return fNumTrigg;}
@@ -34,10 +34,12 @@ class AliJetCorrelMaker : public TObject {
   
  private: 
   UInt_t fNumCorrel, fNumTrigg, fNumAssoc; // counters
-  UInt_t *fCorrelType;                  // array of correlation types
-  TString *fCorrelStr;                  // array of correlation string descriptors
-  PartType_t *fTriggType, *fAssocType;  // arrays of trigger&associated particle types
-  UInt_t *fIdxTrigg, *fIdxAssoc;        // arrays with trigger&associated indices
+  UInt_t* fCorrelType;     //! array of correlation types
+  TString* fCorrelStr;     //! array of correlation string descriptors
+  PartType_t* fTriggType;  //! array of trigger particle types
+  PartType_t* fAssocType;  //! array of associated particle types
+  UInt_t* fIdxTrigg;       //! array with trigger indices
+  UInt_t* fIdxAssoc;       //! array with associated indices
   
   // disable (make private) copy constructor, and assignment operator:
   AliJetCorrelMaker(const AliJetCorrelMaker&);
index a3f2d33..502bf8f 100644 (file)
@@ -30,8 +30,8 @@ ClassImp(AliJetCorrelMixer)
 
 AliJetCorrelMixer::AliJetCorrelMixer() :
   fSelector(NULL), fMaker(NULL), fWriter(NULL),
-  TriggEvnt(new CorrelList_t), AssocEvnt(new CorrelList_t),
-  AssocIter(NULL), TriggIter(NULL),
+  fTriggEvnt(new CorrelList_t), fAssocEvnt(new CorrelList_t),
+  fAssocIter(NULL), fTriggIter(NULL),
   fNumCentBins(0), fNumVertBins(0), fPoolDepth(0), fNumCorrel(0), fNumTriggs(0), fNumAssocs(0){
   // constructor
 }
@@ -40,8 +40,8 @@ AliJetCorrelMixer::~AliJetCorrelMixer(){
   // destructor
   CleanPool(triggs);
   CleanPool(assocs);
-  if(TriggEvnt) delete TriggEvnt;
-  if(AssocEvnt) delete AssocEvnt;
+  if(fTriggEvnt) delete fTriggEvnt;
+  if(fAssocEvnt) delete fAssocEvnt;
 }
 
 void AliJetCorrelMixer::Init(AliJetCorrelSelector * const s, AliJetCorrelMaker * const m, AliJetCorrelWriter * const w){
@@ -78,27 +78,27 @@ void AliJetCorrelMixer::FillPool(CorrelList_t *partList, UInt_t pIdx, UInt_t vBi
   fPool[pType][pIdx][vBin][cBin]->AddLast(partList->DeepCopy());
 }
 
-void AliJetCorrelMixer::Mix(UInt_t vBin, UInt_t cBin, UInt_t it, UInt_t ia, UInt_t ic){
+void AliJetCorrelMixer::Mix(UInt_t vBin, UInt_t cBin, UInt_t it, UInt_t ia, UInt_t ic) {
   // rolling buffer mixing method
   TListIter* iterAssocPool=(TListIter*)fPool[assocs][ia][vBin][cBin]->MakeIterator();
   while(fPool[triggs][it][vBin][cBin]->GetSize()>0){ // evaluate here due to popping
-    TriggEvnt = (CorrelList_t*)fPool[triggs][it][vBin][cBin]->First();
-    TriggIter = TriggEvnt->Head();
+    fTriggEvnt = (CorrelList_t*)fPool[triggs][it][vBin][cBin]->First();
+    fTriggIter = fTriggEvnt->Head();
     
-    while((AssocEvnt=(CorrelList_t*)iterAssocPool->Next())){
-      AssocIter = AssocEvnt->Head();
+    while((fAssocEvnt=(CorrelList_t*)iterAssocPool->Next())){
+      fAssocIter = fAssocEvnt->Head();
       
-      if(TriggEvnt->EvtID()==AssocEvnt->EvtID()) continue; // don't mix same event!
+      if(fTriggEvnt->EvtID()==fAssocEvnt->EvtID()) continue; // don't mix same event!
       
-      while(!TriggIter.HasEnded()){
-       while(!AssocIter.HasEnded()){
-         fWriter->FillCorrelations(mixed,ic,cBin,vBin,TriggIter.Data(),AssocIter.Data()); // trigg first!
-         AssocIter.Move();
+      while(!fTriggIter.HasEnded()){
+       while(!fAssocIter.HasEnded()){
+         fWriter->FillCorrelations(mixed,ic,cBin,vBin,fTriggIter.Data(),fAssocIter.Data()); // trigg first!
+         fAssocIter.Move();
        } // loop over associated particles
-       AssocIter = AssocEvnt->Head(); // reset associated particle iterator to list head
-       TriggIter.Move();
+       fAssocIter = fAssocEvnt->Head(); // reset associated particle iterator to list head
+       fTriggIter.Move();
       } // loop over trigger particles
-      TriggIter = TriggEvnt->Head(); // reset trigger particle iterator to list head
+      fTriggIter = fTriggEvnt->Head(); // reset trigger particle iterator to list head
     } // loop over associated pool
     fPool[triggs][it][vBin][cBin]->RemoveFirst();
   } // if trigger pool is not empty
@@ -116,7 +116,7 @@ void AliJetCorrelMixer::CleanPool(PoolType_t pType){
   }
 }
 
-UInt_t AliJetCorrelMixer::PoolSize(PoolType_t pType, UInt_t vBin, UInt_t cBin){
+UInt_t AliJetCorrelMixer::PoolSize(PoolType_t pType, UInt_t vBin, UInt_t cBin) const {
   // computes (static) pool size
   UInt_t totalPoolSize=0;
   UInt_t partSize = sizeof(CorrelParticle_t);
@@ -131,7 +131,7 @@ UInt_t AliJetCorrelMixer::PoolSize(PoolType_t pType, UInt_t vBin, UInt_t cBin){
   return totalPoolSize/1024;
 }
 
-void AliJetCorrelMixer::ShowSummary(PoolType_t pType, UInt_t pIdx, UInt_t vBin, UInt_t cBin){
+void AliJetCorrelMixer::ShowSummary(PoolType_t pType, UInt_t pIdx, UInt_t vBin, UInt_t cBin) const {
   // pool printout method
   UInt_t totalPoolSize=0;
   TListIter* iter=(TListIter*)fPool[pType][pIdx][vBin][cBin]->MakeIterator();
@@ -143,7 +143,7 @@ void AliJetCorrelMixer::ShowSummary(PoolType_t pType, UInt_t pIdx, UInt_t vBin,
   std::cout<<vBin<<"]["<<cBin<<"]: nevt="<<fPool[pType][pIdx][vBin][cBin]->GetSize()<<" npart="<<totalPoolSize<<std::endl;
 }
 
-void AliJetCorrelMixer::ShowPool(PoolType_t pType, UInt_t vBin, UInt_t cBin){
+void AliJetCorrelMixer::ShowPool(PoolType_t pType, UInt_t vBin, UInt_t cBin) const {
   // all pools printout
   CorrelList_t* tempList; TListIter* iter;
   UInt_t size = 0;
index 3e20806..e124528 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef __ALIJETCORRELMIXER_H__
-#define __ALIJETCORRELMIXER_H__
+#ifndef ALIJETCORRELMIXER_H
+#define ALIJETCORRELMIXER_H
 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
  * See cxx source for full Copyright notice     */
 /* $Id:  $ */
@@ -24,22 +24,22 @@ class AliJetCorrelMixer : public TObject {
   
   // pool manipulation:
   void FillPool(CorrelList_t *partList, UInt_t pIdx, UInt_t vBin, UInt_t cBin);
-  UInt_t PoolSize(PoolType_t pType, UInt_t vBin, UInt_t cBin);
+  UInt_t PoolSize(PoolType_t pType, UInt_t vBin, UInt_t cBin) const;
   void CleanPool(PoolType_t pType);
   // mixing methods:  
   void Mix(UInt_t vBin, UInt_t cBin, UInt_t it, UInt_t ia, UInt_t ic);
   // print methods:
-  void ShowPool(PoolType_t pType, UInt_t vBin, UInt_t cBin);
-  void ShowSummary(PoolType_t pType, UInt_t pIdx, UInt_t vBin, UInt_t cBin);
+  void ShowPool(PoolType_t pType, UInt_t vBin, UInt_t cBin) const;
+  void ShowSummary(PoolType_t pType, UInt_t pIdx, UInt_t vBin, UInt_t cBin) const;
   
  private:
   AliJetCorrelSelector* fSelector;       // user selection object
   AliJetCorrelMaker* fMaker;             // correlation maker object
   AliJetCorrelWriter* fWriter;           // output writer object
-  CorrelList_t *TriggEvnt, *AssocEvnt;   // particle lists
-  CorrelListIter_t AssocIter, TriggIter; // particle list iterators
+  CorrelList_t *fTriggEvnt, *fAssocEvnt;   //! particle lists
+  CorrelListIter_t fAssocIter, fTriggIter; //! particle list iterators
   UInt_t fNumCentBins, fNumVertBins, fPoolDepth, fNumCorrel, fNumTriggs, fNumAssocs; // counters
-  TList* fPool[2][kMAXNUMCORREL][kMAXVERTBIN][kMAXCENTBIN]; // the particle pools used for mixing
+  TList* fPool[2][kMAXNUMCORREL][kMAXVERTBIN][kMAXCENTBIN]; //! the particle pools used for mixing
   
   // disable (make private) copy constructor and assignment operator:
   AliJetCorrelMixer(const AliJetCorrelMixer&);
index 16d4697..a185190 100644 (file)
  **************************************************************************/
 /* $Id: $ */
 
-//______________________________________________________________________________________
-// Class for input (ESD or AOD) reading and filling of Trigger&Associated particle lists
+//__________________________________________________________________________
+// Class for input (ESD or AOD) reading.
+// At the moment only ESD input is really implemented, AOD to be added later.
+// Its products are the Trigger&Associated particle lists
 //-- Author: Paul Constantin
 
 #include "AliJetCorrelReader.h"
@@ -25,7 +27,7 @@ using namespace std;
 ClassImp(AliJetCorrelReader)
 
 AliJetCorrelReader::AliJetCorrelReader() :
-  jcESD(NULL), fSelector(NULL), fWriter(NULL){
+  fjcESD(NULL), fSelector(NULL), fWriter(NULL){
   // constructor
 }
 
@@ -39,30 +41,30 @@ void AliJetCorrelReader::Init(AliJetCorrelSelector * const s, AliJetCorrelWriter
   fWriter = w;
 }
 
-Float_t AliJetCorrelReader::GetMultiplicity(){
+Float_t AliJetCorrelReader::GetMultiplicity() const {
   // event multiplicity
-  if(!jcESD){
-    std::cerr<<"AliJetCorrelReader::GetVertex() - ERROR : jcESD not set!"<<std::endl; 
+  if(!fjcESD){
+    std::cerr<<"AliJetCorrelReader::GetVertex() - ERROR : fjcESD not set!"<<std::endl; 
     exit(-1);
   }
-  // return jcESD->GetNumberOfTracks(); // ESD no of global tracks
-  const AliMultiplicity* m = jcESD->GetMultiplicity(); // SPD no of tracklets
+  // return fjcESD->GetNumberOfTracks(); // ESD no of global tracks
+  const AliMultiplicity* m = fjcESD->GetMultiplicity(); // SPD no of tracklets
   return m->GetNumberOfTracklets();
 }
 
-Float_t AliJetCorrelReader::GetVertex(){
+Float_t AliJetCorrelReader::GetVertex() const {
   // event vertex
-  if(!jcESD){
-    std::cerr<<"AliJetCorrelReader::GetVertex() - ERROR : jcESD not set!"<<std::endl; 
+  if(!fjcESD){
+    std::cerr<<"AliJetCorrelReader::GetVertex() - ERROR : fjcESD not set!"<<std::endl; 
     exit(-1);
   }
-  return jcESD->GetPrimaryVertex()->GetZ();
+  return fjcESD->GetPrimaryVertex()->GetZ();
 }
 
-Bool_t AliJetCorrelReader::VtxOutPipe(){
+Bool_t AliJetCorrelReader::VtxOutPipe() const {
   // returns true if vertex R >= beam pipe
-  Float_t xVtx2 = jcESD->GetPrimaryVertex()->GetX()*jcESD->GetPrimaryVertex()->GetX();
-  Float_t yVtx2 = jcESD->GetPrimaryVertex()->GetY()*jcESD->GetPrimaryVertex()->GetY();
+  Float_t xVtx2 = fjcESD->GetPrimaryVertex()->GetX()*fjcESD->GetPrimaryVertex()->GetX();
+  Float_t yVtx2 = fjcESD->GetPrimaryVertex()->GetY()*fjcESD->GetPrimaryVertex()->GetY();
   if(TMath::Sqrt(xVtx2+yVtx2)>3) return kTRUE;
   return kFALSE;
 }
@@ -126,13 +128,13 @@ void AliJetCorrelReader::FillESDTrackLists(CorrelList_t *list1, CorrelList_t *li
   // fills trigg&assoc lists simultaneously with ESD tracks
   PartType_t partType = list1->PartID(); // by definition the two lists store same particle
 
-  UInt_t nTracks = jcESD->GetNumberOfTracks() ;
+  UInt_t nTracks = fjcESD->GetNumberOfTracks() ;
   if(nTracks<1) return;
   for(register UInt_t i=0; i<nTracks; i++){
-    AliESDtrack *track = (AliESDtrack*)jcESD->GetTrack(i);
+    AliESDtrack *track = (AliESDtrack*)fjcESD->GetTrack(i);
 
     Float_t pT = track->Pt();
-    if(pT<fSelector->MinAssocPt()) continue;
+    if(pT<fSelector->MinLowBin(assoc)) continue;
     if(fSelector->GenQA()) fWriter->FillTrackQA(track,0);
     if(fSelector->LowQualityTrack(track)) continue;
     if(!fSelector->PassPID(track,partType)) continue;
@@ -151,10 +153,10 @@ void AliJetCorrelReader::FillESDTrackLists(CorrelList_t *list1, CorrelList_t *li
     hadr->SetMass(track->GetMass());
     hadr->SetID(partType);
 
-    if(list1->PoolID()==assocs && fSelector->AssocBin(pT)>=0) list1->Push(hadr->Copy());
-    if(list1->PoolID()==triggs && fSelector->TriggBin(pT)>=0) list1->Push(hadr->Copy());
-    if(list2->PoolID()==assocs && fSelector->AssocBin(pT)>=0) list2->Push(hadr->Copy());
-    if(list2->PoolID()==triggs && fSelector->TriggBin(pT)>=0) list2->Push(hadr->Copy());
+    if(list1->PoolID()==assocs && fSelector->GetBin(assoc,pT)>=0) list1->Push(hadr->Copy());
+    if(list1->PoolID()==triggs && fSelector->GetBin(trigg,pT)>=0) list1->Push(hadr->Copy());
+    if(list2->PoolID()==assocs && fSelector->GetBin(assoc,pT)>=0) list2->Push(hadr->Copy());
+    if(list2->PoolID()==triggs && fSelector->GetBin(trigg,pT)>=0) list2->Push(hadr->Copy());
     delete hadr;
   } // ESD track loop
 }
@@ -164,13 +166,13 @@ void AliJetCorrelReader::FillESDTrackList(CorrelList_t *list){
   // (2) electrons to be used in dielectron reconstruction. Assoc pT cuts apply then...
   PartType_t partType = list->PartID();
 
-  UInt_t nTracks = jcESD->GetNumberOfTracks();
+  UInt_t nTracks = fjcESD->GetNumberOfTracks();
   if(nTracks<1) return;
   for(register UInt_t i=0; i<nTracks; i++){
-    AliESDtrack *track = (AliESDtrack*)jcESD->GetTrack(i);
+    AliESDtrack *track = (AliESDtrack*)fjcESD->GetTrack(i);
 
     Float_t pT = track->Pt();
-    if(pT<fSelector->MinAssocPt()) continue; 
+    if(pT<fSelector->MinLowBin(assoc)) continue; 
     if(fSelector->GenQA()) fWriter->FillTrackQA(track,0);
     if(fSelector->LowQualityTrack(track)) continue;
     if(fSelector->GenQA()) fWriter->FillTrackQA(track,1);
@@ -240,10 +242,10 @@ void AliJetCorrelReader::FillParentList(CorrelList_t *ParentList, CorrelList_t *
     while(!iterChild2.HasEnded()){
       CorrelParticle_t *child2 = iterChild2.Data(); iterChild2.Move();
       CorrelRecoParent_t *parent = new CorrelRecoParent_t;
-      parent->SetEvent(jcESD);
+      parent->SetEvent(fjcESD);
       Bool_t goodParent = parent->Reconstruct(child1, child2, fSelector->UseAliKF());
-      Bool_t inPtRange = (ParentList->PoolID()==assocs && fSelector->AssocBin(parent->Pt())>=0) ||
-       (ParentList->PoolID()==triggs && fSelector->TriggBin(parent->Pt())>=0);
+      Bool_t inPtRange = (ParentList->PoolID()==assocs && fSelector->GetBin(assoc,parent->Pt())>=0) ||
+       (ParentList->PoolID()==triggs && fSelector->GetBin(trigg,parent->Pt())>=0);
       if(goodParent && inPtRange) ParentList->Push(parent);
     } // 2nd particle loop
   } // 1st particle loop
index ca9ef21..dc39912 100644 (file)
@@ -1,11 +1,13 @@
-#ifndef __ALIJETCORRELREADER_H__
-#define __ALIJETCORRELREADER_H__
+#ifndef ALIJETCORRELREADER_H
+#define ALIJETCORRELREADER_H
 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
  * See cxx source for full Copyright notice     */
 /* $Id:  $ */
 
-//______________________________________________________________________________________
-// Class for input (ESD or AOD) reading and filling of Trigger&Associated particle lists
+//__________________________________________________________________________
+// Class for input (ESD or AOD) reading.
+// At the moment only ESD input is really implemented, AOD to be added later.
+// Its products are the Trigger&Associated particle lists
 //-- Author: Paul Constantin
  
 #include "AliJetCorrelWriter.h"
@@ -18,15 +20,15 @@ class AliJetCorrelReader : public TObject {
   ~AliJetCorrelReader();
   
   void Init(AliJetCorrelSelector * const s, AliJetCorrelWriter * const w);    
-  void SetEvent(AliESDEvent * const e) {jcESD=e;}
+  void SetEvent(AliESDEvent * const e) {fjcESD=e;}
   
-  Float_t GetMultiplicity(); 
-  Float_t GetVertex();
-  Bool_t VtxOutPipe();
+  Float_t GetMultiplicity() const; 
+  Float_t GetVertex() const;
+  Bool_t VtxOutPipe() const;
   void FillLists(CorrelList_t* list1, CorrelList_t* list2);
   
  private:    
-  AliESDEvent *jcESD;              // input event (ESD/AOD)
+  AliESDEvent *fjcESD;              // input event (ESD/AOD)
   AliJetCorrelSelector *fSelector; // user selection object
   AliJetCorrelWriter *fWriter;     // output writer object
   
index abb25db..89f2780 100644 (file)
@@ -27,14 +27,15 @@ using namespace std;
 ClassImp(AliJetCorrelSelector)
 
 AliJetCorrelSelector::AliJetCorrelSelector() : 
-  fGenQA(kFALSE), fDPhiNumBins(0), fDEtaNumBins(0), fNumCorrel(0), nEvtTriggs(0),
-  fPoolDepth(0), fCorrelType(NULL), fEvtTriggs(NULL), minTriggPt(0), maxTriggPt(0), bwTriggPt(0),
-  minAssocPt(0), maxAssocPt(0), bwAssocPt(0), fITSRefit(kFALSE), fTPCRefit(kFALSE), fTRDRefit(kFALSE),
+  fGenQA(kFALSE), fDPhiNumBins(0), fDEtaNumBins(0), fNumCorrel(0), fNumEvtTriggs(0), fPoolDepth(0), 
+  fCorrelType(NULL), fEvtTriggs(NULL), fITSRefit(kFALSE), fTPCRefit(kFALSE), fTRDRefit(kFALSE),
   fRejectKinkChild(kFALSE), fMaxEta(0), fMaxNsigmaVtx(0), fMaxTrkVtx(0), fMaxITSChi2(0), fMaxTPCChi2(0),
-  fMinNClusITS(0), fMinNClusTPC(0), trkMinProx(0), fUseAliKF(kFALSE) {
+  fMinNClusITS(0), fMinNClusTPC(0), fTrkMinProx(0), fUseAliKF(kFALSE) {
   // (default) constructor
   fNumBins[centr] = 0; fBinning[centr] = NULL;
   fNumBins[zvert] = 0; fBinning[zvert] = NULL;
+  fNumBins[trigg] = 0; fBinning[trigg] = NULL;
+  fNumBins[assoc] = 0; fBinning[assoc] = NULL;
 }
 
 AliJetCorrelSelector::~AliJetCorrelSelector(){
@@ -42,11 +43,15 @@ AliJetCorrelSelector::~AliJetCorrelSelector(){
   if(fCorrelType) delete [] fCorrelType;
   fNumCorrel = 0;
   if(fEvtTriggs) delete [] fEvtTriggs;
-  nEvtTriggs = 0;
+  fNumEvtTriggs = 0;
   if(fBinning[centr]) delete [] fBinning[centr];
   fNumBins[centr] = 0;
   if(fBinning[zvert]) delete [] fBinning[zvert];
   fNumBins[zvert] = 0;
+  if(fBinning[trigg]) delete [] fBinning[trigg];
+  fNumBins[trigg] = 0;
+  if(fBinning[assoc]) delete [] fBinning[assoc];
+  fNumBins[assoc] = 0;
 }
 
 void AliJetCorrelSelector::SetCorrelTypes(UInt_t s, UInt_t * const v){
@@ -68,9 +73,9 @@ void AliJetCorrelSelector::SetTriggers(UInt_t s, TString * const v){
   // fills the array of event triggers
   if(s<1){std::cerr<<"AliJetCorrelSelector::SetTriggers - empty array"<<std::endl; exit(-1);}
   if(s>9){std::cerr<<"AliJetCorrelSelector: event trigger array too big!"<<std::endl; exit(-1);}
-  nEvtTriggs = s;
-  fEvtTriggs = new TString[nEvtTriggs];
-  for(UInt_t k=0; k<nEvtTriggs; k++){
+  fNumEvtTriggs = s;
+  fEvtTriggs = new TString[fNumEvtTriggs];
+  for(UInt_t k=0; k<fNumEvtTriggs; k++){
     if(!v[k].IsAscii()){
       std::cerr<<"AliJetCorrelSelector::SetTriggers - read error? val["<<k<<"]="<<v[k]<<std::endl;
       exit(-1);
@@ -110,27 +115,43 @@ void AliJetCorrelSelector::SetBinningZvert(UInt_t s, Float_t * const v){
   }
 }
 
-void AliJetCorrelSelector::SetBinningTrigg(Float_t min, Float_t max, Float_t bw){
-  // sets trigger Pt binning
-  minTriggPt = min;
-  maxTriggPt = max;
-  bwTriggPt  = bw;
+void AliJetCorrelSelector::SetBinningTrigg(UInt_t s, Float_t * const v){
+  // fills array of trigger bins
+  if(s<1){std::cerr<<"AliJetCorrelSelector::SetBinningTrigg - empty array"<<std::endl; exit(-1);}
+  if(s>kMAXTRIGBIN){std::cerr<<"AliJetCorrelSelector: trigger array too big!"<<std::endl; exit(-1);}
+  fNumBins[trigg] = s;
+  fBinning[trigg] = new Float_t[fNumBins[trigg]]; 
+  for(UInt_t k=0; k<fNumBins[trigg]; k++){
+    if(TMath::Abs(v[k])>999.){
+      std::cerr<<"AliJetCorrelSelector::SetBinningTrigg - read error? val["<<k<<"]="<<v[k]<<std::endl;
+      exit(-1);
+    }
+    else fBinning[trigg][k] = v[k];
+  }
 }
 
-void AliJetCorrelSelector::SetBinningAssoc(Float_t min, Float_t max, Float_t bw){
-  // sets associated Pt binning
-  minAssocPt = min;
-  maxAssocPt = max;
-  bwAssocPt  = bw;
+void AliJetCorrelSelector::SetBinningAssoc(UInt_t s, Float_t * const v){
+  // fills array of associated bins
+  if(s<1){std::cerr<<"AliJetCorrelSelector::SetBinningAssoc - empty array"<<std::endl; exit(-1);}
+  if(s>kMAXTRIGBIN){std::cerr<<"AliJetCorrelSelector: associated array too big!"<<std::endl; exit(-1);}
+  fNumBins[assoc] = s;
+  fBinning[assoc] = new Float_t[fNumBins[assoc]]; 
+  for(UInt_t k=0; k<fNumBins[assoc]; k++){
+    if(TMath::Abs(v[k])>999.){
+      std::cerr<<"AliJetCorrelSelector::SetBinningAssoc - read error? val["<<k<<"]="<<v[k]<<std::endl;
+      exit(-1);
+    }
+    else fBinning[assoc][k] = v[k];
+  }
 }
 
-Float_t AliJetCorrelSelector::BinBorder(BinType_t cType, UInt_t k){
+Float_t AliJetCorrelSelector::BinBorder(BinType_t cType, UInt_t k) const {
   // returns bin margins
   if(k<=NoOfBins(cType)) return fBinning[cType][k];
   else {std::cerr<<"BinBorder Error: bin of type "<<cType<<" outside range "<<k<<std::endl; exit(0);}
 }
 
-Int_t AliJetCorrelSelector::GetBin(BinType_t cType, Float_t val){
+Int_t AliJetCorrelSelector::GetBin(BinType_t cType, Float_t val) const {
   // returns bin number
   Int_t iBin=-1; UInt_t nBins=NoOfBins(cType);
   for(UInt_t i=0; i<nBins; i++)
@@ -138,76 +159,54 @@ Int_t AliJetCorrelSelector::GetBin(BinType_t cType, Float_t val){
   return iBin;
 }
 
-UInt_t AliJetCorrelSelector::NumAssocPt(){
-  UInt_t nBins = UInt_t((maxAssocPt-minAssocPt)/bwAssocPt);
-  if(nBins>=kMAXASSOBIN)
-    {std::cerr<<"AliJetCorrelSelector::NumAssocPt - Error: outside range"<<std::endl; exit(0);}
-  return nBins;
-}
-
-Int_t AliJetCorrelSelector::AssocBin(Float_t pT){
-  if(pT>=maxAssocPt) return -1;
-  return TMath::FloorNint((pT-minAssocPt)/bwAssocPt);
-}
-
-UInt_t AliJetCorrelSelector::NumTriggPt() {
-  UInt_t nBins = UInt_t((maxTriggPt-minTriggPt)/bwTriggPt);
-  if(nBins>=kMAXTRIGBIN)
-    {std::cerr<<"AliJetCorrelSelector::NumTrigPt - Error: outside range"<<std::endl; exit(0);}
-  return nBins;
-}
-
-Int_t AliJetCorrelSelector::TriggBin(Float_t pT){
-  if(pT>=maxTriggPt) return -1;
-  return TMath::FloorNint((pT-minTriggPt)/bwTriggPt);
-}
-
-void AliJetCorrelSelector::Show(){
+void AliJetCorrelSelector::Show() const {
   // print out all user selections
   std::cout<<"Generic selections: "<<std::endl<<" GenQA="<<fGenQA<<" UseAliKF="<<fUseAliKF
           <<" nDPhiBins="<<fDPhiNumBins<<" nDEtaBins="<<fDEtaNumBins<<" PoolDepth="<<fPoolDepth;
   std::cout<<std::endl<<" Correlation Types: ";
   for(UInt_t k=0; k<fNumCorrel; k++) std::cout<<fCorrelType[k]<<" ";
   std::cout<<std::endl<<" Event Triggers: ";
-  for(UInt_t k=0; k<nEvtTriggs; k++) std::cout<<fEvtTriggs[k]<<" ";
+  for(UInt_t k=0; k<fNumEvtTriggs; k++) std::cout<<fEvtTriggs[k]<<" ";
   std::cout<<std::endl<<" Centrality/Multiplicity binning: ";
   for(UInt_t k=0; k<fNumBins[centr]; k++) std::cout<<fBinning[centr][k]<<" ";
   std::cout<<std::endl<<" Vertex binning: ";
   for(UInt_t k=0; k<fNumBins[zvert]; k++) std::cout<<fBinning[zvert][k]<<" ";
-  std::cout<<std::endl<<" Trigg binning:"<<minTriggPt<<"->"<<maxTriggPt<<"/"<<bwTriggPt;
-  std::cout<<std::endl<<" Assoc binning:"<<minAssocPt<<"->"<<maxAssocPt<<"/"<<bwAssocPt;
+  std::cout<<std::endl<<" Trigger binning: ";
+  for(UInt_t k=0; k<fNumBins[trigg]; k++) std::cout<<fBinning[trigg][k]<<" ";
+  std::cout<<std::endl<<" Associated binning: ";
+  for(UInt_t k=0; k<fNumBins[assoc]; k++) std::cout<<fBinning[assoc][k]<<" ";
   std::cout<<std::endl<<"Track selections: "<<std::endl
           <<" MaxEta="<<fMaxEta<<" MaxTrkVtx="<<fMaxTrkVtx<<" MaxNsigmaVtx="<<fMaxNsigmaVtx<<std::endl
           <<" MaxITSChi2="<<fMaxITSChi2<<" MaxTPCChi2="<<fMaxTPCChi2<<std::endl
           <<" MinNClusITS="<<fMinNClusITS<<" MinNClusTPC="<<fMinNClusTPC<<std::endl
           <<" ITSRefit="<<fITSRefit<<" TPCRefit="<<fTPCRefit<<" TRDRefit="<<fTRDRefit<<std::endl
-          <<" RejectKinkChild="<<fRejectKinkChild<<" minTrackPairTPCDist="<<trkMinProx<<std::endl;
+          <<" RejectKinkChild="<<fRejectKinkChild<<" minTrackPairTPCDist="<<fTrkMinProx<<std::endl;
 }
 
 //////////////////////////////////////////////////////////
 // Cutting Methods
 /////////////////////////////////////////////////////////
 
-Bool_t AliJetCorrelSelector::SelectedEvtTrigger(AliESDEvent * const jcESD){
+Bool_t AliJetCorrelSelector::SelectedEvtTrigger(AliESDEvent * const jcESD) const {
   // matches the event trigger classes with the user trigger classes
   if(jcESD->InheritsFrom("AliESDEvent")){
     const AliESDEvent *esd = (AliESDEvent*)jcESD;
     TString trigClass = esd->GetFiredTriggerClasses();
-    if(nEvtTriggs==1 && fEvtTriggs[0].Contains("ALL")) return kTRUE;
-    for(UInt_t k=0; k<nEvtTriggs; k++)
+    if(fNumEvtTriggs==1 && fEvtTriggs[0].Contains("ALL")) return kTRUE;
+    for(UInt_t k=0; k<fNumEvtTriggs; k++)
       if(trigClass.Contains(fEvtTriggs[k])) return kTRUE;
     return kFALSE;
   } else {std::cerr<<"AliJetCorrelSelector::SelectedEvtTrigger ERROR: not an ESD event!"<<std::endl; exit(0);}
 }
 
-Bool_t AliJetCorrelSelector::CloseTrackPair(Float_t dist){
+Bool_t AliJetCorrelSelector::CloseTrackPair(Float_t dist) const {
   // applies two-track cut (dist at TPC entrance); it is possible that single-track cuts,
   // like fraction of shared TPC clusters, will avoid inclusion of split tracks...
-  if(dist>trkMinProx) return kFALSE;
+  if(dist>fTrkMinProx) return kFALSE;
   return kTRUE;
 }
 
-Bool_t AliJetCorrelSelector::LowQualityTrack(AliESDtrack* track){
+Bool_t AliJetCorrelSelector::LowQualityTrack(AliESDtrack* track) const {
   // selects low quality tracks
   if(track->Eta()>fMaxEta) return kTRUE;
   UInt_t status = track->GetStatus();
@@ -237,7 +236,7 @@ Bool_t AliJetCorrelSelector::LowQualityTrack(AliESDtrack* track){
   return kFALSE;
 }
 
-Bool_t AliJetCorrelSelector::PassPID(AliESDtrack* track, PartType_t PartType){
+Bool_t AliJetCorrelSelector::PassPID(AliESDtrack* track, PartType_t PartType) const {
   // checks if a track has the required ID
   Bool_t hasReqPID = kFALSE;
   Stat_t fPid;
@@ -273,7 +272,7 @@ Bool_t AliJetCorrelSelector::PassPID(AliESDtrack* track, PartType_t PartType){
   return hasReqPID;
 }
 
-Float_t AliJetCorrelSelector::GetSigmaToVertex(AliESDtrack* track){
+Float_t AliJetCorrelSelector::GetSigmaToVertex(AliESDtrack* track) const {
   // Calculates the number of sigma to the vertex; from ANALYSIS/AliESDtrackCuts
   Float_t b[2], bRes[2], bCov[3];
   track->GetImpactParameters(b,bCov);
@@ -289,7 +288,7 @@ Float_t AliJetCorrelSelector::GetSigmaToVertex(AliESDtrack* track){
   return nSigma;
 }
 
-void AliJetCorrelSelector::GetPID(AliESDtrack* track, Stat_t& fpid, Stat_t& fweight){
+void AliJetCorrelSelector::GetPID(AliESDtrack* track, Stat_t& fpid, Stat_t& fweight) const {
   // Finds most probable particle: 0=Electron, 1=Muon, 2=Pion, 3=Kaon, 4=Proton
   fpid = -1;
   fweight = -1;
index 457adbd..8a309de 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef __ALIJETCORRELSELECTOR_H__
-#define __ALIJETCORRELSELECTOR_H__
+#ifndef ALIJETCORRELSELECTOR_H
+#define ALIJETCORRELSELECTOR_H
 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
  * See cxx source for full Copyright notice     */
 /* $Id:  $ */
@@ -22,30 +22,26 @@ class AliJetCorrelSelector : public TObject {
   ~AliJetCorrelSelector();
   
   // Selection getters:
-  UInt_t PoolDepth() {return fPoolDepth;}
-  UInt_t NoOfCorrel() {return fNumCorrel;}
-  UInt_t* CorrelTypes() {return fCorrelType;}
-  UInt_t NoOfBins(BinType_t cType) {return fNumBins[cType]-1;}  
-  Float_t BinBorder(BinType_t cType, UInt_t ii);
-  Int_t GetBin(BinType_t cType, Float_t val);
-  Float_t MinAssocPt() {return minAssocPt;}
-  Float_t MaxAssocPt() {return maxAssocPt;}
-  UInt_t  NumAssocPt();
-  Float_t MinTriggPt() {return minTriggPt;}
-  Float_t MaxTriggPt() {return maxTriggPt;}
-  UInt_t  NumTriggPt();
-  Bool_t GenQA()       {return fGenQA;}
-  Bool_t UseAliKF()    {return fUseAliKF;}
-  UInt_t DPhiNumBins() {return fDPhiNumBins;}
-  UInt_t DEtaNumBins() {return fDEtaNumBins;}
-  void Show();
+  UInt_t PoolDepth() const {return fPoolDepth;}
+  UInt_t NoOfCorrel() const {return fNumCorrel;}
+  UInt_t* CorrelTypes() const {return fCorrelType;}
+  UInt_t NoOfBins(BinType_t cType) const {return fNumBins[cType]-1;}  
+  Float_t BinBorder(BinType_t cType, UInt_t ii) const;
+  Float_t MinLowBin(BinType_t cType) const {return fBinning[cType][0];}
+  Float_t MaxHighBin(BinType_t cType) const {return fBinning[cType][fNumBins[cType]-1];}
+  Int_t GetBin(BinType_t cType, Float_t val) const;
+  Bool_t GenQA() const       {return fGenQA;}
+  Bool_t UseAliKF() const    {return fUseAliKF;}
+  UInt_t DPhiNumBins() const {return fDPhiNumBins;}
+  UInt_t DEtaNumBins() const {return fDEtaNumBins;}
+  void Show() const;
   // Selection Setters:
   void SetPoolDepth(UInt_t v)      {fPoolDepth=v;}
   void SetCorrelTypes(UInt_t s,  UInt_t * const v);
   void SetBinningCentr(UInt_t s, Float_t * const v);
   void SetBinningZvert(UInt_t s, Float_t * const v);
-  void SetBinningTrigg(Float_t min, Float_t max, Float_t bw);
-  void SetBinningAssoc(Float_t min, Float_t max, Float_t bw);
+  void SetBinningTrigg(UInt_t s, Float_t * const v);
+  void SetBinningAssoc(UInt_t s, Float_t * const v);
   void SetTriggers(UInt_t s, TString * const v);
   void SetITSRefit(Bool_t v)    {fITSRefit=v;}
   void SetTPCRefit(Bool_t v)    {fTPCRefit=v;}
@@ -61,29 +57,25 @@ class AliJetCorrelSelector : public TObject {
   void SetQA(Bool_t v) {fGenQA=v;}
   void SetDPhiNumBins(UInt_t v) {fDPhiNumBins=v;}
   void SetDEtaNumBins(UInt_t v) {fDEtaNumBins=v;}
-  void SetTrkProximityCut(Float_t v) {trkMinProx=v;}
+  void SetTrkProximityCut(Float_t v) {fTrkMinProx=v;}
   void SetUseAliKF(Bool_t v)    {fUseAliKF=v;}
   // Cutting methods:
-  Int_t AssocBin(Float_t pT);
-  Int_t TriggBin(Float_t pT);
-  Bool_t SelectedEvtTrigger(AliESDEvent * const jcESD);
-  Bool_t CloseTrackPair(Float_t dist);
-  Bool_t LowQualityTrack(AliESDtrack* t);  
-  Bool_t PassPID(AliESDtrack* t, PartType_t pType);
-  Float_t GetSigmaToVertex(AliESDtrack* trk);
-  void GetPID(AliESDtrack* trk, Stat_t& fpid, Stat_t& fweight);
+  Bool_t SelectedEvtTrigger(AliESDEvent * const jcESD) const;
+  Bool_t CloseTrackPair(Float_t dist) const;
+  Bool_t LowQualityTrack(AliESDtrack* t) const;
+  Bool_t PassPID(AliESDtrack* t, PartType_t pType) const;
+  Float_t GetSigmaToVertex(AliESDtrack* trk) const;
+  void GetPID(AliESDtrack* trk, Stat_t& fpid, Stat_t& fweight) const;
   
  private: 
   // Generic Selections:
   Bool_t fGenQA;                 // generate QA histos
   UInt_t fDPhiNumBins, fDEtaNumBins; // number of bins in DeltaPhi, DeltaEta histos
-  UInt_t fNumCorrel, nEvtTriggs, fPoolDepth; // number of correlations, event triggers, pool depth
-  UInt_t *fCorrelType;           // array of correlation types
-  TString *fEvtTriggs;           // array of event triggers
-  UInt_t fNumBins[2];            // number of bins: centr, zvert
-  Float_t* fBinning[2];          // bin margins: centr, zvert
-  Float_t minTriggPt, maxTriggPt, bwTriggPt; // trigg Pt binning
-  Float_t minAssocPt, maxAssocPt, bwAssocPt; // assoc Pt binning
+  UInt_t fNumCorrel, fNumEvtTriggs, fPoolDepth; // number of correlations, event triggers, pool depth
+  UInt_t* fCorrelType;           //! array of correlation types
+  TString* fEvtTriggs;           //! array of event triggers
+  UInt_t fNumBins[4];            // number of bins: centr, zvert, trigg, assoc
+  Float_t* fBinning[4];          //! bin margins: centr, zvert, trigg, assoc
   // Track Selections:
   Bool_t fITSRefit, fTPCRefit, fTRDRefit, fRejectKinkChild; // on/off cuts
   Float_t fMaxEta;                   // single-particle eta cut
@@ -91,14 +83,14 @@ class AliJetCorrelSelector : public TObject {
   Float_t fMaxTrkVtx;                // track-primary vertex cut (value)
   Float_t fMaxITSChi2, fMaxTPCChi2;  // ITS/TPC Chi2/cluster cut
   UInt_t fMinNClusITS, fMinNClusTPC; // ITS/TPC number of clusters cut
-  Float_t trkMinProx;                // two-track proximity cut (dist at TPC entrance)
+  Float_t fTrkMinProx;                // two-track proximity cut (dist at TPC entrance)
   Bool_t fUseAliKF;                  // use AliKF or TLorentzVector for parent reconstruction
   
   // disable (make private) copy constructor, and assignment operator:
   AliJetCorrelSelector(const AliJetCorrelSelector&);
   AliJetCorrelSelector& operator=(const AliJetCorrelSelector&);
   
-  ClassDef(AliJetCorrelSelector, 1);
+  ClassDef(AliJetCorrelSelector, 1); //AliJetCorrelSelector
 };
 
 #endif 
index fd46f48..4216614 100644 (file)
@@ -16,6 +16,7 @@
 
 //______________________________________________________
 // Class for output (histograms) definition and filling.
+// Contains also the methods for calculation of correlation parameters.
 //-- Author: Paul Constantin
 
 #include "AliJetCorrelWriter.h"
@@ -25,8 +26,8 @@ using namespace std;
 ClassImp(AliJetCorrelWriter)
 
 AliJetCorrelWriter::AliJetCorrelWriter() :
-  fSelector(NULL), fMaker(NULL), hname(""), htit(""), fRecoTrigg(kFALSE), fRndm(6251093),
-  hBinsCentr(NULL), hBinsZVert(NULL), hCentr(NULL), hZVert(NULL), ntuParent(NULL) {
+  fSelector(NULL), fMaker(NULL), fHname(""), fHtit(""), fRecoTrigg(kFALSE), fRndm(6251093),
+  fHBinsCentr(NULL), fHBinsZVert(NULL), fHBinsTrigg(NULL), fHBinsAssoc(NULL),fHCentr(NULL), fHZVert(NULL), ntuParent(NULL) {
   // constructor
   for(UInt_t i=0; i<kMAXNUMCORREL; i++) 
     for(UInt_t j=0; j<kMAXCENTBIN; j++) 
@@ -54,88 +55,96 @@ void AliJetCorrelWriter::CreateGeneric(TList *histosContainer){
   UInt_t nTypeAssoc = fMaker->NoOfAssoc();
   UInt_t nBinsCentr = fSelector->NoOfBins(centr);
   UInt_t nBinsZVert = fSelector->NoOfBins(zvert);
-  UInt_t nBinsTrigg = fSelector->NumTriggPt();
-  Float_t minTrigg  = fSelector->MinTriggPt();
-  Float_t maxTrigg  = fSelector->MaxTriggPt();
-  UInt_t nBinsAssoc = fSelector->NumAssocPt();
-  Float_t minAssoc  = fSelector->MinAssocPt();
-  Float_t maxAssoc  = fSelector->MaxAssocPt();
+  UInt_t nBinsTrigg = fSelector->NoOfBins(trigg);
+  UInt_t nBinsAssoc = fSelector->NoOfBins(assoc);
+  Float_t minTrigg  = fSelector->MinLowBin(trigg);
+  Float_t maxTrigg  = fSelector->MaxHighBin(trigg);
+  Float_t minAssoc  = fSelector->MinLowBin(assoc);
+  Float_t maxAssoc  = fSelector->MaxHighBin(assoc);
 
   for(UInt_t ic=0; ic<nBinsCentr; ic++){ // loop over centrality bins
     for(UInt_t tt=0; tt<nTypeTrigg; tt++){ // loop over trigger types
-      htit="type:"; htit+=tt; htit+=" cent:"; htit+=ic;
-      hname = "hTriggPt"; hname+=tt; hname+=ic;
-      hTriggPt[tt][ic] = new TH1F(hname,  htit, 10*nBinsTrigg, minTrigg, maxTrigg); // for <pT> each bin
-      histosContainer->AddLast(hTriggPt[tt][ic]);
+      fHtit="type:"; fHtit+=tt; fHtit+=" cent:"; fHtit+=ic;
+      fHname = "fHTriggPt"; fHname+=tt; fHname+=ic;
+      fHTriggPt[tt][ic] = new TH1F(fHname,  fHtit, 10*nBinsTrigg, minTrigg, maxTrigg); // for <pT> each bin
+      histosContainer->AddLast(fHTriggPt[tt][ic]);
     } // loop over trigger types
     for(UInt_t at=0; at<nTypeAssoc; at++){ // loop over trigger types
-      htit="type:"; htit+=at; htit+=" cent:"; htit+=ic;
-      hname = "hAssocPt"; hname+=at; hname+=ic;
-      hAssocPt[at][ic] = new TH1F(hname,  htit, 10*nBinsAssoc, minAssoc, maxAssoc); // for <pT> each bin
-      histosContainer->AddLast(hAssocPt[at][ic]);
+      fHtit="type:"; fHtit+=at; fHtit+=" cent:"; fHtit+=ic;
+      fHname = "fHAssocPt"; fHname+=at; fHname+=ic;
+      fHAssocPt[at][ic] = new TH1F(fHname,  fHtit, 10*nBinsAssoc, minAssoc, maxAssoc); // for <pT> each bin
+      histosContainer->AddLast(fHAssocPt[at][ic]);
     } // loop over trigger types
   } // centrality binning loop
 
-  hCentr = new TH1F("hCentr","centrality distribution",100, 0., 100.);
-  histosContainer->AddLast(hCentr);
-  hZVert = new TH1F("hZVert","vertex distribution",100, -50., 50.);
-  histosContainer->AddLast(hZVert);
+  fHCentr = new TH1F("fHCentr","centrality distribution",100, 0., 100.);
+  histosContainer->AddLast(fHCentr);
+  fHZVert = new TH1F("fHZVert","vertex distribution",100, -50., 50.);
+  histosContainer->AddLast(fHZVert);
 
-  hBinsCentr = new TH1F("hBinsCentr","centrality binning", nBinsCentr+1, 0, 1); 
-  histosContainer->AddLast(hBinsCentr);
+  fHBinsCentr = new TH1F("fHBinsCentr","centrality binning", nBinsCentr+1, 0, 1); 
+  histosContainer->AddLast(fHBinsCentr);
   for(UInt_t i=1;i<=nBinsCentr+1; i++)
-    hBinsCentr->SetBinContent(i,fSelector->BinBorder(centr,i-1));
-  hBinsZVert = new TH1F("hBinsZVert","centrality binning", nBinsZVert+1, 0, 1); 
-  histosContainer->AddLast(hBinsZVert);
+    fHBinsCentr->SetBinContent(i,fSelector->BinBorder(centr,i-1));
+  fHBinsZVert = new TH1F("fHBinsZVert","centrality binning", nBinsZVert+1, 0, 1); 
+  histosContainer->AddLast(fHBinsZVert);
   for(UInt_t i=1;i<=nBinsZVert+1; i++)
-    hBinsZVert->SetBinContent(i,fSelector->BinBorder(zvert,i-1));
+    fHBinsZVert->SetBinContent(i,fSelector->BinBorder(zvert,i-1));
+  fHBinsTrigg = new TH1F("fHBinsTrigg","trigger binning", nBinsTrigg+1, 0, 1); 
+  histosContainer->AddLast(fHBinsTrigg);
+  for(UInt_t i=1;i<=nBinsTrigg+1; i++)
+    fHBinsTrigg->SetBinContent(i,fSelector->BinBorder(trigg,i-1));
+  fHBinsAssoc = new TH1F("fHBinsAssoc","associated binning", nBinsAssoc+1, 0, 1); 
+  histosContainer->AddLast(fHBinsAssoc);
+  for(UInt_t i=1;i<=nBinsAssoc+1; i++)
+    fHBinsAssoc->SetBinContent(i,fSelector->BinBorder(assoc,i-1));
 }
 
 void AliJetCorrelWriter::CreateQA(TList *histosContainer){
   // books QA histograms
   TString when[2] = {"before cuts","after cuts"};
   for(UInt_t i=0; i<2; i++){
-    hname = "hTrkITSQA"; hname += i;
-    htit = "ITS nClust vs Chi2/nClust "; htit += when[i];
-    hTrkITSQA[i] = new TH2F(hname,htit,20,0.,20.,50,0.,10.);
-    histosContainer->AddLast(hTrkITSQA[i]);
-    hname = "hTrkTPCQA"; hname += i;
-    htit = "TPC nClust vs Chi2/nClust "; htit += when[i];
-    hTrkTPCQA[i] = new TH2F(hname,htit,30,0.,150.,50,0.,10.);
-    histosContainer->AddLast(hTrkTPCQA[i]);
-    hname = "hTrkVTXQA"; hname += i;
-    htit = "VTX KinkIndex vs nSigma "; htit += when[i];
-    hTrkVTXQA[i] = new TH2F(hname,htit,21,-10.,10,50,0.,10.);
-    histosContainer->AddLast(hTrkVTXQA[i]);
+    fHname = "fHTrkITSQA"; fHname += i;
+    fHtit = "ITS nClust vs Chi2/nClust "; fHtit += when[i];
+    fHTrkITSQA[i] = new TH2F(fHname,fHtit,20,0.,20.,50,0.,10.);
+    histosContainer->AddLast(fHTrkITSQA[i]);
+    fHname = "fHTrkTPCQA"; fHname += i;
+    fHtit = "TPC nClust vs Chi2/nClust "; fHtit += when[i];
+    fHTrkTPCQA[i] = new TH2F(fHname,fHtit,30,0.,150.,50,0.,10.);
+    histosContainer->AddLast(fHTrkTPCQA[i]);
+    fHname = "fHTrkVTXQA"; fHname += i;
+    fHtit = "VTX KinkIndex vs nSigma "; fHtit += when[i];
+    fHTrkVTXQA[i] = new TH2F(fHname,fHtit,21,-10.,10,50,0.,10.);
+    histosContainer->AddLast(fHTrkVTXQA[i]);
   }
 
   UInt_t nTypeTrigg = fMaker->NoOfTrigg();
   UInt_t nTypeAssoc = fMaker->NoOfAssoc();
   UInt_t nBinsCentr = fSelector->NoOfBins(centr);
-  UInt_t nBinsTrigg = fSelector->NumTriggPt();
-  Float_t minTrigg  = fSelector->MinTriggPt();
-  Float_t maxTrigg  = fSelector->MaxTriggPt();
-  UInt_t nBinsAssoc = fSelector->NumAssocPt();
-  Float_t minAssoc  = fSelector->MinAssocPt();
-  Float_t maxAssoc  = fSelector->MaxAssocPt();
+  UInt_t nBinsTrigg = fSelector->NoOfBins(trigg);
+  UInt_t nBinsAssoc = fSelector->NoOfBins(assoc);
+  Float_t minTrigg  = fSelector->MinLowBin(trigg);
+  Float_t maxTrigg  = fSelector->MaxHighBin(trigg);
+  Float_t minAssoc  = fSelector->MinLowBin(assoc);
+  Float_t maxAssoc  = fSelector->MaxHighBin(assoc);
   for(UInt_t ic=0; ic<nBinsCentr; ic++){ // centrality loop
     for(UInt_t it=0; it<2; it++){ // mixing type loop (real/mixed)
-      hname="hTrkProx"; hname+=it; hname+=ic;
-      htit="hTrkProx"; htit+=it; htit+=ic;
-      hTrkProx[it][ic] = new TH3F(hname,htit,100,0.,10.,
+      fHname="fHTrkProx"; fHname+=it; fHname+=ic;
+      fHtit="fHTrkProx"; fHtit+=it; fHtit+=ic;
+      fHTrkProx[it][ic] = new TH3F(fHname,fHtit,100,0.,10.,
                                  nBinsTrigg,minTrigg,maxTrigg,nBinsAssoc,minAssoc,maxAssoc);
-      histosContainer->AddLast(hTrkProx[it][ic]);
+      histosContainer->AddLast(fHTrkProx[it][ic]);
     } // loop over mixing type
   } // loop over centrality
   for(UInt_t tt=0; tt<nTypeTrigg; tt++){ // loop over trigger types
-    hname = "hTriggAcc"; hname+=tt;
-    hTriggAcc[tt] = new TH3F(hname,hname,62,0.,2*TMath::Pi(),20,-1.,1.,nBinsTrigg,minTrigg,maxTrigg);
-    histosContainer->AddLast(hTriggAcc[tt]);
+    fHname = "fHTriggAcc"; fHname+=tt;
+    fHTriggAcc[tt] = new TH3F(fHname,fHname,62,0.,2*TMath::Pi(),20,-1.,1.,nBinsTrigg,minTrigg,maxTrigg);
+    histosContainer->AddLast(fHTriggAcc[tt]);
   } // loop over trigger types
   for(UInt_t ta=0; ta<nTypeAssoc; ta++){ // loop over associated types
-    hname="hAssocAcc"; hname+=ta;
-    hAssocAcc[ta] = new TH3F(hname,hname,62,0.,2*TMath::Pi(),20,-1.,1.,nBinsAssoc,minAssoc,maxAssoc);
-    histosContainer->AddLast(hAssocAcc[ta]);
+    fHname="fHAssocAcc"; fHname+=ta;
+    fHAssocAcc[ta] = new TH3F(fHname,fHname,62,0.,2*TMath::Pi(),20,-1.,1.,nBinsAssoc,minAssoc,maxAssoc);
+    histosContainer->AddLast(fHAssocAcc[ta]);
   } // loop over associated types
 }
 
@@ -145,13 +154,12 @@ void AliJetCorrelWriter::CreateCorrelations(TList* histosContainer){
   UInt_t nTypeCorrel = fMaker->NoOfCorrel();
   UInt_t nBinsCentr = fSelector->NoOfBins(centr);
   UInt_t nBinsZVert = fSelector->NoOfBins(zvert);
-  UInt_t nBinsTrigg = fSelector->NumTriggPt();
-  UInt_t nBinsAssoc = fSelector->NumAssocPt();
-  Float_t maxAssoc  = fSelector->MaxAssocPt();
+  UInt_t nBinsTrigg = fSelector->NoOfBins(trigg);
+  UInt_t nBinsAssoc = fSelector->NoOfBins(assoc);
+  Float_t maxAssoc  = fSelector->MaxHighBin(assoc);
   UInt_t kDPhiNumBins = fSelector->DPhiNumBins();
   UInt_t kDEtaNumBins = fSelector->DEtaNumBins();
-  UInt_t nPoutBins = UInt_t(TMath::Ceil(2.2*maxAssoc/bwPout)); // since |p_out|<p_Ta       
-
+  UInt_t nPoutBins = UInt_t(TMath::Ceil(2.2*maxAssoc/bwPout)); // since |p_out|<p_Ta
   if(fRecoTrigg) {  // if any correlation has reconstructed trigger, define ntuple; use id to differentiate
     ntuParent = new TNtuple("ntuParent","Reconstructed Parent Ntuple","id:q:m:pT:phi:eta:assym:open");
     histosContainer->AddLast(ntuParent);
@@ -161,17 +169,17 @@ void AliJetCorrelWriter::CreateCorrelations(TList* histosContainer){
       for(UInt_t hiv=0; hiv<nBinsZVert; hiv++){ // vertex loop
        for(UInt_t hit=0; hit<nBinsTrigg; hit++){ // trigger loop
          for(UInt_t hia=0; hia<nBinsAssoc; hia++){ // associated loop
-           htit = fMaker->Descriptor(htc); htit+=":"; htit+=hic; htit+=hiv; htit+=hit; htit+=hia;
-           hname="hReal"; hname+=htc; hname+=hic; hname+=hiv; hname+=hit; hname+=hia;
-           hReal[htc][hic][hiv][hit][hia] = new TH3F(hname,htit, kDPhiNumBins,lr,ur,
+           fHtit = fMaker->Descriptor(htc); fHtit+=":"; fHtit+=hic; fHtit+=hiv; fHtit+=hit; fHtit+=hia;
+           fHname="fHReal"; fHname+=htc; fHname+=hic; fHname+=hiv; fHname+=hit; fHname+=hia;
+           fHReal[htc][hic][hiv][hit][hia] = new TH3F(fHname,fHtit, kDPhiNumBins,lr,ur,
                                                      kDEtaNumBins,-2.,2.,
                                                      nPoutBins,-1.1*maxAssoc,1.1*maxAssoc);
-           histosContainer->AddLast(hReal[htc][hic][hiv][hit][hia]);
-           hname="hMix"; hname+=htc; hname+=hic; hname+=hiv; hname+=hit; hname+=hia;
-           hMix[htc][hic][hiv][hit][hia] = new TH3F(hname,htit, kDPhiNumBins,lr,ur,
+           histosContainer->AddLast(fHReal[htc][hic][hiv][hit][hia]);
+           fHname="fHMix"; fHname+=htc; fHname+=hic; fHname+=hiv; fHname+=hit; fHname+=hia;
+           fHMix[htc][hic][hiv][hit][hia] = new TH3F(fHname,fHtit, kDPhiNumBins,lr,ur,
                                                      kDEtaNumBins,-2.,2.,
                                                      nPoutBins,-1.1*maxAssoc,1.1*maxAssoc);
-           histosContainer->AddLast(hMix[htc][hic][hiv][hit][hia]);
+           histosContainer->AddLast(fHMix[htc][hic][hiv][hit][hia]);
          } // loop over associated bins
        } // loop over trigger bins
       } // loop over vertex bins
@@ -185,8 +193,8 @@ void AliJetCorrelWriter::CreateCorrelations(TList* histosContainer){
 
 void AliJetCorrelWriter::FillGlobal(Float_t cent, Float_t zvert){
   // some global event histos
-  hCentr->Fill(cent);
-  hZVert->Fill(zvert);
+  fHCentr->Fill(cent);
+  fHZVert->Fill(zvert);
 }
 
 void AliJetCorrelWriter::FillSingleHistos(UInt_t cBin, CorrelList_t * const TriggList, UInt_t tIdx,
@@ -196,8 +204,8 @@ void AliJetCorrelWriter::FillSingleHistos(UInt_t cBin, CorrelList_t * const Trig
     CorrelListIter_t trigIter = TriggList->Head();
     while(!trigIter.HasEnded()){
       CorrelParticle_t *particle = trigIter.Data();
-      hTriggPt[tIdx][cBin]->Fill(particle->Pt());
-      if(fSelector->GenQA()) hTriggAcc[tIdx]->Fill(particle->Phi(),particle->Eta(),particle->Pt());
+      fHTriggPt[tIdx][cBin]->Fill(particle->Pt());
+      if(fSelector->GenQA()) fHTriggAcc[tIdx]->Fill(particle->Phi(),particle->Eta(),particle->Pt());
       trigIter.Move();
     }
   }
@@ -205,8 +213,8 @@ void AliJetCorrelWriter::FillSingleHistos(UInt_t cBin, CorrelList_t * const Trig
     CorrelListIter_t assoIter = AssocList->Head();
     while(!assoIter.HasEnded()){
       CorrelParticle_t *particle = assoIter.Data();
-      hAssocPt[aIdx][cBin]->Fill(particle->Pt());
-      if(fSelector->GenQA()) hAssocAcc[aIdx]->Fill(particle->Phi(),particle->Eta(),particle->Pt());
+      fHAssocPt[aIdx][cBin]->Fill(particle->Pt());
+      if(fSelector->GenQA()) fHAssocAcc[aIdx]->Fill(particle->Phi(),particle->Eta(),particle->Pt());
       assoIter.Move();
     }
   }
@@ -224,9 +232,9 @@ void AliJetCorrelWriter::FillTrackQA(AliESDtrack * const track, UInt_t idx){
   UInt_t kinkIndex = track->GetKinkIndex(0);
   Float_t sigVtx = fSelector->GetSigmaToVertex(track);
 
-  hTrkITSQA[idx]->Fill(Float_t(nClusITS),chi2ITS);
-  hTrkTPCQA[idx]->Fill(Float_t(nClusTPC),chi2TPC);
-  hTrkVTXQA[idx]->Fill(Float_t(kinkIndex),sigVtx);
+  fHTrkITSQA[idx]->Fill(Float_t(nClusITS),chi2ITS);
+  fHTrkTPCQA[idx]->Fill(Float_t(nClusTPC),chi2TPC);
+  fHTrkVTXQA[idx]->Fill(Float_t(kinkIndex),sigVtx);
 }
 
 void AliJetCorrelWriter::FillParentNtuple(CorrelList_t * const ParentList){
@@ -260,12 +268,13 @@ void AliJetCorrelWriter::FillCorrelations(FillType_t fTyp, UInt_t iCorr, UInt_t
   Float_t ptt  = Trigg->Pt();
   Float_t phit = Trigg->Phi();
   Float_t etat = Trigg->Eta();
-  Int_t   tBin = fSelector->TriggBin(ptt);
+  Int_t   tBin = fSelector->GetBin(trigg,ptt);
   // associated information:
   Float_t pta  = Assoc->Pt();
   Float_t phia = Assoc->Phi();
   Float_t etaa = Assoc->Eta();
-  Int_t   aBin = fSelector->AssocBin(pta);
+  Int_t   aBin = fSelector->GetBin(assoc,pta);
+  //  Short_t qprod= Trigg->Q()*Assoc->Q();
 
   if(tBin<0 || aBin<0) return;  // one of them is not in the required pT range
   if(fabs(ptt-pta)<1.e-6 && fabs(phit-phia)<1.e-6 && fabs(etat-etaa)<1.e-6) return; // don't auto-correlate
@@ -278,7 +287,7 @@ void AliJetCorrelWriter::FillCorrelations(FillType_t fTyp, UInt_t iCorr, UInt_t
       {std::cerr<<"AliJetCorrelWriter::FillCorrelations: failed casting!"<<std::endl; exit(-1);}
     Float_t pairDist = trk1->Dist(trk2);
     if(fSelector->CloseTrackPair(pairDist)) return; // proximity cut
-    if(fSelector->GenQA()) hTrkProx[fTyp][cBin]->Fill(pairDist,ptt,pta);
+    if(fSelector->GenQA()) fHTrkProx[fTyp][cBin]->Fill(pairDist,ptt,pta);
   }
 
   // Fill correlation histograms:
@@ -286,15 +295,15 @@ void AliJetCorrelWriter::FillCorrelations(FillType_t fTyp, UInt_t iCorr, UInt_t
   Float_t deta = etat-etaa;
   Float_t pout = pta*TMath::Sin(dphi);
   if(fTyp==real){
-    hReal[iCorr][cBin][vBin][tBin][aBin]->Fill(dphi,deta,pout);
+    fHReal[iCorr][cBin][vBin][tBin][aBin]->Fill(dphi,deta,pout);
     fNumReal[iCorr][cBin]++;
   } else {
-    hMix[iCorr][cBin][vBin][tBin][aBin]->Fill(dphi,deta,pout);
+    fHMix[iCorr][cBin][vBin][tBin][aBin]->Fill(dphi,deta,pout);
     fNumMix[iCorr][cBin]++;
   }
 }
 
-void AliJetCorrelWriter::ShowStats(){
+void AliJetCorrelWriter::ShowStats() const {
   // stats printout method
   UInt_t nTypeCorrel = fMaker->NoOfCorrel();
   UInt_t nBinsCentr = fSelector->NoOfBins(centr);
@@ -309,7 +318,7 @@ void AliJetCorrelWriter::ShowStats(){
   }
 }
 
-Float_t AliJetCorrelWriter::DeltaPhi(Float_t  phi1, Float_t phi2){
+Float_t AliJetCorrelWriter::DeltaPhi(Float_t  phi1, Float_t phi2) {
 // wrapps dphi in (-pi/3,5pi/3)
   Float_t kPi = TMath::Pi();
   Float_t res = phi2-phi1;
index cf99752..d012c75 100644 (file)
@@ -1,11 +1,12 @@
-#ifndef  __ALIJETCORRELWRITER_H__
-#define  __ALIJETCORRELWRITER_H__
+#ifndef  ALIJETCORRELWRITER_H
+#define  ALIJETCORRELWRITER_H
 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
  * See cxx source for full Copyright notice     */
 /* $Id:  $ */
 
 //______________________________________________________
 // Class for output (histograms) definition and filling.
+// Contains also the methods for calculation of correlation parameters.
 //-- Author: Paul Constantin
 
 #include "AliJetCorrelSelector.h"
@@ -31,27 +32,27 @@ class AliJetCorrelWriter : public TObject {
                        CorrelParticle_t * const Trigger, CorrelParticle_t * const Associated);
   
   Float_t DeltaPhi(Float_t phi1, Float_t phi2);
-  void  ShowStats();
+  void  ShowStats() const;
   
  private:
   AliJetCorrelSelector *fSelector;  // user selection object
   AliJetCorrelMaker *fMaker;        // correlation maker object
-  TString hname, htit;              // histos name&title
+  TString fHname, fHtit;            // histos name&title
   Bool_t fRecoTrigg;                // is trigger reconstructed
   TRandom2 fRndm;                   // random number generator
   UInt_t fNumReal[kMAXNUMCORREL][kMAXCENTBIN], fNumMix[kMAXNUMCORREL][kMAXCENTBIN]; // counters
   
   // Output Histograms
-  TH1F *hBinsCentr, *hBinsZVert, *hCentr, *hZVert;          // binning histos
-  TH2F *hTrkITSQA[2], *hTrkTPCQA[2], *hTrkVTXQA[2];         // track QA histos
-  TH3F *hTrkProx[2][kMAXCENTBIN];                           // distance at TPC entrance between tracks
-  TH3F *hTriggAcc[kMAXNUMCORREL];                           // trigg PhixEta acceptance
-  TH3F *hAssocAcc[kMAXNUMCORREL];                           // assoc PhixEta acceptance
-  TNtuple *ntuParent;                                       // reconstructed parent ntuple
-  TH1F *hTriggPt[kMAXNUMCORREL][kMAXCENTBIN];               // trigg Pt
-  TH1F *hAssocPt[kMAXNUMCORREL][kMAXCENTBIN];               // assoc Pt
-  TH3F *hReal[kMAXNUMCORREL][kMAXCENTBIN][kMAXVERTBIN][kMAXTRIGBIN][kMAXASSOBIN];  // real DPhixDEtaxPout
-  TH3F *hMix[kMAXNUMCORREL][kMAXCENTBIN][kMAXVERTBIN][kMAXTRIGBIN][kMAXASSOBIN];   // mix  DPhixDEtaxPout
+  TH1F *fHBinsCentr, *fHBinsZVert, *fHBinsTrigg, *fHBinsAssoc, *fHCentr, *fHZVert;  // binning histos
+  TH2F *fHTrkITSQA[2], *fHTrkTPCQA[2], *fHTrkVTXQA[2];       // track QA histos
+  TH3F *fHTrkProx[2][kMAXCENTBIN];                           // distance at TPC entrance between tracks
+  TH3F *fHTriggAcc[kMAXNUMCORREL];                           // trigg PhixEta acceptance
+  TH3F *fHAssocAcc[kMAXNUMCORREL];                           // assoc PhixEta acceptance
+  TNtuple *ntuParent;                                        // reconstructed parent ntuple
+  TH1F *fHTriggPt[kMAXNUMCORREL][kMAXCENTBIN];               // trigg Pt
+  TH1F *fHAssocPt[kMAXNUMCORREL][kMAXCENTBIN];               // assoc Pt
+  TH3F *fHReal[kMAXNUMCORREL][kMAXCENTBIN][kMAXVERTBIN][kMAXTRIGBIN][kMAXASSOBIN];  // real DPhixDEtaxPout
+  TH3F *fHMix[kMAXNUMCORREL][kMAXCENTBIN][kMAXVERTBIN][kMAXTRIGBIN][kMAXASSOBIN];   // mix  DPhixDEtaxPout
   
   // disable (make private) copy constructor and assignment operator:
   AliJetCorrelWriter(const AliJetCorrelWriter&);
index 79143b0..01fee28 100644 (file)
 
 enum FillType_t {real, mixed};
 enum PoolType_t {triggs, assocs};
-enum BinType_t  {centr, zvert}; 
+enum BinType_t  {centr, zvert, trigg, assoc}; 
 enum PartType_t {unknown, hadron, proton, kaon, pion, photon, electron, jet, 
                 dihadron, diphoton, dielectron, dijet};
 
 const UInt_t kMAXNUMCORREL = 1;     // Maximum no of correlations
 const UInt_t kMAXVERTBIN   = 10;    // Maximum no of vertex bins
-const UInt_t kMAXCENTBIN   = 2;     // Maximum no of centrality bins
+const UInt_t kMAXCENTBIN   = 3;     // Maximum no of centrality bins
 const UInt_t kMAXTRIGBIN   = 10;    // Maximum no of trigger bins
-const UInt_t kMAXASSOBIN   = 20;    // Maximum no of associated bins
+const UInt_t kMAXASSOBIN   = 10;    // Maximum no of associated bins
 
 #endif
index cd98feb..9c43475 100644 (file)
@@ -61,7 +61,7 @@ CorrelKFTrack_t* CorrelKFTrack_t::Copy(){
   return copy;
 }
 
-void CorrelKFTrack_t::Show(){
+void CorrelKFTrack_t::Show() const {
   // printout method
   std::cout<<" Electron pT="<<Pt()<<" phi="<<Phi()<<" eta="<<Eta()<<" m="<<M()<<" id="<<ID()
           <<" param="<<Param()<<" covar="<<Covar()<<std::endl;
index 960ab7b..37e69f4 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef __CORRELKFTRACK_H__
-#define __CORRELKFTRACK_H__
+#ifndef CORRELKFTRACK_H
+#define CORRELKFTRACK_H
 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
  * See cxx source for full Copyright notice     */
 /* $Id:  $ */
@@ -26,7 +26,7 @@ class CorrelKFTrack_t : public CorrelParticle_t {
   Double_t* Param() const {return fParam;}
   Double_t* Covar() const {return fCovar;}
   
-  virtual void Show();
+  virtual void Show() const;
   
  private:
   Double_t* fParam; // Param[6] = {X, Y, Z, Px, Py, Pz} - position and momentum
index 717a654..7122a2c 100644 (file)
@@ -57,7 +57,7 @@ CorrelListIter_t::CorrelListIter_t(const CorrelListIter_t& rhs) : fCurr(rhs.fCur
 CorrelListIter_t::~CorrelListIter_t(){
 }
 
-void CorrelListIter_t::Check(){
+void CorrelListIter_t::Check() const {
   // performs bounds check
   if(HasEnded()){
     std::cerr<<"CorrelListIter_t::Check() - ERROR: attempt to access null iterator!"<<std::endl; 
@@ -137,12 +137,12 @@ void CorrelList_t::Reset(){
   fHead = NULL;
 }
 
-void CorrelList_t::ShowHead(){
+void CorrelList_t::ShowHead() const {
   // top printout
   std::cout<<" CorrelList_t("<<this<<") head="<<fHead<<" size="<<Size()<<" filled="<<Filled()<<" evt="<<EvtID()<<" part="<<PartID()<<" pool="<<PoolID()<<std::endl;
 }
 
-void CorrelList_t::Show(){
+void CorrelList_t::Show() const {
   // full printout
   ShowHead();
   CorrelListIter_t iter = Head();
index 4be4ca2..7df82f8 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef __CORRELLIST_H__
-#define __CORRELLIST_H__
+#ifndef CORRELLIST_H
+#define CORRELLIST_H
 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
  * See cxx source for full Copyright notice     */
 /* $Id:  $ */
@@ -29,8 +29,8 @@ class CorrelListNode_t {
   CorrelListNode_t* GetNext() const {return fNext;}
     
  private:
-    CorrelParticle_t* fPart;
-    CorrelListNode_t* fNext;      
+  CorrelParticle_t* fPart; // pointer to contained particle
+  CorrelListNode_t* fNext; // pointer to next node
 };
 
 class CorrelListIter_t {
@@ -42,10 +42,10 @@ class CorrelListIter_t {
   const CorrelListIter_t& operator=(const CorrelListIter_t& rhs);
     
   Bool_t HasEnded() const {return (fCurr==NULL);}
-  void Check();
+  void Check() const;
   void Move() {Check(); fCurr=fCurr->GetNext();}
-  CorrelListNode_t* Node() {Check(); return fCurr;}
-  CorrelParticle_t* Data() {Check(); return fCurr->GetData();}
+  CorrelListNode_t* Node() const {Check(); return fCurr;}
+  CorrelParticle_t* Data() const {Check(); return fCurr->GetData();}
   
  private:
   CorrelListNode_t* fCurr; // iterator "current node"
@@ -68,8 +68,8 @@ class CorrelList_t : public TObject {
   void SetFilled(Bool_t f) {fFilled=f;}
   void Label(PartType_t p, PoolType_t l, UInt_t e) {fPartID=p; fPoolID=l; fEvtID=e;}
   CorrelListIter_t Head() const {return CorrelListIter_t(fHead);}
-  void ShowHead();
-  void Show();
+  void ShowHead() const;
+  void Show() const;
   
  private:
   UInt_t fSize;             // list size
@@ -80,6 +80,8 @@ class CorrelList_t : public TObject {
   CorrelListNode_t* fHead;  // list head
   
   CorrelList_t(const CorrelList_t& rhs);        // forbid copy constructor
+  
+  ClassDef(CorrelList_t, 1); //CorrelList_t
 };
 
 #endif
index 01eab31..ed98487 100644 (file)
@@ -45,7 +45,7 @@ CorrelParticle_t* CorrelParticle_t::Copy(){
   return copy;
 }
 
-void CorrelParticle_t::Show(){
+void CorrelParticle_t::Show() const {
   // printout method
   std::cout<<" Particle pT="<<Pt()<<" phi="<<Phi()<<" eta="<<Eta()<<" m="<<M()<<" id="<<ID()<<std::endl;
 }
index 43d0deb..57d831a 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef __CORRELPARTICLE_H__
-#define __CORRELPARTICLE_H__
+#ifndef CORRELPARTICLE_H
+#define CORRELPARTICLE_H
 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
  * See cxx source for full Copyright notice     */
 /* $Id:  $ */
@@ -45,7 +45,7 @@ class CorrelParticle_t {
   virtual Float_t Et()    const {return TMath::Sqrt(Pt()*Pt()+fMass*fMass);}
   virtual Float_t Y()     const {return 0.5*TMath::Log((E()+Pz())/(E()-Pz()));}
   
-  virtual void Show();
+  virtual void Show() const;
   
  protected:
   Float_t fPt;    // pt; store charge as its sign
index f394f37..d3a6028 100644 (file)
@@ -24,7 +24,7 @@
 using namespace std;
 
 CorrelRecoParent_t::CorrelRecoParent_t() :
-  CorrelParticle_t(), fAssym(-999.), fOpenAng(-999.), jcESD(NULL){
+  CorrelParticle_t(), fAssym(-999.), fOpenAng(-999.), fjcESD(NULL){
   // default constructor
 }
 
@@ -36,7 +36,7 @@ CorrelRecoParent_t& CorrelRecoParent_t::operator=(const CorrelRecoParent_t& rhs)
   fID      = rhs.ID();
   fAssym   = rhs.Assym();
   fOpenAng = rhs.OpenAng();
-  jcESD     = rhs.Evt();
+  fjcESD     = rhs.Evt();
   return *this;
 }
 
@@ -50,7 +50,7 @@ CorrelRecoParent_t* CorrelRecoParent_t::Copy(){
   copy->fID      = this->ID();
   copy->fAssym   = this->Assym();
   copy->fOpenAng = this->OpenAng();
-  copy->jcESD     = this->Evt();
+  copy->fjcESD     = this->Evt();
   return copy;
 }
 
@@ -64,16 +64,16 @@ Bool_t CorrelRecoParent_t::Reconstruct(CorrelParticle_t *p1, CorrelParticle_t *p
   
   if(fID==dielectron && kUseAliKF){
     // code for parent reconstruction based on AliKFParticle:
-    if(!jcESD)
+    if(!fjcESD)
       {std::cerr<<"CorrelRecoParent_t::Reconstruct - undefined event"<<std::endl; exit(-1);}
     CorrelKFTrack_t* e1 = dynamic_cast<CorrelKFTrack_t*>(p1);
     CorrelKFTrack_t* e2 = dynamic_cast<CorrelKFTrack_t*>(p2);
     if(!e1 || !e2)
       {std::cerr<<"CorrelRecoParent_t::Reconstruct - failed particle casting"<<std::endl; exit(-1);}
 
-    AliKFVertex primVtx(*(jcESD->GetPrimaryVertex()));
+    AliKFVertex primVtx(*(fjcESD->GetPrimaryVertex()));
     if(primVtx.GetNContributors()<=0) return kFALSE;
-    AliKFParticle::SetField(jcESD->GetMagneticField());
+    AliKFParticle::SetField(fjcESD->GetMagneticField());
     AliKFParticle* pKF1 = new AliKFParticle; AliKFParticle* pKF2 = new AliKFParticle;
     if(e1->Param()==NULL || e1->Covar()==NULL || e2->Param()==NULL || e2->Covar()==NULL)
       {std::cerr<<"CorrelRecoParent_t::Reconstruct - null parameter pointer"<<std::endl; exit(-1);}      
@@ -141,7 +141,7 @@ Bool_t CorrelRecoParent_t::NotInMass(PartType_t pID, Float_t mass){
   return kTRUE;
 }
 
-void CorrelRecoParent_t::Show(){
+void CorrelRecoParent_t::Show() const {
   // printout method
   std::cout<<" RecoParent pT="<<Pt()<<" phi="<<Phi()<<" eta="<<Eta()<<" m="<<M()<<" id="<<ID()
           <<" assym="<<Assym()<<" open="<<OpenAng()<<std::endl;
index 749620e..a6aebc3 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef __CORRELRECOPARENT_H__
-#define __CORRELRECOPARENT_H__
+#ifndef CORRELRECOPARENT_H
+#define CORRELRECOPARENT_H
 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
  * See cxx source for full Copyright notice     */
 /* $Id:  $ */
@@ -21,16 +21,16 @@ class CorrelRecoParent_t : public CorrelParticle_t {
   
   Float_t Assym()   const {return fAssym;}
   Float_t OpenAng() const {return fOpenAng;}
-  AliESDEvent* Evt()  const {return jcESD;}
+  AliESDEvent* Evt()  const {return fjcESD;}
   Bool_t Reconstruct(CorrelParticle_t* p1, CorrelParticle_t* p2, Bool_t kUseAliKF);
-  void SetEvent(AliESDEvent * const v) {jcESD=v;}
+  void SetEvent(AliESDEvent * const v) {fjcESD=v;}
   
-  virtual void Show();
+  virtual void Show() const;
   
  private:
   Float_t fAssym;   // children energy assymetry
   Float_t fOpenAng; // children opening angle
-  AliESDEvent* jcESD;  // input event (ESD or AOD)
+  AliESDEvent* fjcESD;  // input event (ESD or AOD)
   
   // disable (make private) the copy constructor
   CorrelRecoParent_t(const CorrelRecoParent_t &p);
index e468056..18997bf 100644 (file)
@@ -51,13 +51,13 @@ CorrelTrack_t* CorrelTrack_t::Copy(){
   return copy;
 }
 
-Float_t CorrelTrack_t::Dist(CorrelTrack_t * const that) {
+Float_t CorrelTrack_t::Dist(CorrelTrack_t * const that) const {
   return TMath::Sqrt((this->X()-that->X())*(this->X()-that->X()) +
                     (this->Y()-that->Y())*(this->Y()-that->Y()) +
                     (this->Z()-that->Z())*(this->Z()-that->Z()));
 }
 
-void CorrelTrack_t::Show(){
+void CorrelTrack_t::Show() const {
   std::cout<<" Track pT="<<Pt()<<" phi="<<Phi()<<" eta="<<Eta()<<" m="<<M()<<" id="<<ID()
           <<" x="<<X()<<" y="<<Y()<<" z="<<Z()<<std::endl;
 }
index 72c27a6..4290829 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef __CORRELTRACK_H__
-#define __CORRELTRACK_H__
+#ifndef CORRELTRACK_H
+#define CORRELTRACK_H
 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
  * See cxx source for full Copyright notice     */
 /* $Id:  $ */
@@ -23,10 +23,10 @@ class CorrelTrack_t : public CorrelParticle_t {
   Float_t X() const {return fTPCx;}
   Float_t Y() const {return fTPCy;}
   Float_t Z() const {return fTPCz;}
-  Float_t Dist(CorrelTrack_t * const trk);
+  Float_t Dist(CorrelTrack_t * const trk) const;
   
   void SetTPCEntry(Float_t x, Float_t y, Float_t z) {fTPCx=x; fTPCy=y; fTPCz=z;}
-  virtual void Show();
+  virtual void Show() const;
   
  private:
   Float_t fTPCx;   // x-coord TPC entrance
index 889a04a..7a7cd82 100644 (file)
@@ -4,6 +4,7 @@
 #pragma link off all classes;
 #pragma link off all functions;
 
+#pragma link C++ class CorrelList_t+;
 #pragma link C++ class AliJetCorrelMaker+;
 #pragma link C++ class AliJetCorrelSelector+;
 #pragma link C++ class AliJetCorrelReader+;
index b23b381..a1db3c2 100644 (file)
@@ -11,9 +11,9 @@ AliJetCorrelSelector* ConfigJetCorrel(){
   UInt_t poolDepth = 10;
   UInt_t correlTypes[] = {0};  // 0=dihadron, 1=pi0-hadron, 2=photon-hadron
   Float_t centrBins[] = {1,300};
-  Float_t zVertBins[] = {-10,-7,-5,5,7,10};
-  Float_t bwTriggPt = 1;   Float_t minTriggPt = 2;   Float_t maxTriggPt = 10;
-  Float_t bwAssocPt = 0.5; Float_t minAssocPt = 0.5; Float_t maxAssocPt = 4;
+  Float_t zVertBins[] = {-10,-7,-5,-3,3,5,7,10};
+  Float_t triggBins[] = {2,3,4,5,6,10};
+  Float_t assocBins[] = {0.5,1.5,10};
   //TString sTrigg[] = {"ALL"}; // selects events where one of the strings is matched; "ALL"=no cut
   TString sTrigg[] = {"CINT1B-"};
   // set track selections:
@@ -43,8 +43,8 @@ AliJetCorrelSelector* ConfigJetCorrel(){
   selector->SetCorrelTypes(sizeof(correlTypes)/sizeof(UInt_t),correlTypes);
   selector->SetBinningCentr(sizeof(centrBins)/sizeof(Float_t),centrBins);
   selector->SetBinningZvert(sizeof(zVertBins)/sizeof(Float_t),zVertBins);
-  selector->SetBinningTrigg(minTriggPt,maxTriggPt,bwTriggPt);
-  selector->SetBinningAssoc(minAssocPt,maxAssocPt,bwAssocPt);
+  selector->SetBinningTrigg(sizeof(triggBins)/sizeof(Float_t),triggBins);
+  selector->SetBinningAssoc(sizeof(assocBins)/sizeof(Float_t),assocBins);
   selector->SetTriggers(sizeof(sTrigg)/sizeof(TString),sTrigg);
   selector->SetITSRefit(itsRefit);
   selector->SetTPCRefit(tpcRefit);