]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Fixing bug of output when running with parallel mode in AliAnalysisTaskSEMuonsHF...
authormartinez <martinez@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 10 Jun 2010 10:17:09 +0000 (10:17 +0000)
committermartinez <martinez@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 10 Jun 2010 10:17:09 +0000 (10:17 +0000)
13 files changed:
PWG3/muon/AddTaskMuonsHF.C
PWG3/muon/AliAnalysisTaskSEMuonsHF.cxx
PWG3/muon/AliAnalysisTaskSEMuonsHF.h
PWG3/muon/AliDimuInfoStoreMC.cxx
PWG3/muon/AliDimuInfoStoreMC.h
PWG3/muon/AliDimuInfoStoreRD.cxx
PWG3/muon/AliDimuInfoStoreRD.h
PWG3/muon/AliMuonInfoStoreMC.cxx
PWG3/muon/AliMuonInfoStoreMC.h
PWG3/muon/AliMuonInfoStoreRD.cxx
PWG3/muon/AliMuonInfoStoreRD.h
PWG3/muon/AliMuonsHFHeader.cxx
PWG3/muon/AliMuonsHFHeader.h

index 9c56da8a4b6c18e6edae120109af2c5ae7dbf96c..a5ff5aa4379e71a6c516a88c8ce134d9682641f7 100644 (file)
@@ -5,21 +5,18 @@ AliAnalysisTaskSEMuonsHF* AddTaskMuonsHF(Int_t mode=0, Bool_t isMC=kFALSE, Bool_
     ::Error("AddTaskMuonsHF", "No analysis manager to connect to.");
     return NULL;
   }
-
   TString type = mgr->GetInputEventHandler()->GetDataType();
   if (!type.Contains("ESD") && !type.Contains("AOD")) {
     ::Error("AddTaskMuonsHF", "MuonsHF task needs the manager to have an ESD or AOD input handler.");
     return NULL;
   }
