- Add new class for multiplicity correlations
authorjthaeder <jthaeder@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 2 Nov 2010 23:50:42 +0000 (23:50 +0000)
committerjthaeder <jthaeder@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 2 Nov 2010 23:50:42 +0000 (23:50 +0000)
- Add component for class for multiplicity correlations
- Add test macros

HLT/global/AliHLTGlobalAgent.cxx
HLT/global/physics/AliHLTMultiplicityCorrelations.cxx [new file with mode: 0644]
HLT/global/physics/AliHLTMultiplicityCorrelations.h [new file with mode: 0644]
HLT/global/physics/AliHLTMultiplicityCorrelationsComponent.cxx [new file with mode: 0644]
HLT/global/physics/AliHLTMultiplicityCorrelationsComponent.h [new file with mode: 0644]
HLT/global/physics/macros/HLTMultiplicityCorrelationsTest.C [new file with mode: 0644]
HLT/global/physics/macros/makeConfigurationObjectMultiplicityCorrelations.C [new file with mode: 0644]
HLT/global/physics/macros/runMultiplicityCorrelationsTest.sh [new file with mode: 0755]

index 2f087893a3e6da1b5b879262accc3b9c53469c5b..07ade06ae299d8da1c732d7debe6ccfebb393d50 100644 (file)
@@ -40,6 +40,7 @@
 #include "AliHLTGlobalHistoComponent.h"
 #include "AliHLTGlobalHistoCollector.h"
 #include "AliHLTGlobalDCSPublisherComponent.h"
+#include "AliHLTMultiplicityCorrelationsComponent.h"
 
 /** global instance for agent registration */
 AliHLTGlobalAgent gAliHLTGlobalAgent;
@@ -77,6 +78,7 @@ int AliHLTGlobalAgent::RegisterComponents(AliHLTComponentHandler* pHandler) cons
   pHandler->AddComponent(new AliHLTV0HistoComponent );
   //pHandler->AddComponent(new AliHLTdNdPtAnalysisComponent );
   //pHandler->AddComponent(new AliHLTdNdPtAnalysisMergerComponent );
+  pHandler->AddComponent(new AliHLTMultiplicityCorrelationsComponent );
   pHandler->AddComponent(new AliHLTGlobalHistoCollector );
   pHandler->AddComponent(new AliHLTGlobalDCSPublisherComponent );
   return 0;
@@ -178,6 +180,8 @@ int AliHLTGlobalAgent::CreateConfigurations(AliHLTConfigurationHandler* pHandler
   
   //pHandler->CreateConfiguration("GLOBAL-dNdPtAnalysis", "dNdPtAnalysis", "GLOBAL-esd-converter", "");
  
+  pHandler->CreateConfiguration("GLOBAL-MultCorr", "MultiplicityCorrelations", "GLOBAL-esd-converter", "");
+
   return 0;
 }
 
