new correlation histogramming, Paul Constantin
authorgconesab <gconesab@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 8 Jun 2010 13:53:12 +0000 (13:53 +0000)
committergconesab <gconesab@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 8 Jun 2010 13:53:12 +0000 (13:53 +0000)
27 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 [deleted file]
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/libPWG4JetCorrel.pkg
PWG4/macros/AddTaskJetCorrel.C
PWG4/macros/ConfigJetCorrel.C

index a81b01c1c4f29746b2deb3bd29defb1a3c171259..6873bb020ed53d42b5d0e0928e631c62c5046df6 100644 (file)
@@ -103,26 +103,24 @@ void AliAnalysisTaskJetCorrel::Exec(Option_t */*option*/){
   fReader->SetEvent(fjcESD);
 
   // get global event pars and apply global cuts
-  if(!fSelector->SelectedEvtTrigger(fjcESD)) return;
+  //  if(!fSelector->SelectedEvtTrigger(fjcESD)) return; // using AliPhysicsSelection
   Float_t cent = fReader->GetMultiplicity(); // use multiplicity in p-p
   Float_t zvtx = fReader->GetVertex();
-  Int_t cBin = fSelector->GetBin(centr,cent);
-  Int_t vBin = fSelector->GetBin(zvert,zvtx);
+  Int_t cBin = fSelector->GetBin(t_cent,cent);
+  Int_t vBin = fSelector->GetBin(t_vert,zvtx);
   if(cBin<0 || vBin<0 || fReader->VtxOutPipe()) return; // event fails centrality or vertex selection
   fWriter->FillGlobal(cent,zvtx);
   fNumEvts++;
-  //  std::cout<<"Event:"<<fNumEvts<<" cBin="<<cBin<<" vBin="<<vBin<<std::endl;
 
   // loop over correlations
   for(UInt_t iCor=0; iCor<fNumCorrel; iCor++){
     UInt_t idxTrigg = fMaker->IdxTrigg(iCor);
     UInt_t idxAssoc = fMaker->IdxAssoc(iCor);
-    Bool_t tFilled = fTriggList[idxTrigg].Filled();
     Bool_t aFilled = fAssocList[idxAssoc].Filled();
 
-    fTriggList[idxTrigg].Label(fMaker->TriggType(iCor),triggs,fNumEvts);
-    fAssocList[idxAssoc].Label(fMaker->AssocType(iCor),assocs,fNumEvts);
-    fReader->FillLists(&fTriggList[idxTrigg],&fAssocList[idxAssoc]);
+    fTriggList[idxTrigg].Label(fMaker->TriggType(iCor),fNumEvts);
+    fAssocList[idxAssoc].Label(fMaker->AssocType(iCor),fNumEvts);
+    fReader->FillLists(&fTriggList[idxTrigg],&fAssocList[idxAssoc]); // trigger list first!
 
     UInt_t nTriggs = fTriggList[idxTrigg].Size();
     UInt_t nAssocs = fAssocList[idxAssoc].Size();    
@@ -132,11 +130,13 @@ void AliAnalysisTaskJetCorrel::Exec(Option_t */*option*/){
     if(nTriggs<1 && nAssocs<1) continue;
     fWriter->FillSingleHistos(cBin, &fTriggList[idxTrigg], idxTrigg, &fAssocList[idxAssoc], idxAssoc);
     
-    CrossCorrelate(&fTriggList[idxTrigg], &fAssocList[idxAssoc], cBin, vBin, iCor); // same-event correlation
-    
-    if(!tFilled) fMixer->FillPool(&fTriggList[idxTrigg], idxTrigg, vBin, cBin);
     if(!aFilled) fMixer->FillPool(&fAssocList[idxAssoc], idxAssoc, vBin, cBin);
-    if(nTriggs>0) fMixer->Mix(vBin, cBin, idxTrigg, idxAssoc, iCor);
+
+    if(nTriggs>0){
+      CrossCorrelate(&fTriggList[idxTrigg], &fAssocList[idxAssoc], cBin, vBin, iCor); // same-event correlation
+      fMixer->CurrTrigList(&fTriggList[idxTrigg]);
+      fMixer->Mix(vBin, cBin, idxAssoc, iCor); // mixed-event correlation
+    }
     
     PostData(0, fOutputContainer);
   } // loop over correlations
@@ -147,9 +147,8 @@ void AliAnalysisTaskJetCorrel::Exec(Option_t */*option*/){
 }
 
 void AliAnalysisTaskJetCorrel::Terminate(Option_t */*option*/){
-  // clean pools, print stats
-  fMixer->CleanPool(triggs);
-  fMixer->CleanPool(assocs);
+  // clean pool, print stats
+  fMixer->CleanPool();
 //   std::cout<<"CorrelParticle="<<sizeof(CorrelParticle_t)
 //        <<" CorrelTrack="<<sizeof(CorrelTrack_t)
 //        <<" CorrelRecoParent="<<sizeof(CorrelRecoParent_t)<<std::endl;
@@ -164,7 +163,7 @@ void AliAnalysisTaskJetCorrel::CrossCorrelate(CorrelList_t * const TriggList, Co
   CorrelListIter_t iterAssoc = AssocList->Head();
   while(!iterTrigg.HasEnded()){
     while(!iterAssoc.HasEnded()){
-      fWriter->FillCorrelations(real,iCor,cBin,vBin,iterTrigg.Data(),iterAssoc.Data()); // trigg first!
+      fWriter->FillCorrelations(0,iCor,cBin,vBin,iterTrigg.Data(),iterAssoc.Data()); // trigg first!
       iterAssoc.Move();
     }
     iterAssoc = AssocList->Head(); // reset associated particle iterator to list head
index 67e188c54c5d6dea355cc9d4604abe6949901e1f..09b03f05f34f0f653cdf3df3aa5f8e2e7eb09231 100644 (file)
 // AliJetCorrelMixer for event mixing and AliJetCorrelWriter for output histos
 //-- Author: Paul Constantin
 
-#include "AliJetCorrelMaker.h"
-#include "AliJetCorrelSelector.h"
 #include "AliJetCorrelReader.h"
 #include "AliJetCorrelMixer.h"
-#include "AliJetCorrelWriter.h"
 
 class AliAnalysisTaskJetCorrel : public AliAnalysisTaskSE {
   
@@ -31,15 +28,15 @@ class AliAnalysisTaskJetCorrel : public AliAnalysisTaskSE {
   virtual void Terminate(Option_t *option);
   
  private:
-  AliESDEvent *fjcESD;
+  AliESDEvent *fjcESD;                               //! ESD event
   TList *fOutputContainer;                           // Histogram container
-  AliJetCorrelSelector *fSelector;                   // User selection object
-  UInt_t fNumCorrel, fNumTrigg, fNumAssoc, fNumEvts; // counters
-  AliJetCorrelMaker *fMaker;                         // Correlation maker object
-  AliJetCorrelWriter *fWriter;                       // Output writer object
-  AliJetCorrelReader *fReader;                       // Input reader object
-  AliJetCorrelMixer *fMixer;                         // Event mixing object
-  CorrelList_t *fTriggList, *fAssocList;             // Trigger&Associated particle lists
+  AliJetCorrelSelector *fSelector;                   //! User selection object
+  UInt_t fNumCorrel, fNumTrigg, fNumAssoc, fNumEvts; //! counters
+  AliJetCorrelMaker *fMaker;                         //! Correlation maker object
+  AliJetCorrelWriter *fWriter;                       //! Output writer object
+  AliJetCorrelReader *fReader;                       //! Input reader object
+  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);
index 219339cff8e467b4865388da7bf8b6a5dafae37a..311ff4e189ec4fbf86e249161bbbe781e472a892 100644 (file)
@@ -51,31 +51,31 @@ Bool_t AliJetCorrelMaker::Init(UInt_t s, UInt_t * const v){
   fNumCorrel = s;
   fCorrelType = new UInt_t[fNumCorrel];
   fCorrelStr  = new TString[fNumCorrel];
-  fTriggType  = new PartType_t[fNumCorrel];
-  fAssocType  = new PartType_t[fNumCorrel];
+  fTriggType  = new cPartType_t[fNumCorrel];
+  fAssocType  = new cPartType_t[fNumCorrel];
   for(UInt_t k=0; k<fNumCorrel; k++){
     fCorrelType[k] = v[k];
     switch(fCorrelType[k]){
     case 0:
-      fTriggType[k] = hadron;     fAssocType[k] = hadron; fCorrelStr[k] = "DiHadron";
+      fTriggType[k] = t_hadron;     fAssocType[k] = t_hadron; fCorrelStr[k] = "DiHadron";
       break;
     case 1:
-      fTriggType[k] = diphoton;   fAssocType[k] = hadron; fCorrelStr[k] = "Pi0Hadron";
+      fTriggType[k] = t_diphoton;   fAssocType[k] = t_hadron; fCorrelStr[k] = "Pi0Hadron";
       break;
     case 2:
-      fTriggType[k] = photon;     fAssocType[k] = hadron; fCorrelStr[k] = "PhotHadron";
+      fTriggType[k] = t_photon;     fAssocType[k] = t_hadron; fCorrelStr[k] = "PhotHadron";
       break;
     case 3:
-      fTriggType[k] = dielectron; fAssocType[k] = hadron; fCorrelStr[k] = "Z0Hadron";
+      fTriggType[k] = t_dielectron; fAssocType[k] = t_hadron; fCorrelStr[k] = "Z0Hadron";
       break;
     case 4:
-      fTriggType[k] = jet;        fAssocType[k] = jet;    fCorrelStr[k] = "JetJet";
+      fTriggType[k] = t_jet;        fAssocType[k] = t_jet;    fCorrelStr[k] = "JetJet";
       break;
     case 5:
-      fTriggType[k] = photon;     fAssocType[k] = jet;    fCorrelStr[k] = "PhotJet";
+      fTriggType[k] = t_photon;     fAssocType[k] = t_jet;    fCorrelStr[k] = "PhotJet";
       break;
     case 6:
-      fTriggType[k] = dielectron; fAssocType[k] = jet;    fCorrelStr[k] = "Z0Jet";
+      fTriggType[k] = t_dielectron; fAssocType[k] = t_jet;    fCorrelStr[k] = "Z0Jet";
       break;
     default:
       std::cerr<<"AliJetCorrelMaker::Initialize - ERROR: unknown correlation type!"<<std::endl;
@@ -86,7 +86,7 @@ Bool_t AliJetCorrelMaker::Init(UInt_t s, UInt_t * const v){
 
   Bool_t notStored;
   fIdxTrigg  = new UInt_t[fNumCorrel];
-  PartType_t *fTriggUniq = new PartType_t[fNumCorrel];
+  cPartType_t *fTriggUniq = new cPartType_t[fNumCorrel];
   for(UInt_t k=0; k<fNumCorrel; k++){
     notStored = kTRUE;
     for(UInt_t i=0; i<fNumTrigg; i++) 
@@ -99,7 +99,7 @@ Bool_t AliJetCorrelMaker::Init(UInt_t s, UInt_t * const v){
   delete [] fTriggUniq;
 
   fIdxAssoc  = new UInt_t[fNumCorrel];
-  PartType_t *fAssocUniq = new PartType_t[fNumCorrel];
+  cPartType_t *fAssocUniq = new cPartType_t[fNumCorrel];
   for(UInt_t k=0; k<fNumCorrel; k++){
     notStored = kTRUE;
     for(UInt_t i=0; i<fNumAssoc; i++) 
@@ -148,20 +148,20 @@ UInt_t AliJetCorrelMaker::IdxAssoc(UInt_t k) const {
   return fIdxAssoc[k];
 }
 
-PartType_t AliJetCorrelMaker::TriggType(UInt_t k) const {
+cPartType_t AliJetCorrelMaker::TriggType(UInt_t k) const {
   if(k>=fNumCorrel)
-    {std::cerr<<"AliJetCorrelMaker::TriggType overflow!"<<std::endl; return unknown;}
+    {std::cerr<<"AliJetCorrelMaker::TriggType overflow!"<<std::endl; return t_unknown;}
   return fTriggType[k];
 }
 
-PartType_t AliJetCorrelMaker::AssocType(UInt_t k) const {
+cPartType_t AliJetCorrelMaker::AssocType(UInt_t k) const {
   if(k>=fNumCorrel)
-    {std::cerr<<"AliJetCorrelMaker::AssocType overflow!"<<std::endl; return unknown;}
+    {std::cerr<<"AliJetCorrelMaker::AssocType overflow!"<<std::endl; return t_unknown;}
   return fAssocType[k];
 }
 
 Bool_t AliJetCorrelMaker::RecoTrigger(UInt_t k) const {
-  if(fTriggType[k]==diphoton || fTriggType[k]==dielectron)
+  if(fTriggType[k]==t_diphoton || fTriggType[k]==t_dielectron)
     return kTRUE;
   return kFALSE;
 }
index 2d6583777e9c834f586861e3a844cb6796649ffa..806775a758b8c64baa3fe67ee9b53059c96a8535 100644 (file)
@@ -9,7 +9,7 @@
 // two-particle correlations to be run in one instance of the analysis module.
 //-- Author: Paul Constantin
 
-#include "CorrelDefs.h"
+#include "AliJetCorrelSelector.h"
 
 class AliJetCorrelMaker : public TObject {
   
@@ -26,18 +26,18 @@ class AliJetCorrelMaker : public TObject {
   UInt_t NoOfAssoc()  const {return fNumAssoc;}
   UInt_t IdxTrigg(UInt_t k) const;
   UInt_t IdxAssoc(UInt_t k) const;
-  PartType_t TriggType(UInt_t k) const;
-  PartType_t AssocType(UInt_t k) const;
+  cPartType_t TriggType(UInt_t k) const;
+  cPartType_t AssocType(UInt_t k) const;
   TString Descriptor(UInt_t k) const;
   Bool_t RecoTrigger(UInt_t k) const;
   Bool_t RecoTrigger() const;
   
  private: 
-  UInt_t fNumCorrel, fNumTrigg, fNumAssoc; // counters
+  UInt_t fNumCorrel, fNumTrigg, fNumAssoc; //! counters
   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
+  cPartType_t* fTriggType;  //! array of trigger particle types
+  cPartType_t* fAssocType;  //! array of associated particle types
   UInt_t* fIdxTrigg;       //! array with trigger indices
   UInt_t* fIdxAssoc;       //! array with associated indices
   
index 61c501ce927b0631792ce70c6279365dc6b12c51..8774af23fac038a0325f13a006a313cbddd97044 100644 (file)
@@ -15,8 +15,8 @@
 /* $Id: $ */
 
 //__________________________________________
-// Event mixing class. A 6-dimensinal pool fPool is maintained:
-// type(fixed), type_idx(fixed), vertex(fixed), centrality(fixed), 
+// Event mixing class. A 5-dimensinal pool fPool is maintained:
+// type_idx(fixed), vertex(fixed), centrality(fixed), 
 // and event(dynamic), particle(dynamic)
 // fixed dimensions are fixed at task initialization time (via AliJetCorrelSelector)
 // event&particle are allow to float during runtime (via linked lists TList=event & CorrelList_t=particle)
@@ -30,18 +30,14 @@ ClassImp(AliJetCorrelMixer)
 
 AliJetCorrelMixer::AliJetCorrelMixer() :
   fSelector(NULL), fMaker(NULL), fWriter(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){
+  fTriggEvnt(NULL), fAssocEvnt(NULL),
+  fAssocIter(NULL), fTriggIter(NULL) {
   // constructor
 }
 
 AliJetCorrelMixer::~AliJetCorrelMixer(){
   // destructor
-  CleanPool(triggs);
-  CleanPool(assocs);
-  if(fTriggEvnt) delete fTriggEvnt;
-  if(fAssocEvnt) delete fAssocEvnt;
+  CleanPool();
 }
 
 void AliJetCorrelMixer::Init(AliJetCorrelSelector * const s, AliJetCorrelMaker * const m, AliJetCorrelWriter * const w){
@@ -50,81 +46,60 @@ void AliJetCorrelMixer::Init(AliJetCorrelSelector * const s, AliJetCorrelMaker *
   fMaker = m;
   fWriter = w;
   
-  fNumCentBins = fSelector->NoOfBins(centr);  
-  fNumVertBins = fSelector->NoOfBins(zvert);
-  fPoolDepth   = fSelector->PoolDepth();
-  fNumCorrel = fMaker->NoOfCorrel();
-  fNumTriggs = fMaker->NoOfTrigg();
-  fNumAssocs = fMaker->NoOfAssoc();
-  
-  for(UInt_t vBin=0; vBin<fNumVertBins; vBin++){
-    for(UInt_t cBin=0; cBin<fNumCentBins; cBin++){
-      for(UInt_t it=0; it<fNumTriggs; it++)
-       fPool[triggs][it][vBin][cBin] = new TList;
-      for(UInt_t ia=0; ia<fNumAssocs; ia++)
-       fPool[assocs][ia][vBin][cBin] = new TList;
-    }
-  }
+  for(UInt_t vBin=0; vBin<fSelector->NoOfBins(t_vert); vBin++)
+    for(UInt_t cBin=0; cBin<fSelector->NoOfBins(t_cent); cBin++)
+      for(UInt_t ia=0; ia<fMaker->NoOfAssoc(); ia++)
+       fPool[ia][vBin][cBin] = new TList;
 }
 
 void AliJetCorrelMixer::FillPool(CorrelList_t *partList, UInt_t pIdx, UInt_t vBin, UInt_t cBin){
   // pool filling method
   if(partList->Size()<1) return;
-  PoolType_t pType = partList->PoolID();
-  UInt_t pSize = fPool[pType][pIdx][vBin][cBin]->GetSize();
+  UInt_t pSize = fPool[pIdx][vBin][cBin]->GetSize();
   // when pool depth is reached, pop pool before new event push (keep const depth)
-  if(pSize>=fPoolDepth) fPool[pType][pIdx][vBin][cBin]->RemoveFirst();
+  if(pSize>=fSelector->PoolDepth()) fPool[pIdx][vBin][cBin]->RemoveFirst();
   // incoming list is cleared at end-of-event; hence, store in pool a deep copy:
-  fPool[pType][pIdx][vBin][cBin]->AddLast(partList->DeepCopy());
+  fPool[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 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
-    fTriggEvnt = (CorrelList_t*)fPool[triggs][it][vBin][cBin]->First();
-    fTriggIter = fTriggEvnt->Head();
+  TListIter* iterPool=(TListIter*)fPool[ia][vBin][cBin]->MakeIterator();
+  if(!fTriggEvnt) {std::cerr<<"AliJetCorrelMixer::Mix - ERROR: Trigger list not set!"<<std::endl; exit(-1);}
+  fTriggIter = fTriggEvnt->Head();
+  while((fAssocEvnt=(CorrelList_t*)iterPool->Next())){
+    fAssocIter = fAssocEvnt->Head();  
+    if(fTriggEvnt->EvtID()==fAssocEvnt->EvtID()) continue; // don't mix same event!
     
-    while((fAssocEvnt=(CorrelList_t*)iterAssocPool->Next())){
-      fAssocIter = fAssocEvnt->Head();
-      
-      if(fTriggEvnt->EvtID()==fAssocEvnt->EvtID()) continue; // don't mix same event!
-      
-      while(!fTriggIter.HasEnded()){
-       while(!fAssocIter.HasEnded()){
-         fWriter->FillCorrelations(mixed,ic,cBin,vBin,fTriggIter.Data(),fAssocIter.Data()); // trigg first!
-         fAssocIter.Move();
-       } // loop over associated particles
-       fAssocIter = fAssocEvnt->Head(); // reset associated particle iterator to list head
-       fTriggIter.Move();
-      } // loop over trigger particles
-      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
-  delete iterAssocPool;
+    while(!fTriggIter.HasEnded()){
+      while(!fAssocIter.HasEnded()){
+       fWriter->FillCorrelations(1,ic,cBin,vBin,fTriggIter.Data(),fAssocIter.Data()); // trigg first!
+       fAssocIter.Move();
+      } // loop over associated particles
+      fAssocIter = fAssocEvnt->Head(); // reset associated particle iterator to list head
+      fTriggIter.Move();
+    } // loop over trigger particles
+    fTriggIter = fTriggEvnt->Head(); // reset trigger particle iterator to list head
+  } // loop over associated pool
+  delete iterPool;
 }
 
-void AliJetCorrelMixer::CleanPool(PoolType_t pType){
+void AliJetCorrelMixer::CleanPool(){
   // pool cleaning
-  UInt_t size = 0;
-  if(pType==triggs) size = fNumTriggs;
-  if(pType==assocs) size = fNumAssocs;
+  UInt_t size = fMaker->NoOfAssoc();
   for(UInt_t k=0; k<size; k++){
-    for(UInt_t vBin=0; vBin<fNumVertBins; vBin++)
-      for(UInt_t cBin=0; cBin<fNumCentBins; cBin++)
-       fPool[pType][k][vBin][cBin]->Delete(); // Remove all list objects AND delete all heap based objects
+    for(UInt_t vBin=0; vBin<fSelector->NoOfBins(t_vert); vBin++)
+      for(UInt_t cBin=0; cBin<fSelector->NoOfBins(t_cent); cBin++)
+       fPool[k][vBin][cBin]->Delete(); // Remove all list objects AND delete all heap based objects
   }
 }
 
-void AliJetCorrelMixer::ShowSummary(PoolType_t pType, UInt_t pIdx, UInt_t vBin, UInt_t cBin) const {
+void AliJetCorrelMixer::ShowSummary(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();
+  TListIter* iter=(TListIter*)fPool[pIdx][vBin][cBin]->MakeIterator();
   CorrelList_t* partList;
   while((partList=(CorrelList_t*)iter->Next())) totalPoolSize += partList->Size();
   delete iter;
-  if(pType==triggs) std::cout<<"TriggPool[";
-  if(pType==assocs) std::cout<<"AssocPool[";
-  std::cout<<vBin<<"]["<<cBin<<"]: nevt="<<fPool[pType][pIdx][vBin][cBin]->GetSize()<<" npart="<<totalPoolSize<<std::endl;
+  std::cout<<"Pool["<<vBin<<"]["<<cBin<<"]: nevt="<<fPool[pIdx][vBin][cBin]->GetSize()<<" npart="<<totalPoolSize<<std::endl;
 }
index 3103ed326a45750b6248cb4c8bb0c520d440689e..7be1eaaa4725db32742ef1039446792be1fdd015 100644 (file)
@@ -12,7 +12,6 @@
 // event&particle are allow to float during runtime (via linked lists TList=event & CorrelList_t=particle)
 //-- Author: Paul Constantin
 
-#include  "AliJetCorrelSelector.h"
 #include  "AliJetCorrelWriter.h"
 
 class AliJetCorrelMixer : public TObject {
@@ -22,22 +21,19 @@ class AliJetCorrelMixer : public TObject {
   ~AliJetCorrelMixer();
   void Init(AliJetCorrelSelector * const s, AliJetCorrelMaker * const m, AliJetCorrelWriter * const w);
   
-  // pool manipulation:
+  void CurrTrigList(CorrelList_t *l) {fTriggEvnt=l;}
   void FillPool(CorrelList_t *partList, UInt_t pIdx, UInt_t vBin, UInt_t cBin);
-  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 ShowSummary(PoolType_t pType, UInt_t pIdx, UInt_t vBin, UInt_t cBin) const;
+  void Mix(UInt_t vBin, UInt_t cBin, UInt_t ia, UInt_t ic);
+  void ShowSummary(UInt_t pIdx, UInt_t vBin, UInt_t cBin) const;
+  void CleanPool();
   
  private:
-  AliJetCorrelSelector* fSelector;       // user selection object
-  AliJetCorrelMaker* fMaker;             // correlation maker object
-  AliJetCorrelWriter* fWriter;           // output writer object
+  AliJetCorrelSelector* fSelector;       //! user selection object
+  AliJetCorrelMaker* fMaker;             //! correlation maker object
+  AliJetCorrelWriter* fWriter;           //! output writer object
   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][AliJetCorrelSelector::kMaxCorrel][AliJetCorrelSelector::kMaxVert][AliJetCorrelSelector::kMaxCent]; //! the particle pools used for mixing
+  TList* fPool[AliJetCorrelSelector::kMaxCorrel][AliJetCorrelSelector::kMaxVert][AliJetCorrelSelector::kMaxCent]; //! the particle pools used for mixing
   
   // disable (make private) copy constructor and assignment operator:
   AliJetCorrelMixer(const AliJetCorrelMixer&);
index a185190c120dd58e3f58c0cdc2b9e36946717506..f7989bae8aea3c71ec4270b9861cdbd9b12cace6 100644 (file)
@@ -69,54 +69,54 @@ Bool_t AliJetCorrelReader::VtxOutPipe() const {
   return kFALSE;
 }
 
-void AliJetCorrelReader::FillLists(CorrelList_t *list1, CorrelList_t *list2){
-  // fills the trigger&associated particle lists
-  PartType_t partType1 = list1->PartID();
-  PartType_t partType2 = list2->PartID();
-  Bool_t filled1 = list1->Filled();
-  Bool_t filled2 = list2->Filled();
+void AliJetCorrelReader::FillLists(CorrelList_t *trigList, CorrelList_t *assoList){
+  // fills the trigger&associated particle lists, in this order!
+  cPartType_t trigType = trigList->PartID();
+  cPartType_t assoType = assoList->PartID();
+  Bool_t filledTrig = trigList->Filled();
+  Bool_t filledAsso = assoList->Filled();
   // when needed, fill both lists simultaneously for speed:
-  if(!filled1 && !filled2 && partType1==partType2){
-    switch(partType1){
-    case hadron:
-      FillESDTrackLists(list1,list2);
+  if(!filledTrig && !filledAsso && trigType==assoType){
+    switch(trigType){
+    case t_hadron:
+      FillESDTrackLists(trigList,assoList); // trigger list first!
       break;
     default:
       std::cerr<<"AliJetCorrelReader::FillLists() - ERROR: type not implemented!"<<std::endl;
       exit(-1);
     }
-    list1->SetFilled(kTRUE);
-    list2->SetFilled(kTRUE);
+    trigList->SetFilled(kTRUE);
+    assoList->SetFilled(kTRUE);
   } else {
-    if(!filled1){
-      FillList(list1);
-      list1->SetFilled(kTRUE);
+    if(!filledTrig){
+      FillList(trigList,kTRUE);
+      trigList->SetFilled(kTRUE);
     }
-    if(!filled2){
-      FillList(list2);
-      list2->SetFilled(kTRUE);
+    if(!filledAsso){
+      FillList(assoList,kFALSE);
+      assoList->SetFilled(kTRUE);
     }
   }
 }
 
-void AliJetCorrelReader::FillList(CorrelList_t *list){
+void AliJetCorrelReader::FillList(CorrelList_t *list, Bool_t isTrigg){
   // calls the appropriate Fill method for the list's particle type
-  PartType_t partType = list->PartID();
+  cPartType_t partType = list->PartID();
   switch(partType){
-  case hadron:
-    FillESDTrackList(list);
+  case t_hadron:
+    FillESDTrackList(list,isTrigg);
     break;
-  case electron: 
-    FillESDTrackList(list);
+  case t_electron: 
+    FillESDTrackList(list,isTrigg);
     break;
-  case dielectron:
-    FillESDDielectronList(list);
+  case t_dielectron:
+    FillESDDielectronList(list,isTrigg);
     break;
-  case photon:
-    FillESDPhotonList(list);
+  case t_photon:
+    FillESDPhotonList(list,isTrigg);
     break;
-  case diphoton:
-    FillESDDiphotonList(list);
+  case t_diphoton:
+    FillESDDiphotonList(list,isTrigg);
     break;
   default:
     std::cerr<<"AliJetCorrelReader::FillList() - ERROR: type not implemented!"<<std::endl;
@@ -124,9 +124,9 @@ void AliJetCorrelReader::FillList(CorrelList_t *list){
   }
 }
 
-void AliJetCorrelReader::FillESDTrackLists(CorrelList_t *list1, CorrelList_t *list2){
+void AliJetCorrelReader::FillESDTrackLists(CorrelList_t *trigList, CorrelList_t *assoList){
   // fills trigg&assoc lists simultaneously with ESD tracks
-  PartType_t partType = list1->PartID(); // by definition the two lists store same particle
+  cPartType_t partType = trigList->PartID(); // by definition the two lists store same particle
 
   UInt_t nTracks = fjcESD->GetNumberOfTracks() ;
   if(nTracks<1) return;
@@ -134,7 +134,7 @@ void AliJetCorrelReader::FillESDTrackLists(CorrelList_t *list1, CorrelList_t *li
     AliESDtrack *track = (AliESDtrack*)fjcESD->GetTrack(i);
 
     Float_t pT = track->Pt();
-    if(pT<fSelector->MinLowBin(assoc)) continue;
+    if(pT<fSelector->MinLowBin(t_asso)) continue;
     if(fSelector->GenQA()) fWriter->FillTrackQA(track,0);
     if(fSelector->LowQualityTrack(track)) continue;
     if(!fSelector->PassPID(track,partType)) continue;
@@ -143,28 +143,28 @@ void AliJetCorrelReader::FillESDTrackLists(CorrelList_t *list1, CorrelList_t *li
     // fill CorrelList_t object with CorrelTrack_t if two-track cuts (TPC entrance) are used and
     // with CorrelParticle_t if not (base particle uses much less memory). Pair (ghost) cuts need
     // to be applied for both real/mixed pairs, but it's not clear yet whether this is necessary.
-    CorrelTrack_t *hadr = new CorrelTrack_t;
-    const AliExternalTrackParam* tpcEntry = track->GetInnerParam();
-    hadr->SetTPCEntry(tpcEntry->GetX(),tpcEntry->GetY(),tpcEntry->GetZ());
-//     CorrelParticle_t *hadr = new CorrelParticle_t; // comment out above 4 lines first
+//     CorrelTrack_t *hadr = new CorrelTrack_t; // if uncommenting these 3 lines, comment out next line
+//     const AliExternalTrackParam* tpcEntry = track->GetInnerParam();
+//     hadr->SetTPCEntry(tpcEntry->GetX(),tpcEntry->GetY(),tpcEntry->GetZ());
+    CorrelParticle_t *hadr = new CorrelParticle_t;
     hadr->SetPt(pT*track->Charge());
     hadr->SetPhi(track->Phi());
     hadr->SetEta(track->Eta());
     hadr->SetMass(track->GetMass());
     hadr->SetID(partType);
 
-    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());
+    if(fSelector->GetBin(t_trig,pT)>=0) trigList->Push(hadr->Copy());
+    if(fSelector->GetBin(t_asso,pT)>=0) assoList->Push(hadr->Copy());
     delete hadr;
   } // ESD track loop
 }
 
-void AliJetCorrelReader::FillESDTrackList(CorrelList_t *list){
+void AliJetCorrelReader::FillESDTrackList(CorrelList_t *list, Bool_t isTrigg){
   // this method is called for: (1) associated hadrons, when trigger is not hadron;
   // (2) electrons to be used in dielectron reconstruction. Assoc pT cuts apply then...
-  PartType_t partType = list->PartID();
+  if(isTrigg)
+    {std::cerr<<"AliJetCorrelReader::FillESDTrackList - ERROR: not meant for triggers!"<<std::endl; exit(-1);}
+  cPartType_t partType = list->PartID();
 
   UInt_t nTracks = fjcESD->GetNumberOfTracks();
   if(nTracks<1) return;
@@ -172,7 +172,7 @@ void AliJetCorrelReader::FillESDTrackList(CorrelList_t *list){
     AliESDtrack *track = (AliESDtrack*)fjcESD->GetTrack(i);
 
     Float_t pT = track->Pt();
-    if(pT<fSelector->MinLowBin(assoc)) continue; 
+    if(pT<fSelector->MinLowBin(t_asso)) continue; 
     if(fSelector->GenQA()) fWriter->FillTrackQA(track,0);
     if(fSelector->LowQualityTrack(track)) continue;
     if(fSelector->GenQA()) fWriter->FillTrackQA(track,1);
@@ -181,7 +181,7 @@ void AliJetCorrelReader::FillESDTrackList(CorrelList_t *list){
     // fill CorrelList_t object with CorrelKFTrack_t if AliKFParticle is used for di-electrons and 
     // with CorrelParticle_t if this is done via TLorentzVector in CorrelRecoParent_t (less memory).
     // AliKFParticle allows for a vertex cut on the reconstructed di-electron
-    if(partType==electron && fSelector->UseAliKF()){
+    if(partType==t_electron && fSelector->UseAliKF()){
       CorrelKFTrack_t *elec = new CorrelKFTrack_t;
       const AliExternalTrackParam* tPar = track->GetConstrainedParam();
       elec->SetParam(tPar->GetParameter());
@@ -204,33 +204,33 @@ void AliJetCorrelReader::FillESDTrackList(CorrelList_t *list){
   }
 }
 
-void AliJetCorrelReader::FillESDPhotonList(CorrelList_t *list){
+void AliJetCorrelReader::FillESDPhotonList(CorrelList_t *list, Bool_t isTrigg){
   // TBI
   std::cerr<<"WARNING : FillESDPhotonList() not emplemented yet. Doing nothing..."<<std::endl;
   std::cerr<<"Photon list size:"<<list->Size()<<std::endl;
 }
 
-void AliJetCorrelReader::FillESDDiphotonList(CorrelList_t* list){
+void AliJetCorrelReader::FillESDDiphotonList(CorrelList_t* list, Bool_t isTrigg){
   // makes a diphoton list (see above warning!)
   CorrelList_t *fPhotonList = new CorrelList_t;
-  fPhotonList->Label(photon,assocs,0); // event number unimportant here
-  FillESDPhotonList(fPhotonList);
-  FillParentList(list, fPhotonList);
+  fPhotonList->Label(t_photon,0); // event number unimportant here
+  FillESDPhotonList(fPhotonList, isTrigg);
+  FillParentList(list, fPhotonList, isTrigg);
   fWriter->FillParentNtuple(list);
   delete fPhotonList;
 }
 
-void AliJetCorrelReader::FillESDDielectronList(CorrelList_t* list){
+void AliJetCorrelReader::FillESDDielectronList(CorrelList_t* list, Bool_t isTrigg){
   // makes a dielectron list
   CorrelList_t *fElectronList = new CorrelList_t;
-  fElectronList->Label(electron,assocs,0); // event number unimportant here
-  FillESDTrackList(fElectronList);
-  FillParentList(list, fElectronList);
+  fElectronList->Label(t_electron,0); // event number unimportant here
+  FillESDTrackList(fElectronList, isTrigg);
+  FillParentList(list, fElectronList, isTrigg);
   fWriter->FillParentNtuple(list);
   delete fElectronList;
 }
 
-void AliJetCorrelReader::FillParentList(CorrelList_t *ParentList, CorrelList_t *ChildList){
+void AliJetCorrelReader::FillParentList(CorrelList_t *ParentList, CorrelList_t *ChildList, Bool_t isTrigg){
   // makes a list of parent particles from a list of children of same type
   if(ChildList->Size()<2) return;
 
@@ -244,8 +244,8 @@ void AliJetCorrelReader::FillParentList(CorrelList_t *ParentList, CorrelList_t *
       CorrelRecoParent_t *parent = new CorrelRecoParent_t;
       parent->SetEvent(fjcESD);
       Bool_t goodParent = parent->Reconstruct(child1, child2, fSelector->UseAliKF());
-      Bool_t inPtRange = (ParentList->PoolID()==assocs && fSelector->GetBin(assoc,parent->Pt())>=0) ||
-       (ParentList->PoolID()==triggs && fSelector->GetBin(trigg,parent->Pt())>=0);
+      Bool_t inPtRange = (!isTrigg && fSelector->GetBin(t_asso,parent->Pt())>=0) ||
+       (isTrigg && fSelector->GetBin(t_trig,parent->Pt())>=0);
       if(goodParent && inPtRange) ParentList->Push(parent);
     } // 2nd particle loop
   } // 1st particle loop
index dc39912e5642e4e845df67edb76aa8e2418d73b9..2a665ae4bd1a71e48f5efb7fcbb8935206f635dc 100644 (file)
@@ -11,7 +11,6 @@
 //-- Author: Paul Constantin
  
 #include "AliJetCorrelWriter.h"
-#include "AliJetCorrelSelector.h"
 
 class AliJetCorrelReader : public TObject {
   
@@ -28,17 +27,17 @@ class AliJetCorrelReader : public TObject {
   void FillLists(CorrelList_t* list1, CorrelList_t* list2);
   
  private:    
-  AliESDEvent *fjcESD;              // input event (ESD/AOD)
-  AliJetCorrelSelector *fSelector; // user selection object
-  AliJetCorrelWriter *fWriter;     // output writer object
+  AliESDEvent *fjcESD;              //! input event (ESD/AOD)
+  AliJetCorrelSelector *fSelector;  //! user selection object
+  AliJetCorrelWriter *fWriter;      //! output writer object
   
-  void FillList(CorrelList_t* list);
+  void FillList(CorrelList_t* list, Bool_t isTrigg);
   void FillESDTrackLists(CorrelList_t* list1,CorrelList_t* list2);
-  void FillESDTrackList(CorrelList_t* list);
-  void FillESDPhotonList(CorrelList_t* list);
-  void FillESDDiphotonList(CorrelList_t* list);
-  void FillESDDielectronList(CorrelList_t* list);
-  void FillParentList(CorrelList_t* list1, CorrelList_t* list2);
+  void FillESDTrackList(CorrelList_t* list, Bool_t isTrigg);
+  void FillESDPhotonList(CorrelList_t* list, Bool_t isTrigg);
+  void FillESDDiphotonList(CorrelList_t* list, Bool_t isTrigg);
+  void FillESDDielectronList(CorrelList_t* list, Bool_t isTrigg);
+  void FillParentList(CorrelList_t* list1, CorrelList_t* list2, Bool_t isTrigg);
   
   // disable (make private) copy constructor and assignment operator:
   AliJetCorrelReader(const AliJetCorrelReader&);
index e8a3e8ca688c0a653b344db1e20f38c159c8a380..d2a11d36b5edb4bd61e4e799277c2af0b89da61f 100644 (file)
@@ -29,13 +29,13 @@ ClassImp(AliJetCorrelSelector)
 AliJetCorrelSelector::AliJetCorrelSelector() : 
   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), fTrkMinProx(0), fUseAliKF(kFALSE) {
+  fRejectKinkChild(kFALSE), fMaxEta(0), fPoutBW(0), fMaxNsigmaVtx(0), fMaxTrkVtx(0), 
+  fMaxITSChi2(0), fMaxTPCChi2(0), 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;
+  fNumBins[t_cent] = 0; fBinning[t_cent] = NULL;
+  fNumBins[t_vert] = 0; fBinning[t_vert] = NULL;
+  fNumBins[t_trig] = 0; fBinning[t_trig] = NULL;
+  fNumBins[t_asso] = 0; fBinning[t_asso] = NULL;
 }
 
 AliJetCorrelSelector::~AliJetCorrelSelector(){
@@ -44,14 +44,14 @@ AliJetCorrelSelector::~AliJetCorrelSelector(){
   fNumCorrel = 0;
   if(fEvtTriggs) delete [] fEvtTriggs;
   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;
+  if(fBinning[t_cent]) delete [] fBinning[t_cent];
+  fNumBins[t_cent] = 0;
+  if(fBinning[t_vert]) delete [] fBinning[t_vert];
+  fNumBins[t_vert] = 0;
+  if(fBinning[t_trig]) delete [] fBinning[t_trig];
+  fNumBins[t_trig] = 0;
+  if(fBinning[t_asso]) delete [] fBinning[t_asso];
+  fNumBins[t_asso] = 0;
 }
 
 void AliJetCorrelSelector::SetCorrelTypes(UInt_t s, UInt_t * const v){
@@ -89,14 +89,14 @@ void AliJetCorrelSelector::SetBinningCentr(UInt_t s, Float_t * const v){
   // fills array of centrality bins
   if(s<1){std::cerr<<"AliJetCorrelSelector::SetBinningCentr - empty array"<<std::endl; exit(-1);}
   if(s>kMaxCent){std::cerr<<"AliJetCorrelSelector: centrality array too big!"<<std::endl; exit(-1);}
-  fNumBins[centr] = s;
-  fBinning[centr] = new Float_t[fNumBins[centr]]; 
-  for(UInt_t k=0; k<fNumBins[centr]; k++){
+  fNumBins[t_cent] = s;
+  fBinning[t_cent] = new Float_t[fNumBins[t_cent]]; 
+  for(UInt_t k=0; k<fNumBins[t_cent]; k++){
     if(TMath::Abs(v[k])>999.){
       std::cerr<<"AliJetCorrelSelector::SetBinningCentr - read error? val["<<k<<"]="<<v[k]<<std::endl;
       exit(-1);
     }
-    else fBinning[centr][k] = v[k];
+    else fBinning[t_cent][k] = v[k];
   }
 }
 
@@ -104,14 +104,14 @@ void AliJetCorrelSelector::SetBinningZvert(UInt_t s, Float_t * const v){
   // fills array of vertex bins
   if(s<1){std::cerr<<"AliJetCorrelSelector::SetBinningZvert - empty array"<<std::endl; exit(-1);}
   if(s>kMaxVert){std::cerr<<"AliJetCorrelSelector: vertex array too big!"<<std::endl; exit(-1);}
-  fNumBins[zvert] = s;
-  fBinning[zvert] = new Float_t[fNumBins[zvert]]; 
-  for(UInt_t k=0; k<fNumBins[zvert]; k++){
+  fNumBins[t_vert] = s;
+  fBinning[t_vert] = new Float_t[fNumBins[t_vert]]; 
+  for(UInt_t k=0; k<fNumBins[t_vert]; k++){
     if(TMath::Abs(v[k])>999.){
       std::cerr<<"AliJetCorrelSelector::SetBinningZvert - read error? val["<<k<<"]="<<v[k]<<std::endl;
       exit(-1);
     }
-    else fBinning[zvert][k] = v[k];
+    else fBinning[t_vert][k] = v[k];
   }
 }
 
@@ -119,14 +119,14 @@ 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>kMaxTrig){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++){
+  fNumBins[t_trig] = s;
+  fBinning[t_trig] = new Float_t[fNumBins[t_trig]]; 
+  for(UInt_t k=0; k<fNumBins[t_trig]; 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];
+    else fBinning[t_trig][k] = v[k];
   }
 }
 
@@ -134,24 +134,24 @@ 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>kMaxAsso){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++){
+  fNumBins[t_asso] = s;
+  fBinning[t_asso] = new Float_t[fNumBins[t_asso]]; 
+  for(UInt_t k=0; k<fNumBins[t_asso]; 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];
+    else fBinning[t_asso][k] = v[k];
   }
 }
 
-Float_t AliJetCorrelSelector::BinBorder(BinType_t cType, UInt_t k) const {
+Float_t AliJetCorrelSelector::BinBorder(cBinType_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) const {
+Int_t AliJetCorrelSelector::GetBin(cBinType_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++)
@@ -162,19 +162,20 @@ Int_t AliJetCorrelSelector::GetBin(BinType_t cType, Float_t val) const {
 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;
+          <<" nDPhiBins="<<fDPhiNumBins<<" nDEtaBins="<<fDEtaNumBins<<" PoutBinWidth="<<fPoutBW
+          <<" 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<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]<<" ";
+  for(UInt_t k=0; k<fNumBins[t_cent]; k++) std::cout<<fBinning[t_cent][k]<<" ";
   std::cout<<std::endl<<" Vertex binning: ";
-  for(UInt_t k=0; k<fNumBins[zvert]; k++) std::cout<<fBinning[zvert][k]<<" ";
+  for(UInt_t k=0; k<fNumBins[t_vert]; k++) std::cout<<fBinning[t_vert][k]<<" ";
   std::cout<<std::endl<<" Trigger binning: ";
-  for(UInt_t k=0; k<fNumBins[trigg]; k++) std::cout<<fBinning[trigg][k]<<" ";
+  for(UInt_t k=0; k<fNumBins[t_trig]; k++) std::cout<<fBinning[t_trig][k]<<" ";
   std::cout<<std::endl<<" Associated binning: ";
-  for(UInt_t k=0; k<fNumBins[assoc]; k++) std::cout<<fBinning[assoc][k]<<" ";
+  for(UInt_t k=0; k<fNumBins[t_asso]; k++) std::cout<<fBinning[t_asso][k]<<" ";
   std::cout<<std::endl<<"Track selections: "<<std::endl
           <<" MaxEta="<<fMaxEta<<" MaxTrkVtx="<<fMaxTrkVtx<<" MaxNsigmaVtx="<<fMaxNsigmaVtx<<std::endl
           <<" MaxITSChi2="<<fMaxITSChi2<<" MaxTPCChi2="<<fMaxTPCChi2<<std::endl
@@ -208,7 +209,7 @@ Bool_t AliJetCorrelSelector::CloseTrackPair(Float_t dist) const {
 
 Bool_t AliJetCorrelSelector::LowQualityTrack(AliESDtrack* track) const {
   // selects low quality tracks
-  if(track->Eta()>fMaxEta) return kTRUE;
+  if(TMath::Abs(track->Eta())>fMaxEta) return kTRUE;
   UInt_t status = track->GetStatus();
   if(track->Pt()>5 && fITSRefit && !(status & AliESDtrack::kITSrefit)) return kTRUE;
   if(fTPCRefit && !(status & AliESDtrack::kTPCrefit)) return kTRUE;
@@ -236,7 +237,7 @@ Bool_t AliJetCorrelSelector::LowQualityTrack(AliESDtrack* track) const {
   return kFALSE;
 }
 
-Bool_t AliJetCorrelSelector::PassPID(AliESDtrack* track, PartType_t PartType) const {
+Bool_t AliJetCorrelSelector::PassPID(AliESDtrack* track, cPartType_t PartType) const {
   // checks if a track has the required ID
   Bool_t hasReqPID = kFALSE;
   Stat_t fPid;
@@ -244,27 +245,15 @@ Bool_t AliJetCorrelSelector::PassPID(AliESDtrack* track, PartType_t PartType) co
   GetPID(track, fPid, fWeight);
   
   switch(PartType){
-    case hadron:
+    case t_hadron:
       // if(fPID!=0) hasReqPID = kTRUE;
       hasReqPID = kTRUE;
       break;
-    case electron:
+    case t_electron:
       // if(fTRDRefit && !(status & AliESDtrack::kTRDrefit)) hasReqPID = kFALSE;
       // if(fPID!=0) hasReqPID = kFALSE;
       hasReqPID = kTRUE;
       break;
-    case pion:
-      // if(fPID!=2) hasReqPID = kFALSE;
-      hasReqPID = kTRUE;
-      break;
-    case kaon:
-      // if(fPID!=3) hasReqPID = kFALSE;
-      hasReqPID = kTRUE;
-      break;
-    case proton:
-      // if(fPID!=4) hasReqPID = kFALSE;
-      hasReqPID = kTRUE;
-      break;
     default:
       std::cerr<<"AliJetCorrelSelector::PassPID() - ERROR: wrong type!"<<std::endl;
       exit(-1);
index 76bd349d4ee64f3d6a42e9b5f675c238a37ab1b0..9d2831bbe874bd37183a4fd39e56ccddbb26da77 100644 (file)
@@ -25,15 +25,16 @@ class AliJetCorrelSelector : public TObject {
   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;
+  UInt_t NoOfBins(cBinType_t cType) const {return fNumBins[cType]-1;}  
+  Float_t BinBorder(cBinType_t cType, UInt_t ii) const;
+  Float_t MinLowBin(cBinType_t cType) const {return fBinning[cType][0];}
+  Float_t MaxHighBin(cBinType_t cType) const {return fBinning[cType][fNumBins[cType]-1];}
+  Int_t GetBin(cBinType_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;}
+  Float_t PoutBW() const     {return fPoutBW;}
   void Show() const;
   // Selection Setters:
   void SetPoolDepth(UInt_t v)      {fPoolDepth=v;}
@@ -47,6 +48,7 @@ class AliJetCorrelSelector : public TObject {
   void SetTPCRefit(Bool_t v)    {fTPCRefit=v;}
   void SetTRDRefit(Bool_t v)    {fTRDRefit=v;}
   void SetMaxEta(Float_t v)     {fMaxEta=v;}
+  void SetPoutBinWidth(Float_t v) {fPoutBW=v;}
   void SetMaxITSChi2(Float_t v) {fMaxITSChi2=v;}
   void SetMaxTPCChi2(Float_t v) {fMaxTPCChi2=v;}
   void SetMinNClusITS(UInt_t v) {fMinNClusITS=v;}
@@ -63,34 +65,35 @@ class AliJetCorrelSelector : public TObject {
   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;
+  Bool_t PassPID(AliESDtrack* t, cPartType_t pType) const;
   Float_t GetSigmaToVertex(AliESDtrack* trk) const;
   void GetPID(AliESDtrack* trk, Stat_t& fpid, Stat_t& fweight) const;
 
   enum {kMaxCorrel = 1};   // Maximum no of correlations
-  enum {kMaxVert = 10};    // Maximum no of vertex bins
+  enum {kMaxVert = 3};    // Maximum no of vertex bins
   enum {kMaxCent = 3};     // Maximum no of centrality bins
-  enum {kMaxTrig = 10};    // Maximum no of trigger bins
-  enum {kMaxAsso = 10};    // Maximum no of associated bins
+  enum {kMaxTrig = 13};    // Maximum no of trigger bins
+  enum {kMaxAsso = 7};    // Maximum no of associated bins
   
  private: 
   // Generic Selections:
-  Bool_t fGenQA;                 // generate QA histos
-  UInt_t fDPhiNumBins, fDEtaNumBins; // number of bins in DeltaPhi, DeltaEta histos
-  UInt_t fNumCorrel, fNumEvtTriggs, fPoolDepth; // number of correlations, event triggers, pool depth
+  Bool_t fGenQA;                     //! generate QA histos
+  UInt_t fDPhiNumBins, fDEtaNumBins; //! number of bins in DeltaPhi, DeltaEta histos
+  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
+  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
-  Float_t fMaxNsigmaVtx;             // track-primary vertex cut (sigma)
-  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 fTrkMinProx;                // two-track proximity cut (dist at TPC entrance)
-  Bool_t fUseAliKF;                  // use AliKF or TLorentzVector for parent reconstruction
+  Bool_t fITSRefit, fTPCRefit, fTRDRefit, fRejectKinkChild; //! on/off cuts
+  Float_t fMaxEta;                   //! single-particle eta cut
+  Float_t fPoutBW;                   //! Pout bin width
+  Float_t fMaxNsigmaVtx;             //! track-primary vertex cut (sigma)
+  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 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&);
index bb1f0b6a0908c1c9873376bc6e0d59e748ec372f..6fe856632bf7763370cdc799896966453a6dd235 100644 (file)
@@ -66,14 +66,14 @@ void AliJetCorrelWriter::CreateGeneric(TList *histosContainer){
   // books generic histograms
   UInt_t nTypeTrigg = fMaker->NoOfTrigg();
   UInt_t nTypeAssoc = fMaker->NoOfAssoc();
-  UInt_t nBinsCentr = fSelector->NoOfBins(centr);
-  UInt_t nBinsZVert = fSelector->NoOfBins(zvert);
-  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);
+  UInt_t nBinsCentr = fSelector->NoOfBins(t_cent);
+  UInt_t nBinsZVert = fSelector->NoOfBins(t_vert);
+  UInt_t nBinsTrigg = fSelector->NoOfBins(t_trig);
+  UInt_t nBinsAssoc = fSelector->NoOfBins(t_asso);
+  Float_t minTrigg  = fSelector->MinLowBin(t_trig);
+  Float_t maxTrigg  = fSelector->MaxHighBin(t_trig);
+  Float_t minAssoc  = fSelector->MinLowBin(t_asso);
+  Float_t maxAssoc  = fSelector->MaxHighBin(t_asso);
 
   for(UInt_t ic=0; ic<nBinsCentr; ic++){ // loop over centrality bins
     for(UInt_t tt=0; tt<nTypeTrigg; tt++){ // loop over trigger types
@@ -90,27 +90,27 @@ void AliJetCorrelWriter::CreateGeneric(TList *histosContainer){
     } // loop over trigger types
   } // centrality binning loop
 
-  fHCentr = new TH1F("fHCentr","centrality distribution",100, 0., 100.);
+  fHCentr = new TH1F("fHCentr","centrality distribution",100, 0., 200.);
   histosContainer->AddLast(fHCentr);
-  fHZVert = new TH1F("fHZVert","vertex distribution",100, -50., 50.);
+  fHZVert = new TH1F("fHZVert","vertex distribution",100, -10., 10.);
   histosContainer->AddLast(fHZVert);
 
   fHBinsCentr = new TH1F("fHBinsCentr","centrality binning", nBinsCentr+1, 0, 1); 
   histosContainer->AddLast(fHBinsCentr);
   for(UInt_t i=1;i<=nBinsCentr+1; i++)
-    fHBinsCentr->SetBinContent(i,fSelector->BinBorder(centr,i-1));
+    fHBinsCentr->SetBinContent(i,fSelector->BinBorder(t_cent,i-1));
   fHBinsZVert = new TH1F("fHBinsZVert","centrality binning", nBinsZVert+1, 0, 1); 
   histosContainer->AddLast(fHBinsZVert);
   for(UInt_t i=1;i<=nBinsZVert+1; i++)
-    fHBinsZVert->SetBinContent(i,fSelector->BinBorder(zvert,i-1));
+    fHBinsZVert->SetBinContent(i,fSelector->BinBorder(t_vert,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));
+    fHBinsTrigg->SetBinContent(i,fSelector->BinBorder(t_trig,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));
+    fHBinsAssoc->SetBinContent(i,fSelector->BinBorder(t_asso,i-1));
 }
 
 void AliJetCorrelWriter::CreateQA(TList *histosContainer){
@@ -133,13 +133,13 @@ void AliJetCorrelWriter::CreateQA(TList *histosContainer){
 
   UInt_t nTypeTrigg = fMaker->NoOfTrigg();
   UInt_t nTypeAssoc = fMaker->NoOfAssoc();
-  UInt_t nBinsCentr = fSelector->NoOfBins(centr);
-  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);
+  UInt_t nBinsCentr = fSelector->NoOfBins(t_cent);
+  UInt_t nBinsTrigg = fSelector->NoOfBins(t_trig);
+  UInt_t nBinsAssoc = fSelector->NoOfBins(t_asso);
+  Float_t minTrigg  = fSelector->MinLowBin(t_trig);
+  Float_t maxTrigg  = fSelector->MaxHighBin(t_trig);
+  Float_t minAssoc  = fSelector->MinLowBin(t_asso);
+  Float_t maxAssoc  = fSelector->MaxHighBin(t_asso);
   for(UInt_t ic=0; ic<nBinsCentr; ic++){ // centrality loop
     for(UInt_t it=0; it<2; it++){ // mixing type loop (real/mixed)
       fHname="fHTrkProx"; fHname+=it; fHname+=ic;
@@ -163,16 +163,15 @@ void AliJetCorrelWriter::CreateQA(TList *histosContainer){
 
 void AliJetCorrelWriter::CreateCorrelations(TList* histosContainer){
   // books correlation histograms
-  const Float_t lr=-TMath::Pi()/3, ur=5*TMath::Pi()/3, bwPout=0.2;
   UInt_t nTypeCorrel = fMaker->NoOfCorrel();
-  UInt_t nBinsCentr = fSelector->NoOfBins(centr);
-  UInt_t nBinsZVert = fSelector->NoOfBins(zvert);
-  UInt_t nBinsTrigg = fSelector->NoOfBins(trigg);
-  UInt_t nBinsAssoc = fSelector->NoOfBins(assoc);
-  Float_t maxAssoc  = fSelector->MaxHighBin(assoc);
+  UInt_t nBinsCentr = fSelector->NoOfBins(t_cent);
+  UInt_t nBinsZVert = fSelector->NoOfBins(t_vert);
+  UInt_t nBinsTrigg = fSelector->NoOfBins(t_trig);
+  UInt_t nBinsAssoc = fSelector->NoOfBins(t_asso);
+  Float_t maxAssoc  = fSelector->MaxHighBin(t_asso);
   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(maxAssoc/fSelector->PoutBW())); // since |p_out|<p_Ta
   if(fRecoTrigg) {  // if any correlation has reconstructed trigger, define ntuple; use id to differentiate
     fNtuParent = new TNtuple("fNtuParent","Reconstructed Parent Ntuple","id:q:m:pT:phi:eta:assym:open");
     histosContainer->AddLast(fNtuParent);
@@ -184,14 +183,12 @@ void AliJetCorrelWriter::CreateCorrelations(TList* histosContainer){
          for(UInt_t hia=0; hia<nBinsAssoc; hia++){ // associated loop
            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);
+           fHReal[htc][hic][hiv][hit][hia] = new TH3F(fHname,fHtit, kDPhiNumBins,-1./3.,5./3.,
+                                                     kDEtaNumBins,-1.6,1.6, nPoutBins,0.,maxAssoc);
            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);
+           fHMix[htc][hic][hiv][hit][hia] = new TH3F(fHname,fHtit, kDPhiNumBins,-1./3.,5./3.,
+                                                     kDEtaNumBins,-1.6,1.6, nPoutBins,0.,maxAssoc);
            histosContainer->AddLast(fHMix[htc][hic][hiv][hit][hia]);
          } // loop over associated bins
        } // loop over trigger bins
@@ -204,10 +201,10 @@ void AliJetCorrelWriter::CreateCorrelations(TList* histosContainer){
 // METHODS FOR FILLING THE OUTPUT HISTOGRAMS
 /////////////////////////////////////////////////////////
 
-void AliJetCorrelWriter::FillGlobal(Float_t cent, Float_t zvert){
+void AliJetCorrelWriter::FillGlobal(Float_t cent, Float_t vert){
   // some global event histos
   fHCentr->Fill(cent);
-  fHZVert->Fill(zvert);
+  fHZVert->Fill(vert);
 }
 
 void AliJetCorrelWriter::FillSingleHistos(UInt_t cBin, CorrelList_t * const TriggList, UInt_t tIdx,
@@ -274,44 +271,45 @@ void AliJetCorrelWriter::FillParentNtuple(CorrelList_t * const ParentList){
   }
 }
 
-void AliJetCorrelWriter::FillCorrelations(FillType_t fTyp, UInt_t iCorr, UInt_t cBin, UInt_t vBin, 
+void AliJetCorrelWriter::FillCorrelations(UInt_t fTyp, UInt_t iCorr, UInt_t cBin, UInt_t vBin, 
                                          CorrelParticle_t * const Trigg, CorrelParticle_t * const Assoc){
   // fills the correlation (two-particle) histograms
   // trigger information (this is why the first particle has to be the trigger):
   Float_t ptt  = Trigg->Pt();
   Float_t phit = Trigg->Phi();
   Float_t etat = Trigg->Eta();
-  Int_t   tBin = fSelector->GetBin(trigg,ptt);
+  Int_t   tBin = fSelector->GetBin(t_trig,ptt);
   // associated information:
   Float_t pta  = Assoc->Pt();
   Float_t phia = Assoc->Phi();
   Float_t etaa = Assoc->Eta();
-  Int_t   aBin = fSelector->GetBin(assoc,pta);
+  Int_t   aBin = fSelector->GetBin(t_asso,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(pta>=ptt) return; // use only associated particles below the trigger
   if(fabs(ptt-pta)<1.e-6 && fabs(phit-phia)<1.e-6 && fabs(etat-etaa)<1.e-6) return; // don't auto-correlate
 
-  // store track pair proximity
-  if(Trigg->ID()==hadron && Assoc->ID()==hadron){
-    CorrelTrack_t* trk1 = dynamic_cast<CorrelTrack_t*>(Trigg);
-    CorrelTrack_t* trk2 = dynamic_cast<CorrelTrack_t*>(Assoc);
-    if(!trk1 || !trk2)
-      {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()) fHTrkProx[fTyp][cBin]->Fill(pairDist,ptt,pta);
-  }
+  // track pair proximity 
+  // Before uncommenting, first store CorrelTrack_t in lists see AliJetCorrelReader::FillESDTrackLists
+//   if(Trigg->ID()==hadron && Assoc->ID()==hadron){
+//     CorrelTrack_t* trk1 = dynamic_cast<CorrelTrack_t*>(Trigg);
+//     CorrelTrack_t* trk2 = dynamic_cast<CorrelTrack_t*>(Assoc);
+//     if(!trk1 || !trk2)
+//       {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()) fHTrkProx[fTyp][cBin]->Fill(pairDist,ptt,pta);
+//   }
 
   // Fill correlation histograms:
   Float_t dphi = DeltaPhi(phit,phia);
   Float_t deta = etat-etaa;
-  Float_t pout = pta*TMath::Sin(dphi);
-  if(fTyp==real)
-    fHReal[iCorr][cBin][vBin][tBin][aBin]->Fill(dphi,deta,pout);
+  Float_t pout = TMath::Abs(pta*TMath::Sin(dphi));
+  if(fTyp==0)
+    fHReal[iCorr][cBin][vBin][tBin][aBin]->Fill(dphi/TMath::Pi(),deta,pout);
   else
-    fHMix[iCorr][cBin][vBin][tBin][aBin]->Fill(dphi,deta,pout);
+    fHMix[iCorr][cBin][vBin][tBin][aBin]->Fill(dphi/TMath::Pi(),deta,pout);
 }
 
 Float_t AliJetCorrelWriter::DeltaPhi(Float_t  phi1, Float_t phi2) {
index d260e19b3688e7ebc7cce7402ae4145eab844f84..6ad2686117995fac03b5c6ac38101ddeef72ffae 100644 (file)
@@ -9,7 +9,6 @@
 // Contains also the methods for calculation of correlation parameters.
 //-- Author: Paul Constantin
 
-#include "AliJetCorrelSelector.h"
 #include "AliJetCorrelMaker.h"
 
 class AliJetCorrelWriter : public TObject {
@@ -23,22 +22,22 @@ class AliJetCorrelWriter : public TObject {
   void CreateQA(TList *histosContainer);
   void CreateCorrelations(TList* histosContainer);
   
-  void FillGlobal(Float_t cent, Float_t zvert);
+  void FillGlobal(Float_t cent, Float_t vert);
   void FillSingleHistos(UInt_t cBin, CorrelList_t * const TriggList, UInt_t tIdx,
                        CorrelList_t * const AssocList, UInt_t aIdx);
   void FillTrackQA(AliESDtrack * const track, UInt_t idx);
   void FillParentNtuple(CorrelList_t * const ParentList);
-  void FillCorrelations(FillType_t fTyp, UInt_t iCorr, UInt_t cBin, UInt_t vBin,
+  void FillCorrelations(UInt_t fTyp, UInt_t iCorr, UInt_t cBin, UInt_t vBin,
                        CorrelParticle_t * const Trigger, CorrelParticle_t * const Associated);
   
   Float_t DeltaPhi(Float_t phi1, Float_t phi2);
   
  private:
-  AliJetCorrelSelector *fSelector;  // user selection object
-  AliJetCorrelMaker *fMaker;        // correlation maker object
-  TString fHname, fHtit;            // histos name&title
-  Bool_t fRecoTrigg;                // is trigger reconstructed
-  TRandom2 fRndm;                   // random number generator
+  AliJetCorrelSelector *fSelector;  //! user selection object
+  AliJetCorrelMaker *fMaker;        //! correlation maker object
+  TString fHname, fHtit;            //! histos name&title
+  Bool_t fRecoTrigg;                //! is trigger reconstructed
+  TRandom2 fRndm;                   //! random number generator
   
   // Output Histograms
   TNtuple *fNtuParent;                                       // reconstructed parent ntuple
diff --git a/PWG4/JetCorrel/CorrelDefs.h b/PWG4/JetCorrel/CorrelDefs.h
deleted file mode 100644 (file)
index d1053ec..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-#ifndef __CORRELDEFS_H__
-#define __CORRELDEFS_H__
-/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
- * See cxx source for full Copyright notice     */
-/* $Id:  $ */
-
-// CorrelDefs.h is at the top of preprocessor includes,
-// hence we add the general headers here
-//-- Author: Paul Constantin
-
-// C++ headers:
-#include <iostream>
-
-// ROOT headers:
-#include <TROOT.h>
-#include <TSystem.h>
-#include <Riostream.h>
-#include <TChain.h>
-#include <TFile.h>
-#include <TLorentzVector.h>
-#include <TVector3.h>
-#include <TClonesArray.h>
-#include <TList.h>
-#include <TMath.h>
-#include <TH1F.h>
-#include <TH2F.h>
-#include <TH3F.h>
-#include <TNtuple.h>
-#include <TString.h>
-#include <TRandom2.h>
-
-// AliRoot headers:
-#include "AliAnalysisManager.h"
-#include "AliAnalysisTaskSE.h"
-#include "AliKFParticle.h"
-#include "AliKFVertex.h"
-#include "AliESDInputHandler.h"
-#include "AliESDEvent.h"
-#include "AliESDVertex.h"
-#include "AliMultiplicity.h"
-#include "AliESDtrack.h"
-
-enum FillType_t {real, mixed};
-enum PoolType_t {triggs, assocs};
-enum BinType_t  {centr, zvert, trigg, assoc}; 
-enum PartType_t {unknown, hadron, proton, kaon, pion, photon, electron, jet, 
-                dihadron, diphoton, dielectron, dijet};
-
-#endif
index 9c434751b0cdce7596216612cef43118df8dfa40..6cd54dd7b210f2aca4b9d5684dde4746ce6fb2bd 100644 (file)
@@ -26,7 +26,7 @@ CorrelKFTrack_t::CorrelKFTrack_t() : CorrelParticle_t(), fParam(NULL), fCovar(NU
   // default constructor:
 }
 
-CorrelKFTrack_t::CorrelKFTrack_t(Float_t pt, Float_t p, Float_t e, Float_t m, PartType_t i, 
+CorrelKFTrack_t::CorrelKFTrack_t(Float_t pt, Float_t p, Float_t e, Float_t m, cPartType_t i, 
                                   Double_t* par, Double_t* cov) : 
   CorrelParticle_t(pt,p,e,m,i), fParam(par), fCovar(cov){
   // constructor:
index 37e69f4ebfa60338bafac8b52acb7e5d67c5818c..fe2503940de396c7582acd4ecc705ad60daa22bd 100644 (file)
@@ -14,7 +14,7 @@ class CorrelKFTrack_t : public CorrelParticle_t {
  public:
   
   CorrelKFTrack_t();
-  CorrelKFTrack_t(Float_t pt, Float_t p, Float_t e, Float_t m, PartType_t i, 
+  CorrelKFTrack_t(Float_t pt, Float_t p, Float_t e, Float_t m, cPartType_t i, 
                  Double_t* par, Double_t* cov);
   CorrelKFTrack_t(const CorrelKFTrack_t &p);
   virtual ~CorrelKFTrack_t() {;}
index 7122a2cbe095952f1e4e57fe439538b4ea5bc94d..d12a69a75d7854d98f238d1ac66d3c84447d4c54 100644 (file)
@@ -71,7 +71,7 @@ const CorrelListIter_t& CorrelListIter_t::operator=(const CorrelListIter_t& rhs)
 }
 
 CorrelList_t::CorrelList_t() : 
-  fSize(0), fEvtID(0), fFilled(kFALSE), fPartID(unknown), fPoolID(assocs), fHead(NULL) {
+  fSize(0), fEvtID(0), fFilled(kFALSE), fPartID(t_unknown), fHead(NULL) {
   // constructor
 }
 
@@ -80,7 +80,6 @@ const CorrelList_t& CorrelList_t::operator=(const CorrelList_t& rhs){
   fEvtID  = rhs.EvtID();
   fFilled = rhs.Filled();
   fPartID = rhs.PartID();
-  fPoolID = rhs.PoolID();
   fHead   = rhs.Head().Node();
   return *this;
 }
@@ -100,7 +99,7 @@ CorrelList_t* CorrelList_t::DeepCopy(){
   // use it to store lists in memory for mixing pools 
   
   CorrelList_t *copy = new CorrelList_t;
-  copy->Label(this->PartID(), this->PoolID(), this->EvtID());
+  copy->Label(this->PartID(), this->EvtID());
   copy->SetFilled(this->Filled());
   // fHead and fSize are set by Push() below
 
@@ -132,14 +131,13 @@ void CorrelList_t::Reset(){
   }
   fEvtID = 0;
   fFilled = kFALSE;
-  fPartID = unknown;
-  fPoolID = assocs;
+  fPartID = t_unknown;
   fHead = NULL;
 }
 
 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;
+  std::cout<<" CorrelList_t("<<this<<") head="<<fHead<<" size="<<Size()<<" filled="<<Filled()<<" evt="<<EvtID()<<" part="<<PartID()<<std::endl;
 }
 
 void CorrelList_t::Show() const {
index 7df82f86d32df0b2af9e306f4b5ae2f8ad86f08a..6c02528c08223881772672cb20e26f056bab3888 100644 (file)
@@ -62,22 +62,20 @@ class CorrelList_t : public TObject {
   void Push(CorrelParticle_t* p);
   UInt_t Size() const {return fSize;}
   UInt_t EvtID() const {return fEvtID;}
-  PartType_t PartID() const {return fPartID;}
-  PoolType_t PoolID() const {return fPoolID;}
+  cPartType_t PartID() const {return fPartID;}
   Bool_t Filled() const {return fFilled;}
   void SetFilled(Bool_t f) {fFilled=f;}
-  void Label(PartType_t p, PoolType_t l, UInt_t e) {fPartID=p; fPoolID=l; fEvtID=e;}
+  void Label(cPartType_t p, UInt_t e) {fPartID=p; fEvtID=e;}
   CorrelListIter_t Head() const {return CorrelListIter_t(fHead);}
   void ShowHead() const;
   void Show() const;
   
  private:
-  UInt_t fSize;             // list size
-  UInt_t fEvtID;            // event ID
-  Bool_t fFilled;           // is filled
-  PartType_t fPartID;       // particle ID
-  PoolType_t fPoolID;       // pool type
-  CorrelListNode_t* fHead;  // list head
+  UInt_t fSize;             //! list size
+  UInt_t fEvtID;            //! event ID
+  Bool_t fFilled;           //! is filled
+  cPartType_t fPartID;      //! particle ID
+  CorrelListNode_t* fHead;  //! list head
   
   CorrelList_t(const CorrelList_t& rhs);        // forbid copy constructor
   
index ed9848725b37eb44180633b1f8a19fb826853d61..0cbead8333dfe8a22cb9e7d9065183116960cffe 100644 (file)
 
 using namespace std;
 
-CorrelParticle_t::CorrelParticle_t() : fPt(-999.), fPhi(-999.), fEta(-999.), fMass(-999.), fID(unknown){
+CorrelParticle_t::CorrelParticle_t() : fPt(-999.), fPhi(-999.), fEta(-999.), fMass(-999.), fID(t_unknown){
   // default constructor
 }
 
-CorrelParticle_t::CorrelParticle_t(Float_t pt, Float_t p, Float_t t, Float_t m, PartType_t i) : fPt(pt), fPhi(p), fEta(t), fMass(m), fID(i){
+CorrelParticle_t::CorrelParticle_t(Float_t pt, Float_t p, Float_t t, Float_t m, cPartType_t i) : fPt(pt), fPhi(p), fEta(t), fMass(m), fID(i){
   // constructor
 }
 
index 57d831a7fc1a52ecb56ef13d3a9ce9cd344409a8..93f328508d35d44fd1e5082847a70286a7652f24 100644 (file)
@@ -6,14 +6,49 @@
 
 //________________________________________________
 // Main container class - stores generic particle.
+// At the top of preprocessor includes,
+// hence we add the general headers here
 //-- Author: Paul Constantin
 
-#include "CorrelDefs.h"
+// C++ headers:
+#include <iostream>
+
+// ROOT headers:
+#include <TROOT.h>
+#include <TSystem.h>
+#include <Riostream.h>
+#include <TChain.h>
+#include <TFile.h>
+#include <TLorentzVector.h>
+#include <TVector3.h>
+#include <TClonesArray.h>
+#include <TList.h>
+#include <TMath.h>
+#include <TH1F.h>
+#include <TH2F.h>
+#include <TH3F.h>
+#include <TNtuple.h>
+#include <TString.h>
+#include <TRandom2.h>
+
+// AliRoot headers:
+#include "AliAnalysisManager.h"
+#include "AliAnalysisTaskSE.h"
+#include "AliKFParticle.h"
+#include "AliKFVertex.h"
+#include "AliESDInputHandler.h"
+#include "AliESDEvent.h"
+#include "AliESDVertex.h"
+#include "AliMultiplicity.h"
+#include "AliESDtrack.h"
+
+enum cBinType_t  {t_cent, t_vert, t_trig, t_asso}; 
+enum cPartType_t {t_unknown, t_hadron, t_photon, t_electron, t_jet, t_dihadron, t_diphoton, t_dielectron, t_dijet};
 
 class CorrelParticle_t {        
  public:
   CorrelParticle_t();
-  CorrelParticle_t(Float_t pt, Float_t p, Float_t t, Float_t m, PartType_t i);
+  CorrelParticle_t(Float_t pt, Float_t p, Float_t t, Float_t m, cPartType_t i);
   CorrelParticle_t(const CorrelParticle_t& p);
   virtual ~CorrelParticle_t() {;}
   virtual CorrelParticle_t* Copy();
@@ -23,14 +58,14 @@ class CorrelParticle_t {
   void SetPhi(Float_t v)   {fPhi=v;}
   void SetEta(Float_t v)   {fEta=v;}
   void SetMass(Float_t v)  {fMass=v;}
-  void SetID(PartType_t v) {fID=v;}
+  void SetID(cPartType_t v) {fID=v;}
   
   // data getters
   virtual Float_t Pt()    const {return TMath::Abs(fPt);}
   virtual Float_t Phi()   const {return fPhi;}
   virtual Float_t Eta()   const {return fEta;}    
   virtual Float_t M()     const {return fMass;}
-  virtual PartType_t ID() const {return fID;}
+  virtual cPartType_t ID() const {return fID;}
   
   // derived data getters
   virtual Short_t Q()     const {return (Pt()>0)?(Short_t(fPt/Pt())):(-99);}
@@ -52,7 +87,7 @@ class CorrelParticle_t {
   Float_t fPhi;   // phi
   Float_t fEta;   // eta
   Float_t fMass;  // mass
-  PartType_t fID; // ID
+  cPartType_t fID; // ID
 };
 
 #endif
index d3a60281844a2a71e9daa40ce61f578dbeea4077..98aba220fcacb69ad6f25fd3fe54221b45746f16 100644 (file)
@@ -57,12 +57,12 @@ CorrelRecoParent_t* CorrelRecoParent_t::Copy(){
 Bool_t CorrelRecoParent_t::Reconstruct(CorrelParticle_t *p1, CorrelParticle_t *p2, Bool_t kUseAliKF){
   // main method for parent reconstruction
 
-  if(p1->ID()==photon && p2->ID()==photon) fID = diphoton;
-  else if(p1->ID()==electron && p2->ID()==electron) fID = dielectron;
-  else if(p1->ID()==jet && p2->ID()==jet) fID = dijet;
-  else fID = dihadron;
+  if(p1->ID()==t_photon && p2->ID()==t_photon) fID = t_diphoton;
+  else if(p1->ID()==t_electron && p2->ID()==t_electron) fID = t_dielectron;
+  else if(p1->ID()==t_jet && p2->ID()==t_jet) fID = t_dijet;
+  else fID = t_dihadron;
   
-  if(fID==dielectron && kUseAliKF){
+  if(fID==t_dielectron && kUseAliKF){
     // code for parent reconstruction based on AliKFParticle:
     if(!fjcESD)
       {std::cerr<<"CorrelRecoParent_t::Reconstruct - undefined event"<<std::endl; exit(-1);}
@@ -127,16 +127,16 @@ Bool_t CorrelRecoParent_t::Reconstruct(CorrelParticle_t *p1, CorrelParticle_t *p
   return kTRUE;
 }
 
-Bool_t CorrelRecoParent_t::NotInMass(PartType_t pID, Float_t mass){
+Bool_t CorrelRecoParent_t::NotInMass(cPartType_t pID, Float_t mass){
   // THE MASS RANGES SHOULD PROBABLY BE MOMENTUM AND CENTRALITY DEPENDENT!!!
-  if(pID!=dielectron && pID!=diphoton) return kFALSE;
+  if(pID!=t_dielectron && pID!=t_diphoton) return kFALSE;
 
   const Float_t kZ0MassMin = 82;    // 91-3*3
   const Float_t kZ0MassMax = 100;   // 91+3*3
   const Float_t kPi0MassMin = 0.11; // 0.14-3*0.1
   const Float_t kPi0MassMax = 0.17; // 0.14+3*0.1
-  if(pID==dielectron && mass>kZ0MassMin && mass<kZ0MassMax) return kFALSE;
-  if(pID==diphoton && mass>kPi0MassMin && mass<kPi0MassMax) return kFALSE;
+  if(pID==t_dielectron && mass>kZ0MassMin && mass<kZ0MassMax) return kFALSE;
+  if(pID==t_diphoton && mass>kPi0MassMin && mass<kPi0MassMax) return kFALSE;
 
   return kTRUE;
 }
index a6aebc3911b6b21a2f2373218cc5c1e6ef106dc2..120d93b2727689895f07aed092cc6389f1d21147 100644 (file)
@@ -6,7 +6,7 @@
 
 //______________________________________________________________________________
 // Container class for reconstructed parents. Reconstruction method uses
-// AliKFParticle or TLorentzVector as indicated by kUseAliKF set in CorrelDefs.h
+// AliKFParticle or TLorentzVector as chosen thru the selector
 //-- Author: Paul Constantin
 
 #include "CorrelParticle.h"
@@ -35,7 +35,7 @@ class CorrelRecoParent_t : public CorrelParticle_t {
   // disable (make private) the copy constructor
   CorrelRecoParent_t(const CorrelRecoParent_t &p);
   
-  Bool_t NotInMass(PartType_t ID, Float_t mass);
+  Bool_t NotInMass(cPartType_t ID, Float_t mass);
 };
 
 #endif
index 18997bf579e620563222d755d5968f8fdbbfac56..d973bd9ea0537693c46ac94bb02927149d64993e 100644 (file)
@@ -27,7 +27,7 @@ CorrelTrack_t::CorrelTrack_t() : CorrelParticle_t(), fTPCx(-999.), fTPCy(-999.),
   // default constructor:
 }
 
-CorrelTrack_t::CorrelTrack_t(Float_t pt, Float_t p, Float_t e, Float_t m, PartType_t i, Float_t x, Float_t y, Float_t z) : 
+CorrelTrack_t::CorrelTrack_t(Float_t pt, Float_t p, Float_t e, Float_t m, cPartType_t i, Float_t x, Float_t y, Float_t z) : 
   CorrelParticle_t(pt,p,e,m,i), fTPCx(x), fTPCy(y), fTPCz(z){
   // constructor:
 }
index 42908294f70f66dfd27fa94fb9cfa750d362c57c..a6b6ee93fcee12bb599116b139e9f147ecca3c04 100644 (file)
@@ -15,7 +15,7 @@ class CorrelTrack_t : public CorrelParticle_t {
  public:
   
   CorrelTrack_t();
-  CorrelTrack_t(Float_t pt, Float_t p, Float_t e, Float_t m, PartType_t i, Float_t x, Float_t y, Float_t z);
+  CorrelTrack_t(Float_t pt, Float_t p, Float_t e, Float_t m, cPartType_t i, Float_t x, Float_t y, Float_t z);
   CorrelTrack_t(const CorrelTrack_t &p);
   virtual ~CorrelTrack_t() {;}
   virtual CorrelTrack_t* Copy();
index 6bbd8cbbe22fa0237fafebf7bf3ac4e152df875d..7a7cd82e4f43df6ad189e04366340cf1b68c39c8 100644 (file)
@@ -5,8 +5,6 @@
 #pragma link off all functions;
 
 #pragma link C++ class CorrelList_t+;
-#pragma link C++ class CorrelListIter_t+;
-#pragma link C++ class CorrelListNode_t+;
 #pragma link C++ class AliJetCorrelMaker+;
 #pragma link C++ class AliJetCorrelSelector+;
 #pragma link C++ class AliJetCorrelReader+;
index def58a0c654b14572fec3de3fb7cd77fcac99ea1..f42244e3f2fca5f99e1a426b99c6ccf2d0a1ec5c 100644 (file)
@@ -4,7 +4,7 @@ SRCS = JetCorrel/AliAnalysisTaskJetCorrel.cxx  \
        JetCorrel/AliJetCorrelMaker.cxx JetCorrel/AliJetCorrelSelector.cxx JetCorrel/AliJetCorrelReader.cxx JetCorrel/AliJetCorrelMixer.cxx JetCorrel/AliJetCorrelWriter.cxx \
        JetCorrel/CorrelList.cxx JetCorrel/CorrelParticle.cxx JetCorrel/CorrelRecoParent.cxx JetCorrel/CorrelTrack.cxx JetCorrel/CorrelKFTrack.cxx
 
-HDRS:= JetCorrel/CorrelDefs.h $(SRCS:.cxx=.h) 
+HDRS:= $(SRCS:.cxx=.h) 
 
 DHDR:= PWG4JetCorrelLinkDef.h
 
index b2035eacd37303181e166d92c3b9eed5dee8230d..21fd5aaea7141aa02253d91040aa9edab09edd0f 100644 (file)
@@ -17,14 +17,20 @@ AliAnalysisTaskJetCorrel *AddTaskJetCorrel(){
 
   gROOT->LoadMacro("$ALICE_ROOT/PWG4/macros/ConfigJetCorrel.C");
   AliJetCorrelSelector* Selector = ConfigJetCorrel();
-  AliAnalysisTaskJetCorrel *task = new AliAnalysisTaskJetCorrel(Selector);
-  mgr->AddTask(task);
+  AliAnalysisTaskJetCorrel *jetcorrel = new AliAnalysisTaskJetCorrel(Selector);
+  mgr->AddTask(jetcorrel);
+  
+  gROOT->LoadMacro("$ALICE_ROOT/ANALYSIS/macros/AddTaskPhysicsSelection.C");
+  AliPhysicsSelectionTask* physSelTask = AddTaskPhysicsSelection();
+  AliPhysicsSelection* physSele = physSelTask->GetPhysicsSelection();
+  jetcorrel->SelectCollisionCandidates(); 
 
   //create data containers
   AliAnalysisDataContainer *cinput = (AliAnalysisDataContainer*)mgr->GetContainers()->FindObject("cAUTO_INPUT");
-  mgr->ConnectInput(task,0,cinput);
-  AliAnalysisDataContainer *coutput_JetCorrel = mgr->CreateContainer("JetCorrelHistos", TList::Class(), AliAnalysisManager::kOutputContainer, Form("%s:JetCorrel",AliAnalysisManager::GetCommonFileName()));  
-  mgr->ConnectOutput(task,0,coutput_JetCorrel);
+  mgr->ConnectInput(jetcorrel,0,cinput);
+  AliAnalysisDataContainer *coutput_JetCorrel = mgr->CreateContainer("JetCorrelHistos", TList::Class(),
+       AliAnalysisManager::kOutputContainer, Form("%s:JetCorrel",AliAnalysisManager::GetCommonFileName()));  
+  mgr->ConnectOutput(jetcorrel,0,coutput_JetCorrel);
   
-  return task;
+  return jetcorrel;
 }
index a1db3c2fd7533056a9c74b2f95d79b761887038f..ce0200befeaf73c027d3b7aca6199383adb1c843 100644 (file)
@@ -4,18 +4,19 @@ AliJetCorrelSelector* ConfigJetCorrel(){
   // set correlation input parameters
   ///////////////////////////////////
   // set generic selections:
-  Bool_t kGenQA = kTRUE;       // generate QA histos
-  UInt_t kDPhiNumBins = 60;    // number of bins in DeltaPhi histos
-  UInt_t kDEtaNumBins = 40;    // number of bins in DeltaEta histos
+  Bool_t kGenQA = kFALSE;      // generate QA histos
+  UInt_t kDPhiNumBins = 30;    // number of bins in DeltaPhi
+  UInt_t kDEtaNumBins = 16;    // number of bins in DeltaEta
+  Float_t kPoutBinWidth = 0.2; // number of bins in Pout = max(assocBins)/kPoutBinWidth
   Bool_t kUseAliKF = kFALSE;   // use AliKF or TLorentzVector for parent reconstruction
-  UInt_t poolDepth = 10;
+  UInt_t poolDepth = 5;
   UInt_t correlTypes[] = {0};  // 0=dihadron, 1=pi0-hadron, 2=photon-hadron
-  Float_t centrBins[] = {1,300};
-  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-"};
+  Float_t centrBins[] = {1,500};
+  Float_t zVertBins[] = {-5,5};
+  Float_t triggBins[] = {6,8,10,20};
+  Float_t assocBins[] = {2,10};
+  TString sTrigg[] = {"ALL"}; // selects events where one of the strings is matched; "ALL"=no cut
+  //TString sTrigg[] = {"CINT1B-"};
   // set track selections:
   Bool_t itsRefit = kTRUE;
   Bool_t tpcRefit = kTRUE;
@@ -39,6 +40,7 @@ AliJetCorrelSelector* ConfigJetCorrel(){
   selector->SetUseAliKF(kUseAliKF);
   selector->SetDPhiNumBins(kDPhiNumBins);
   selector->SetDEtaNumBins(kDEtaNumBins);
+  selector->SetPoutBinWidth(kPoutBinWidth);
   selector->SetPoolDepth(poolDepth);
   selector->SetCorrelTypes(sizeof(correlTypes)/sizeof(UInt_t),correlTypes);
   selector->SetBinningCentr(sizeof(centrBins)/sizeof(Float_t),centrBins);