-
-  /*if (isMC) {
+  if (isMC && type.Contains("ESD")) {
     AliMCEventHandler *mcH = mgr->GetMCtruthEventHandler();
     if (!mcH) {
       ::Error("AddTaskMuonsHF", "MuonsHF task needs the manager to have an MC evnet handler.");
       return NULL;
     }
-  }*/
-
+  }
   if (isTree) {
     AliAODHandler *aodH = (AliAODHandler*)mgr->GetOutputEventHandler();
     if (!aodH) {
@@ -32,32 +29,40 @@ AliAnalysisTaskSEMuonsHF* AddTaskMuonsHF(Int_t mode=0, Bool_t isMC=kFALSE, Bool_
   Double_t cutsEvsH[3] ={-999999.0,   // low limit of Ncontrs
                           999999.0,   // up limit of |vz|
                           999999.0};  // up limit of vt
-  Double_t cutsMuon[10]={-999999.0,   // 0, min of 3-momentum
-                          999999.0,   // 1, max of 3-momnentum
-                         -999999.0,   // 2, PtMin
-                          999999.0,   // 3, PtMax
-                         -999999.0,   // 4, EtaMin
-                          999999.0,   // 5, EtaMax
-                         -999999.0,   // 6, DCAmin
-                          999999.0,   // 7, DCAmax
-                         -999999.0,   // 8, for trigger
-                          999999.0};  // 9, for trigger
-  Double_t cutsDimu[10]={-999999.0, 999999.0,  // single muon cuts used for dimuon selection
+  Double_t cutsMuon[12]={-999999.0,   //   0, min of 3-momentum
+                          999999.0,   //   1, max of 3-momnentum
+                         -999999.0,   //   2, PtMin
+                          999999.0,   //   3, PtMax
+                         -999999.0,   //   4, EtaMin
+                          999999.0,   //   5, EtaMax
+                         -999999.0,   //   6, DCAmin
+                          999999.0,   //   7, DCAmax
+                         -999999.0,   //   8, for trigger
+                          999999.0,   //   9, for trigger
+                         -999999.0,   //  10, RabsEndMin
+                          999999.0,};  // 11, RabsEndMax
+  Double_t cutsDimu[12]={-999999.0, 999999.0,  // single muon cuts used for dimuon selection
+                         -999999.0, 999999.0,
                          -999999.0, 999999.0,
                          -999999.0, 999999.0,
                          -999999.0, 999999.0,
                          -999999.0, 999999.0};
   AliAnalysisTaskSEMuonsHF *taskMuonsHF = new AliAnalysisTaskSEMuonsHF("MuonsHF Analysis Task");
   taskMuonsHF->SetAnaMode(mode);
-  taskMuonsHF->SetIsUseMC(isMC);
+  taskMuonsHF->SetUseMC(isMC);
   taskMuonsHF->SetIsOutputTree(isTree);
   taskMuonsHF->SetEvsHCuts(cutsEvsH);
   taskMuonsHF->SetMuonCuts(cutsMuon);
   taskMuonsHF->SetDimuCuts(cutsDimu);
+  taskMuonsHF->SelectCollisionCandidates();
   mgr->AddTask(taskMuonsHF);
 
-  mgr->ConnectInput(taskMuonsHF,0,mgr->GetCommonInputContainer());
-  if (isTree) mgr->ConnectOutput(taskMuonsHF,0,mgr->GetCommonOutputContainer());
+  mgr->ConnectInput(taskMuonsHF, 0, mgr->GetCommonInputContainer());
+  if (isTree) mgr->ConnectOutput(taskMuonsHF, 0, mgr->GetCommonOutputContainer());
+
+  char *fileName = "muonsHF.root";
+  AliAnalysisDataContainer *coutput1 = mgr->CreateContainer("histosList",TList::Class(),AliAnalysisManager::kOutputContainer,fileName);
+  mgr->ConnectOutput(taskMuonsHF,1,coutput1);
 
   return taskMuonsHF;
 }
index 9063a6bbb0e9d5e2d511f21995046a4092145fde..843d5034db64654edacd91aa9c1926ef11388790 100644 (file)
 
 #include <TList.h>
 #include <TClonesArray.h>
-#include <TFile.h>
 
-#include "AliAnalysisManager.h"
-#include "AliMCEventHandler.h"
-#include "AliAODMCParticle.h"
-#include "AliVEvent.h"
 #include "AliESDEvent.h"
 #include "AliAODEvent.h"
 #include "AliESDMuonTrack.h"
@@ -45,8 +40,6 @@
 #include "AliDimuInfoStoreMC.h"
 #include "AliAnalysisTaskSEMuonsHF.h"
 
-class AliAnalysisTaskSE;
-
 ClassImp(AliAnalysisTaskSEMuonsHF)
 
 //_____________________________________________________________________________
@@ -54,13 +47,11 @@ AliAnalysisTaskSEMuonsHF::AliAnalysisTaskSEMuonsHF() :
 AliAnalysisTaskSE(),
 fAnaMode(0),
 fIsOutputTree(kFALSE),
-fIsUseMC(kFALSE),
+fIsMC(kFALSE),
 fHeader(0),
 fMuonClArr(0),
 fDimuClArr(0),
-fListHisHeader(0),
-fListHisMuon(),
-fListHisDimu(0)
+fListOutput(0)
 {
   //
   // Default constructor
@@ -72,17 +63,16 @@ AliAnalysisTaskSEMuonsHF::AliAnalysisTaskSEMuonsHF(const char *name) :
 AliAnalysisTaskSE(name),
 fAnaMode(0),
 fIsOutputTree(kFALSE),
-fIsUseMC(kFALSE),
+fIsMC(kFALSE),
 fHeader(0),
 fMuonClArr(0),
 fDimuClArr(0),
-fListHisHeader(0),
-fListHisMuon(0),
-fListHisDimu(0)
+fListOutput(0)
 {
   //
   // Constructor
   //
+  DefineOutput(1, TList::Class());
 }
 
 //_____________________________________________________________________________
@@ -91,13 +81,10 @@ AliAnalysisTaskSEMuonsHF::~AliAnalysisTaskSEMuonsHF()
   //
   // Default destructor
   //
-  if (fHeader)    { delete fHeader;     fHeader    =NULL; }
-  if (fMuonClArr) { delete fMuonClArr;  fMuonClArr =NULL; }
-  if (fDimuClArr) { delete fDimuClArr;  fDimuClArr =NULL; }
-
-  if (fListHisHeader) { delete    fListHisHeader; fListHisHeader=NULL; }
-  if (fListHisMuon)   { delete [] fListHisMuon;   fListHisMuon  =NULL; }
-  if (fListHisDimu)   { delete [] fListHisDimu;   fListHisDimu  =NULL; }
+  if (fHeader)     { delete fHeader;     fHeader    =NULL; }
+  if (fMuonClArr)  { delete fMuonClArr;  fMuonClArr =NULL; }
+  if (fDimuClArr)  { delete fDimuClArr;  fDimuClArr =NULL; }
+  if (fListOutput) { delete fListOutput; fListOutput=NULL; }
 }
 
 //_____________________________________________________________________________
@@ -107,14 +94,14 @@ void AliAnalysisTaskSEMuonsHF::Init()
   // Setting and initializing the running mode and status
 
   AliMuonsHFHeader::SetAnaMode(fAnaMode);
-  AliMuonsHFHeader::SetIsMC(fIsUseMC);
+  AliMuonsHFHeader::SetIsMC(fIsMC);
   if (!fHeader) {
     fHeader = new AliMuonsHFHeader();
     fHeader->SetName(AliMuonsHFHeader::StdBranchName());
   }
 
   if (!fMuonClArr) {
-    if (fIsUseMC) { 
+    if (fIsMC) { 
       fMuonClArr = new TClonesArray("AliMuonInfoStoreMC", 0);
       fMuonClArr->SetName(AliMuonInfoStoreMC::StdBranchName());
     } else {
@@ -124,7 +111,7 @@ void AliAnalysisTaskSEMuonsHF::Init()
   }
 
   if (fAnaMode!=1 && !fDimuClArr) {
-    if (fIsUseMC) {
+    if (fIsMC) {
       fDimuClArr = new TClonesArray("AliDimuInfoStoreMC", 0);
       fDimuClArr->SetName(AliDimuInfoStoreMC::StdBranchName());
     } else {
@@ -141,16 +128,8 @@ void AliAnalysisTaskSEMuonsHF::UserCreateOutputObjects()
 {
   // Create the output container
 
-  if (!fListHisHeader) fListHisHeader = new TList();
-  if (fAnaMode!=2 && !fListHisMuon) {
-    if (fIsUseMC) fListHisMuon = new TList[AliMuonInfoStoreMC::NSources()];
-    else fListHisMuon = new TList();
-  }
-  if (fAnaMode!=1 && !fListHisDimu) {
-    if (fIsUseMC) fListHisDimu = new TList[AliDimuInfoStoreMC::NSources()];
-    else fListHisDimu = new TList();
-  }
-  fHeader->CreateHistograms(fListHisHeader, fListHisMuon, fListHisDimu);
+  if (!fListOutput) fListOutput = new TList();
+  fHeader->CreateHistograms(fListOutput);
 
   if (fIsOutputTree) {
     AddAODBranch("AliMuonsHFHeader", &fHeader);
@@ -167,77 +146,70 @@ void AliAnalysisTaskSEMuonsHF::UserExec(Option_t *)
   // Execute analysis for current event:
   // muon event header & (di)muon info store
 
-  AliVEvent *event = dynamic_cast<AliVEvent*>(InputEvent());
-  //if (AODEvent() && IsStandardAOD()) event = dynamic_cast<AliVEvent*>(AODEvent());
-  TString evName = event->IsA()->GetName();
-  Bool_t isAOD = ((evName=="AliAODEvent") ? kTRUE : kFALSE);
-  event = 0x0;
+  if (fIsMC) {
+    if (MCEvent()) {
+      if (MCEvent()->GetNumberOfTracks()<=0)
+           { AliError("MC event not found. Nothing done!"); return; }
+    } else { AliError("MC event not found. Nothing done!"); return; }
+  }
+
+  fHeader->SetEvent(((AliVVertex*)InputEvent()->GetPrimaryVertex()));
+  fHeader->FillHistosEvnH(fListOutput);
 
   Int_t ntrks = 0;
   AliAODEvent *aod = 0;
   AliESDEvent *esd = 0;
-  TClonesArray *mcClArr = 0;
-  AliMCEventHandler *mcH = 0;
-  if (isAOD) {
+  if (((TString)InputEvent()->IsA()->GetName())=="AliAODEvent") {
     aod = dynamic_cast<AliAODEvent*>(InputEvent());
-    //if (AODEvent() && IsStandardAOD()) aod = dynamic_cast<AliAODEvent*>(AODEvent());
     if (!aod) { AliError("AOD event not found. Nothing done!"); return; }
-    if (fIsUseMC) {
-      mcClArr = (TClonesArray*)aod->GetList()->FindObject(AliAODMCParticle::StdBranchName());
-      if (!mcClArr) { AliError("MC Array not found. Nothing done!"); return; }
-    }
-    fHeader->SetEvent(aod);
     ntrks = aod->GetNTracks();
+    fHeader->SetFiredTriggerClass(aod->GetFiredTriggerClasses());
   } else {
     esd = dynamic_cast<AliESDEvent*>(InputEvent());
     if (!esd) { AliError("ESD event not found. Nothing done!"); return; }
-    if (fIsUseMC) {
-      mcH = (AliMCEventHandler*)((AliAnalysisManager::GetAnalysisManager())->GetMCtruthEventHandler());
-      if (!mcH) { AliError("MC Handler not found. Nothing done!"); return; }
-    }
-    fHeader->SetEvent(esd);
     ntrks = esd->GetNumberOfMuonTracks();
+    fHeader->SetFiredTriggerClass(esd->GetFiredTriggerClasses());
   }
 
-  fHeader->FillHistosEventH(fListHisHeader);
-
   fMuonClArr->Delete();
   TClonesArray &muonRef = *fMuonClArr;
   Int_t countN = fMuonClArr->GetEntriesFast();
 
   AliAODTrack        *trkAOD = 0;
   AliESDMuonTrack    *trkESD = 0;
-  AliMuonInfoStoreRD *trkRD  = 0;
-  AliMuonInfoStoreMC *trkMC  = 0;
+  AliMuonInfoStoreRD *muonRD = 0;
+  AliMuonInfoStoreMC *muonMC = 0;
   for (Int_t itrk=0; itrk<ntrks; itrk++) {  // loop over all tracks
-    if (isAOD) {
+    if (aod) {
       trkAOD = (AliAODTrack*)aod->GetTrack(itrk);
-      if (!trkAOD->IsMuonTrack()) { trkAOD=0; trkRD=0; trkMC=0; continue; }
-      if (fIsUseMC) trkMC = new AliMuonInfoStoreMC(trkAOD, mcClArr);
-      else trkRD = new AliMuonInfoStoreRD(trkAOD);
+      if (!trkAOD->IsMuonTrack())        { trkAOD=0; continue; }
+      if (fIsMC) muonMC = new AliMuonInfoStoreMC(trkAOD, MCEvent());
+      else muonRD = new AliMuonInfoStoreRD(trkAOD);
       trkAOD = 0;
     } else {
       trkESD = (AliESDMuonTrack*)esd->GetMuonTrack(itrk);
-      if (!trkESD->ContainTrackerData()) { trkESD=0; trkRD=0; trkMC=0; continue; }
-      if (fIsUseMC) trkMC = new AliMuonInfoStoreMC(trkESD, esd, mcH);
-      else trkRD = new AliMuonInfoStoreRD(trkESD);
+      if (!trkESD->ContainTrackerData()) { trkESD=0; continue; }
+      if (fIsMC) muonMC = new AliMuonInfoStoreMC(trkESD, MCEvent());
+      else muonRD = new AliMuonInfoStoreRD(trkESD);
       trkESD = 0;
     }
 
-    if (trkRD) {
-      if (fAnaMode!=2) fHeader->FillHistosMuonRD(fListHisMuon, trkRD);
-      new(muonRef[countN++]) AliMuonInfoStoreRD(*trkRD);
+    if (muonRD) {
+      new(muonRef[countN++]) AliMuonInfoStoreRD(*muonRD);
+      if (fAnaMode!=2) fHeader->FillHistosMuon(fListOutput, muonRD);
     }
-    if (trkMC) {
-      if (fAnaMode!=2) fHeader->FillHistosMuonMC(fListHisMuon, trkMC);
-      new(muonRef[countN++]) AliMuonInfoStoreMC(*trkMC);
+    if (muonMC) {
+      new(muonRef[countN++]) AliMuonInfoStoreMC(*muonMC);
+      if (fAnaMode!=2) fHeader->FillHistosMuon(fListOutput, muonMC, muonMC->Source());
     }
 
-    if (trkRD) { delete trkRD; trkRD=0; }
-    if (trkMC) { delete trkMC; trkMC=0; }
+    if (muonRD) { delete muonRD; muonRD=0; }
+    if (muonMC) { delete muonMC; muonMC=0; }
   }  // end loop of all tracks
 
-  if (fAnaMode==1) return;
+  aod = 0; esd = 0;
+  if (fAnaMode==1) { PostData(1,fListOutput); return; }
+
   fDimuClArr->Delete();
   countN = fDimuClArr->GetEntriesFast();
   TClonesArray &dimuRef = *fDimuClArr;
@@ -247,17 +219,18 @@ void AliAnalysisTaskSEMuonsHF::UserExec(Option_t *)
   ntrks = fMuonClArr->GetEntriesFast();
   for (Int_t itrk=0; itrk<ntrks-1; itrk++) {  // 1st loop over muon tracks
     for (Int_t jtrk=itrk+1; jtrk<ntrks; jtrk++) {  // 2nd loop ofver muon tracks
-      if (fIsUseMC)
+      if (fIsMC)
         dimuMC = new AliDimuInfoStoreMC((AliMuonInfoStoreMC*)fMuonClArr->At(itrk), (AliMuonInfoStoreMC*)fMuonClArr->At(jtrk));
-      else
+      else {
         dimuRD = new AliDimuInfoStoreRD((AliMuonInfoStoreRD*)fMuonClArr->At(itrk), (AliMuonInfoStoreRD*)fMuonClArr->At(jtrk));
+      }
 
       if (dimuRD) {
-        fHeader->FillHistosDimuRD(fListHisDimu, dimuRD);
+        fHeader->FillHistosDimu(fListOutput, dimuRD);
         if (fIsOutputTree) new(dimuRef[countN++]) AliDimuInfoStoreRD(*dimuRD);
       }
       if (dimuMC) {
-        fHeader->FillHistosDimuMC(fListHisDimu, dimuMC);
+        fHeader->FillHistosDimu(fListOutput, dimuMC, dimuMC->Source());
         if (fIsOutputTree) new(dimuRef[countN++]) AliDimuInfoStoreMC(*dimuMC);
       }
 
@@ -266,6 +239,7 @@ void AliAnalysisTaskSEMuonsHF::UserExec(Option_t *)
     }  // end 2nd loop of muon tracks
   }  // end 1st loop of muon tracks
 
+  PostData(1, fListOutput);
   return;
 }
 
@@ -274,43 +248,7 @@ void AliAnalysisTaskSEMuonsHF::Terminate(Option_t *)
 {
   // Terminate analysis
 
-  TFile *fout = new TFile("muonsHF.root", "RECREATE");
-  gDirectory->mkdir("header");
-  gDirectory->cd("header");
-  fListHisHeader->Write();
-  gDirectory->cd("..");
-
-  if (fAnaMode!=2) {
-    gDirectory->mkdir("muon");
-    gDirectory->cd("muon");
-    if (fIsUseMC) {
-      char *muonName[] = {"BottomMu", "CharmMu", "PrimaryMu", "SecondaryMu", "NotMu", "Undentified", "All"};
-      for (Int_t i=AliMuonInfoStoreMC::NSources(); i--;) {
-        gDirectory->mkdir(muonName[i]);
-        gDirectory->cd(muonName[i]);
-        fListHisMuon[i].Write();
-        gDirectory->cd("..");
-      }
-    } else fListHisMuon->Write();
-    gDirectory->cd("..");
-  }
-
-  if (fAnaMode!=1) {
-    gDirectory->mkdir("dimu");
-    gDirectory->cd("dimu");
-    if (fIsUseMC) {
-      char *dimuName[] = {"BBdiff", "Bchain", "DDdiff", "Dchain", "Resonance", "Background", "All"};
-      for (Int_t i=AliDimuInfoStoreMC::NSources(); i--;) {
-        gDirectory->mkdir(dimuName[i]);
-        gDirectory->cd(dimuName[i]);
-        fListHisDimu[i].Write();
-        gDirectory->cd("..");
-      }
-    } else fListHisDimu->Write();
-    gDirectory->cd("..");
-  }
+  // add the correction matrix
 
-  fout->Write();
-  fout->Close();
   return;
 }
index c48c8aae22105d09063e37d7dc7f42d70ab3dc39..b6ca4ba045d6d97becf35206210972aa25c2dd76 100644 (file)
@@ -31,13 +31,13 @@ class AliAnalysisTaskSEMuonsHF : public AliAnalysisTaskSE {
   virtual void UserExec(Option_t *opt);
   virtual void Terminate(Option_t *opt);
 
-  void SetAnaMode(Int_t mode) { fAnaMode = (mode<3 ? mode : 0); }
-  void SetIsOutputTree(Bool_t ist) { fIsOutputTree = ist; }
-  void SetIsUseMC(Bool_t isMC) { fIsUseMC = isMC; }
+  void SetAnaMode(Int_t mode)      { fAnaMode      = ((mode>=0 && mode<3) ? mode : 0); }
+  void SetIsOutputTree(Bool_t ist) { fIsOutputTree = ist;                              }
+  void SetUseMC(Bool_t isMC)       { fIsMC         = isMC;                             }
 
   void SetEvsHCuts(Double_t cuts[3])  const { AliMuonsHFHeader::SetSelectionCuts(cuts);   }
-  void SetMuonCuts(Double_t cuts[10]) const { AliMuonInfoStoreRD::SetSelectionCuts(cuts); }
-  void SetDimuCuts(Double_t cuts[10]) const { AliDimuInfoStoreRD::SetSelectionCuts(cuts); }
+  void SetMuonCuts(Double_t cuts[12]) const { AliMuonInfoStoreRD::SetSelectionCuts(cuts); }
+  void SetDimuCuts(Double_t cuts[12]) const { AliDimuInfoStoreRD::SetSelectionCuts(cuts); }
 
  private:
 
@@ -48,15 +48,12 @@ class AliAnalysisTaskSEMuonsHF : public AliAnalysisTaskSE {
                          // = 1, ana single muon
                          // = 2, ana dimuon
   Bool_t fIsOutputTree;  // flag used to switch on/off tree output
-  Bool_t fIsUseMC;       // flag used to switch on/off MC ana
+  Bool_t fIsMC;          // flag of whether the input is MC
 
   AliMuonsHFHeader *fHeader;  // output for info at ev level
-  TClonesArray *fMuonClArr;   // output clones array for single mu
-  TClonesArray *fDimuClArr;   // output clones array for dimu
-
-  TList *fListHisHeader;  // output list of histos at event level
-  TList *fListHisMuon;    // output list of histos for single mu
-  TList *fListHisDimu;    // output list of histos for dimuon
+  TClonesArray  *fMuonClArr;  // output clones array for single mu
+  TClonesArray  *fDimuClArr;  // output clones array for dimu
+  TList *fListOutput;         // output list of histos
 
   ClassDef(AliAnalysisTaskSEMuonsHF, 6);
 };
index 5ba0e2c89ca2d9149dbfe87923d9aeb8e1f7e318..528d9d9e0ee9d12dd4067124fddab351ac14ec65 100644 (file)
@@ -28,7 +28,7 @@
 ClassImp(AliDimuInfoStoreMC)
 
 const TString AliDimuInfoStoreMC::fgkStdBranchName("DimuMC");
-const Int_t   AliDimuInfoStoreMC::fgkNSources = 7;
+const Int_t   AliDimuInfoStoreMC::fgkSourcesN = 6;
 
 //-----------------------------------------------------------------------------
 AliDimuInfoStoreMC::AliDimuInfoStoreMC() :
@@ -102,23 +102,23 @@ void AliDimuInfoStoreMC::FindDimuonSourceFast()
   // find corr relation of two particles (fast for p-p)
 
   AliMuonInfoStoreMC *trk0 = (AliMuonInfoStoreMC*)fMuonRef[0].GetObject();
-  Int_t src0 = trk0->MuonSource();
+  Int_t src0 = trk0->Source();
   if (src0<0 || src0==4 || src0==3) {
     fSource=5; return;
   }
 
   AliMuonInfoStoreMC *trk1 = (AliMuonInfoStoreMC*)fMuonRef[1].GetObject();
-  Int_t src1 = trk1->MuonSource();
+  Int_t src1 = trk1->Source();
   if (src1<0 || src1==4 || src1==3) {
     fSource=5; return;
   }
 
   // Drell-Yan is expected very small at LHC, we ingore it
-  Int_t np0 = trk0->NParents() - 1;
+  Int_t np0 = trk0->ParentsN() - 1;
   if (np0<0) {
     fSource=5; return;
   }
-  Int_t np1 = trk1->NParents() - 1;
+  Int_t np1 = trk1->ParentsN() - 1;
   if (np1<0) {
     fSource=5; return;
   }
index 573133925271532b6dbba6a3beb4b1285748d669..8a6000bb061c34e8cfaa908573f25dbcdc3bc35c 100644 (file)
@@ -19,7 +19,7 @@ class AliDimuInfoStoreMC : public AliDimuInfoStoreRD {
  public:
 
   AliDimuInfoStoreMC();
-  AliDimuInfoStoreMC(AliMuonInfoStoreMC* const trk0, AliMuonInfoStoreMC* const trk1, Bool_t full=kFALSE);
+  AliDimuInfoStoreMC(AliMuonInfoStoreMC *trk0, AliMuonInfoStoreMC *trk1, Bool_t full=kFALSE);
   AliDimuInfoStoreMC(const AliDimuInfoStoreMC &src);
   AliDimuInfoStoreMC& operator=(const AliDimuInfoStoreMC &src);
   virtual ~AliDimuInfoStoreMC();
@@ -27,10 +27,10 @@ class AliDimuInfoStoreMC : public AliDimuInfoStoreRD {
   AliMuonInfoStoreMC* Muon(Int_t i) const { return (i<2 ? (AliMuonInfoStoreMC*)(fMuonRef[i].GetObject()) : 0x0); }
 
   TLorentzVector LorentzP() const { return fLorentzP; }
-  Int_t DimuSource() const { return fSource; }
+  Int_t Source() const { return fSource; }
 
   static const char* StdBranchName() { return fgkStdBranchName.Data(); }
-  static Int_t NSources()      { return fgkNSources;             }
+  static Int_t SourcesN()            { return fgkSourcesN;             }
 
 
  private:
@@ -39,7 +39,7 @@ class AliDimuInfoStoreMC : public AliDimuInfoStoreRD {
   void FindDimuonSourceFull();
 
   static const TString fgkStdBranchName;  // Standard branch name
-  static const Int_t   fgkNSources;       // num. of dimuon sources
+  static const Int_t   fgkSourcesN;       // num. of dimuon sources
 
   Bool_t fIsFull;  // flag of using full analysis (for Pb-Pb)
   TLorentzVector fLorentzP;  // lorentz momentum of MC particle
index 8dbdaa9331401c979731098c68380b4f8f74221c..afb37d29a4329da0c72dbf3d2aa11320f2f77460 100644 (file)
@@ -30,7 +30,8 @@
 ClassImp(AliDimuInfoStoreRD)
 
 const TString AliDimuInfoStoreRD::fgkStdBranchName("DimuRD");
-Double_t      AliDimuInfoStoreRD::fgCutd[10] = {-999999., 999999.,
+Double_t      AliDimuInfoStoreRD::fgCutd[12] = {-999999., 999999.,
+                                                -999999., 999999.,
                                                 -999999., 999999.,
                                                 -999999., 999999.,
                                                 -999999., 999999.,
@@ -129,7 +130,7 @@ Bool_t AliDimuInfoStoreRD::DimuSelection()
 {
   // select dimuon candidates according to the corresponding two muon tracks cuts
 
-  Double_t cutsOld[10];
+  Double_t cutsOld[12];
   AliMuonInfoStoreRD::SelectionCust(cutsOld);
   AliMuonInfoStoreRD::SetSelectionCuts(AliDimuInfoStoreRD::fgCutd);
   AliMuonInfoStoreRD *trk0 = (AliMuonInfoStoreRD*)fMuonRef[0].GetObject();
index fec5df8475f4d215e7682a2c7c9847a9cd65c7b1..234b2d008194262534c05fca6b2d14aef2fcdf0e 100644 (file)
@@ -36,7 +36,7 @@ class AliDimuInfoStoreRD : public TObject {
   Bool_t DimuSelection();
 
   static const char* StdBranchName() { return fgkStdBranchName.Data(); }
-  static void SetSelectionCuts(Double_t cuts[10]) { for (Int_t i=10; i--;) fgCutd[i]=cuts[i]; }
+  static void SetSelectionCuts(Double_t cuts[12]) { for (Int_t i=12; i--;) fgCutd[i]=cuts[i]; }
 
  protected:
 
@@ -46,7 +46,7 @@ class AliDimuInfoStoreRD : public TObject {
  private:
 
   static const TString fgkStdBranchName;  // Standard branch name
-  static Double_t fgCutd[10];             // single muon cuts for dimuon selection
+  static Double_t fgCutd[12];             // single muon cuts for dimuon selection
 
   TVector3 fMomentum;  // 3-momentum of dimuon
   Short_t  fCharge;    // charge of dimuon
index 85b398c24e9039ec60279b9aac9e0dd42d0a7a2f..f0cb4fc17fac0701fc3f22bb75efd0ebb68b0b1e 100644 (file)
 /////////////////////////////////////////////////////////////
 
 #include <TParticle.h>
-#include <TClonesArray.h>
 
 #include "AliMCEvent.h"
-#include "AliMCEventHandler.h"
-#include "AliStack.h"
 #include "AliAODMCParticle.h"
 #include "AliESDMuonTrack.h"
 #include "AliAODTrack.h"
 #include "AliMuonInfoStoreRD.h"
 #include "AliMuonInfoStoreMC.h"
-
-class AliESDEvent;
+#include "AliMCEvent.h"
 
 ClassImp(AliMuonInfoStoreMC)
 
 const TString AliMuonInfoStoreMC::fgkStdBranchName("MuonMC");
-const Int_t   AliMuonInfoStoreMC::fgkNSources = 7;
+const Int_t   AliMuonInfoStoreMC::fgkSourcesN = 6;
 
 //-----------------------------------------------------------------------------
 AliMuonInfoStoreMC::AliMuonInfoStoreMC() :
@@ -60,7 +56,7 @@ fWeight(0.)
 }
 
 //-----------------------------------------------------------------------------
-AliMuonInfoStoreMC::AliMuonInfoStoreMC(AliAODTrack *trkAOD, TClonesArray *mcClArr, Bool_t full) :
+AliMuonInfoStoreMC::AliMuonInfoStoreMC(AliAODTrack *trkAOD, AliMCEvent *mcEvent, Bool_t full) :
 AliMuonInfoStoreRD(trkAOD),
 fIsFull(full),
 fLorentzP(),
@@ -77,12 +73,11 @@ fWeight(0.)
   for (Int_t i=5; i--;) { fParentIndex[i] = -1; fParentPDGCode[i] = 0; }
   for (Int_t i=4; i--;) { fQuarkIndex[i]  = -1; fQuarkPDGCode[i]  = 0; }
 
-  AliAODMCParticle *pMC = this->FindTrackRef(trkAOD, mcClArr);
-  if (pMC) this->SetMCInfo(pMC, mcClArr);
+  this->SetMCInfoAOD(mcEvent, trkAOD->GetLabel());
 }
 
 //-----------------------------------------------------------------------------
-AliMuonInfoStoreMC::AliMuonInfoStoreMC(AliESDMuonTrack *trkESD, AliMCEventHandler *mcH, Bool_t full) :
+AliMuonInfoStoreMC::AliMuonInfoStoreMC(AliESDMuonTrack *trkESD, AliMCEvent *mcEvent, Bool_t full) :
 AliMuonInfoStoreRD(trkESD),
 fIsFull(full),
 fLorentzP(),
@@ -99,36 +94,9 @@ fWeight(0.)
   for (Int_t i=5; i--;) { fParentIndex[i] = -1; fParentPDGCode[i] = 0; }
   for (Int_t i=4; i--;) { fQuarkIndex[i]  = -1; fQuarkPDGCode[i]  = 0; }
 
-  TParticle *pMC = this->FindTrackRef(trkESD, mcH);
-  if (pMC) this->SetMCInfo(pMC, mcH);
+  this->SetMCInfoESD(mcEvent, trkESD->GetLabel());
 }
 
-//-----------------------------------------------------------------------------
-/*AliMuonInfoStoreMC::AliMuonInfoStoreMC(AliESDMuonTrack *trkESD, AliESDEvent *esd, AliMCEventHandler *mcH, Bool_t full) :
-AliMuonInfoStoreRD(trkESD),
-fIsFull(full),
-fLorentzP(),
-fTrackIndex(-1),
-fTrackPDGCode(0),
-fSource(-1),
-fNParents(0),
-fOscillation(kFALSE),
-fWeight(0.)
-{
-#include "AliMUONRecoCheck.h"
-#include "AliMUONVTrackStore.h"
-#include "AliMUONTrack.h"
-#include "AliMUONESDInterface.h"
-  //
-  // default constructor
-  //
-  for (Int_t i=5; i--;) { fParentIndex[i] = -1; fParentPDGCode[i] = 0; }
-  for (Int_t i=4; i--;) { fQuarkIndex[i]  = -1; fQuarkPDGCode[i]  = 0; }
-
-  TParticle *pMC = this->FindTrackRef(trkESD, esd, mcH);
-  if (pMC) this->SetMCInfo(pMC, mcH);
-}*/
-
 //-----------------------------------------------------------------------------
 AliMuonInfoStoreMC::AliMuonInfoStoreMC(const AliMuonInfoStoreMC &src) :
 AliMuonInfoStoreRD(src),
@@ -192,115 +160,29 @@ AliMuonInfoStoreMC::~AliMuonInfoStoreMC()
 }
 
 //-----------------------------------------------------------------------------
-AliAODMCParticle* AliMuonInfoStoreMC::FindTrackRef(AliAODTrack* const trkAOD, TClonesArray* const mcClArr)
-{
-  // find MC track ref with AOD base
-
-  AliAODMCParticle *pMC = 0;
-  fTrackIndex = trkAOD->GetLabel();
-  if (fTrackIndex>=0)
-    pMC = (AliAODMCParticle*)mcClArr->At(fTrackIndex);
-  return pMC;
-}
-
-//-----------------------------------------------------------------------------
-TParticle* AliMuonInfoStoreMC::FindTrackRef(AliESDMuonTrack* const trkESD, AliMCEventHandler* const mcH)
-{
-  // find MC track ref with ESD base
-
-  TParticle *pMCRef = 0;
-  fTrackIndex = trkESD->GetLabel();
-  if (fTrackIndex>=0) pMCRef = mcH->MCEvent()->Stack()->Particle(fTrackIndex);
-  return pMCRef;
-}
-
-//-----------------------------------------------------------------------------
-/*TParticle* AliMuonInfoStoreMC::FindTrackRef(AliESDMuonTrack* const trkESD, AliESDEvent* const esd, AliMCEventHandler* const mcH)
-{
-  // find MC track ref with ESD trackRef base
-
-  TParticle *pMCRef = 0;
-  AliMUONRecoCheck rc(esd,mcH);
-  AliMUONVTrackStore *trkRefArr = rc.TrackRefs(-1);
-
-  AliMUONTrack trkMuon;
-  AliMUONESDInterface::ESDToMUON(*trkESD, trkMuon, kFALSE);
-
-  Int_t nMatchClusters = 0;
-  AliMUONTrack *trkRef = rc.FindCompatibleTrack(trkMuon, *trkRefArr, nMatchClusters, kFALSE, 10.);
-  if (trkRef) fTrackIndex = trkRef->GetUniqueID();
-  if (fTrackIndex>=0) pMCRef = mcH->MCEvent()->Stack()->Particle(fTrackIndex);
-  return pMCRef;
-}*/
-
-//-----------------------------------------------------------------------------
-void AliMuonInfoStoreMC::SetMCInfo(AliAODMCParticle *pMC, TClonesArray *mcClArr)
+void AliMuonInfoStoreMC::SetMCInfoAOD(AliMCEvent *mcEvent, Int_t label)
 {
   // fill track MC info with AOD base
+  fTrackIndex = label;
+  if (fTrackIndex<0) { fSource=5; return; }
 
+  AliAODMCParticle *pMC = (AliAODMCParticle*)mcEvent->GetTrack(fTrackIndex);
   fLorentzP.SetPxPyPzE(pMC->Px(), pMC->Py(), pMC->Pz(), pMC->E());
-  fTrackPDGCode = pMC->GetPdgCode();
-  if (TMath::Abs(fTrackPDGCode)!=13) {
-    fSource = 4;
-    return;
-  } 
-
-  Int_t lineM = pMC->GetMother();
-  if (lineM<0) {
-    fSource = 2;
-    return;
-  }
-
-  Bool_t isPrimary = ((AliAODMCParticle*)mcClArr->At(lineM))->IsPrimary();
-  if (!isPrimary) {
-    fSource = 3;
-    return;
-  }
-
-  this->FillHistoryParents(lineM, mcClArr);
-  fSource = this->SelectHFMuon();
-  return;
-}
-
-//-----------------------------------------------------------------------------
-void AliMuonInfoStoreMC::SetMCInfo(TParticle *pMC, AliMCEventHandler* const mcH)
-{
-  // fill track MC info with ESD base
-
-  fLorentzP.SetPxPyPzE(pMC->Px(), pMC->Py(), pMC->Pz(), pMC->Energy());
-  fTrackPDGCode = pMC->GetPdgCode();
-  if (TMath::Abs(fTrackPDGCode)!=13) {
-    fSource = 4;
-    return;
-  }
-
-  Int_t lineM = pMC->GetFirstMother();
-  if (lineM<0) {
-    fSource = 2;
-    return;
-  }
 
-  AliStack *stack = mcH->MCEvent()->Stack();
-  if (lineM>=stack->GetNprimary()) {
-    fSource = 3;
-    return;
-  }
+  fTrackPDGCode = pMC->PdgCode();
+  if (TMath::Abs(fTrackPDGCode)!=13) { fSource=4; return; } 
 
-  this->FillHistoryParents(lineM, stack);
-  fSource = this->SelectHFMuon();
-  return;
-}
+  Int_t lineM = pMC->GetMother();
+  if (lineM<0) { fSource=2; return; }
 
-//-----------------------------------------------------------------------------
-void AliMuonInfoStoreMC::FillHistoryParents(Int_t lineM, TClonesArray *mcClArr)
-{
-  // find track hadron parents with AOD base
+  Bool_t isPrimary = ((AliAODMCParticle*)mcEvent->GetTrack(lineM))->IsPrimary();
+  if (!isPrimary) { fSource=3; return; }
 
   Int_t countP=-1, pdg=0;
   Int_t parents[10], parLine[10];
   AliAODMCParticle *mother = 0;
   while(lineM>=0){
-    mother = (AliAODMCParticle*)mcClArr->At(lineM);
+    mother = (AliAODMCParticle*)mcEvent->GetTrack(lineM);
     pdg = mother->GetPdgCode();
     if(pdg==92 || pdg==21 || TMath::Abs(pdg)<10 || IsDiquark(pdg)) break;
     parents[++countP] = pdg;
@@ -313,20 +195,35 @@ void AliMuonInfoStoreMC::FillHistoryParents(Int_t lineM, TClonesArray *mcClArr)
   }
   fNParents = countP + 1;
 
-  if (fIsFull && lineM>=0) this->FillHistoryQuarks(lineM, mcClArr);
+  if (fIsFull && lineM>=0) this->FillHistoryQuarksAOD(mcEvent, lineM);
+
+  fSource = this->SelectHFMuon();
   return;
 }
 
 //-----------------------------------------------------------------------------
-void AliMuonInfoStoreMC::FillHistoryParents(Int_t lineM, AliStack *stack)
+void AliMuonInfoStoreMC::SetMCInfoESD(AliMCEvent *mcEvent, Int_t label)
 {
-  // find track hadron parents with ESD base
+  // fill track MC info with ESD base
+  fTrackIndex = label;
+  if (fTrackIndex<0) { fSource=5; return; }
+
+  TParticle *pMC = ((AliMCParticle*)mcEvent->GetTrack(fTrackIndex))->Particle();
+  fLorentzP.SetPxPyPzE(pMC->Px(), pMC->Py(), pMC->Pz(), pMC->Energy());
+
+  fTrackPDGCode = pMC->GetPdgCode();
+  if (TMath::Abs(fTrackPDGCode)!=13) { fSource=4; return; }
+
+  Int_t lineM = pMC->GetFirstMother();
+  if (lineM<0) { fSource=2; return; }
+
+  if (lineM>=mcEvent->Stack()->GetNprimary()) { fSource=3; return; }
 
   Int_t countP=-1, pdg=0;
   Int_t parents[10], parLine[10];
   TParticle *mother = 0;
   while(lineM>=0){
-    mother = stack->Particle(lineM);
+    mother = ((AliMCParticle*)mcEvent->GetTrack(lineM))->Particle();
     pdg = mother->GetPdgCode();
     if(pdg==92 || pdg==21 || TMath::Abs(pdg)<10 || IsDiquark(pdg)) break;
     parents[++countP] = pdg;
@@ -339,12 +236,14 @@ void AliMuonInfoStoreMC::FillHistoryParents(Int_t lineM, AliStack *stack)
   }
   fNParents = countP + 1;
 
-  if (fIsFull && lineM>=0) this->FillHistoryQuarks(lineM, stack);
+  if (fIsFull && lineM>=0) this->FillHistoryQuarksESD(mcEvent, lineM);
+
+  fSource = this->SelectHFMuon();
   return;
 }
 
 //-----------------------------------------------------------------------------
-void AliMuonInfoStoreMC::FillHistoryQuarks(Int_t lineM, TClonesArray* const mcClArr)
+void AliMuonInfoStoreMC::FillHistoryQuarksAOD(AliMCEvent* const mcEvent, Int_t lineM)
 {
   // method in $ALICE_ROOT/MUON/AliMUONTrackLight.cxx 
 
@@ -352,7 +251,7 @@ void AliMuonInfoStoreMC::FillHistoryQuarks(Int_t lineM, TClonesArray* const mcCl
   Int_t countP=-1, pdg=0;
   AliAODMCParticle *mother = 0;
   while(lineM>=0){
-    mother = (AliAODMCParticle*)mcClArr->At(lineM);
+    mother = (AliAODMCParticle*)mcEvent->GetTrack(lineM);
     pdg = mother->GetPdgCode();
     fQuarkIndex[++countP] = lineM;
     fQuarkPDGCode[countP] = pdg;
@@ -373,10 +272,10 @@ void AliMuonInfoStoreMC::FillHistoryQuarks(Int_t lineM, TClonesArray* const mcCl
       Int_t line = this->QuarkIndex(countP);
       this->ResetQuarkInfo();
       while(TMath::Abs(pdg)!=this->ParentFlavour(0)) {
-        pdg = ((AliAODMCParticle*)mcClArr->At(++line))->GetPdgCode();
+        pdg = ((AliAODMCParticle*)mcEvent->GetTrack(++line))->GetPdgCode();
       }
       while(line>=0){
-        mother = (AliAODMCParticle*)mcClArr->At(line);
+        mother = (AliAODMCParticle*)mcEvent->GetTrack(line);
         pdg = mother->GetPdgCode();
         fQuarkIndex[countP] = line;
         fQuarkPDGCode[countP++] = pdg;
@@ -388,7 +287,7 @@ void AliMuonInfoStoreMC::FillHistoryQuarks(Int_t lineM, TClonesArray* const mcCl
 }
 
 //-----------------------------------------------------------------------------
-void AliMuonInfoStoreMC::FillHistoryQuarks(Int_t lineM, AliStack* const stack)
+void AliMuonInfoStoreMC::FillHistoryQuarksESD(AliMCEvent* const mcEvent, Int_t lineM)
 {
   // method in $ALICE_ROOT/MUON/AliMUONTrackLight.cxx 
 
@@ -396,7 +295,7 @@ void AliMuonInfoStoreMC::FillHistoryQuarks(Int_t lineM, AliStack* const stack)
   Int_t countP=-1, pdg=0;
   TParticle *mother = 0;
   while(lineM>=0){
-    mother = stack->Particle(lineM);
+    mother = ((AliMCParticle*)mcEvent->GetTrack(lineM))->Particle();
     pdg = mother->GetPdgCode();
     fQuarkIndex[++countP] = lineM;
     fQuarkPDGCode[countP] = pdg;
@@ -417,10 +316,10 @@ void AliMuonInfoStoreMC::FillHistoryQuarks(Int_t lineM, AliStack* const stack)
       Int_t line = this->QuarkIndex(countP);
       this->ResetQuarkInfo();
       while(TMath::Abs(pdg)!=this->ParentFlavour(0)) {
-        pdg = stack->Particle(++line)->GetPdgCode();
+        pdg = ((AliMCParticle*)mcEvent->GetTrack(++lineM))->Particle()->GetPdgCode();
       }
       while(line>=0){
-        mother = stack->Particle(line);
+        mother = ((AliMCParticle*)mcEvent->GetTrack(++lineM))->Particle();
         pdg = mother->GetPdgCode();
         fQuarkIndex[countP] = line;
         fQuarkPDGCode[countP++] = pdg;
@@ -440,7 +339,7 @@ Int_t AliMuonInfoStoreMC::SelectHFMuon()
   if (flv!=4 && flv!=5) return 2;
 
   Bool_t isRes = kFALSE;
-  Int_t i=0, nparents=this->NParents();
+  Int_t i=0, nparents=this->ParentsN();
   while (i<nparents && !isRes) {
     isRes = IsMotherAResonance(i++);
   }
index 5dbd49c30aa66cfac041a9846af07cd5cb680b0b..7d6cb3758a6ffb7fc32f200b705d9a641148d53f 100644 (file)
 #include "AliESDMuonTrack.h"
 #include "AliAODTrack.h"
 #include "AliMuonInfoStoreRD.h"
+#include "AliMCEvent.h"
 
 class AliMuonInfoStoreMC : public AliMuonInfoStoreRD {
  public:
 
   AliMuonInfoStoreMC();
-  AliMuonInfoStoreMC(AliAODTrack *trkAOD, TClonesArray *mcClArr, Bool_t full=kFALSE);
-  AliMuonInfoStoreMC(AliESDMuonTrack *trkESD, AliESDEvent *esd, AliMCEventHandler *mcH, Bool_t full=kFALSE);
-  AliMuonInfoStoreMC(AliESDMuonTrack *trkESD, AliMCEventHandler *mcH, Bool_t full=kFALSE);
-  AliMuonInfoStoreMC(AliESDMuonTrack *trkESD, AliStack *stack);
+  AliMuonInfoStoreMC(AliAODTrack     *trkAOD, AliMCEvent *mcEvent, Bool_t full=kFALSE);
+  AliMuonInfoStoreMC(AliESDMuonTrack *trkESD, AliMCEvent *mcEvent, Bool_t full=kFALSE);
   AliMuonInfoStoreMC(const AliMuonInfoStoreMC &src);
   AliMuonInfoStoreMC& operator=(const AliMuonInfoStoreMC &src);
   virtual ~AliMuonInfoStoreMC();
 
-  Int_t ParentFlavour(Int_t i=0) const;
+  Int_t  ParentFlavour(Int_t i=0)    const;
   Bool_t IsMotherAResonance(Int_t i) const;
-  Bool_t IsAMuon() const { return (fSource>=0 && fSource!=4); }
-
-  TLorentzVector LorentzP()      const { return fLorentzP; }
-  Int_t MuonSource()             const { return fSource; }
-  Int_t TrackIndex()             const { return fTrackIndex; }
-  Int_t TrackPDGCode()           const { return fTrackPDGCode; }
-  Int_t NParents()               const { return fNParents; }
-  Int_t ParentIndex(Int_t i=0)   const { return (i<fNParents ? fParentIndex[i] : -1); }
-  Int_t ParentPDGCode(Int_t i=0) const { return (i<fNParents ? fParentPDGCode[i] : 0); }
-  Int_t QuarkIndex(Int_t i=0)    const { return (i<4 ? fQuarkIndex[i] : -1); }
-  Int_t QuarkPDGCode(Int_t i=0)  const { return (i<4 ? fQuarkPDGCode[i] : 0); }
-  Bool_t IsOscillation()         const { return fOscillation; }
-  Double_t Weight()              const { return fWeight; }
+
+  TLorentzVector LorentzP()         const { return fLorentzP; }
+  Int_t    Source()                 const { return fSource; }
+  Int_t    TrackIndex()             const { return fTrackIndex; }
+  Int_t    TrackPDGCode()           const { return fTrackPDGCode; }
+  Int_t    ParentsN()               const { return fNParents; }
+  Int_t    ParentIndex(Int_t i=0)   const { return (i<fNParents ? fParentIndex[i] : -1); }
+  Int_t    ParentPDGCode(Int_t i=0) const { return (i<fNParents ? fParentPDGCode[i] : 0); }
+  Int_t    QuarkIndex(Int_t i=0)    const { return (i<4 ? fQuarkIndex[i] : -1); }
+  Int_t    QuarkPDGCode(Int_t i=0)  const { return (i<4 ? fQuarkPDGCode[i] : 0); }
+  Bool_t   IsOscillation()          const { return fOscillation; }
+  Double_t Weight()                 const { return fWeight; }
 
   static const char* StdBranchName() { return fgkStdBranchName.Data(); }
-  static Int_t NSources()      { return fgkNSources;             }
+  static Int_t SourcesN()            { return fgkSourcesN;             }
 
  private:
 
-  AliAODMCParticle* FindTrackRef(AliAODTrack*     const trkAOD, TClonesArray* const mcClArr);
-  TParticle*        FindTrackRef(AliESDMuonTrack* const trkESD, AliMCEventHandler* const mcH);
-  TParticle*        FindTrackRef(AliESDMuonTrack* const trkESD, AliESDEvent* const esd, AliMCEventHandler* const mcH);
-  void SetMCInfo(AliAODMCParticle *pMC, TClonesArray* const mcClArr);
-  void SetMCInfo(TParticle *pMC, AliMCEventHandler *mcH);
-  void FillHistoryParents(Int_t lineM, TClonesArray* const mcClArr);
-  void FillHistoryParents(Int_t lineM, AliStack* const stack);
-  void FillHistoryQuarks(Int_t lineM, TClonesArray *mcClArr);
-  void FillHistoryQuarks(Int_t lineM, AliStack *stack);
+  void SetMCInfoAOD(AliMCEvent *mcEvent, Int_t label);
+  void SetMCInfoESD(AliMCEvent *mcEvent, Int_t label);
+  void FillHistoryQuarksAOD(AliMCEvent *mcEvent, Int_t lineM);
+  void FillHistoryQuarksESD(AliMCEvent *mcEvent, Int_t lineM);
   Int_t SelectHFMuon();
 
   Bool_t IsDiquark(Int_t pdg);
   void ResetQuarkInfo();
 
   static const TString fgkStdBranchName;  // Standard branch name
-  static const Int_t   fgkNSources;       // num. of muon sources
+  static const Int_t   fgkSourcesN;       // num. of muon sources
 
   Bool_t fIsFull;            // whether to use full mode (Pb-Pb)
   TLorentzVector fLorentzP;  // lorentz momentum of particle
index 04f7e9daf0e1a7bacdf776cdce5e99d2199fa266..67d9a51fb4ca7c72a314fdbb473750fc7a712cde 100644 (file)
@@ -30,7 +30,8 @@ class TObject;
 ClassImp(AliMuonInfoStoreRD)
 
 const TString AliMuonInfoStoreRD::fgkStdBranchName("MuonRD");
-Double_t      AliMuonInfoStoreRD::fgCuts[10] = {-999999., 999999.,
+Double_t      AliMuonInfoStoreRD::fgCuts[12] = {-999999., 999999.,
+                                                -999999., 999999.,
                                                 -999999., 999999.,
                                                 -999999., 999999.,
                                                 -999999., 999999.,
@@ -40,36 +41,32 @@ Double_t      AliMuonInfoStoreRD::fgCuts[10] = {-999999., 999999.,
 AliMuonInfoStoreRD::AliMuonInfoStoreRD() :
 TObject(),
 fMomentum(),
-fMomentumAtDCA(),
 fCharge(0),
 fMatchTrigger(-1),
-fNClusters(0),
-fMUONClusterMap(0),
 fChi2FitMomentum(0.),
-fChi2MatchTrigger(0.)
+fChi2MatchTrigger(0.),
+fRabsEnd(0.)
 {
   //
   // default constructor
   //
-  for (Int_t i=3; i--;) fDCA[i] = 0.;
+  for (Int_t i=3; i--;) fDCA[i]=0.;
 }
 
 //-----------------------------------------------------------------------------
 AliMuonInfoStoreRD::AliMuonInfoStoreRD(AliAODTrack *trk) :
 TObject(),
 fMomentum(),
-fMomentumAtDCA(),
 fCharge(0),
 fMatchTrigger(-1),
-fNClusters(0),
-fMUONClusterMap(0),
 fChi2FitMomentum(0.),
-fChi2MatchTrigger(0.)
+fChi2MatchTrigger(0.),
+fRabsEnd(0.)
 {
   //
   // AOD-base constructor
   //
-  for (Int_t i=3; i--;) fDCA[i] = 0.;
+  for (Int_t i=3; i--;) fDCA[i]=0.;
   this->FillMuonInfo(trk);
 }
 
@@ -77,18 +74,16 @@ fChi2MatchTrigger(0.)
 AliMuonInfoStoreRD::AliMuonInfoStoreRD(AliESDMuonTrack *trk) :
 TObject(),
 fMomentum(),
-fMomentumAtDCA(),
 fCharge(0),
 fMatchTrigger(-1),
-fNClusters(0),
-fMUONClusterMap(0),
 fChi2FitMomentum(0.),
-fChi2MatchTrigger(0.)
+fChi2MatchTrigger(0.),
+fRabsEnd(0.)
 {
   //
   // ESD-base constructor
   //
-  for (Int_t i=3; i--;) fDCA[i] = 0.;
+  for (Int_t i=3; i--;) fDCA[i]=0.;
   this->FillMuonInfo(trk);
 }
 
@@ -96,18 +91,16 @@ fChi2MatchTrigger(0.)
 AliMuonInfoStoreRD::AliMuonInfoStoreRD(const AliMuonInfoStoreRD &src) :
 TObject(src),
 fMomentum(src.fMomentum),
-fMomentumAtDCA(src.fMomentumAtDCA),
 fCharge(src.fCharge),
 fMatchTrigger(src.fMatchTrigger),
-fNClusters(src.fNClusters),
-fMUONClusterMap(src.fMUONClusterMap),
 fChi2FitMomentum(src.fChi2FitMomentum),
-fChi2MatchTrigger(src.fChi2MatchTrigger)
+fChi2MatchTrigger(src.fChi2MatchTrigger),
+fRabsEnd(src.fRabsEnd)
 {
   //
   // copy constructor
   //
-  for (Int_t i=3; i--;) fDCA[i] = src.fDCA[i];
+  for (Int_t i=3; i--;) fDCA[i]=src.fDCA[i];
 }
 
 //-----------------------------------------------------------------------------
@@ -119,16 +112,13 @@ AliMuonInfoStoreRD& AliMuonInfoStoreRD::operator=(const AliMuonInfoStoreRD &src)
   if(&src==this) return *this;
 
   fMomentum         = src.fMomentum;
-  fMomentumAtDCA    = src.fMomentumAtDCA;
-
   fCharge           = src.fCharge;
   fMatchTrigger     = src.fMatchTrigger;
-  fNClusters        = src.fNClusters;
-  fMUONClusterMap   = src.fMUONClusterMap;
   fChi2FitMomentum  = src.fChi2FitMomentum;
   fChi2MatchTrigger = src.fChi2MatchTrigger;
+  fRabsEnd          = src.fRabsEnd;
 
-  for (Int_t i=3; i--;) fDCA[i] = src.fDCA[i];
+  for (Int_t i=3; i--;) fDCA[i]=src.fDCA[i];
 
   return *this;
 }
@@ -150,17 +140,14 @@ void AliMuonInfoStoreRD::FillMuonInfo(AliAODTrack *trk)
   trk->PxPyPz(arr);
   this->SetMomentum(arr);
 
-  trk->PxPyPzAtDCA(arr);
-  this->SetMomentumAtDCA(arr);
-
   trk->XYZAtDCA(arr);
   this->SetDCA(arr);
 
   this->SetCharge(trk->Charge());
   this->SetMatchTrigger(trk->GetMatchTrigger());
-  this->SetMUONClusterMap(trk->GetMUONClusterMap());
   this->SetChi2FitMomentum(trk->Chi2perNDF());
   this->SetChi2MatchTrigger(trk->GetChi2MatchTrigger());
+  this->SetRabsEnd(trk->GetRAtAbsorberEnd());
 
   return;
 }
@@ -170,15 +157,11 @@ void AliMuonInfoStoreRD::FillMuonInfo(AliAODTrack *trk)
 void AliMuonInfoStoreRD::FillMuonInfo(AliESDMuonTrack *trk)
 {
   // extract reco info of muon track from ESD
-  // tract params before related to vertex are extracted
 
   Double_t arr[3];
   trk->PxPyPz(arr);
   this->SetMomentum(arr);
 
-  trk->PxPyPzAtDCA(arr);
-  this->SetMomentumAtDCA(arr);
-
   arr[0] = trk->GetNonBendingCoorAtDCA();
   arr[1] = trk->GetBendingCoorAtDCA();
   arr[2] = trk->GetZ();
@@ -186,11 +169,10 @@ void AliMuonInfoStoreRD::FillMuonInfo(AliESDMuonTrack *trk)
 
   this->SetCharge(trk->Charge());
   this->SetMatchTrigger(trk->GetMatchTrigger());
-  this->SetMUONClusterMap(trk->GetMuonClusterMap());
   this->SetChi2FitMomentum(trk->GetChi2()/(2.*trk->GetNHit()-5.));
   this->SetChi2MatchTrigger(trk->GetChi2MatchTrigger());
+  this->SetRabsEnd(trk->GetRAtAbsorberEnd());
 
-  this->SetNClusters(trk->GetNClusters());
   return;
 }
 
@@ -214,5 +196,8 @@ Bool_t AliMuonInfoStoreRD::MuonSelection()
   Int_t trigger = this->MatchTrigger();
   if (trigger<AliMuonInfoStoreRD::fgCuts[8] || trigger>AliMuonInfoStoreRD::fgCuts[9]) return kFALSE;
 
+  Double_t rAbs = this->RabsEnd();
+  if (rAbs<AliMuonInfoStoreRD::fgCuts[10] || rAbs>AliMuonInfoStoreRD::fgCuts[11])     return kFALSE;
+
   return kTRUE;
 }
index 7aef594910c8e5494f5eb90be62910e333043364..887b45fdcd3ddba0ffd0f7b2441925977db07bb9 100644 (file)
@@ -29,23 +29,21 @@ class AliMuonInfoStoreRD : public TObject {
   virtual ~AliMuonInfoStoreRD();
 
   TVector3 Momentum()      const { return fMomentum; }
-  TVector3 MomentumAtDCA() const { return fMomentumAtDCA; }
 
   void XYZAtDCA(Double_t dca[3]) const { for (Int_t i=3; i--;) dca[i]=fDCA[i]; }
   Double_t DCA() const  { return TMath::Sqrt(fDCA[0]*fDCA[0]+fDCA[1]*fDCA[1]); }
 
   Short_t  Charge()           const { return fCharge;           }
   Int_t    MatchTrigger()     const { return fMatchTrigger;     }
-  Int_t    NClusters()        const { return fNClusters;        }
-  UInt_t   MUONClusterMap()   const { return fMUONClusterMap;   }
   Double_t Chi2FitMomentum()  const { return fChi2FitMomentum;  }
   Double_t Chi2MatchTrigger() const { return fChi2MatchTrigger; }
+  Double_t RabsEnd()          const { return fRabsEnd;          }
 
   Bool_t MuonSelection();
 
   static const char* StdBranchName()                  { return fgkStdBranchName.Data(); }
-  static void SelectionCust(Double_t cuts[10])  { for (Int_t i=10; i--;) cuts[i]=fgCuts[i]; }
-  static void SetSelectionCuts(Double_t cuts[10]) { for (Int_t i=10; i--;) fgCuts[i]=cuts[i]; }
+  static void SelectionCust(Double_t cuts[12])  { for (Int_t i=12; i--;) cuts[i]=fgCuts[i]; }
+  static void SetSelectionCuts(Double_t cuts[12]) { for (Int_t i=12; i--;) fgCuts[i]=cuts[i]; }
 
  private:
 
@@ -53,18 +51,16 @@ class AliMuonInfoStoreRD : public TObject {
   void FillMuonInfo(AliESDMuonTrack *trk);
 
   void SetMomentum(Double_t p[3])      { fMomentum.SetXYZ(p[0],p[1],p[2]);      }
-  void SetMomentumAtDCA(Double_t p[3]) { fMomentumAtDCA.SetXYZ(p[0],p[1],p[2]); }
 
-  void SetDCA(Double_t dca[3]) { for (Int_t i=3; i--;) fDCA[i]=dca[i]; }
-  void SetCharge(Short_t charge)           { fCharge        = charge;  }
-  void SetNClusters(Int_t ncls)            { fNClusters     = ncls;    }
-  void SetMatchTrigger(Int_t trigger)      { fMatchTrigger  = trigger; }
-  void SetMUONClusterMap(UInt_t clMap)     { fMUONClusterMap  = clMap; }
-  void SetChi2FitMomentum(Double_t chi2)   { fChi2FitMomentum  = chi2; }
-  void SetChi2MatchTrigger(Double_t chi2)  { fChi2MatchTrigger = chi2; }
+  void SetDCA(Double_t dca[3]) { for (Int_t i=3; i--;) fDCA[i]=dca[i];    }
+  void SetCharge(Short_t charge)           { fCharge           = charge;  }
+  void SetMatchTrigger(Int_t trigger)      { fMatchTrigger     = trigger; }
+  void SetChi2FitMomentum(Double_t chi2)   { fChi2FitMomentum  = chi2;    }
+  void SetChi2MatchTrigger(Double_t chi2)  { fChi2MatchTrigger = chi2;    }
+  void SetRabsEnd(Double_t rAbsEnd)        { fRabsEnd          = rAbsEnd; }
 
   static const TString fgkStdBranchName;  // Standard branch name
-  static Double_t fgCuts[10];  // 0, min of 3-momentum
+  static Double_t fgCuts[12];  // 0, min of 3-momentum
                                // 1, max of 3-momentum
                                // 2, pt_Min
                                // 3, pt_Max
@@ -74,17 +70,17 @@ class AliMuonInfoStoreRD : public TObject {
                                // 7, dca_Max
                                // 8, about trigger matching
                                // 9, about trigger matching
+                               //10, rAbs_Min
+                               //11, rAbs_Max
 
   TVector3 fMomentum;       // momentum corrected w vtx
-  TVector3 fMomentumAtDCA;  // momentum at DCA in vtx plane
 
   Double_t fDCA[3];            // distance of closet approach
   Short_t  fCharge;            // track charge
   Int_t    fMatchTrigger;      // type of match trigger
-  Int_t    fNClusters;         // number of clusters in the track
-  UInt_t   fMUONClusterMap;    // map of MUON clusters
   Double_t fChi2FitMomentum;   // chi2/NDF of momentum fit
   Double_t fChi2MatchTrigger;  // chi2 of trigger matching
+  Double_t fRabsEnd;  // position at the end of front absorber
 
   ClassDef(AliMuonInfoStoreRD, 4);
 };
index 515f81b1975dbb526e079e9d49da905b78d08f77..a24fc4d3eb84668dee66b9956e18bea3bc260442 100644 (file)
 #include <TMath.h>
 #include <TH1.h>
 #include <TH1F.h>
-#include <TH2F.h>
 #include <TList.h>
-#include <TObjArray.h>
-#include <TObjString.h>
-
-#include "AliTriggerAnalysis.h"
-#include "AliBackgroundSelection.h"
-#include "AliAODVertex.h"
-#include "AliAODEvent.h"
-#include "AliESDEvent.h"
-#include "AliMultiplicity.h"
+
 #include "AliMuonInfoStoreRD.h"
 #include "AliMuonInfoStoreMC.h"
 #include "AliDimuInfoStoreRD.h"
@@ -47,55 +38,34 @@ class AliESDVertex;
 ClassImp(AliMuonsHFHeader)
 
 const TString AliMuonsHFHeader::fgkStdBranchName("MuEvsH");
-Int_t         AliMuonsHFHeader::fgAnaMode         = 0;
-Bool_t        AliMuonsHFHeader::fgIsMC            = kFALSE;
-Bool_t        AliMuonsHFHeader::fgIsEventSelected = kFALSE;
+Int_t         AliMuonsHFHeader::fgAnaMode = 0;
+Bool_t        AliMuonsHFHeader::fgIsMC    = kFALSE;
 Double_t      AliMuonsHFHeader::fgCuts[3] = { -999999., 999999., 999999.};
 
 //_____________________________________________________________________________
 AliMuonsHFHeader::AliMuonsHFHeader() :
 TNamed(),
-fTriggerMask(0),
-fFiredTrigger(0),
-fNFiredTrigger(0),
-fIsPhysicsTriggered(kFALSE),
-fIsPhysicsAccepted(kFALSE),
-fEventType(0),
-fUnrecoVertex(kFALSE),
-fNContributors(0),
-fUnrecoVtxSPD(kFALSE),
-fNContributorsSPD(0),
-fNTrackletsSPD(0),
+fVtxContrsN(0),
+fFiredTriggerClass(),
 fCentrality(0.)
 {
   //
   // default constructor
   //
   for (Int_t i=3; i--;) fVtx[i] = 0.;
-  for (Int_t i=3; i--;) fVtxSPD[i] = 0.;
 }
 
 //_____________________________________________________________________________
 AliMuonsHFHeader::AliMuonsHFHeader(const AliMuonsHFHeader &src) :
 TNamed(),
-fTriggerMask(src.fTriggerMask),
-fFiredTrigger(src.fFiredTrigger),
-fNFiredTrigger(src.fNFiredTrigger),
-fIsPhysicsTriggered(src.fIsPhysicsTriggered),
-fIsPhysicsAccepted(src.fIsPhysicsAccepted),
-fEventType(src.fEventType),
-fUnrecoVertex(src.fUnrecoVertex),
-fNContributors(src.fNContributors),
-fUnrecoVtxSPD(src.fUnrecoVtxSPD),
-fNContributorsSPD(src.fNContributorsSPD),
-fNTrackletsSPD(src.fNTrackletsSPD),
+fVtxContrsN(src.fVtxContrsN),
+fFiredTriggerClass(src.fFiredTriggerClass),
 fCentrality(src.fCentrality)
 {
   //
   // copy constructor
   //
-  for (Int_t i=3; i--;) fVtx[i]    = src.fVtx[i];
-  for (Int_t i=3; i--;) fVtxSPD[i] = src.fVtxSPD[i];
+  for (Int_t i=3; i--;) fVtx[i] = src.fVtx[i];
 }
 
 //_____________________________________________________________________________
@@ -104,21 +74,11 @@ AliMuonsHFHeader& AliMuonsHFHeader::operator=(const AliMuonsHFHeader &src)
   //
   // assignment constructor
   //
-  fTriggerMask        = src.fTriggerMask;
-  fFiredTrigger       = src.fFiredTrigger;
-  fNFiredTrigger      = src.fNFiredTrigger; 
-  fIsPhysicsTriggered = src.fIsPhysicsTriggered;
-  fIsPhysicsAccepted  = src.fIsPhysicsAccepted;
-  fEventType          = src.fEventType;
-  fUnrecoVertex       = src.fUnrecoVertex;
-  fNContributors      = src.fNContributors;
-  fUnrecoVtxSPD       = src.fUnrecoVtxSPD;
-  fNContributorsSPD   = src.fNContributorsSPD;
-  fNTrackletsSPD      = src.fNTrackletsSPD;
-  fCentrality         = src.fCentrality;
-
-  for (Int_t i=3; i--;) fVtx[i]      = src.fVtx[i];
-  for (Int_t i=3; i--;) fVtxSPD[i]   = src.fVtxSPD[i];
+
+  fVtxContrsN        = src.fVtxContrsN;
+  fFiredTriggerClass = src.fFiredTriggerClass;
+  fCentrality        = src.fCentrality;
+  for (Int_t i=3; i--;) fVtx[i] = src.fVtx[i];
 
   return *this;
 }
@@ -132,160 +92,54 @@ AliMuonsHFHeader::~AliMuonsHFHeader()
 }
 
 //_____________________________________________________________________________
-void AliMuonsHFHeader::SetEvent(AliAODEvent *event)
+void AliMuonsHFHeader::SetEvent(AliVVertex *vertex)
 {
   // extract event info from AOD event
 
-  fTriggerMask = event->GetTriggerMask();
-
-  AliAODVertex *vertex = event->GetPrimaryVertex(); 
-  vertex->GetXYZ(fVtx);
-  fNContributors = vertex->GetNContributors();
-  fUnrecoVertex = (TMath::Abs(fVtx[0])<1e-6 && TMath::Abs(fVtx[1])<1e-6 &&
-                   TMath::Abs(fVtx[2])<1e-6);
-  this->SetTitle(vertex->GetTitle());
-
-  this->SetFiredTrigger(event->GetFiredTriggerClasses());
-  this->EventSelection();
-  return;
-}
-
-//_____________________________________________________________________________
-void AliMuonsHFHeader::SetEvent(AliESDEvent *event)
-{
-  // extract event info from ESD event
-  // SPD vertex and Physics event selection are implimented
-
-  fTriggerMask = event->GetTriggerMask();
-
-  const AliESDVertex *vertex = event->GetPrimaryVertex(); 
   vertex->GetXYZ(fVtx);
-  fNContributors = vertex->GetNContributors();
-  fUnrecoVertex = (TMath::Abs(fVtx[0])<1e-6 && TMath::Abs(fVtx[1])<1e-6 &&
-                   TMath::Abs(fVtx[2])<1e-6);
+  fVtxContrsN = vertex->GetNContributors();
   this->SetTitle(vertex->GetTitle());
-
-  const AliESDVertex *vtxSPD = event->GetPrimaryVertexSPD();
-  vtxSPD->GetXYZ(fVtxSPD);
-  fNContributorsSPD = vtxSPD->GetNContributors();
-  fUnrecoVtxSPD = (TMath::Abs(fVtxSPD[0])<1e-6 && TMath::Abs(fVtxSPD[1])<1e-6 &&
-                   TMath::Abs(fVtxSPD[2])<1e-6);
-  fNTrackletsSPD = event->GetMultiplicity()->GetNumberOfTracklets();
-
-  this->SetFiredTrigger(event->GetFiredTriggerClasses());
-  this->PhysicsTriggerAna(event);
-  this->EventSelection();
   return;
 }
 
 //_____________________________________________________________________________
-void AliMuonsHFHeader::PhysicsTriggerAna(const AliESDEvent *esd)
+Bool_t AliMuonsHFHeader::EventSelection()
 {
-  // ESD event trigger condition analysis
-  // according to the method in $ALICE_ROOT/ANALYSIS/AliPhysicsSelection.cxx
-
-  fEventType = esd->GetHeader()->GetEventType();
-  fIsPhysicsTriggered = kFALSE;
-  fIsPhysicsAccepted  = kFALSE;
-
-  AliTriggerAnalysis *triggerAna = new AliTriggerAnalysis();
-  triggerAna->SetAnalyzeMC(fgIsMC);
-  triggerAna->SetSPDGFOThreshhold(1);
-
-  Int_t  triggerHW  = triggerAna->SPDFiredChips(esd, 1);
-  Bool_t isFiredv0A = triggerAna->IsOfflineTriggerFired(esd, AliTriggerAnalysis::kV0A);
-  Bool_t isFiredv0C = triggerAna->IsOfflineTriggerFired(esd, AliTriggerAnalysis::kV0C);
-  if (triggerHW==0 && !isFiredv0A && !isFiredv0C) {
-    delete triggerAna;
-    triggerAna = 0;
-    return;
-  }
-
-  Bool_t triggerBG = (triggerAna->IsOfflineTriggerFired(esd, AliTriggerAnalysis::kV0ABG) ||
-                      triggerAna->IsOfflineTriggerFired(esd, AliTriggerAnalysis::kV0CBG));
-  Int_t  isFiredSPD = triggerAna->SPDFiredChips(esd, 0);
-  Bool_t triggerFD = ((isFiredSPD>1) || (isFiredSPD>0 && (isFiredv0A || isFiredv0C)) || (isFiredv0A && isFiredv0C));
-  if ((!triggerBG) && triggerFD) fIsPhysicsTriggered = kTRUE; 
-  delete triggerAna;
-  triggerAna = 0;
-
-  if (fIsPhysicsTriggered) {
-    AliBackgroundSelection *bkgId = new AliBackgroundSelection();
-    fIsPhysicsAccepted = bkgId->IsSelected(const_cast<AliESDEvent*>(esd));
-    delete bkgId; bkgId=0;
-  }
-  return;
-}
-
-//_____________________________________________________________________________
-void AliMuonsHFHeader::SetFiredTrigger(TString trigger)
-{
-  // get info of fired trigger classes of event
-
-  fFiredTrigger = trigger;
-  TObjArray *tokens = trigger.Tokenize(" ");
-  fNFiredTrigger = tokens->GetEntries();
-  return;
+  // select event according to the event selection cuts
+  if (this->VtxContrsN()<fgCuts[0])     return kFALSE;
+  if (TMath::Abs(this->Vz())>fgCuts[1]) return kFALSE;
+  if (this->Vt()>fgCuts[2])             return kFALSE;
+  return kTRUE;
 }
 
 //_____________________________________________________________________________
-Bool_t AliMuonsHFHeader::IsTriggerFired(TString trigger)
+void AliMuonsHFHeader::CreateHistograms(TList *list)
 {
-  // check whether the trigger class "trigger" is fired in this event
+  // create output histos of muon analysis according to the analysis mode & MC flag
 
-  if (fNFiredTrigger<=0) return kFALSE;
+  this->CreateHistosEvnH(list);
 
-  TObjArray *tokens = fFiredTrigger.Tokenize(" "); 
-  for (Int_t i=fNFiredTrigger; i--;) {
-    TString fired = ((TObjString*)tokens->At(i))->String(); 
-    if (fired.CompareTo(trigger)==0) return kTRUE;
+  if (fgAnaMode!=2) {
+   this->CreateHistosMuon(list);
+   if (fgIsMC) {
+      TString sName[6] = { "Unidentified", "Hadron", "SecondaryMu", "PrimaryMu", "CharmMu", "BottomMu" };
+      for (Int_t i=AliMuonInfoStoreMC::SourcesN(); i--;) this->CreateHistosMuon(list, sName[i]);
+    }
   }
-  return kFALSE;
-}
-
-//_____________________________________________________________________________
-void AliMuonsHFHeader::EventSelection(TString triggerName)
-{
-  // select event according to the "triggerName" & event selection cuts
-
-  fgIsEventSelected = kFALSE;
-  if (!this->IsPhysicsAccepted()) return;
-  if (!fgIsMC && !this->IsTriggerFired(triggerName)) return;
-  this->EventSelection();
-  return; 
-}
-
-//_____________________________________________________________________________
-void AliMuonsHFHeader::EventSelection()
-{
-  // select event according to the event selection cuts
 
-  fgIsEventSelected = kFALSE;
-  if (this->NVtxContributorsSPD()<fgCuts[0]) return;
-  if (TMath::Abs(this->VzSPD())>fgCuts[1]) return;
-  if (this->VtSPD()>fgCuts[2]) return;
-  fgIsEventSelected = kTRUE;
-  return;
-}
-
-//_____________________________________________________________________________
-void AliMuonsHFHeader::CreateHistograms(TList *listEvent, TList *listMuon, TList *listDimu)
-{
-  // create output histos of muon analysis according to the analysis mode & MC flag
-
-  this->CreateHistosEventH(listEvent);
-  if (fgIsMC) {
-    if (fgAnaMode!=2) this->CreateHistosMuonMC(listMuon);
-    if (fgAnaMode!=1) this->CreateHistosDimuMC(listDimu);
-  } else {
-    if (fgAnaMode!=2) this->CreateHistosMuonRD(listMuon);
-    if (fgAnaMode!=1) this->CreateHistosDimuRD(listDimu);
+  if (fgAnaMode!=1) {
+    this->CreateHistosDimu(list);
+    if (fgIsMC) {
+      TString sName[6] = { "Uncorr", "Resonance", "DDsame", "DDdiff", "BBsame", "BBdiff" };
+      for (Int_t i=AliDimuInfoStoreMC::SourcesN(); i--;) this->CreateHistosDimu(list, sName[i]);
+    }
   }
+
   return;
 }
 
 //_____________________________________________________________________________
-void AliMuonsHFHeader::CreateHistosEventH(TList *list)
+void AliMuonsHFHeader::CreateHistosEvnH(TList *list)
 {
   // create histograms at event level
 
@@ -294,19 +148,16 @@ void AliMuonsHFHeader::CreateHistosEventH(TList *list)
   Bool_t oldStatus = TH1::AddDirectoryStatus();
   TH1::AddDirectory(kFALSE);
 
-  const Int_t nHistos = 5;
-  char    *name[nHistos] = { "hVztSPD", "hVzxSPD", "hVzySPD", "hVzNcontr", "hVtNcontr"  };
-  Int_t  nbinsX[nHistos] = {      800 ,      800 ,      800 ,       800  ,        400   };
-  Double_t xlow[nHistos] = {      -40.,      -40.,      -40.,       -40. ,          0.  };
-  Double_t  xup[nHistos] = {       40.,       40.,       40.,        40. ,          4.  };
-  Int_t  nbinsY[nHistos] = {      400 ,      600 ,      600 ,       202  ,        202   };
-  Double_t ylow[nHistos] = {        0.,       -3.,       -3.,        -2.5,         -2.5 };
-  Double_t  yup[nHistos] = {        4.,        3.,        3.,       199.5,        199.5 };
+  const Int_t nHistos = 3;
+  TString tname[nHistos] = { "hVz", "hVt", "hVtxNcontr" };
+  Int_t   nbins[nHistos] = {  800 ,   40 ,        202   };
+  Double_t xlow[nHistos] = {  -40.,    0.,         -2.5 };
+  Double_t  xup[nHistos] = {   40.,    4.,        199.5 };
 
-  TH2F *histo = 0;
+  TH1F *histo = 0;
   for (Int_t i=0; i<nHistos; i++) {
-    histo = new TH2F(name[i], name[i], nbinsX[i], xlow[i], xup[i], nbinsY[i], ylow[i], yup[i]);
-    histo->Sumw2(); list->AddAt(histo, i); histo = 0;
+    histo = new TH1F(tname[i], tname[i].Data(), nbins[i], xlow[i], xup[i]);
+    histo->Sumw2(); list->Add(histo); histo = 0;
   }
 
   TH1::AddDirectory(oldStatus);
@@ -314,7 +165,7 @@ void AliMuonsHFHeader::CreateHistosEventH(TList *list)
 }
 
 //_____________________________________________________________________________
-void AliMuonsHFHeader::CreateHistosMuonRD(TList *list)
+void AliMuonsHFHeader::CreateHistosMuon(TList *list, TString sName)
 {
   // create histograms for single muon
 
@@ -323,16 +174,17 @@ void AliMuonsHFHeader::CreateHistosMuonRD(TList *list)
   Bool_t oldStatus = TH1::AddDirectoryStatus();
   TH1::AddDirectory(kFALSE);
   
-  const Int_t nHistos = 8; 
-  char    *name[nHistos] = {  "hP", "hPt", "hEta", "hDCA", "hTrg", "hCharge", "hUnfVtx" , "hEtaTimesDCA"};
-  Int_t   nbins[nHistos] = { 1500 ,  300 ,   100 ,   500 ,    4  ,       3  ,       80  ,         10000 };
-  Double_t xlow[nHistos] = {    0.,    0.,   -10.,     0.,   -0.5,      -1.5,      -40. ,             0.};
-  Double_t  xup[nHistos] = {  150.,   30.,     0.,   500.,    3.5,       1.5,       40. ,          1000.};
+  const Int_t nHistos = 8;
+  TString tName[nHistos] = {   "P",  "Pt",  "Eta",  "DCA",  "TrM",  "Charge", "Rabs", "UnfVtx" };
+  Int_t   nbins[nHistos] = { 1500 ,  300 ,   100 ,   500 ,    4  ,       3  ,   300 ,      80  };
+  Double_t xlow[nHistos] = {    0.,    0.,   -10.,     0.,   -0.5,      -1.5,     0.,     -40. };
+  Double_t  xup[nHistos] = {  150.,   30.,     0.,   500.,    3.5,       1.5,   150.,      40. };
 
   TH1F *histo = 0;
   for (Int_t i=0; i<nHistos; i++) {
-    histo = new TH1F(name[i], name[i], nbins[i], xlow[i], xup[i]);
-    histo->Sumw2(); list->AddAt(histo, i); histo = 0;
+    char *hName = Form("h%s_%s", sName.Data(), tName[i].Data());
+    histo = new TH1F(hName, hName, nbins[i], xlow[i], xup[i]);
+    histo->Sumw2(); list->Add(histo); histo = 0;
   }
 
   TH1::AddDirectory(oldStatus);
@@ -340,7 +192,7 @@ void AliMuonsHFHeader::CreateHistosMuonRD(TList *list)
 }
 
 //_____________________________________________________________________________
-void AliMuonsHFHeader::CreateHistosDimuRD(TList *list)
+void AliMuonsHFHeader::CreateHistosDimu(TList *list, TString sName)
 {
   // create histograms for dimuon
 
@@ -351,15 +203,16 @@ void AliMuonsHFHeader::CreateHistosDimuRD(TList *list)
 
   TH1F *histo = 0;
   const Int_t nHistos = 3;
-  char    *name[nHistos] = {  "hP", "hPt", "hInvM" };
-  Int_t   nbins[nHistos] = { 1500 ,  300 ,    300  };
-  Double_t xlow[nHistos] = {    0.,    0.,      0. };
-  Double_t  xup[nHistos] = {  150.,   30.,     30. };
-  char *dimuName[3] = {"DimuNN", "DimuNP", "DimuPP"};
+  TString tName[nHistos] = {   "P",  "Pt",  "InvM"   };
+  Int_t   nbins[nHistos] = { 1500 ,  300 ,    300    };
+  Double_t xlow[nHistos] = {    0.,    0.,      0.   };
+  Double_t  xup[nHistos] = {  150.,   30.,     30.   };
+  TString dimuName[3] = { "DimuNN", "DimuNP", "DimuPP" };
   for (Int_t i=0; i<3; i++) {
     for (Int_t j=0; j<nHistos; j++) {
-      histo = new TH1F(Form("%s_%s",name[j],dimuName[i]), name[j], nbins[j], xlow[j], xup[j]);
-      histo->Sumw2(); list->AddAt(histo,i*nHistos+j); histo = 0;
+      char *hName = Form("h%s_%s_%s", sName.Data(), dimuName[i].Data(), tName[j].Data());
+      histo = new TH1F(hName, hName, nbins[j], xlow[j], xup[j]);
+      histo->Sumw2(); list->Add(histo); histo = 0;
     }
   }
 
@@ -368,105 +221,73 @@ void AliMuonsHFHeader::CreateHistosDimuRD(TList *list)
 }
 
 //_____________________________________________________________________________
-void AliMuonsHFHeader::CreateHistosMuonMC(TList *list)
-{
-  // create histograms for single muon with MC info
-
-  if (!list) list = new TList[AliMuonInfoStoreMC::NSources()];
-  for (Int_t i=AliMuonInfoStoreMC::NSources(); i--;) this->CreateHistosMuonRD(&list[i]);
-  return;
-}
-
-//_____________________________________________________________________________
-void AliMuonsHFHeader::CreateHistosDimuMC(TList *list)
-{
-  // create histograms for dimuon with MC info
-
-  if (!list) list = new TList[AliDimuInfoStoreMC::NSources()];
-  for (Int_t i=AliDimuInfoStoreMC::NSources(); i--;) this->CreateHistosDimuRD(&list[i]);
-  return;
-}
-
-//_____________________________________________________________________________
-void AliMuonsHFHeader::FillHistosEventH(TList *list)
+void AliMuonsHFHeader::FillHistosEvnH(TList *list)
 {
   // fill histograms at event level according to event selection cuts
 
-  if (!list) return;
-  if (!AliMuonsHFHeader::IsEventSelected()) return;
+  if (!list)                   return;
+  if (!this->EventSelection()) return;
 
-  const Int_t nHistos = 5;
-  Double_t vz = this->VzSPD();
-  Double_t vt = this->VtSPD();
-  Int_t    nc = this->NVtxContributorsSPD();
-  Double_t distX[nHistos] = { vz,            vz,            vz, vz, vt };
-  Double_t distY[nHistos] = { vt, this->VxSPD(), this->VySPD(), nc, nc };
-  for (Int_t i=nHistos; i--;) ((TH2F*)list->At(i))->Fill(distX[i], distY[i]);
+  const Int_t    nHistos = 3;
+  TString tname[nHistos] = {      "hVz",      "hVt",       "hVtxNcontr" };
+  Double_t dist[nHistos] = { this->Vz(), this->Vt(), this->VtxContrsN() };
+  for (Int_t i=nHistos; i--;) ((TH1F*)list->FindObject(tname[i].Data()))->Fill(dist[i]);
   return;
 }
 
 //_____________________________________________________________________________
-void AliMuonsHFHeader::FillHistosMuonRD(TList *list, AliMuonInfoStoreRD* const muonStoreRD)
+void AliMuonsHFHeader::FillHistosMuon(TList *list, AliMuonInfoStoreRD* const infoStore, Int_t src)
 {
   // fill histograms for single muon according to event & muon track selection cuts
 
-  if (!list) return;
-  if (!AliMuonsHFHeader::IsEventSelected()) return;
-  if (!muonStoreRD->MuonSelection()) return;
+  if (!list)                       return;
+  if (!this->EventSelection())     return;
+  if (!infoStore->MuonSelection()) return;
+
+  const Int_t nHistos    = 8;
+  TString tName[nHistos] = { "P", "Pt", "Eta", "DCA", "TrM", "Charge", "Rabs", "UnfVtx" };
+  Double_t dist[nHistos] = { infoStore->Momentum().Mag(),
+                             infoStore->Momentum().Pt(),
+                             infoStore->Momentum().Eta(),
+                             infoStore->DCA(),
+                             infoStore->MatchTrigger(),
+                             infoStore->Charge(),
+                             infoStore->RabsEnd(),
+                             this->Vz() };
+  for (Int_t i=nHistos; i--;) ((TH1F*)list->FindObject(Form("h%s_%s","",tName[i].Data())))->Fill(dist[i]);
+
+  if (fgIsMC && src>=0) {
+    TString sName[6] = { "BottomMu", "CharmMu", "PrimaryMu", "SecondaryMu", "Hadron", "Unidentified" };
+    for (Int_t i=nHistos; i--;) ((TH1F*)list->FindObject(Form("h%s_%s",sName[src].Data(),tName[i].Data())))->Fill(dist[i]);
+  }
 
-  const Int_t nHistos = 8;
-  Double_t dist[nHistos] = {muonStoreRD->Momentum().Mag(),
-                            muonStoreRD->Momentum().Pt(),
-                            muonStoreRD->Momentum().Eta(),
-                            muonStoreRD->DCA(),
-                            muonStoreRD->MatchTrigger(),
-                            muonStoreRD->Charge(),
-                            this->VzSPD(),
-                            muonStoreRD->DCA()*TMath::Exp(-2.*muonStoreRD->Momentum().Eta())/1000.};
-  for (Int_t i=nHistos; i--;) ((TH1F*)list->At(i))->Fill(dist[i]);
   return; 
 }
 
 //_____________________________________________________________________________
-void AliMuonsHFHeader::FillHistosDimuRD(TList *list, AliDimuInfoStoreRD* const dimuStoreRD)
+void AliMuonsHFHeader::FillHistosDimu(TList *list, AliDimuInfoStoreRD* const infoStore, Int_t src)
 {
   // fill histograms for dimuon according to evnet & dimuon candidates selection cuts
 
-  if (!list) return;
-  if (!AliMuonsHFHeader::IsEventSelected()) return;
-  if (!dimuStoreRD->DimuSelection()) return;
+  if (!list)                       return;
+  if (!this->EventSelection())     return;
+  if (!infoStore->DimuSelection()) return;
 
-  Int_t theDimu = 0;
-  if (dimuStoreRD->Charge()==0)     theDimu = 1;
-  else if (dimuStoreRD->Charge()>0) theDimu = 2;
+  TString dimuName = "DimuNN";
+  if (infoStore->Charge()==0)     dimuName = "DimuNP";
+  else if (infoStore->Charge()>0) dimuName = "DimuPP";
 
-  const Int_t nHistos = 3;
-  Double_t dist[nHistos] = {dimuStoreRD->Momentum().Mag(),
-                            dimuStoreRD->Momentum().Pt(),
-                            dimuStoreRD->InvM()};
-  for (Int_t i=nHistos; i--;) ((TH1F*)list->At(theDimu*nHistos+i))->Fill(dist[i]);
-  return;
-}
+  const Int_t nHistos    = 3;
+  TString tName[nHistos] = { "P", "Pt", "InvM" };
+  Double_t dist[nHistos] = { infoStore->Momentum().Mag(),
+                             infoStore->Momentum().Pt(),
+                             infoStore->InvM() };
+  for (Int_t i=nHistos; i--;) ((TH1F*)list->FindObject(Form("h%s_%s_%s","",dimuName.Data(),tName[i].Data())))->Fill(dist[i]);
 
-//_____________________________________________________________________________
-void AliMuonsHFHeader::FillHistosMuonMC(TList *list, AliMuonInfoStoreMC* const muonStoreMC)
-{
-  // fill histograms for single muon with MC info
-
-  Int_t srcMuon = muonStoreMC->MuonSource(); 
-  this->FillHistosMuonRD(&list[6], (AliMuonInfoStoreRD*)muonStoreMC);
-  if (srcMuon<0) this->FillHistosMuonRD(&list[5], (AliMuonInfoStoreRD*)muonStoreMC);
-  else this->FillHistosMuonRD(&list[srcMuon], (AliMuonInfoStoreRD*)muonStoreMC);
-  return;
-}
-
-//_____________________________________________________________________________
-void AliMuonsHFHeader::FillHistosDimuMC(TList *list, AliDimuInfoStoreMC* const dimuStoreMC)
-{
-  // fill histograms for dimuon with MC info
+  if (fgIsMC && src>=0) {
+    TString sName[6] = { "BBdiff", "BBsame", "DDdiff", "DDsame", "Resonance", "Uncorr" };
+    for (Int_t i=nHistos; i--;) ((TH1F*)list->FindObject(Form("h%s_%s_%s",sName[src].Data(),dimuName.Data(),tName[i].Data())))->Fill(dist[i]);
+  }
 
-  Int_t srcDimu = dimuStoreMC->DimuSource();
-  this->FillHistosDimuRD(&list[6], (AliDimuInfoStoreRD*)dimuStoreMC);
-  this->FillHistosDimuRD(&list[srcDimu], (AliDimuInfoStoreRD*)dimuStoreMC);
   return;
 }
index b91efa6a4999a17c7353a1afaf53bf775b3a3a9e..f0392f7ba3b62a19dac52c138666d2b204805277 100644 (file)
@@ -31,89 +31,50 @@ class AliMuonsHFHeader : public TNamed {
   AliMuonsHFHeader& operator=(const AliMuonsHFHeader &src);
   ~AliMuonsHFHeader();
 
-  ULong64_t TriggerMask()     const { return fTriggerMask;        }
-  TString FiredTrigger()      const { return fFiredTrigger;       }
-  Int_t  NFiredTrigger()      const { return fNFiredTrigger;      }
-  Int_t  EventType()          const { return fEventType;          }
-  Bool_t IsPhysicsTriggered() const { return fIsPhysicsTriggered; }
-  Bool_t IsPhysicsAccepted()  const { return fIsPhysicsAccepted;  }
-  Bool_t IsTriggerFired(TString trigger);
-
-  void GetXYZ(Double_t *vtx) const { for (Int_t i=3; i--;) vtx[i]=fVtx[i]; }
-  Double_t Vx() const { return fVtx[0]; }
-  Double_t Vy() const { return fVtx[1]; }
-  Double_t Vz() const { return fVtx[2]; }
-  Double_t Vt() const { return TMath::Sqrt(fVtx[0]*fVtx[0] + fVtx[1]*fVtx[1]); }
-  Bool_t  IsUnrecoVertex() const { return fUnrecoVertex;  }
-  Int_t NVtxContributors() const { return fNContributors; }
-
-  void GetXYZSPD(Double_t *vtx) const { for (Int_t i=3; i--;) vtx[i]=fVtxSPD[i]; }
-  Double_t VxSPD() const { return fVtxSPD[0]; }
-  Double_t VySPD() const { return fVtxSPD[1]; }
-  Double_t VzSPD() const { return fVtxSPD[2]; }
-  Double_t VtSPD() const { return TMath::Sqrt(fVtxSPD[0]*fVtxSPD[0] + fVtxSPD[1]*fVtxSPD[1]); }
-  Bool_t  IsUnrecoVtxSPD()    const { return fUnrecoVtxSPD;     }
-  Int_t NVtxContributorsSPD() const { return fNContributorsSPD; }
-  Int_t NTrackletsSPD()       const { return fNTrackletsSPD;    }
-
-  Double_t Centrality() const { return fCentrality; }
-
-  void SetEvent(AliAODEvent *event);
-  void SetEvent(AliESDEvent *event);
-
-  void EventSelection(TString triggerName);
-  void CreateHistograms(TList *listEvent=0, TList *listMuon=0, TList *listDimu=0);
-  void CreateHistosEventH(TList *list);
-  void CreateHistosMuonRD(TList *list);
-  void CreateHistosDimuRD(TList *list);
-  void CreateHistosMuonMC(TList *list);
-  void CreateHistosDimuMC(TList *list);
-
-  void FillHistosEventH(TList *list);
-  void FillHistosMuonRD(TList *list, AliMuonInfoStoreRD* const muonStoreRD);
-  void FillHistosDimuRD(TList *list, AliDimuInfoStoreRD* const dimuStoreRD);
-  void FillHistosMuonMC(TList *list, AliMuonInfoStoreMC* const muonStoreMC);
-  void FillHistosDimuMC(TList *list, AliDimuInfoStoreMC* const dimuStoreMC);
-
-  static const char* StdBranchName()    { return fgkStdBranchName.Data(); }
-  static Bool_t IsEventSelected() { return fgIsEventSelected; }
-  static void SetAnaMode(Int_t anaMode=0)        { fgAnaMode=anaMode; }
-  static void SetIsMC(Int_t isMC=kFALSE)         { fgIsMC   =isMC;    }
+  void GetXYZ(Double_t *vtx)  const { for (Int_t i=3; i--;) vtx[i]=fVtx[i]; }
+  Double_t Vx()               const { return fVtx[0]; }
+  Double_t Vy()               const { return fVtx[1]; }
+  Double_t Vz()               const { return fVtx[2]; }
+  Double_t Vt()               const { return TMath::Sqrt(fVtx[0]*fVtx[0] + fVtx[1]*fVtx[1]); }
+  Int_t VtxContrsN()          const { return fVtxContrsN; }
+  TString FiredTriggerClass() const { return fFiredTriggerClass; }
+  Double_t Centrality()       const { return fCentrality; }
+
+  void SetEvent(AliVVertex *vertex);
+  void SetFiredTriggerClass(TString trigger) { fFiredTriggerClass=trigger; }
+  Bool_t EventSelection();
+
+  void CreateHistograms(TList *list);
+  void FillHistosEvnH(TList *list);
+  void FillHistosMuon(TList *list, AliMuonInfoStoreRD* infoStore, Int_t src=-1);
+  void FillHistosDimu(TList *list, AliDimuInfoStoreRD* infoStore, Int_t src=-1);
+
+  static const char* StdBranchName()             { return fgkStdBranchName.Data();          }
+  static void SetAnaMode(Int_t anaMode=0)        { fgAnaMode=anaMode;                       }
+  static void SetIsMC(Int_t isMC=kFALSE)         { fgIsMC   =isMC;                          }
   static void SetSelectionCuts(Double_t cuts[3]) { for (Int_t i=3; i--;) fgCuts[i]=cuts[i]; }
 
  private :
 
-  void SetFiredTrigger(TString str);
-  void PhysicsTriggerAna(const AliESDEvent *esd);
-  void EventSelection();
+  void CreateHistosEvnH(TList *list);
+  void CreateHistosMuon(TList *list, TString sName="");
+  void CreateHistosDimu(TList *list, TString sName="");
 
   static const TString fgkStdBranchName;  // Standard branch name
-  static Bool_t fgIsEventSelected;        // flag for event selection
   static Int_t  fgAnaMode;                // analysis mode
   static Bool_t fgIsMC;                   // flag to use MC
   static Double_t fgCuts[3];  // 0, low limit of num. of vtx contributors
                               // 1, up limit of vz
                               // 2, up limit of vt
 
-  ULong64_t fTriggerMask;      // trigger mask
-  TString fFiredTrigger;       // fired of trigger class of event
-  Int_t fNFiredTrigger;        // num. of fired trigger class
-  Bool_t fIsPhysicsTriggered;  // flag of final physics trigger from AliPhysicsSelection
-  Bool_t fIsPhysicsAccepted;   // flag of physiscs selection w/ BKG Id
-  Int_t fEventType;            // event type
+  Double_t fVtx[3];   // position of vtx
+  Int_t fVtxContrsN;  // num. of contributors of vtx rec
 
-  Double32_t fVtx[3];      // position of vtx
-  Bool_t fUnrecoVertex;    // flag for unreco vtx
-  Int_t fNContributors;    // num. of contributors of vtx rec
+  TString fFiredTriggerClass; // trigger class
 
-  Double32_t fVtxSPD[3];   // position of vtx
-  Bool_t fUnrecoVtxSPD;    // flag for unreco vtx
-  Int_t fNContributorsSPD; // num. of contributors of vtx rec
-  Int_t fNTrackletsSPD;  // num. of SPD tracklets
+  Double_t fCentrality;  // event centrality class
 
-  Double_t fCentrality;    // event centrality class
-
-  ClassDef(AliMuonsHFHeader, 2)
+  ClassDef(AliMuonsHFHeader, 3)
 };
 
 #endif