diff --git a/HLT/global/physics/AliHLTMultiplicityCorrelations.cxx b/HLT/global/physics/AliHLTMultiplicityCorrelations.cxx
new file mode 100644 (file)
index 0000000..d820823
--- /dev/null
@@ -0,0 +1,810 @@
+//-*- Mode: C++ -*-
+// $Id: AliHLTMultiplicityCorrelations.cxx  $
+//**************************************************************************
+//* This file is property of and copyright by the ALICE HLT Project        * 
+//* ALICE Experiment at CERN, All rights reserved.                         *
+//*                                                                        *
+//* Primary Authors: Jochen Thaeder <jochen@thaeder.de>                    *
+//*                  for The ALICE HLT Project.                            *
+//*                                                                        *
+//* Permission to use, copy, modify and distribute this software and its   *
+//* documentation strictly for non-commercial purposes is hereby granted   *
+//* without fee, provided that the above copyright notice appears in all   *
+//* copies and that both the copyright notice and this permission notice   *
+//* appear in the supporting documentation. The authors make no claims     *
+//* about the suitability of this software for any purpose. It is          *
+//* provided "as is" without express or implied warranty.                  *
+//**************************************************************************
+
+/** @file   AliHLTMultiplicityCorrelations.cxx
+    @author Jochen Thaeder <jochen@thaeder.de>
+    @brief  Correlation plots for multiplicity studies
+*/
+
+// see header file for class documentation
+// or
+// refer to README to build package
+// or
+// visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
+
+#if __GNUC__>= 3
+   using namespace std;
+#endif
+
+#include "TH1F.h"
+#include "TH2F.h"
+#include "TList.h"
+
+#include "AliHLTMultiplicityCorrelations.h"
+
+/** ROOT macro for the implementation of ROOT specific class methods */
+ClassImp(AliHLTMultiplicityCorrelations)
+
+/*
+ * ---------------------------------------------------------------------------------
+ *                            Constructor / Destructor
+ * ---------------------------------------------------------------------------------
+ */
+
+//##################################################################################
+AliHLTMultiplicityCorrelations::AliHLTMultiplicityCorrelations() :
+  fHistList(NULL),
+  fESDEvent(NULL),
+  fESDZDC(NULL),
+  fESDVZERO(NULL),
+  fESDTrackCuts(NULL),
+  fEsdTracks(0), fEsdTracksA(0),
+  fTpcTracks(0), fTpcTracksA(0),
+  fVzeroMult(0.), fVzeroMultA(0.), fVzeroMultC(0.),
+  fVzeroMultFlagged(0.), fVzeroMultFlaggedA(0.), fVzeroMultFlaggedC(0.),
+  fVzeroBinning(350), fVzeroBinningMin(0.), fVzeroBinningMax(35000.),
+  fTpcBinning(200),fTpcBinningMin(0.),fTpcBinningMax(8000.),
+  fZdcBinning(280),fZdcBinningMin(0.),fZdcBinningMax(140.),
+  fZemBinning(100),fZemBinningMin(0.),fZemBinningMax(5.),
+  fZnpBinning(200),fZnpBinningMin(0.),fZnpBinningMax(100.) {
+  // see header file for class documentation
+  // or
+  // refer to README to build package
+  // or
+  // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
+  
+}
+
+//##################################################################################
+AliHLTMultiplicityCorrelations::~AliHLTMultiplicityCorrelations() {
+  // see header file for class documentation
+
+  if ( fHistList ) {
+    fHistList->Clear();
+    delete fHistList;
+  }
+  fHistList = NULL;
+}
+
+/*
+ * ---------------------------------------------------------------------------------
+ *                                   Initialize / Reset
+ * ---------------------------------------------------------------------------------
+ */
+
+//##################################################################################
+Int_t AliHLTMultiplicityCorrelations::Initialize() {
+  // see header file for class documentation  
+
+  Int_t iResult = 0;
+
+  fHistList = new TList();
+  fHistList->SetOwner(kTRUE);
+
+  iResult = SetupHistograms();
+
+  return iResult;
+}
+
+/*
+ * ---------------------------------------------------------------------------------
+ *                             Output - public
+ * ---------------------------------------------------------------------------------
+ */
+
+//##################################################################################
+Int_t AliHLTMultiplicityCorrelations::ProcessEvent( AliESDEvent *esd ) {
+  // see header file for class documentation  
+
+  Int_t iResult = 0;
+
+  if ( ! AddESDEvent(esd) ) {
+    HLTWarning("No ESD event.");
+    return -1;
+  }
+
+  // -- TPC .. To be done before the others
+  if (fESDEvent->GetNumberOfTracks() > 0)
+    iResult = ProcessTPC();
+
+  // -- VZERO
+  if (fESDVZERO)
+    iResult = ProcessVZERO();
+
+  // -- ZDC and Correlations
+  if (fESDZDC)
+    iResult = ProcessZDC();
+
+
+  return iResult;
+}
+
+////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////
+///                                                                              ///
+//////                             PRIVATE                                    //////
+///                                                                              ///
+////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////
+
+/*
+ * ---------------------------------------------------------------------------------
+ *                          Setup / Initialize - private
+ * ---------------------------------------------------------------------------------
+ */
+
+//##################################################################################
+Bool_t AliHLTMultiplicityCorrelations::AddESDEvent( AliESDEvent* esd ) {
+  // see header file for class documentation  
+
+  fESDEvent = esd;
+  
+  // -- Check for ESD
+  if ( !fESDEvent ) {
+    HLTWarning("No ESD event present.");
+    return kFALSE;
+  }
+  
+  // -- Check for PrimaryVertex
+  if ( !esd->GetPrimaryVertexTracks() ){
+    HLTError("No Vertex present.");
+    return kFALSE;
+  }
+  
+  fESDZDC = esd->GetESDZDC();
+  if ( !fESDZDC ) {
+    HLTInfo("No ZDC information !");
+  }
+  
+  fESDVZERO = esd->GetVZEROData();
+  if ( !fESDVZERO ) {
+    HLTInfo("No VZERO information !");
+  }
+  
+  return kTRUE;
+}
+
+//##################################################################################
+Int_t AliHLTMultiplicityCorrelations::SetupHistograms() {
+  // see header file for class documentation  
+
+  Int_t iResult = 0;
+  
+  iResult = SetupVZERO();
+  iResult = SetupZDC();
+  iResult = SetupTPC();
+  iResult = SetupCorrelations();
+
+  return iResult;
+}
+
+//##################################################################################
+Int_t AliHLTMultiplicityCorrelations::SetupVZERO() {
+  // see header file for class documentation  
+
+  // VzeroMult
+  fHistList->Add(new TH1F("fVzeroMult",  "Multiplicity^{VZERO};Multiplicity^{VZERO};N_{Events}",   
+                         fVzeroBinning,fVzeroBinningMin,fVzeroBinningMax));
+  fHistList->Add(new TH1F("fVzeroMultA", "Multiplicity^{VZERO} A;Multiplicity^{VZERO};N_{Events}", 
+                         fVzeroBinning,fVzeroBinningMin,fVzeroBinningMax));
+  fHistList->Add(new TH1F("fVzeroMultC", "Multiplicity^{VZERO} C;Multiplicity^{VZERO};N_{Events}", 
+                         fVzeroBinning,fVzeroBinningMin,fVzeroBinningMax)); 
+
+  // Flagged VzeroMult
+  fHistList->Add(new TH1F("fVzeroFlaggedMult",  "Multiplicity_{flagged}^{VZERO};Multiplicity^{VZERO};N_{Events}",   
+                         fVzeroBinning,fVzeroBinningMin,fVzeroBinningMax)); 
+  fHistList->Add(new TH1F("fVzeroFlaggedMultA", "Multiplicity_{flagged}^{VZERO} A;Multiplicity^{VZERO};N_{Events}", 
+                         fVzeroBinning,fVzeroBinningMin,fVzeroBinningMax)); 
+  fHistList->Add(new TH1F("fVzeroFlaggedMultC", "Multiplicity_{flagged}^{VZERO} C;Multiplicity^{VZERO};N_{Events}", 
+                         fVzeroBinning,fVzeroBinningMin,fVzeroBinningMax)); 
+  
+  fHistList->Add(new TH1F("fVzeroTime",  "Time;Time;N_{Events}",   500, 0, 1000));
+  fHistList->Add(new TH1F("fVzeroTimeA", "Time A;Time;N_{Events}", 500, 0, 1000));
+  fHistList->Add(new TH1F("fVzeroTimeC", "Time B;Time;N_{Events}", 500, 0, 1000));
+
+  fHistList->Add(new TH1F("fVzeroADC",  "ADC;ADC;N_{Events}",   500, 0, 150000));
+  fHistList->Add(new TH1F("fVzeroADCA", "ADC A;ADC;N_{Events}", 500, 0, 100000));
+  fHistList->Add(new TH1F("fVzeroADCC", "ADC B;ADC;N_{Events}", 500, 0, 100000));
+
+  return 0;
+}
+
+//##################################################################################
+Int_t AliHLTMultiplicityCorrelations::SetupZDC() {
+  // see header file for class documentation  
+  
+  // E_{ZN}
+  fHistList->Add(new TH1F("fZdcEzn",  "E_{ZN};E_{ZN} (TeV);N_{Events}",   
+                         fZnpBinning,fZnpBinningMin,fZnpBinningMax));
+  fHistList->Add(new TH1F("fZdcEznA", "E_{ZN} A;E_{ZN} (TeV);N_{Events}", 
+                         fZnpBinning,fZnpBinningMin,fZnpBinningMax));
+  fHistList->Add(new TH1F("fZdcEznC", "E_{ZN} C;E_{ZN} (TeV);N_{Events}", 
+                         fZnpBinning,fZnpBinningMin,fZnpBinningMax));
+  
+  // E_{ZP}
+  fHistList->Add(new TH1F("fZdcEzp",  "E_{ZP};E_{ZP} (TeV);N_{Events}",   
+                         fZnpBinning,fZnpBinningMin,fZnpBinningMax));
+  fHistList->Add(new TH1F("fZdcEzpA", "E_{ZP} A;E_{ZP} (TeV);N_{Events}", 
+                         fZnpBinning,fZnpBinningMin,fZnpBinningMax));
+  fHistList->Add(new TH1F("fZdcEzpC", "E_{ZP} C;E_{ZP} (TeV);N_{Events}", 
+                         fZnpBinning,fZnpBinningMin,fZnpBinningMax));
+  
+  // E_{ZDC}
+  fHistList->Add(new TH1F("fZdcEzdc",  "E_{ZDC};E_{ZDC} (TeV);N_{Events}",   
+                         fZdcBinning,fZdcBinningMin,fZdcBinningMax));
+  fHistList->Add(new TH1F("fZdcEzdcA", "E_{ZDC} A;E_{ZDC} (TeV);N_{Events}", 
+                         fZdcBinning,fZdcBinningMin,fZdcBinningMax));
+  fHistList->Add(new TH1F("fZdcEzdcC", "E_{ZDC} C;E_{ZDC} (TeV);N_{Events}", 
+                         fZdcBinning,fZdcBinningMin,fZdcBinningMax));
+
+  // E_{ZEM}
+  fHistList->Add(new TH1F("fZdcEzem",  "E_{ZEM};E_{ZEM} (TeV);N_{Events}",   
+                         fZemBinning,fZemBinningMin,fZemBinningMax));
+  fHistList->Add(new TH1F("fZdcEzemA", "E_{ZEM} A;E_{ZEM} (TeV);N_{Events}", 
+                         fZemBinning,fZemBinningMin,fZemBinningMax));
+  fHistList->Add(new TH1F("fZdcEzemC", "E_{ZEM} C;E_{ZEM} (TeV);N_{Events}", 
+                         fZemBinning,fZemBinningMin,fZemBinningMax));
+  
+  // N_{Part}
+  fHistList->Add(new TH1F("fZdcNpart",  "N_{Part} ;N_{Part};N_{Events}",  50,0,499));
+  fHistList->Add(new TH1F("fZdcNpartA", "N_{Part} A;N_{Part};N_{Events}", 50,0,499));
+  fHistList->Add(new TH1F("fZdcNpartC", "N_{Part} C;N_{Part};N_{Events}", 50,0,499));
+  
+  // b
+  fHistList->Add(new TH1F("fZdcB",  "b;b {fm);N_{Events}",   31,0,30));
+  fHistList->Add(new TH1F("fZdcBA", "b A;b (fm);N_{Events}", 31,0,30));
+  fHistList->Add(new TH1F("fZdcBC", "b C;b (fm);N_{Events}", 31,0,30));
+
+  // E_{ZEM} vs E_{ZDC} 
+  fHistList->Add(new TH2F("fZdcEzemEzdc", "E_{ZEM} vs E_{ZDC};E_{ZEM} (TeV); E_{ZDC} (TeV)",   
+                         fZemBinning,fZemBinningMin,fZemBinningMax, fZdcBinning,fZdcBinningMin,fZdcBinningMax));
+  fHistList->Add(new TH2F("fZdcEzemEzdcA","E_{ZEM} vs E_{ZDC} A;E_{ZEM} (TeV); E_{ZDC} (TeV)", 
+                         fZemBinning,fZemBinningMin,fZemBinningMax, fZdcBinning,fZdcBinningMin,fZdcBinningMax));
+  fHistList->Add(new TH2F("fZdcEzemEzdcC","E_{ZEM} vs E_{ZDC} C;E_{ZEM} (TeV); E_{ZDC} (TeV)", 
+                         fZemBinning,fZemBinningMin,fZemBinningMax, fZdcBinning,fZdcBinningMin,fZdcBinningMax));
+
+  return 0;
+}
+
+//##################################################################################
+Int_t AliHLTMultiplicityCorrelations::SetupTPC() {
+  // see header file for class documentation  
+
+  Int_t    n = 50;
+  Double_t s = 0.1;
+  Double_t e = 50.;
+  
+  // -- Create LogPtBinning
+  // ------------------------
+  Double_t logMin = TMath::Log10(s);
+  Double_t logMax = TMath::Log10(e);
+  Double_t binwidth = (logMax-logMin)/n;
+  
+  Double_t *logBinning = new Double_t[n+1];
+
+  logBinning[0] = s;
+  for (Int_t ii = 1; ii <= n; ii++)
+    logBinning[ii] = s + TMath::Power(10, logMin + ii*binwidth);
+  // - - - - - - - - - - - - - - - - - - - - - - - - - - - 
+
+  // dN_{ch} / dP_{T}
+  fHistList->Add(new TH1F("fTpcPt0", "dN_{ch} / dP_{T} esdTracks; P_{T} (GeV/c);dN/dP_{T} (c/GeV)", n, logBinning));  
+  fHistList->Add(new TH1F("fTpcPt1", "dN_{ch} / dP_{T} accepted esdTracks; P_{T} (GeV/c);dN/dP_{T} (c/GeV)", n, logBinning));  
+  fHistList->Add(new TH1F("fTpcPt2", "dN_{ch} / dP_{T} tpcTracks; P_{T} (GeV/c);dN/dP_{T} (c/GeV)", n, logBinning));  
+  fHistList->Add(new TH1F("fTpcPt3", "dN_{ch} / dP_{T} accepted tpcTracks; P_{T} (GeV/c);dN/dP_{T} (c/GeV)", n, logBinning));  
+
+  // Multiplicty
+  fHistList->Add(new TH1F("fTpcNch0", "N_{ch} esdTracks; N_{ch};N_{Events}", 
+                         fTpcBinning,fTpcBinningMin,fTpcBinningMax));
+  fHistList->Add(new TH1F("fTpcNch1", "N_{ch} accepted esdTracks; N_{ch};N_{Events}", 
+                         fTpcBinning,fTpcBinningMin,fTpcBinningMax));
+  fHistList->Add(new TH1F("fTpcNch2", "N_{ch} tpcTracks; N_{ch};N_{Events}", 
+                         fTpcBinning,fTpcBinningMin,fTpcBinningMax));
+  fHistList->Add(new TH1F("fTpcNch3", "N_{ch} accepted tpcTracks; N_{ch};N_{Events}", 
+                         fTpcBinning,fTpcBinningMin,fTpcBinningMax));
+
+  return 0;
+}
+
+//##################################################################################
+Int_t AliHLTMultiplicityCorrelations::SetupCorrelations() {
+  // see header file for class documentation  
+
+  // ----------------------------------------------------
+  //   ZDC vs TPC
+  // ----------------------------------------------------
+
+  // E_{ZDC} vs N_{ch}
+  fHistList->Add(new TH2F("fCorrEzdcNch", "E_{ZDC} vs N_{ch}^{TPC};E_{ZDC} (TeV);N_{ch}^{TPC}",   
+                         fZdcBinning,fZdcBinningMin,fZdcBinningMax, fTpcBinning,fTpcBinningMin,fTpcBinningMax));
+  fHistList->Add(new TH2F("fCorrEzdcANch","E_{ZDC} vs N_{ch}^{TPC} A;E_{ZDC} (TeV);N_{ch}^{TPC}", 
+                         fZdcBinning,fZdcBinningMin,fZdcBinningMax, fTpcBinning,fTpcBinningMin,fTpcBinningMax));
+  fHistList->Add(new TH2F("fCorrEzdcCNch","E_{ZDC} vs N_{ch}^{TPC} C;E_{ZDC} (TeV);N_{ch}^{TPC}", 
+                         fZdcBinning,fZdcBinningMin,fZdcBinningMax, fTpcBinning,fTpcBinningMin,fTpcBinningMax));
+  
+  // E_{ZEM} vs N_{ch}
+  fHistList->Add(new TH2F("fCorrEzemNch", "E_{ZEM} vs N_{ch}^{TPC};E_{ZEM} (TeV);N_{ch}^{TPC}",   
+                         fZemBinning,fZemBinningMin,fZemBinningMax, fTpcBinning,fTpcBinningMin,fTpcBinningMax));
+  fHistList->Add(new TH2F("fCorrEzemANch","E_{ZEM} vs N_{ch}^{TPC} A;E_{ZEM} (TeV);N_{ch}^{TPC}", 
+                         fZemBinning,fZemBinningMin,fZemBinningMax, fTpcBinning,fTpcBinningMin,fTpcBinningMax));
+  fHistList->Add(new TH2F("fCorrEzemCNch","E_{ZEM} vs N_{ch}^{TPC} C;E_{ZEM} (TeV);N_{ch}^{TPC}", 
+                         fZemBinning,fZemBinningMin,fZemBinningMax, fTpcBinning,fTpcBinningMin,fTpcBinningMax));
+  
+  // E_{ZP} vs N_{ch}
+  fHistList->Add(new TH2F("fCorrEzpNch", "E_{ZP} vs N_{ch}^{TPC};E_{ZP} (TeV);N_{ch}^{TPC}",   
+                         fZnpBinning,fZnpBinningMin,fZnpBinningMax, fTpcBinning,fTpcBinningMin,fTpcBinningMax));
+  fHistList->Add(new TH2F("fCorrEzpANch","E_{ZP} vs N_{ch}^{TPC} A;E_{ZP} (TeV);N_{ch}^{TPC}", 
+                         fZnpBinning,fZnpBinningMin,fZnpBinningMax, fTpcBinning,fTpcBinningMin,fTpcBinningMax));
+  fHistList->Add(new TH2F("fCorrEzpCNch","E_{ZP} vs N_{ch}^{TPC} C;E_{ZP} (TeV);N_{ch}^{TPC}", 
+                         fZnpBinning,fZnpBinningMin,fZnpBinningMax, fTpcBinning,fTpcBinningMin,fTpcBinningMax));
+  
+  // E_{ZN} vs N_{ch}
+  fHistList->Add(new TH2F("fCorrEznNch", "E_{ZN} vs N_{ch}^{TPC};E_{ZN} (TeV);N_{ch}^{TPC}",   
+                         fZnpBinning,fZnpBinningMin,fZnpBinningMax, fTpcBinning,fTpcBinningMin,fTpcBinningMax));
+  fHistList->Add(new TH2F("fCorrEznANch","E_{ZN} vs N_{ch}^{TPC} A;E_{ZN} (TeV);N_{ch}^{TPC}", 
+                         fZnpBinning,fZnpBinningMin,fZnpBinningMax, fTpcBinning,fTpcBinningMin,fTpcBinningMax));
+  fHistList->Add(new TH2F("fCorrEznCNch","E_{ZN} vs N_{ch}^{TPC} C;E_{ZN} (TeV);N_{ch}^{TPC}", 
+                         fZnpBinning,fZnpBinningMin,fZnpBinningMax, fTpcBinning,fTpcBinningMin,fTpcBinningMax));
+  
+  // N_{Part} vs N_{ch}
+  fHistList->Add(new TH2F("fCorrZdcNpartNch", "N_{part} vs N_{ch}^{TPC};N_{Events};N_{ch}^{TPC}",   
+                         50,0,499, fTpcBinning,fTpcBinningMin,fTpcBinningMax)); 
+  fHistList->Add(new TH2F("fCorrZdcNpartANch","N_{part} vs N_{ch}^{TPC} A;N_{Events};N_{ch}^{TPC}", 
+                         50,0,499, fTpcBinning,fTpcBinningMin,fTpcBinningMax));
+  fHistList->Add(new TH2F("fCorrZdcNpartCNch","N_{part} vs N_{ch}^{TPC} C;N_{Events};N_{ch}^{TPC}", 
+                         50,0,499, fTpcBinning,fTpcBinningMin,fTpcBinningMax));
+
+  // b vs N_{ch}
+  fHistList->Add(new TH2F("fCorrZdcbNch", "b_{ZDC} vs N_{ch}^{TPC};b (fm);N_{ch}^{TPC}",  
+                         31,0,30, fTpcBinning,fTpcBinningMin,fTpcBinningMax));
+  fHistList->Add(new TH2F("fCorrZdcbANch","b_{ZDC} vs N_{ch}^{TPC} A;b (fm);N_{ch}^{TPC}", 
+                         31,0,30, fTpcBinning,fTpcBinningMin,fTpcBinningMax));
+  fHistList->Add(new TH2F("fCorrZdcbCNch","b_{ZDC} vs N_{ch}^{TPC} C;b (fm);N_{ch}^{TPC}", 
+                         31,0,30, fTpcBinning,fTpcBinningMin,fTpcBinningMax));
+
+  // ----------------------------------------------------
+  //   ZDC vs VZERO
+  // ----------------------------------------------------
+
+  // E_{ZDC} vs Multiplicty VZERO
+  fHistList->Add(new TH2F("fCorrEzdcVzero", 
+                         "E_{ZDC} vs Multiplicity^{VZERO};E_{ZDC} (TeV);Multiplicity^{VZERO}",  
+                         fZdcBinning,fZdcBinningMin,fZdcBinningMax, fVzeroBinning,fVzeroBinningMin,fVzeroBinningMax));
+  fHistList->Add(new TH2F("fCorrEzdcVzeroA",
+                         "E_{ZDC} vs Multiplicity^{VZERO} A;E_{ZDC} (TeV);Multiplicity^{VZERO}",
+                         fZdcBinning,fZdcBinningMin,fZdcBinningMax, fVzeroBinning,fVzeroBinningMin,fVzeroBinningMax));
+  fHistList->Add(new TH2F("fCorrEzdcVzeroC",
+                         "E_{ZDC} vs Multiplicity^{VZERO} C;E_{ZDC} (TeV);Multiplicity^{VZERO}",
+                         fZdcBinning,fZdcBinningMin,fZdcBinningMax, fVzeroBinning,fVzeroBinningMin,fVzeroBinningMax));
+  
+  // E_{ZEM} vs Multiplicty VZERO
+  fHistList->Add(new TH2F("fCorrEzemVzero", 
+                         "E_{ZEM} vs Multiplicity^{VZERO};E_{ZEM} (TeV);Multiplicity^{VZERO}",  
+                         fZemBinning,fZemBinningMin,fZemBinningMax, fVzeroBinning,fVzeroBinningMin,fVzeroBinningMax));
+  fHistList->Add(new TH2F("fCorrEzemVzeroA",
+                         "E_{ZEM} vs Multiplicity^{VZERO} A;E_{ZEM} (TeV);Multiplicity^{VZERO}",
+                         fZemBinning,fZemBinningMin,fZemBinningMax, fVzeroBinning,fVzeroBinningMin,fVzeroBinningMax));
+  fHistList->Add(new TH2F("fCorrEzemVzeroC",
+                         "E_{ZEM} vs Multiplicity^{VZERO} C;E_{ZEM} (TeV);Multiplicity^{VZERO}",
+                         fZemBinning,fZemBinningMin,fZemBinningMax, fVzeroBinning,fVzeroBinningMin,fVzeroBinningMax));
+  
+  // E_{ZP} vs Multiplicty VZERO
+  fHistList->Add(new TH2F("fCorrEzpVzero", 
+                         "E_{ZP} vs Multiplicity^{VZERO};E_{ZP} (TeV);Multiplicity^{VZERO}",  
+                         fZnpBinning,fZnpBinningMin,fZnpBinningMax, fVzeroBinning,fVzeroBinningMin,fVzeroBinningMax));
+  fHistList->Add(new TH2F("fCorrEzpVzeroA",
+                         "E_{ZP} vs Multiplicity^{VZERO} A;E_{ZP} (TeV);Multiplicity^{VZERO}",
+                         fZnpBinning,fZnpBinningMin,fZnpBinningMax, fVzeroBinning,fVzeroBinningMin,fVzeroBinningMax));
+  fHistList->Add(new TH2F("fCorrEzpVzeroC",
+                         "E_{ZP} vs Multiplicity^{VZERO} C;E_{ZP} (TeV);Multiplicity^{VZERO}",
+                         fZnpBinning,fZnpBinningMin,fZnpBinningMax, fVzeroBinning,fVzeroBinningMin,fVzeroBinningMax));
+  
+  // E_{ZN} vs Multiplicty VZERO
+  fHistList->Add(new TH2F("fCorrEznVzero", 
+                         "E_{ZN} vs Multiplicity^{VZERO};E_{ZN} (TeV);Multiplicity^{VZERO}",   
+                         fZnpBinning,fZnpBinningMin,fZnpBinningMax, fVzeroBinning,fVzeroBinningMin,fVzeroBinningMax));
+  fHistList->Add(new TH2F("fCorrEznVzeroA",
+                         "E_{ZN} vs Multiplicity^{VZERO} A;E_{ZN} (TeV);Multiplicity^{VZERO}",
+                         fZnpBinning,fZnpBinningMin,fZnpBinningMax, fVzeroBinning,fVzeroBinningMin,fVzeroBinningMax));
+  fHistList->Add(new TH2F("fCorrEznVzeroC",
+                         "E_{ZN} vs Multiplicity^{VZERO} C;E_{ZN} (TeV);Multiplicity^{VZERO}",
+                         fZnpBinning,fZnpBinningMin,fZnpBinningMax, fVzeroBinning,fVzeroBinningMin,fVzeroBinningMax));
+  
+  // N_{Part} vs Multiplicty VZERO
+  fHistList->Add(new TH2F("fCorrZdcNpartVzero", 
+                         "N_{part} vs Multiplicity^{VZERO};N_{Events};Multiplicity^{VZERO}",   
+                         50,0,499, fVzeroBinning,fVzeroBinningMin,fVzeroBinningMax)); 
+  fHistList->Add(new TH2F("fCorrZdcNpartVzeroA",
+                         "N_{part} vs Multiplicity^{VZERO} A;N_{Events};Multiplicity^{VZERO}", 
+                         50,0,499, fVzeroBinning,fVzeroBinningMin,fVzeroBinningMax));
+  fHistList->Add(new TH2F("fCorrZdcNpartVzeroC",
+                         "N_{part} vs Multiplicity^{VZERO} C;N_{Events};Multiplicity^{VZERO}",
+                         50,0,499, fVzeroBinning,fVzeroBinningMin,fVzeroBinningMax));
+
+  // b vs Multiplicty VZERO
+  fHistList->Add(new TH2F("fCorrZdcbVzero", "b_{ZDC} vs Multiplicity^{VZERO};b (fm);Multiplicity^{VZERO}",    
+                         31,0,30, fVzeroBinning,fVzeroBinningMin,fVzeroBinningMax));
+  fHistList->Add(new TH2F("fCorrZdcbVzeroA","b_{ZDC} vs Multiplicity^{VZERO} A;b (fm);Multiplicity^{VZERO}",  
+                         31,0,30, fVzeroBinning,fVzeroBinningMin,fVzeroBinningMax));
+  fHistList->Add(new TH2F("fCorrZdcbVzeroC","b_{ZDC} vs Multiplicity^{VZERO} C;b (fm);Multiplicity^{VZERO}",  
+                         31,0,30, fVzeroBinning,fVzeroBinningMin,fVzeroBinningMax));
+
+  // -- -- -- -- -- -- -- 
+
+  // E_{ZDC} vs Multiplicty VZERO flagged
+  fHistList->Add(new TH2F("fCorrEzdcVzeroF", 
+                         "E_{ZDC} vs Multiplicity_{flagged}^{VZERO};E_{ZDC} (TeV);Multiplicity^{VZERO}",   
+                         fZdcBinning,fZdcBinningMin,fZdcBinningMax, fVzeroBinning,fVzeroBinningMin,fVzeroBinningMax));
+  fHistList->Add(new TH2F("fCorrEzdcVzeroFA",
+                         "E_{ZDC} vs Multiplicity_{flagged}^{VZERO} A;E_{ZDC} (TeV);Multiplicity^{VZERO}", 
+                         fZdcBinning,fZdcBinningMin,fZdcBinningMax, fVzeroBinning,fVzeroBinningMin,fVzeroBinningMax));
+  fHistList->Add(new TH2F("fCorrEzdcVzeroFC",
+                         "E_{ZDC} vs Multiplicity_{flagged}^{VZERO} C;E_{ZDC} (TeV);Multiplicity^{VZERO}", 
+                         fZdcBinning,fZdcBinningMin,fZdcBinningMax, fVzeroBinning,fVzeroBinningMin,fVzeroBinningMax));
+  
+  // E_{ZEM} vs Multiplicty VZERO flagged
+  fHistList->Add(new TH2F("fCorrEzemVzeroF", 
+                         "E_{ZEM} vs Multiplicity_{flagged}^{VZERO};E_{ZEM} (TeV);Multiplicity^{VZERO}",   
+                         fZemBinning,fZemBinningMin,fZemBinningMax, fVzeroBinning,fVzeroBinningMin,fVzeroBinningMax));
+  fHistList->Add(new TH2F("fCorrEzemVzeroFA",
+                         "E_{ZEM} vs Multiplicity_{flagged}^{VZERO} A;E_{ZEM} (TeV);Multiplicity^{VZERO}", 
+                         fZemBinning,fZemBinningMin,fZemBinningMax, fVzeroBinning,fVzeroBinningMin,fVzeroBinningMax));
+  fHistList->Add(new TH2F("fCorrEzemVzeroFC",
+                         "E_{ZEM} vs Multiplicity_{flagged}^{VZERO} C;E_{ZEM} (TeV);Multiplicity^{VZERO}", 
+                         fZemBinning,fZemBinningMin,fZemBinningMax, fVzeroBinning,fVzeroBinningMin,fVzeroBinningMax));
+  
+  // E_{ZP} vs Multiplicty VZERO flagged
+  fHistList->Add(new TH2F("fCorrEzpVzeroF", 
+                         "E_{ZP} vs Multiplicity_{flagged}^{VZERO};E_{ZP} (TeV);Multiplicity^{VZERO}",   
+                         fZnpBinning,fZnpBinningMin,fZnpBinningMax, fVzeroBinning,fVzeroBinningMin,fVzeroBinningMax));
+  fHistList->Add(new TH2F("fCorrEzpVzeroFA",
+                         "E_{ZP} vs Multiplicity_{flagged}^{VZERO} A;E_{ZP} (TeV);Multiplicity^{VZERO}", 
+                         fZnpBinning,fZnpBinningMin,fZnpBinningMax, fVzeroBinning,fVzeroBinningMin,fVzeroBinningMax));
+  fHistList->Add(new TH2F("fCorrEzpVzeroFC",
+                         "E_{ZP} vs Multiplicity_{flagged}^{VZERO} C;E_{ZP} (TeV);Multiplicity^{VZERO}",
+                         fZnpBinning,fZnpBinningMin,fZnpBinningMax, fVzeroBinning,fVzeroBinningMin,fVzeroBinningMax));
+  
+  // E_{ZN} vs Multiplicty VZERO flagged
+  fHistList->Add(new TH2F("fCorrEznVzeroF", 
+                         "E_{ZN} vs Multiplicity_{flagged}^{VZERO};E_{ZN} (TeV);Multiplicity^{VZERO}",  
+                         fZnpBinning,fZnpBinningMin,fZnpBinningMax, fVzeroBinning,fVzeroBinningMin,fVzeroBinningMax));
+  fHistList->Add(new TH2F("fCorrEznVzeroFA",
+                         "E_{ZN} vs Multiplicity_{flagged}^{VZERO} A;E_{ZN} (TeV);Multiplicity^{VZERO}", 
+                         fZnpBinning,fZnpBinningMin,fZnpBinningMax, fVzeroBinning,fVzeroBinningMin,fVzeroBinningMax));
+  fHistList->Add(new TH2F("fCorrEznVzeroFC",
+                         "E_{ZN} vs Multiplicity_{flagged}^{VZERO} C;E_{ZN} (TeV);Multiplicity^{VZERO}", 
+                         fZnpBinning,fZnpBinningMin,fZnpBinningMax, fVzeroBinning,fVzeroBinningMin,fVzeroBinningMax));
+  
+  // N_{Part} vs Multiplicty VZERO flagged
+  fHistList->Add(new TH2F("fCorrZdcNpartVzeroF", 
+                         "N_{part} vs Multiplicity_{flagged}^{VZERO};N_{Events};Multiplicity^{VZERO}",   
+                         50,0,499, fVzeroBinning,fVzeroBinningMin,fVzeroBinningMax)); 
+  fHistList->Add(new TH2F("fCorrZdcNpartVzeroFA",
+                         "N_{part} vs Multiplicity_{flagged}^{VZERO} A;N_{Events};Multiplicity^{VZERO}", 
+                         50,0,499, fVzeroBinning,fVzeroBinningMin,fVzeroBinningMax));
+  fHistList->Add(new TH2F("fCorrZdcNpartVzeroFC",
+                         "N_{part} vs Multiplicity_{flagged}^{VZERO} C;N_{Events};Multiplicity^{VZERO}", 
+                         50,0,499, fVzeroBinning,fVzeroBinningMin,fVzeroBinningMax));
+
+  // b vs Multiplicty VZERO flagged
+  fHistList->Add(new TH2F("fCorrZdcbVzeroF", 
+                         "b_{ZDC} vs Multiplicity_{flagged}^{VZERO};b (fm);Multiplicity^{VZERO}",    
+                         31,0,30, fVzeroBinning,fVzeroBinningMin,fVzeroBinningMax));
+  fHistList->Add(new TH2F("fCorrZdcbVzeroFA",
+                         "b_{ZDC} vs Multiplicity_{flagged}^{VZERO} A;b (fm);Multiplicity^{VZERO}",  
+                         31,0,30, fVzeroBinning,fVzeroBinningMin,fVzeroBinningMax));
+  fHistList->Add(new TH2F("fCorrZdcbVzeroFC",
+                         "b_{ZDC} vs Multiplicity_{flagged}^{VZERO} C;b (fm);Multiplicity^{VZERO}",  
+                         31,0,30, fVzeroBinning,fVzeroBinningMin,fVzeroBinningMax));
+
+  // ----------------------------------------------------
+  //   VZERO vs TPC
+  // ----------------------------------------------------
+
+  fHistList->Add(new TH2F("fCorrVzeroNch", 
+                         "Multiplicity^{VZERO} vs N_{ch}^{TPC};Multiplicity^{VZERO};N_{ch}^{TPC}", 
+                         fVzeroBinning,fVzeroBinningMin,fVzeroBinningMax, fTpcBinning,fTpcBinningMin,fTpcBinningMax));
+  fHistList->Add(new TH2F("fCorrVzeroANch", 
+                         "Multiplicity^{VZERO} vs N_{ch}^{TPC} A;Multiplicity^{VZERO};N_{ch}^{TPC}", 
+                         fVzeroBinning,fVzeroBinningMin,fVzeroBinningMax, fTpcBinning,fTpcBinningMin,fTpcBinningMax));
+  fHistList->Add(new TH2F("fCorrVzeroCNch", 
+                         "Multiplicity^{VZERO} vs N_{ch}^{TPC} C;Multiplicity^{VZERO};N_{ch}^{TPC}", 
+                         fVzeroBinning,fVzeroBinningMin,fVzeroBinningMax, fTpcBinning,fTpcBinningMin,fTpcBinningMax));
+
+  fHistList->Add(new TH2F("fCorrVzeroFNch", 
+                         "Multiplicity^{VZERO} vs N_{ch}^{TPC};Multiplicity_{flagged}^{VZERO};N_{ch}^{TPC}", 
+                         fVzeroBinning,fVzeroBinningMin,fVzeroBinningMax, fTpcBinning,fTpcBinningMin,fTpcBinningMax));
+  fHistList->Add(new TH2F("fCorrVzeroFANch", 
+                         "Multiplicity^{VZERO} vs N_{ch}^{TPC} A;Multiplicity_{flagged}^{VZERO};N_{ch}^{TPC}", 
+                         fVzeroBinning,fVzeroBinningMin,fVzeroBinningMax, fTpcBinning,fTpcBinningMin,fTpcBinningMax));
+  fHistList->Add(new TH2F("fCorrVzeroFCNch", 
+                         "Multiplicity^{VZERO} vs N_{ch}^{TPC} C;Multiplicity_{flagged}^{VZERO};N_{ch}^{TPC}", 
+                         fVzeroBinning,fVzeroBinningMin,fVzeroBinningMax, fTpcBinning,fTpcBinningMin,fTpcBinningMax));
+
+  // ----------------------------------------------------
+  //  
+  // ----------------------------------------------------
+
+  return 0;
+}
+
+/*
+ * ---------------------------------------------------------------------------------
+ *                               Process - private
+ * ---------------------------------------------------------------------------------
+ */
+
+//##################################################################################
+Int_t AliHLTMultiplicityCorrelations::ProcessTPC() {
+
+  Int_t iResult = 0 ;
+
+  TH1F* hPt0 = static_cast<TH1F*>(fHistList->FindObject("fTpcPt0")); // all
+  TH1F* hPt1 = static_cast<TH1F*>(fHistList->FindObject("fTpcPt1")); // all accepted
+
+  TH1F* hPt2 = static_cast<TH1F*>(fHistList->FindObject("fTpcPt2")); // GetTPCInnerParam
+  TH1F* hPt3 = static_cast<TH1F*>(fHistList->FindObject("fTpcPt3")); // GetTPCInnerParam A
+
+  fEsdTracks = 0;  
+  fEsdTracksA = 0;  
+  fTpcTracks = 0;  
+  fTpcTracksA = 0;  
+  
+  // -----------------------------------------------------------------
+  for (Int_t idx = 0; idx < fESDEvent->GetNumberOfTracks(); idx++) {
+
+    // -- check  track
+    AliESDtrack* esdTrack = fESDEvent->GetTrack(idx);
+    if (!esdTrack) continue;
+
+    ++fEsdTracks;
+    hPt0->Fill(esdTrack->Pt());
+    
+    //______________________________________________
+    if (!fESDTrackCuts->AcceptTrack(esdTrack)) continue;
+    ++fEsdTracksA;
+
+    hPt1->Fill(esdTrack->Pt());
+  }
+  // -----------------------------------------------------------------
+  for (Int_t idx = 0; idx < fESDEvent->GetNumberOfTracks(); idx++) {
+
+    // -- check  track
+    AliESDtrack* esdTrack = fESDEvent->GetTrack(idx);
+    if (!esdTrack) continue;
+
+    // -- TPC only
+    const AliExternalTrackParam *tpcTrack = esdTrack->GetTPCInnerParam();
+    if (!tpcTrack) continue;
+    ++fTpcTracks;
+    hPt2->Fill(tpcTrack->Pt());
+    
+    //______________________________________________
+    if (!fESDTrackCuts->AcceptTrack(esdTrack)) continue;
+    ++fTpcTracksA;
+
+    hPt3->Fill(tpcTrack->Pt());
+  }
+  // -----------------------------------------------------------------
+
+  (static_cast<TH1F*>(fHistList->FindObject("fTpcNch0")))->Fill(fEsdTracks);
+  (static_cast<TH1F*>(fHistList->FindObject("fTpcNch1")))->Fill(fEsdTracksA);
+  (static_cast<TH1F*>(fHistList->FindObject("fTpcNch2")))->Fill(fTpcTracks);
+  (static_cast<TH1F*>(fHistList->FindObject("fTpcNch3")))->Fill(fTpcTracksA);
+
+  return iResult;
+}
+
+//##################################################################################
+Int_t AliHLTMultiplicityCorrelations::ProcessVZERO() {
+
+  Int_t iResult = 0 ;
+
+  fVzeroMultA = fESDVZERO->GetMTotV0A();
+  fVzeroMultC = fESDVZERO->GetMTotV0C();
+  fVzeroMult  = fVzeroMultA + fVzeroMultC;
+
+  (static_cast<TH1F*>(fHistList->FindObject("fVzeroMult")))->Fill(fVzeroMult);
+  (static_cast<TH1F*>(fHistList->FindObject("fVzeroMultA")))->Fill(fVzeroMultA);
+  (static_cast<TH1F*>(fHistList->FindObject("fVzeroMultC")))->Fill(fVzeroMultC);
+  
+  fVzeroMultFlaggedA = 0.;
+  fVzeroMultFlaggedC = 0.;
+  
+  Double_t vzeroTimeA = 0.;
+  Double_t vzeroTimeC = 0.;
+  
+  Double_t vzeroAdcA = 0.;
+  Double_t vzeroAdcC = 0.;
+  
+  for (Int_t idx = 0; idx < 32; idx++) {
+    
+    if ( fESDVZERO->GetBBFlag(idx) )
+      fVzeroMultFlaggedC += fESDVZERO->GetMultiplicityV0C(idx);
+    if ( fESDVZERO->GetBBFlag(idx+32) )
+      fVzeroMultFlaggedA += fESDVZERO->GetMultiplicityV0A(idx);
+    
+    vzeroTimeA += fESDVZERO->GetTimeV0A(idx);
+    vzeroTimeC += fESDVZERO->GetTimeV0C(idx);
+    
+    vzeroAdcA += fESDVZERO->GetAdcV0A(idx);
+    vzeroAdcC += fESDVZERO->GetAdcV0C(idx);
+  }
+
+  fVzeroMultFlagged = fVzeroMultFlaggedA + fVzeroMultFlaggedC;
+
+  Double_t vzeroTime     = vzeroTimeA + vzeroTimeC;
+  Double_t vzeroAdc      = vzeroAdcA + vzeroAdcC;
+  
+  (static_cast<TH1F*>(fHistList->FindObject("fVzeroFlaggedMult")))->Fill(fVzeroMultFlagged);
+  (static_cast<TH1F*>(fHistList->FindObject("fVzeroFlaggedMultA")))->Fill(fVzeroMultFlaggedA);
+  (static_cast<TH1F*>(fHistList->FindObject("fVzeroFlaggedMultC")))->Fill(fVzeroMultFlaggedC);
+  
+  (static_cast<TH1F*>(fHistList->FindObject("fVzeroTime")))->Fill(vzeroTime);
+  (static_cast<TH1F*>(fHistList->FindObject("fVzeroTimeA")))->Fill(vzeroTimeA);
+  (static_cast<TH1F*>(fHistList->FindObject("fVzeroTimeC")))->Fill(vzeroTimeC);
+  
+  (static_cast<TH1F*>(fHistList->FindObject("fVzeroADC")))->Fill(vzeroAdc);
+  (static_cast<TH1F*>(fHistList->FindObject("fVzeroADCA")))->Fill(vzeroAdcA);
+  (static_cast<TH1F*>(fHistList->FindObject("fVzeroADCC")))->Fill(vzeroAdcC);
+
+  // -- VZERO - TPC correlations
+  if (fESDEvent->GetNumberOfTracks() > 0) {
+    (static_cast<TH2F*>(fHistList->FindObject("fCorrVzeroNch")))->Fill(fVzeroMult, fTpcTracksA);
+    (static_cast<TH2F*>(fHistList->FindObject("fCorrVzeroANch")))->Fill(fVzeroMultA, fTpcTracksA);
+    (static_cast<TH2F*>(fHistList->FindObject("fCorrVzeroCNch")))->Fill(fVzeroMultC, fTpcTracksA);
+    
+    (static_cast<TH2F*>(fHistList->FindObject("fCorrVzeroFNch")))->Fill(fVzeroMultFlagged, fTpcTracksA);
+    (static_cast<TH2F*>(fHistList->FindObject("fCorrVzeroFANch")))->Fill(fVzeroMultFlaggedA, fTpcTracksA);
+    (static_cast<TH2F*>(fHistList->FindObject("fCorrVzeroFCNch")))->Fill(fVzeroMultFlaggedC, fTpcTracksA);
+  }
+
+  return iResult;
+}
+
+//##################################################################################
+Int_t AliHLTMultiplicityCorrelations::ProcessZDC() {
+
+  Int_t iResult = 0 ;
+
+  Double_t zdcEznA = fESDZDC->GetZDCN2Energy() / 1000.;
+  Double_t zdcEznC = fESDZDC->GetZDCN1Energy() / 1000.;
+  Double_t zdcEzn  = zdcEznA + zdcEznC;
+  
+  (static_cast<TH1F*>(fHistList->FindObject("fZdcEzn")))->Fill(zdcEzn);
+  (static_cast<TH1F*>(fHistList->FindObject("fZdcEznA")))->Fill(zdcEznA);
+  (static_cast<TH1F*>(fHistList->FindObject("fZdcEznC")))->Fill(zdcEznC);
+  
+  Double_t zdcEzpA = fESDZDC->GetZDCP2Energy() / 1000.;
+  Double_t zdcEzpC = fESDZDC->GetZDCP1Energy() / 1000.;
+  Double_t zdcEzp  = zdcEzpA + zdcEzpC;
+  
+  (static_cast<TH1F*>(fHistList->FindObject("fZdcEzp")))->Fill(zdcEzp);
+  (static_cast<TH1F*>(fHistList->FindObject("fZdcEzpA")))->Fill(zdcEzpA);
+  (static_cast<TH1F*>(fHistList->FindObject("fZdcEzpC")))->Fill(zdcEzpC);
+  
+  Double_t zdcEA = (zdcEznA + zdcEzpA);
+  Double_t zdcEC = (zdcEznC + zdcEzpC);
+  Double_t zdcE = zdcEA + zdcEC;
+  
+  (static_cast<TH1F*>(fHistList->FindObject("fZdcEzdc")))->Fill(zdcE);
+  (static_cast<TH1F*>(fHistList->FindObject("fZdcEzdcA")))->Fill(zdcEA);
+  (static_cast<TH1F*>(fHistList->FindObject("fZdcEzdcC")))->Fill(zdcEC);
+  
+  Double_t zdcEzemA = fESDZDC->GetZDCEMEnergy(1) / 1000.;
+  Double_t zdcEzemC = fESDZDC->GetZDCEMEnergy(0) / 1000.;
+  Double_t zdcEzem  = zdcEzemA + zdcEzemC;
+  
+  (static_cast<TH1F*>(fHistList->FindObject("fZdcEzem")))->Fill(zdcEzem);
+  (static_cast<TH1F*>(fHistList->FindObject("fZdcEzemA")))->Fill(zdcEzemA);
+  (static_cast<TH1F*>(fHistList->FindObject("fZdcEzemC")))->Fill(zdcEzemC);
+  (static_cast<TH2F*>(fHistList->FindObject("fZdcEzemEzdc")))->Fill(zdcEzem, zdcE);
+  (static_cast<TH2F*>(fHistList->FindObject("fZdcEzemEzdcA")))->Fill(zdcEzemA, zdcEA);
+  (static_cast<TH2F*>(fHistList->FindObject("fZdcEzemEzdcC")))->Fill(zdcEzemC, zdcEC);
+  (static_cast<TH1F*>(fHistList->FindObject("fZdcNpart")))->Fill(fESDZDC->GetZDCParticipants());
+  (static_cast<TH1F*>(fHistList->FindObject("fZdcNpartA")))->Fill(fESDZDC->GetZDCPartSideA());
+  (static_cast<TH1F*>(fHistList->FindObject("fZdcNpartC")))->Fill(fESDZDC->GetZDCPartSideC());
+  
+  (static_cast<TH1F*>(fHistList->FindObject("fZdcB")))->Fill(fESDZDC->GetImpactParameter());
+  (static_cast<TH1F*>(fHistList->FindObject("fZdcBA")))->Fill(fESDZDC->GetImpactParamSideA());
+  (static_cast<TH1F*>(fHistList->FindObject("fZdcBC")))->Fill(fESDZDC->GetImpactParamSideC());
+  // -- ZDC - TPC correlations
+  if (fESDEvent->GetNumberOfTracks() > 0) {
+    (static_cast<TH2F*>(fHistList->FindObject("fCorrEzdcNch")))->Fill(zdcE, fTpcTracksA);
+    (static_cast<TH2F*>(fHistList->FindObject("fCorrEzdcANch")))->Fill(zdcEA, fTpcTracksA);
+    (static_cast<TH2F*>(fHistList->FindObject("fCorrEzdcCNch")))->Fill(zdcEC, fTpcTracksA);
+    
+    (static_cast<TH2F*>(fHistList->FindObject("fCorrEzemNch")))->Fill(zdcEzem, fTpcTracksA);
+    (static_cast<TH2F*>(fHistList->FindObject("fCorrEzemANch")))->Fill(zdcEzemA, fTpcTracksA);
+    (static_cast<TH2F*>(fHistList->FindObject("fCorrEzemCNch")))->Fill(zdcEzemC, fTpcTracksA);
+    
+    (static_cast<TH2F*>(fHistList->FindObject("fCorrEzpNch")))->Fill(zdcEzp, fTpcTracksA);
+    (static_cast<TH2F*>(fHistList->FindObject("fCorrEzpANch")))->Fill(zdcEzpA, fTpcTracksA);
+    (static_cast<TH2F*>(fHistList->FindObject("fCorrEzpCNch")))->Fill(zdcEzpC, fTpcTracksA);
+    
+    (static_cast<TH2F*>(fHistList->FindObject("fCorrEznNch")))->Fill(zdcEzn, fTpcTracksA);
+    (static_cast<TH2F*>(fHistList->FindObject("fCorrEznANch")))->Fill(zdcEznA, fTpcTracksA);
+    (static_cast<TH2F*>(fHistList->FindObject("fCorrEznCNch")))->Fill(zdcEznC, fTpcTracksA);
+    
+    (static_cast<TH2F*>(fHistList->FindObject("fCorrZdcNpartNch")))->Fill(fESDZDC->GetZDCParticipants(), fTpcTracksA);
+    (static_cast<TH2F*>(fHistList->FindObject("fCorrZdcNpartANch")))->Fill(fESDZDC->GetZDCPartSideA(),   fTpcTracksA);
+    (static_cast<TH2F*>(fHistList->FindObject("fCorrZdcNpartCNch")))->Fill(fESDZDC->GetZDCPartSideC(),   fTpcTracksA);
+    
+    (static_cast<TH2F*>(fHistList->FindObject("fCorrZdcbNch")))->Fill(fESDZDC->GetImpactParameter(),   fTpcTracksA);
+    (static_cast<TH2F*>(fHistList->FindObject("fCorrZdcbANch")))->Fill(fESDZDC->GetImpactParamSideA(), fTpcTracksA);
+    (static_cast<TH2F*>(fHistList->FindObject("fCorrZdcbCNch")))->Fill(fESDZDC->GetImpactParamSideC(), fTpcTracksA);
+  }
+
+  // -- VZERO - TPC correlations
+  if (fESDVZERO) {
+    (static_cast<TH2F*>(fHistList->FindObject("fCorrEzdcVzero")))->Fill(zdcE, fVzeroMult);
+    (static_cast<TH2F*>(fHistList->FindObject("fCorrEzdcVzeroA")))->Fill(zdcEA, fVzeroMultA);
+    (static_cast<TH2F*>(fHistList->FindObject("fCorrEzdcVzeroC")))->Fill(zdcEC, fVzeroMultC);
+    
+    (static_cast<TH2F*>(fHistList->FindObject("fCorrEzemVzero")))->Fill(zdcEzem, fVzeroMult);
+    (static_cast<TH2F*>(fHistList->FindObject("fCorrEzemVzeroA")))->Fill(zdcEzemA, fVzeroMultA);
+    (static_cast<TH2F*>(fHistList->FindObject("fCorrEzemVzeroC")))->Fill(zdcEzemC, fVzeroMultC);
+    
+    (static_cast<TH2F*>(fHistList->FindObject("fCorrEzpVzero")))->Fill(zdcEzp, fVzeroMult);
+    (static_cast<TH2F*>(fHistList->FindObject("fCorrEzpVzeroA")))->Fill(zdcEzpA, fVzeroMultA);
+    (static_cast<TH2F*>(fHistList->FindObject("fCorrEzpVzeroC")))->Fill(zdcEzpC, fVzeroMultC);
+    
+    (static_cast<TH2F*>(fHistList->FindObject("fCorrEznVzero")))->Fill(zdcEzn, fVzeroMult);
+    (static_cast<TH2F*>(fHistList->FindObject("fCorrEznVzeroA")))->Fill(zdcEznA, fVzeroMultA);
+    (static_cast<TH2F*>(fHistList->FindObject("fCorrEznVzeroC")))->Fill(zdcEznC, fVzeroMultC);
+    
+    (static_cast<TH2F*>(fHistList->FindObject("fCorrZdcNpartVzero")))->Fill(fESDZDC->GetZDCParticipants(), fVzeroMult);
+    (static_cast<TH2F*>(fHistList->FindObject("fCorrZdcNpartVzeroA")))->Fill(fESDZDC->GetZDCPartSideA(),   fVzeroMultA);
+    (static_cast<TH2F*>(fHistList->FindObject("fCorrZdcNpartVzeroC")))->Fill(fESDZDC->GetZDCPartSideC(),   fVzeroMultC);
+    
+    (static_cast<TH2F*>(fHistList->FindObject("fCorrZdcbVzero")))->Fill(fESDZDC->GetImpactParameter(),   fVzeroMult);
+    (static_cast<TH2F*>(fHistList->FindObject("fCorrZdcbVzeroA")))->Fill(fESDZDC->GetImpactParamSideA(), fVzeroMultA);
+    (static_cast<TH2F*>(fHistList->FindObject("fCorrZdcbVzeroC")))->Fill(fESDZDC->GetImpactParamSideC(), fVzeroMultC);
+
+    // -- -- -- -- 
+
+    (static_cast<TH2F*>(fHistList->FindObject("fCorrEzdcVzeroF")))->Fill(zdcE, fVzeroMultFlagged);
+    (static_cast<TH2F*>(fHistList->FindObject("fCorrEzdcVzeroFA")))->Fill(zdcEA, fVzeroMultFlaggedA);
+    (static_cast<TH2F*>(fHistList->FindObject("fCorrEzdcVzeroFC")))->Fill(zdcEC, fVzeroMultFlaggedC);
+    
+    (static_cast<TH2F*>(fHistList->FindObject("fCorrEzemVzeroF")))->Fill(zdcEzem, fVzeroMultFlagged);
+    (static_cast<TH2F*>(fHistList->FindObject("fCorrEzemVzeroFA")))->Fill(zdcEzemA, fVzeroMultFlaggedA);
+    (static_cast<TH2F*>(fHistList->FindObject("fCorrEzemVzeroFC")))->Fill(zdcEzemC, fVzeroMultFlaggedC);
+    
+    (static_cast<TH2F*>(fHistList->FindObject("fCorrEzpVzeroF")))->Fill(zdcEzp, fVzeroMultFlagged);
+    (static_cast<TH2F*>(fHistList->FindObject("fCorrEzpVzeroFA")))->Fill(zdcEzpA, fVzeroMultFlaggedA);
+    (static_cast<TH2F*>(fHistList->FindObject("fCorrEzpVzeroFC")))->Fill(zdcEzpC, fVzeroMultFlaggedC);
+    
+    (static_cast<TH2F*>(fHistList->FindObject("fCorrEznVzeroF")))->Fill(zdcEzn, fVzeroMultFlagged);
+    (static_cast<TH2F*>(fHistList->FindObject("fCorrEznVzeroFA")))->Fill(zdcEznA, fVzeroMultFlaggedA);
+    (static_cast<TH2F*>(fHistList->FindObject("fCorrEznVzeroFC")))->Fill(zdcEznC, fVzeroMultFlaggedC);
+    
+    (static_cast<TH2F*>(fHistList->FindObject("fCorrZdcNpartVzero")))->Fill(fESDZDC->GetZDCParticipants(), fVzeroMultFlagged);
+    (static_cast<TH2F*>(fHistList->FindObject("fCorrZdcNpartVzeroFA")))->Fill(fESDZDC->GetZDCPartSideA(),   fVzeroMultFlaggedA);
+    (static_cast<TH2F*>(fHistList->FindObject("fCorrZdcNpartVzeroFC")))->Fill(fESDZDC->GetZDCPartSideC(),   fVzeroMultFlaggedC);
+    
+    (static_cast<TH2F*>(fHistList->FindObject("fCorrZdcbVzeroF")))->Fill(fESDZDC->GetImpactParameter(),   fVzeroMultFlagged);
+    (static_cast<TH2F*>(fHistList->FindObject("fCorrZdcbVzeroFA")))->Fill(fESDZDC->GetImpactParamSideA(), fVzeroMultFlaggedA);
+    (static_cast<TH2F*>(fHistList->FindObject("fCorrZdcbVzeroFC")))->Fill(fESDZDC->GetImpactParamSideC(), fVzeroMultFlaggedC);
+  }
+
+  return iResult;
+}
diff --git a/HLT/global/physics/AliHLTMultiplicityCorrelations.h b/HLT/global/physics/AliHLTMultiplicityCorrelations.h
new file mode 100644 (file)
index 0000000..4535c92
--- /dev/null
@@ -0,0 +1,251 @@
+//-*- Mode: C++ -*-
+
+// $Id: AliHLTMultiplicityCorrelations.h  $
+#ifndef ALIHLTMULTIPLICITYCORRELATIONS_H
+#define ALIHLTMULTIPLICITYCORRELATIONS_H
+
+/* This file is property of and copyright by the ALICE HLT Project        * 
+ * ALICE Experiment at CERN, All rights reserved.                         *
+ * See cxx source for full Copyright notice                               */
+
+/** @file   AliHLTMultiplicityCorrelations.h
+    @author Jochen Thaeder
+    @date   
+    @brief  Correlation plots for multiplicity studies
+*/
+
+// see below for class documentation
+// or
+// refer to README to build package
+// or
+// visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
+
+#include "AliHLTLogging.h"
+
+#include "AliESDtrackCuts.h"
+#include "AliESDEvent.h"
+#include "AliESDVZERO.h"
+#include "AliESDZDC.h"
+
+#include "TList.h"
+
+class TH1;
+
+
+/**
+ * @class AliHLTMultiplicityCorrelations
+ *
+ * @ingroup alihlt_physics
+ */
+
+class AliHLTMultiplicityCorrelations : public TObject, public AliHLTLogging {
+public:
+  
+  /*
+   * ---------------------------------------------------------------------------------
+   *                            Constructor / Destructor
+   * ---------------------------------------------------------------------------------
+   */
+
+  /** Constructor */
+  AliHLTMultiplicityCorrelations();
+  
+  /** Destructor */
+  ~AliHLTMultiplicityCorrelations();
+
+  /*
+   * ---------------------------------------------------------------------------------
+   *                         Initialize / Setup / Reset - public
+   * ---------------------------------------------------------------------------------
+   */
+
+  /** Initialize class and members */
+  Int_t Initialize();
+
+  /*
+   * ---------------------------------------------------------------------------------
+   *                                Setter - public
+   * ---------------------------------------------------------------------------------
+   */
+
+  /** Set ESD track cuts */
+  void SetESDTrackCuts(AliESDtrackCuts *cuts) { fESDTrackCuts = cuts; }
+
+  /** Set Binning of VZERO */
+  void SetBinningVzero(Int_t i=1, Float_t f1=0., Float_t f2=1.) {
+    fVzeroBinning = i; fVzeroBinningMin = f1; fVzeroBinningMax = f2;
+  }
+
+  /** Set Binning of TPC */
+  void SetBinningTpc(Int_t i=1, Float_t f1=0., Float_t f2=1.) {
+    fTpcBinning = i; fTpcBinningMin = f1; fTpcBinningMax = f2;
+  }
+
+  /** Set Binning of ZDC */
+  void SetBinningZdc(Int_t i=1, Float_t f1=0., Float_t f2=1.) {
+    fZdcBinning = i; fZdcBinningMin = f1; fZdcBinningMax = f2;
+  }
+
+  /** Set Binning of ZEM */
+  void SetBinningZem(Int_t i=1, Float_t f1=0., Float_t f2=1.) {
+    fZemBinning = i; fZemBinningMin = f1; fZemBinningMax = f2;
+  }
+
+  /** Set Binning of ZNP */
+  void SetBinningZnp(Int_t i=1, Float_t f1=0., Float_t f2=1.) {
+    fZnpBinning = i; fZnpBinningMin = f1; fZnpBinningMax = f2;
+  }
+
+  /*
+   * ---------------------------------------------------------------------------------
+   *                                 Getter - public
+   * ---------------------------------------------------------------------------------
+   */
+
+  /** Get List of histograms */
+  TList* GetHistList() const { return fHistList; }
+
+  /*
+   * ---------------------------------------------------------------------------------
+   *                             Process - public
+   * ---------------------------------------------------------------------------------
+   */
+  
+  /** Process current event */
+  Int_t ProcessEvent( AliESDEvent *esd );
+
+  ///////////////////////////////////////////////////////////////////////////////////
+  
+ private:
+  /** copy constructor prohibited */
+  AliHLTMultiplicityCorrelations(const AliHLTMultiplicityCorrelations&);
+  
+  /** assignment operator prohibited */
+  AliHLTMultiplicityCorrelations& operator=(const AliHLTMultiplicityCorrelations&);
+
+  /*
+   * ---------------------------------------------------------------------------------
+   *                         Initialize / Setup / Reset - private
+   * ---------------------------------------------------------------------------------
+   */
+
+  /** Add esd object
+   * param esd Ptr to AliESDEvent
+   * return kTRUE if AliESDEvent and Vertex present
+   */
+  Bool_t AddESDEvent( AliESDEvent* esd );
+
+  /** Setup histograms */
+  Int_t SetupHistograms();
+
+  /** Setup VZERO histograms */
+  Int_t SetupVZERO();
+
+  /** Setup ZDC histograms */
+  Int_t SetupZDC();
+
+  /** Setup TPC histograms */
+  Int_t SetupTPC();
+
+  /** Setup correlation histograms */
+  Int_t SetupCorrelations();
+
+  /*
+   * ---------------------------------------------------------------------------------
+   *                             Process - private
+   * ---------------------------------------------------------------------------------
+   */
+
+  /** Process current event - TPC */
+  Int_t ProcessTPC();
+  
+  /** Process current event - VZERO */
+  Int_t ProcessVZERO();
+
+  /** Process current event - ZDC and correlations */
+  Int_t ProcessZDC();
+
+  /*
+   * ---------------------------------------------------------------------------------
+   *                             Members - private
+   * ---------------------------------------------------------------------------------
+   */
+
+  /** List of histograms */ 
+  TList           *fHistList;             // see above
+
+  /** Ptr to AliESDEvent */
+  AliESDEvent     *fESDEvent;             //! transient
+
+  /** Ptr to ZDC object in AliESDEvent*/ 
+  AliESDZDC       *fESDZDC;               //! transient
+
+  /** Ptr to VZERO object in AliESDEvent*/ 
+  AliESDVZERO     *fESDVZERO;             //! transient
+
+  /** Ptr to AliESD track cuts */
+  AliESDtrackCuts *fESDTrackCuts;         //! transient
+
+  // -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
+
+  /** N ESD tracks */
+  Int_t fEsdTracks;
+
+  /** N ESD tracks accepted */
+  Int_t fEsdTracksA;
+
+  /** N TPC tracks */
+  Int_t fTpcTracks;
+
+  /** N TPC tracks accepted */
+  Int_t fTpcTracksA;
+
+  /** VZERO mult */
+  Float_t fVzeroMult;
+
+  /** VZERO mult A */
+  Float_t fVzeroMultA;
+
+  /** VZERO mult C */
+  Float_t fVzeroMultC;
+
+  /** VZERO flagged mult */
+  Float_t fVzeroMultFlagged;
+
+  /** VZERO flagged mult A */
+  Float_t fVzeroMultFlaggedA;
+
+  /** VZERO flagged mult C */
+  Float_t fVzeroMultFlaggedC;
+
+  // -- -- -- 
+
+  /** Binnning VZERO */
+  Int_t   fVzeroBinning;
+  Float_t fVzeroBinningMin;
+  Float_t fVzeroBinningMax;
+
+  /** Binnning TPC */
+  Int_t   fTpcBinning;
+  Float_t fTpcBinningMin;
+  Float_t fTpcBinningMax;
+
+  /** Binnning ZDC */
+  Int_t   fZdcBinning;
+  Float_t fZdcBinningMin;
+  Float_t fZdcBinningMax;
+
+  /** Binnning ZEM */
+  Int_t   fZemBinning;
+  Float_t fZemBinningMin;
+  Float_t fZemBinningMax;
+
+  /** Binnning ZNP */
+  Int_t   fZnpBinning;
+  Float_t fZnpBinningMin;
+  Float_t fZnpBinningMax;
+  
+  ClassDef(AliHLTMultiplicityCorrelations, 1);
+};
+#endif
diff --git a/HLT/global/physics/AliHLTMultiplicityCorrelationsComponent.cxx b/HLT/global/physics/AliHLTMultiplicityCorrelationsComponent.cxx
new file mode 100644 (file)
index 0000000..eb9b52a
--- /dev/null
@@ -0,0 +1,508 @@
+//-*- Mode: C++ -*-
+// $Id: AliHLTMultiplicityCorrelationsComponent.cxx $
+/**************************************************************************
+ * This file is property of and copyright by the ALICE HLT Project        * 
+ * ALICE Experiment at CERN, All rights reserved.                         *
+ *                                                                        *
+ * Primary Authors: Jochen Thaeder <jochen@thaeder.de>                    *
+ *                  for The ALICE HLT Project.                            *
+ *                                                                        *
+ * Permission to use, copy, modify and distribute this software and its   *
+ * documentation strictly for non-commercial purposes is hereby granted   *
+ * without fee, provided that the above copyright notice appears in all   *
+ * copies and that both the copyright notice and this permission notice   *
+ * appear in the supporting documentation. The authors make no claims     *
+ * about the suitability of this software for any purpose. It is          *
+ * provided "as is" without express or implied warranty.                  *
+ **************************************************************************/
+
+/** @file    AliHLTMultiplicityCorrelationsComponent.cxx
+    @author  Jochen Thaeder <jochen@thaeder.de>
+    @brief   Component for Multiplicty Correlations
+*/
+
+#if __GNUC__>= 3
+using namespace std;
+#endif
+
+#include "TMap.h"
+#include "TObjString.h"
+
+#include "AliESDtrackCuts.h"
+#include "AliHLTMultiplicityCorrelations.h"
+
+#include "AliHLTErrorGuard.h"
+#include "AliHLTDataTypes.h"
+#include "AliHLTMultiplicityCorrelationsComponent.h"
+
+/** ROOT macro for the implementation of ROOT specific class methods */
+ClassImp(AliHLTMultiplicityCorrelationsComponent)
+
+/*
+ * ---------------------------------------------------------------------------------
+ *                            Constructor / Destructor
+ * ---------------------------------------------------------------------------------
+ */
+
+// #################################################################################
+AliHLTMultiplicityCorrelationsComponent::AliHLTMultiplicityCorrelationsComponent() :
+  AliHLTProcessor(),
+  fESDTrackCuts(NULL),  
+  fCorrObj(NULL) {
+  // an example component which implements the ALICE HLT processor
+  // interface and does some analysis on the input raw data
+  //
+  // see header file for class documentation
+  // or
+  // refer to README to build package
+  // or
+  // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
+  //
+  // NOTE: all helper classes should be instantiated in DoInit()
+}
+
+// #################################################################################
+AliHLTMultiplicityCorrelationsComponent::~AliHLTMultiplicityCorrelationsComponent() {
+  // see header file for class documentation
+}
+
+/*
+ * ---------------------------------------------------------------------------------
+ * Public functions to implement AliHLTComponent's interface.
+ * These functions are required for the registration process
+ * ---------------------------------------------------------------------------------
+ */
+
+// #################################################################################
+const Char_t* AliHLTMultiplicityCorrelationsComponent::GetComponentID() { 
+  // see header file for class documentation
+  return "MultiplicityCorrelations";
+}
+
+// #################################################################################
+void AliHLTMultiplicityCorrelationsComponent::GetInputDataTypes( vector<AliHLTComponentDataType>& list) {
+  // see header file for class documentation
+  list.push_back(kAliHLTDataTypeESDObject|kAliHLTDataOriginAny);
+}
+
+// #################################################################################
+AliHLTComponentDataType AliHLTMultiplicityCorrelationsComponent::GetOutputDataType() {
+  // see header file for class documentation
+  return kAliHLTDataTypeTObject|kAliHLTDataOriginHLT;
+}
+
+// #################################################################################
+void AliHLTMultiplicityCorrelationsComponent::GetOutputDataSize( ULong_t& constBase, Double_t& inputMultiplier ) {
+  // see header file for class documentation
+  constBase = 1000;
+  inputMultiplier = 0.5;
+}
+
+// #################################################################################
+void AliHLTMultiplicityCorrelationsComponent::GetOCDBObjectDescription( TMap* const targetMap) {
+  // see header file for class documentation
+
+  if (!targetMap) return;
+  targetMap->Add(new TObjString("HLT/ConfigGlobal/MultiplicityCorrelations"),
+                new TObjString("configuration object"));
+
+  return;
+}
+
+// #################################################################################
+AliHLTComponent* AliHLTMultiplicityCorrelationsComponent::Spawn() {
+  // see header file for class documentation
+  return new AliHLTMultiplicityCorrelationsComponent;
+}
+
+/*
+ * ---------------------------------------------------------------------------------
+ * Protected functions to implement AliHLTComponent's interface.
+ * These functions provide initialization as well as the actual processing
+ * capabilities of the component. 
+ * ---------------------------------------------------------------------------------
+ */
+
+// #################################################################################
+Int_t AliHLTMultiplicityCorrelationsComponent::DoInit( Int_t argc, const Char_t** argv ) {
+  // see header file for class documentation
+
+  Int_t iResult=0;
+
+  // -- Initialize members
+  // -----------------------
+  do {
+    if (iResult<0) break;
+
+
+    fCorrObj = new AliHLTMultiplicityCorrelations;
+    if (!fCorrObj) {
+      iResult=-ENOMEM;
+      break;
+    }
+
+    fESDTrackCuts = new AliESDtrackCuts("AliESDtrackCuts","HLT");
+    if (!fESDTrackCuts) {
+      iResult=-ENOMEM;
+      break;
+    }
+
+    // implement further initialization
+  } while (0);
+
+  if (iResult<0) {
+    // implement cleanup
+
+    if (fCorrObj) 
+      delete fCorrObj;
+    fCorrObj = NULL;
+
+    if (fESDTrackCuts) 
+      delete fESDTrackCuts;
+    fESDTrackCuts = NULL;
+  }
+
+  if (iResult>=0) {
+    SetDefaultConfiguration();
+
+    // -- Read configuration object : HLT/ConfigGlobal/MultiplicityCorrelations
+    TString cdbPath="HLT/ConfigGlobal/";
+    cdbPath+=GetComponentID();
+    iResult=ConfigureFromCDBTObjString(cdbPath);
+    
+    // -- Read the component arguments
+    if (iResult>=0) {
+      iResult=ConfigureFromArgumentString(argc, argv);
+    }
+  }
+
+  if (iResult>=0) {
+    HLTInfo("ESD track cuts : %s",fESDTrackCuts->GetTitle() );
+
+    fCorrObj->SetESDTrackCuts(fESDTrackCuts);
+    fCorrObj->Initialize();
+  }
+
+  return iResult;
+}
+
+// #################################################################################
+void AliHLTMultiplicityCorrelationsComponent::SetDefaultConfiguration() {
+  // see header file for class documentation
+
+  if (fESDTrackCuts) {
+    fESDTrackCuts->SetEtaRange(-0.9,0.9);
+    fESDTrackCuts->SetPtRange(0.2,200);
+    fESDTrackCuts->SetMinNClustersTPC(80);
+    
+    fESDTrackCuts->SetDCAToVertex2D(kFALSE);
+    fESDTrackCuts->SetRequireSigmaToVertex(kFALSE);
+    
+    fESDTrackCuts->SetMaxDCAToVertexXY(3.0);
+    fESDTrackCuts->SetMaxDCAToVertexZ(3.0);
+    
+    fESDTrackCuts->SetRequireTPCRefit(kFALSE);
+    fESDTrackCuts->SetRequireITSRefit(kFALSE);
+  }
+  return;
+}
+
+// #################################################################################
+Int_t AliHLTMultiplicityCorrelationsComponent::ScanConfigurationArgument(Int_t argc, const Char_t** argv) {
+  // Scan configuration arguments
+  // Return the number of processed arguments
+  //        -EPROTO if argument format error (e.g. number expected but not found)
+  //
+  // The AliHLTComponent base class implements a parsing loop for argument strings and
+  // arrays of strings which is invoked by ConfigureFromArgumentString/ConfigureFromCDBTObjString
+  // The component needs to implement ScanConfigurationArgument in order to decode the arguments.
+
+  if (argc<=0) return 0;
+  Int_t ii =0;
+  TString argument=argv[ii];
+  
+  if (argument.IsNull()) return 0;
+
+  if( !fESDTrackCuts){
+    HLTError("No ESD track cuts availible");
+    return -ENOMEM;
+  }
+
+  // ---------------------
+
+ // -maxpt
+  if (argument.CompareTo("-maxpt")==0) {
+    if (++ii>=argc) return -EPROTO;
+    argument=argv[ii];
+
+    Float_t minPt, maxPt;
+    fESDTrackCuts->GetPtRange(minPt,maxPt);
+    maxPt = argument.Atof(); 
+    fESDTrackCuts->SetPtRange(minPt,maxPt);
+
+    TString title = fESDTrackCuts->GetTitle();
+    if (!title.CompareTo("No track cuts")) title = "";
+    else title += " && ";
+    title += Form("p_t < %f", maxPt);
+    fESDTrackCuts->SetTitle(title);
+    return 2;
+  }    
+
+  // -minpt
+  if (argument.CompareTo("-minpt")==0) {
+    if (++ii>=argc) return -EPROTO;
+    argument=argv[ii];
+
+    Float_t minPt, maxPt;
+    fESDTrackCuts->GetPtRange(minPt,maxPt);
+    minPt = argument.Atof(); 
+    fESDTrackCuts->SetPtRange(minPt,maxPt);
+
+    TString title = fESDTrackCuts->GetTitle();
+    if (!title.CompareTo("No track cuts")) title = "";
+    else title += " && ";
+    title += Form("p_t > %f", minPt);
+    fESDTrackCuts->SetTitle(title);
+    return 2;
+  }    
+
+  // -min-ldca
+  // minimum longitudinal dca to vertex
+  if (argument.CompareTo("-min-ldca")==0) {
+    if (++ii>=argc) return -EPROTO;
+    argument=argv[ii];
+
+    fESDTrackCuts->SetMinDCAToVertexZ(argument.Atof());
+    TString title = fESDTrackCuts->GetTitle();
+    if (!title.CompareTo("No track cuts")) title = "";
+    else title += " && ";
+    title += Form("DCAz > %f", argument.Atof());
+    fESDTrackCuts->SetTitle(title);
+    return 2;
+  }
+  
+  // -max-ldca
+  // maximum longitudinal dca to vertex
+  if (argument.CompareTo("-max-ldca")==0) {
+    if (++ii>=argc) return -EPROTO;
+    argument=argv[ii];
+
+    fESDTrackCuts->SetMaxDCAToVertexZ(argument.Atof());
+    TString title = fESDTrackCuts->GetTitle();
+    if (!title.CompareTo("No track cuts")) title = "";
+    else title += " && ";
+    title += Form("DCAz < %f", argument.Atof());
+    fESDTrackCuts->SetTitle(title);
+    return 2;
+  }
+
+  // -min-tdca
+  // minimum transverse dca to vertex
+  if (argument.CompareTo("-min-tdca")==0) {
+    if (++ii>=argc) return -EPROTO;
+    argument=argv[ii];
+
+    fESDTrackCuts->SetMinDCAToVertexXY(argument.Atof());
+    TString title = fESDTrackCuts->GetTitle();
+    if (!title.CompareTo("No track cuts")) title = "";
+    else title += " && ";
+    title += Form("DCAr > %f", argument.Atof());
+    fESDTrackCuts->SetTitle(title);
+    return 2;
+  }
+  
+  // -max-tdca
+  // maximum transverse dca to vertex
+  if (argument.CompareTo("-max-tdca")==0) {
+    if (++ii>=argc) return -EPROTO;
+    argument=argv[ii];
+
+    fESDTrackCuts->SetMaxDCAToVertexXY(argument.Atof());
+    TString title = fESDTrackCuts->GetTitle();
+    if (!title.CompareTo("No track cuts")) title = "";
+    else title += " && ";
+    title += Form("DCAr < %f", argument.Atof());
+    fESDTrackCuts->SetTitle(title);
+    return 2;
+  }
+
+  // -etarange
+  // +/- eta 
+  if (argument.CompareTo("-etarange")==0) {
+    if (++ii>=argc) return -EPROTO;
+    argument=argv[ii];
+    Float_t eta = argument.Atof();
+
+    fESDTrackCuts->SetEtaRange(-eta,eta);     
+    TString title = fESDTrackCuts->GetTitle();
+    if (!title.CompareTo("No track cuts")) title = "";
+    else title += " && ";
+    title += Form("Eta[%f,%f]", argument.Atof());
+    fESDTrackCuts->SetTitle(title);
+    return 2;
+  }
+
+
+  // -- BINNING --------------
+
+  // binningVzero
+  if (argument.CompareTo("-binningVzero")==0) {
+    if (++ii>=argc) return -EPROTO;
+    argument=argv[ii];
+    Int_t binning = argument.Atoi();
+    if (++ii>=argc) return -EPROTO;
+    argument=argv[ii];
+    Float_t min = argument.Atof();
+    if (++ii>=argc) return -EPROTO;
+    argument=argv[ii];
+    Float_t max = argument.Atof();
+
+    fCorrObj->SetBinningVzero(binning, min, max);
+    return 4;
+  }
+
+  // binningTpc
+  if (argument.CompareTo("-binningTpc")==0) {
+    if (++ii>=argc) return -EPROTO;
+    argument=argv[ii];
+    Int_t binning = argument.Atoi();
+    if (++ii>=argc) return -EPROTO;
+    argument=argv[ii];
+    Float_t min = argument.Atof();
+    if (++ii>=argc) return -EPROTO;
+    argument=argv[ii];
+    Float_t max = argument.Atof();
+
+    fCorrObj->SetBinningTpc(binning, min, max);
+    return 4;
+  }
+
+  // binningZdc
+  if (argument.CompareTo("-binningZdc")==0) {
+    if (++ii>=argc) return -EPROTO;
+    argument=argv[ii];
+    Int_t binning = argument.Atoi();
+    if (++ii>=argc) return -EPROTO;
+    argument=argv[ii];
+    Float_t min = argument.Atof();
+    if (++ii>=argc) return -EPROTO;
+    argument=argv[ii];
+    Float_t max = argument.Atof();
+
+    fCorrObj->SetBinningZdc(binning, min, max);
+    return 4;
+  }
+
+  // binningZnp
+  if (argument.CompareTo("-binningZnp")==0) {
+    if (++ii>=argc) return -EPROTO;
+    argument=argv[ii];
+    Int_t binning = argument.Atoi();
+    if (++ii>=argc) return -EPROTO;
+    argument=argv[ii];
+    Float_t min = argument.Atof();
+    if (++ii>=argc) return -EPROTO;
+    argument=argv[ii];
+    Float_t max = argument.Atof();
+
+    fCorrObj->SetBinningZnp(binning, min, max);
+    return 4;
+  }
+
+  // binningZem
+  if (argument.CompareTo("-binningZem")==0) {
+    if (++ii>=argc) return -EPROTO;
+    argument=argv[ii];
+    Int_t binning = argument.Atoi();
+    if (++ii>=argc) return -EPROTO;
+    argument=argv[ii];
+    Float_t min = argument.Atof();
+    if (++ii>=argc) return -EPROTO;
+    argument=argv[ii];
+    Float_t max = argument.Atof();
+
+    fCorrObj->SetBinningZem(binning, min, max);
+    return 4;
+  }
+
+  // unknown argument
+  return -EINVAL;
+}
+
+// #################################################################################
+Int_t AliHLTMultiplicityCorrelationsComponent::DoDeinit() {
+  // see header file for class documentation
+
+  if (fCorrObj) 
+    delete fCorrObj;
+  fCorrObj = NULL;
+  
+  if (fESDTrackCuts) 
+    delete fESDTrackCuts;
+  fESDTrackCuts = NULL;
+  
+  return 0;
+}
+
+// #################################################################################
+Int_t AliHLTMultiplicityCorrelationsComponent::DoEvent(const AliHLTComponentEventData& /*evtData*/,
+                                       AliHLTComponentTriggerData& /*trigData*/) {
+  // see header file for class documentation
+
+  Int_t iResult=0;
+
+  // -- Only use data event
+  if (!IsDataEvent()) 
+    return 0;
+
+  // -- Get ESD object 
+  for ( const TObject *iter = GetFirstInputObject(kAliHLTDataTypeESDObject); iter != NULL; iter = GetNextInputObject() ) {
+
+    AliESDEvent *esdEvent = dynamic_cast<AliESDEvent*>(const_cast<TObject*>( iter ) );
+    if( !esdEvent ){ 
+      HLTWarning("Wrong ESDEvent object received");
+      iResult = -1;
+      continue;
+    }
+    esdEvent->GetStdContent();
+    iResult = fCorrObj->ProcessEvent(esdEvent);
+  }
+
+  if (iResult) {
+    HLTError("Error while processing event inside multiplicity correlation object");
+    return iResult;
+  }
+
+  // -- Send histlist
+  PushBack(dynamic_cast<TObject*>(fCorrObj->GetHistList()),
+          kAliHLTDataTypeTObject|kAliHLTDataOriginHLT,0);
+  return iResult;
+}
+
+// #################################################################################
+Int_t AliHLTMultiplicityCorrelationsComponent::Reconfigure(const Char_t* cdbEntry, const Char_t* chainId) {
+  // see header file for class documentation
+
+  Int_t iResult=0;
+  TString cdbPath;
+  if (cdbEntry) {
+    cdbPath=cdbEntry;
+  } else {
+    cdbPath="HLT/ConfigGlobal/";
+    cdbPath+=GetComponentID();
+  }
+
+  AliInfoClass(Form("reconfigure '%s' from entry %s%s", chainId, cdbPath.Data(), cdbEntry?"":" (default)"));
+  iResult=ConfigureFromCDBTObjString(cdbPath);
+
+  return iResult;
+}
+
+// #################################################################################
+Int_t AliHLTMultiplicityCorrelationsComponent::ReadPreprocessorValues(const Char_t* /*modules*/) {
+  // see header file for class documentation
+  ALIHLTERRORGUARD(5, "ReadPreProcessorValues not implemented for this component");
+  return 0;
+}
diff --git a/HLT/global/physics/AliHLTMultiplicityCorrelationsComponent.h b/HLT/global/physics/AliHLTMultiplicityCorrelationsComponent.h
new file mode 100644 (file)
index 0000000..0428cb6
--- /dev/null
@@ -0,0 +1,223 @@
+//-*- Mode: C++ -*-
+// $Id: AliHLTMultiplicityCorrelationsComponent $
+
+#ifndef ALIHLTMULTIPLICITYCORRELATIONSCOMPONENT_H
+#define ALIHLTMULTIPLICITYCORRELATIONSCOMPONENT_H
+
+/* This file is property of and copyright by the ALICE HLT Project        * 
+ * ALICE Experiment at CERN, All rights reserved.                         *
+ * See cxx source for full Copyright notice                               */
+
+/** @file    AliHLTMultiplicityCorrelationsComponent.h
+    @author  Jochen Thaeder <jochen@thaeder.de>
+    @brief   Component for Multiplicty Correlations
+*/
+
+// see below for class documentation
+// or
+// refer to README to build package
+// or
+// visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
+
+
+#include "AliHLTProcessor.h"
+
+class AliESDtrackCuts;
+class AliHLTMultiplicityCorrelations;
+
+/**
+ * @class AliHLTMultiplicityCorrelationsComponent
+ * Create Correlations for Multiplicities
+ * 
+ * <h2>General properties:</h2>
+ *
+ * Component ID: \b MultiplicityCorrelations <br>
+ * Library: \b libAliHLTGlobal.so     <br>
+ * Input Data Types:  @ref kAliHLTDataTypeESDObject <br>
+ * Output Data Types: @ref kAliHLTDataTypeTObject|kAliHLTDataOriginHLT <br>
+ *
+ * <h2>Mandatory arguments:</h2>
+ * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting --> 
+ *
+ * <h2>Optional arguments:</h2>
+ * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
+ *
+ * <h2>Configuration:</h2>
+ * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
+ *
+ * \li -minpt    <i> pt  </i> <br>
+ *      minimum pt - pt range
+ * \li -maxpt    <i> pt  </i> <br>
+ *      maximum pt - pt range
+ * \li -min-ldca    <i> dca  </i> <br>
+ *      minimum longitudinal dca to reference point
+ * \li -max-ldca    <i> dca  </i> <br>
+ *      maximum longitudinal dca to reference point
+ * \li -min-tdca    <i> dca  </i> <br>
+ *      minimum transverse dca to reference point
+ * \li -max-tdca    <i> dca  </i> <br>
+ *      maximum transverse dca to reference point
+ * \li -etarange    <i> eta  </i> <br>
+ *      +/- eta range
+ *
+ * \li -binningVzero    <i> bins min max  </i> <br>
+ *       bins (Int_t), minBin (Float_t), maxBin (Float_t)
+ * \li -binningTpc      <i> bins min max  </i> <br>
+ *       bins (Int_t), minBin (Float_t), maxBin (Float_t)
+ * \li -binningZdc      <i> bins min max  </i> <br>
+ *       bins (Int_t), minBin (Float_t), maxBin (Float_t)
+ * \li -binningZnp    <i> bins min max  </i> <br>
+ *       bins (Int_t), minBin (Float_t), maxBin (Float_t)
+ * \li -binningZem    <i> bins min max  </i> <br>
+ *       bins (Int_t), minBin (Float_t), maxBin (Float_t)
+ *
+ * <h2>Default CDB entries:</h2>
+ * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
+ *
+ * <tt>HLT/ConfigGlobal/MultiplicityCorrelations</tt>
+ * \li -TObjString object holding a string with the configuration parameters
+ *      currently empty 
+ *
+ * <h2>Performance:</h2>
+ *
+ * <h2>Memory consumption:</h2>
+ *
+ * <h2>Input size:</h2>
+ * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
+ *
+ * \li pp: 
+ *
+ * <h2>Output size:</h2>
+ * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
+ *
+ * \li pp: Average : 
+ *
+ * <h2>Macros Tests</h2>
+ * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
+ *
+ * <tt>macros/makeConfigurationObjectMultiplicityCorrelations.C</tt>
+ * \li - Create configuration TObjString
+ *
+ * <tt>macros/HLTMultiplicityCorrelationsTest.C</tt>
+ * \li - Test macro for test in off-line environment
+ *
+ * <tt>macros/runMultiplicityCorrelationsTest.sh</tt>
+ * \li - Run Test macro HLTMultiplicityCorrelationsTest.C
+ *
+ * @ingroup alihlt_physics
+ */
+class AliHLTMultiplicityCorrelationsComponent : public AliHLTProcessor {
+public:
+
+  /*
+   * ---------------------------------------------------------------------------------
+   *                            Constructor / Destructor
+   * ---------------------------------------------------------------------------------
+   */
+
+  /** constructor */
+  AliHLTMultiplicityCorrelationsComponent();
+  
+  /** destructor */
+  virtual ~AliHLTMultiplicityCorrelationsComponent();
+
+  /*
+   * ---------------------------------------------------------------------------------
+   * Public functions to implement AliHLTComponent's interface.
+   * These functions are required for the registration process
+   * ---------------------------------------------------------------------------------
+   */
+
+  /** interface function, see @ref AliHLTComponent for description */
+  const Char_t* GetComponentID();
+
+  /** interface function, see @ref AliHLTComponent for description */
+  void GetInputDataTypes( vector<AliHLTComponentDataType>& list);
+
+  /** interface function, see @ref AliHLTComponent for description */
+  AliHLTComponentDataType GetOutputDataType();
+
+  /** interface function, see @ref AliHLTComponent for description */
+  void GetOutputDataSize( ULong_t& constBase, Double_t& inputMultiplier );
+
+  /** interface function, see @ref AliHLTComponent for description */
+  void GetOCDBObjectDescription( TMap* const targetMap);
+
+  /** interface function, see @ref AliHLTComponent for description */
+  AliHLTComponent* Spawn();
+
+ protected:
+
+  /*
+   * ---------------------------------------------------------------------------------
+   * Protected functions to implement AliHLTComponent's interface.
+   * These functions provide initialization as well as the actual processing
+   * capabilities of the component. 
+   * ---------------------------------------------------------------------------------
+   */
+
+  // AliHLTComponent interface functions
+
+  /** interface function, see @ref AliHLTComponent for description */
+  Int_t DoInit( Int_t argc, const Char_t** argv );
+
+  /** interface function, see @ref AliHLTComponent for description */
+  Int_t DoDeinit();
+
+  /** interface function, see @ref AliHLTComponent for description */
+  Int_t DoEvent( const AliHLTComponentEventData& evtData, AliHLTComponentTriggerData& trigData);
+
+  using AliHLTProcessor::DoEvent;
+
+  /** interface function, see @ref AliHLTComponent for description */
+  Int_t ScanConfigurationArgument(Int_t argc, const Char_t** argv);
+
+  /** interface function, see @ref AliHLTComponent for description */
+  Int_t Reconfigure(const Char_t* cdbEntry, const Char_t* chainId);
+
+  /** interface function, see @ref AliHLTComponent for description */
+  Int_t ReadPreprocessorValues(const Char_t* modules);
+  ///////////////////////////////////////////////////////////////////////////////////
+  
+private:
+
+  /*
+   * ---------------------------------------------------------------------------------
+   * Private functions to implement AliHLTComponent's interface.
+   * These functions provide initialization as well as the actual processing
+   * capabilities of the component. 
+   * ---------------------------------------------------------------------------------
+   */
+
+  /** copy constructor prohibited */
+  AliHLTMultiplicityCorrelationsComponent(const AliHLTMultiplicityCorrelationsComponent&);
+
+  /** assignment operator prohibited */
+  AliHLTMultiplicityCorrelationsComponent& operator=(const AliHLTMultiplicityCorrelationsComponent&);
+
+
+  /*
+   * ---------------------------------------------------------------------------------
+   *                              Helper
+   * ---------------------------------------------------------------------------------
+   */
+
+  /** Set Default Configuartion for track cuts */
+  void SetDefaultConfiguration();
+
+  /*
+   * ---------------------------------------------------------------------------------
+   *                             Members - private
+   * ---------------------------------------------------------------------------------
+   */
+  
+  /** ESD track cuts */
+  AliESDtrackCuts *fESDTrackCuts;             //! transient
+
+  /** correlations object */
+  AliHLTMultiplicityCorrelations *fCorrObj;   //! transient
+
+  ClassDef(AliHLTMultiplicityCorrelationsComponent, 0)
+};
+#endif
diff --git a/HLT/global/physics/macros/HLTMultiplicityCorrelationsTest.C b/HLT/global/physics/macros/HLTMultiplicityCorrelationsTest.C
new file mode 100644 (file)
index 0000000..bf4d899
--- /dev/null
@@ -0,0 +1,128 @@
+/**
+ * @file HLTMultiplicityCorrelationsTest.C
+ * @brief Macro for testing HLT MultipicityCorrelations
+ *
+ * This macro uses the ESDMCEventPublisher to publish AliESDEvents.
+ * 
+ * Results are written to disk by a rootfile writer
+ *
+ * @author Jochen Thaeder <jochen@thaeder.de>
+ * @ingroup alihlt_physics
+ */
+
+
+// ---------------------------------------------------------------------------- 
+
+/** HLTMultiplicityCorrelationsTest test macro
+ *  @param nEvents Number of events which should be processed
+ */
+void HLTMultiplicityCorrelationsTest(const Char_t* esdpath="./",
+                                    const Char_t *cdbURI="local://$ALICE_ROOT/OCDB", 
+                                    Int_t nEvents=1) {
+  
+  // -- Set the CDB storage location
+  // ---------------------------------
+  AliCDBManager * man = AliCDBManager::Instance();
+  man->SetDefaultStorage(cdbURI);
+  man->SetRun(120000);
+
+  TString writerInput;
+  TString analysisInput;
+
+  // -- Switch Logging
+  // -------------------
+  AliLog::SetGlobalLogLevel( AliLog::kError );
+  AliHLTLogging log;
+  log.SwitchAliLog(0);
+
+  // -- Initialize HLT
+  // -------------------
+  AliHLTSystem gHLT;
+  gHLT.SetGlobalLoggingLevel(0x7D);
+  
+  gHLT.LoadComponentLibraries("libESD.so");  
+  gHLT.LoadComponentLibraries("libSTEER.so");  
+  gHLT.LoadComponentLibraries("libSTEERBase.so");  
+  gHLT.LoadComponentLibraries("libAOD.so");  
+  gHLT.LoadComponentLibraries("libANALYSIS.so");  
+  gHLT.LoadComponentLibraries("libANALYSISalice.so");  
+
+  gHLT.LoadComponentLibraries("libHLTbase.so");
+  gHLT.LoadComponentLibraries("libAliHLTUtil.so");
+
+  /*
+    gHLT.LoadComponentLibraries("libAliHLTMUON.so");  
+    gHLT.LoadComponentLibraries("libAliHLTTPC.so");  
+    gHLT.LoadComponentLibraries("libAliHLTTRD.so");  
+  */
+
+  gHLT.LoadComponentLibraries("libAliHLTGlobal.so");  
+
+  // ----------------------------//
+  // -                         - //
+  // -- Parameters            -- //
+  // -                         - //
+  // ----------------------------//
+
+  TString esdPath(esdpath);
+
+  // ----------------------------//
+  // -                         - //
+  // -- Publisher  Components -- //
+  // -                         - //
+  // ----------------------------//
+
+  // ------------------------------------------
+  // -- The ESDMCEventPublisher   
+  // ------------------------------------------
+  TString publisherId("ESDMCEventPublisher");
+  // ------------------------------------------
+  TString publisherArg(Form("-entrytype ESD -datapath %s", esdPath.Data()));
+  
+  AliHLTConfiguration ESDMCEventPublisher(publisherId.Data(), publisherId.Data(), NULL, publisherArg.Data() );
+  
+  if (!analysisInput.IsNull()) analysisInput+=" ";
+  analysisInput += publisherId;
+    
+  // ----------------------------//
+  // -                         - //
+  // -- Processing Components -- //
+  // -                         - //
+  // ----------------------------//
+
+  // ------------------------------------------
+  // -- Analysis
+  // ------------------------------------------
+  TString analysisId("MultiplicityCorrelations");
+  // ------------------------------------------
+
+  TString analysisArg("");
+  
+  AliHLTConfiguration analysis(analysisId.Data(),analysisId.Data(),
+                              analysisInput.Data(), analysisArg.Data()); 
+  
+  if (!writerInput.IsNull()) writerInput+=" ";
+  writerInput += analysisId;
+
+  // ----------------------------//
+  // -                         - //
+  // --    Sink Components    -- //
+  // -                         - //
+  // ----------------------------//
+  
+  TString writerArg(Form("-directory analysis -datafile analysis_%d_%s.root", nEvents, analysisId.Data() ));
+
+  // -- The RootFileWriter 
+  AliHLTConfiguration rootWriter("RootWriter", "ROOTFileWriter", writerInput.Data(), writerArg.Data() );
+  
+  // --------------------------- //
+  // -                         - //
+  // --         Run           -- //
+  // -                         - //
+  // --------------------------- //
+
+  gHLT.BuildTaskList("RootWriter");
+  gHLT.Run(nEvents);
+
+  return;
+}
diff --git a/HLT/global/physics/macros/makeConfigurationObjectMultiplicityCorrelations.C b/HLT/global/physics/macros/makeConfigurationObjectMultiplicityCorrelations.C
new file mode 100644 (file)
index 0000000..fffe9d7
--- /dev/null
@@ -0,0 +1,86 @@
+//-*- Mode: C++ -*-
+// $Id: makeConfigurationObjectMultiplicityCorrelations.C$
+/**
+ * @file makeConfigurationObjectMultiplicityCorrelations.C
+ * @brief Creation of HLT component configuration objects in OCDB
+ *
+ * <pre>
+ * Usage: aliroot -b -q makeConfigurationObjectMultiplicityCorrelations.C'("param", "uri", runMin, runMax)'
+ * </pre>
+ *
+ * Create an OCDB entry with a TObjString containing param for
+ * MultiplicityCorrelations
+ *
+ * Parameters: <br>
+ * - param (opt)    string to be stored in the TObjSting, default empty
+ * - uri   (opt)    the OCDB URI, default $ALICE_ROOT   
+ * - runMin (opt)   default 0
+ * - runMax (opt)   default 999999999
+ * 
+ * Current Param : 
+ *  - ""  <pre> aliroot -b -q makeConfigurationObjectMultiplicityCorrelations.C </pre>
+ *
+ * @author Jochen Thaeder <jochen@thaeder.de>
+ * @ingroup alihlt_physics
+ */
+void makeConfigurationObjectMultiplicityCorrelations(const Char_t* param="", const Char_t* cdbUri=NULL,
+                                     Int_t runMin=0, Int_t runMax=AliCDBRunRange::Infinity()) {
+
+  // --------------------------------------
+  // -- Setup CDB
+  // --------------------------------------
+
+  AliCDBManager* man = AliCDBManager::Instance();
+  if (!man) {
+    cerr << "Error : Can not get AliCDBManager" << end;
+    exit;
+  }
+
+  TString storage;
+  if (!man->IsDefaultStorageSet()) {
+    if ( cdbUri ) {
+      storage = cdbUri;
+      if ( storage.Contains("://") == 0 ) {
+       storage = "local://"; 
+       storage += cdbUri;
+      }
+    } 
+    else {
+      storage="local://$ALICE_ROOT/OCDB";
+    }
+    man->SetDefaultStorage(storage);
+  } 
+  else {
+    storage = man->GetDefaultStorage()->GetURI();
+  }
+
+  TString path("HLT/ConfigGlobal/MultiplicityCorrelations");
+
+  // --------------------------------------
+  // -- Create Config Object
+  // --------------------------------------
+
+  // here is the actual content of the configuration object
+  TObjString configParam=param;
+
+  TObject *configObj = static_cast<TObject*>(&configParam);
+  // --------------------------------------
+  // -- Fill Object
+  // --------------------------------------
+  
+  if ( !configObj ) {
+    cerr << "Error : No configuration object created" << endl;
+    return;
+  }
+    
+  AliCDBPath cdbPath(path);
+  AliCDBId   cdbId(cdbPath, runMin, runMax);
+  AliCDBMetaData cdbMetaData;
+  man->Put(configObj, cdbId, &cdbMetaData);
+
+  printf("Adding %s type OCDB object to %s [%d,%d] in %s \n",
+        configObj->ClassName(), 
+        path.Data(),
+        runMin, runMax, storage.Data());
+}
+
diff --git a/HLT/global/physics/macros/runMultiplicityCorrelationsTest.sh b/HLT/global/physics/macros/runMultiplicityCorrelationsTest.sh
new file mode 100755 (executable)
index 0000000..5b857dc
--- /dev/null
@@ -0,0 +1,34 @@
+#!/bin/bash
+
+# -------------------------------------------
+# Test MultiplictyCorrelations
+# Author Jochen Thaeder <jochen@thaeder.de>
+# -------------------------------------------
+
+# N events
+NEVENTS=1
+
+# Path to ESD
+ESDPATH="/lustre/alice/jthaeder/data/v4-20-Rev-01/2760TeV/000001"
+
+# -------------------------------------------
+
+pushd $ESDPATH > /dev/null
+
+#rm *.root  2> /dev/null
+#rm *.log   2> /dev/null
+#rm *.ps    2> /dev/null
+
+if [ ! -d ./analysis ] ; then
+    mkdir analysis
+else
+    rm ./analysis/*
+fi
+
+# -- Create config CDB object 
+aliroot -l -q -b ${ALICE_ROOT}/HLT/global/physics/macros/makeConfigurationObjectMultiplicityCorrelations.C 2>&1 | tee configLog.log
+
+# -- run chain for raw.root file
+aliroot -l -q -b $ALICE_ROOT/HLT/global/physics/macros/HLTMultiplicityCorrelationsTest.C'("'${ESDPATH}'","local://$ALICE_ROOT/OCDB",'${NEVENTS}')' 2>&1 | tee out.log
+
+popd > /dev/null