Various upgrades and bug fixes etc
authorhdalsgaa <hdalsgaa@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 31 Aug 2010 19:31:28 +0000 (19:31 +0000)
committerhdalsgaa <hdalsgaa@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 31 Aug 2010 19:31:28 +0000 (19:31 +0000)
12 files changed:
PWG2/FORWARD/analysis/AddTaskFMD.C
PWG2/FORWARD/analysis/AliFMDAnaCalibBackgroundCorrection.cxx
PWG2/FORWARD/analysis/AliFMDAnaCalibBackgroundCorrection.h
PWG2/FORWARD/analysis/AliFMDAnaParameters.cxx
PWG2/FORWARD/analysis/AliFMDAnaParameters.h
PWG2/FORWARD/analysis/AliFMDAnalysisTaskBackgroundCorrection.cxx
PWG2/FORWARD/analysis/AliFMDAnalysisTaskDndeta.cxx
PWG2/FORWARD/analysis/AliFMDAnalysisTaskGenerateCorrection.cxx
PWG2/FORWARD/analysis/AliFMDAnalysisTaskSE.cxx
PWG2/FORWARD/analysis/AliFMDAnalysisTaskSharing.cxx
PWG2/FORWARD/analysis/AliFMDDndeta.cxx
PWG2/FORWARD/analysis/SubmitFMDCorrections.C

index 979ff7a..8e4f5a7 100644 (file)
@@ -33,7 +33,7 @@ AliFMDAnalysisTaskSE* AddTaskFMD() {
   pars->Init();
   
   TString outputfile = AliAnalysisManager::GetCommonFileName();
-  outputfile += Form(":%s",pars->GetDndetaAnalysisName().Data());
+  outputfile += Form(":%s",pars->GetDndetaAnalysisName());
 
   AliAnalysisDataContainer *cout_fmd = mgr->CreateContainer("BackgroundCorrected", TList::Class(), AliAnalysisManager::kOutputContainer,outputfile);                             
   mgr->ConnectInput(taskfmd, 0, mgr->GetCommonInputContainer());
index 8732081..0b6a4fb 100644 (file)
@@ -14,7 +14,8 @@ AliFMDAnaCalibBackgroundCorrection::AliFMDAnaCalibBackgroundCorrection() : TObje
                                                                           fArray(),
                                                                           fAxis(),
                                                                           fIsInit(kFALSE),
-                                                                          fListOfDoubleHitCorrection()
+                                                                          fListOfDoubleHitCorrection(),
+                                                                          fListOfNSDBgMaps()
 {
   
   
@@ -24,7 +25,7 @@ AliFMDAnaCalibBackgroundCorrection::AliFMDAnaCalibBackgroundCorrection() : TObje
 
 //____________________________________________________________________
 AliFMDAnaCalibBackgroundCorrection::AliFMDAnaCalibBackgroundCorrection(const AliFMDAnaCalibBackgroundCorrection& o)
-  : TObject(o), fArray(o.fArray), fAxis(o.fAxis), fIsInit(o.fIsInit), fListOfDoubleHitCorrection()
+  : TObject(o), fArray(o.fArray), fAxis(o.fAxis), fIsInit(o.fIsInit), fListOfDoubleHitCorrection(), fListOfNSDBgMaps()
 {
   // Copy ctor 
 }
@@ -47,7 +48,24 @@ TH2F* AliFMDAnaCalibBackgroundCorrection::GetBgCorrection(Int_t det,
   TH2F* hCorrection    = (TH2F*)ringArray->At(vtxbin);
   return hCorrection;
 }
-
+//____________________________________________________________________
+void AliFMDAnaCalibBackgroundCorrection::SetNSDBgCorrection(Int_t det, 
+                                                           Char_t ring, 
+                                                           Int_t vtxbin, 
+                                                           TH2F* hCorrection) {
+  if(!fIsInit)
+    Init();
+  hCorrection->SetName(Form("FMDNSD%d%c_vtxbin_%d_correction",det,ring,vtxbin));
+  fListOfNSDBgMaps.Add(hCorrection);
+    
+}
+//____________________________________________________________________
+TH2F* AliFMDAnaCalibBackgroundCorrection::GetNSDBgCorrection(Int_t det, 
+                                                            Char_t ring, 
+                                                            Int_t vtxbin) {
+  TH2F* hCorrection    = (TH2F*)fListOfNSDBgMaps.FindObject(Form("FMDNSD%d%c_vtxbin_%d_correction",det,ring,vtxbin));
+  return hCorrection;
+}
 //____________________________________________________________________
 void AliFMDAnaCalibBackgroundCorrection::SetBgCorrection(Int_t det, 
                                                         Char_t ring, 
index f31ba89..a4664b1 100644 (file)
@@ -26,6 +26,9 @@ class AliFMDAnaCalibBackgroundCorrection : public TObject
   
   TH2F*   GetBgCorrection(Int_t det, Char_t ring, Int_t vtxbin);
   void    SetBgCorrection(Int_t det, Char_t ring, Int_t vtxbin, TH2F* hCorrection);
+  TH2F*   GetNSDBgCorrection(Int_t det, Char_t ring, Int_t vtxbin);
+  void    SetNSDBgCorrection(Int_t det, Char_t ring, Int_t vtxbin, TH2F* hCorrection);
+  
   TH1F*   GetDoubleHitCorrection(Int_t det, Char_t ring);
   void    SetDoubleHitCorrection(Int_t det, Char_t ring, TH1F* hCorrection);
   TH1F*   GetSPDDeadCorrection(Int_t vtxbin);
@@ -43,7 +46,8 @@ class AliFMDAnaCalibBackgroundCorrection : public TObject
   TAxis      fAxis;
   Bool_t     fIsInit;
   TList      fListOfDoubleHitCorrection;
-  ClassDef(AliFMDAnaCalibBackgroundCorrection,2);
+  TList      fListOfNSDBgMaps;
+  ClassDef(AliFMDAnaCalibBackgroundCorrection,3);
 };
 
 #endif
index 72c0439..a7d61de 100644 (file)
@@ -39,6 +39,7 @@
 #include "AliESDEvent.h"
 #include "AliESDVertex.h"
 
+
 //====================================================================
 ClassImp(AliFMDAnaParameters)
 #if 0
@@ -95,17 +96,18 @@ AliFMDAnaParameters::AliFMDAnaParameters() :
   fTriggerInel(kFALSE),
   fTriggerNSD(kFALSE),
   fTriggerEmpty(kFALSE),
-  fUseBuiltInNSD(kFALSE)
+  fUseBuiltInNSD(kFALSE),
+  fInelGtZero(kFALSE)
 {
   // Default constructor 
-  fPhysicsSelection = new AliPhysicsSelection;
-  fPhysicsSelection->SetAnalyzeMC(kTRUE); //For the background correction. This is reset in Init if relevant
+  //  fPhysicsSelection = new AliPhysicsSelection;
+  //  fPhysicsSelection->SetAnalyzeMC(kTRUE); //For the background correction. This is reset in Init if relevant
   // fPhysicsSelection->SetUseBXNumbers(kFALSE);
   
   
-  AliBackgroundSelection* backgroundSelection = new AliBackgroundSelection("bg","bg");
-  backgroundSelection->Init();
-  fPhysicsSelection->AddBackgroundIdentification(backgroundSelection);
+  //  AliBackgroundSelection* backgroundSelection = new AliBackgroundSelection("bg","bg");
+  //  backgroundSelection->Init();
+  //  fPhysicsSelection->AddBackgroundIdentification(backgroundSelection);
   //fPhysicsSelection->Initialize(104792);
   // Do not use this - it is only for IO 
   fgInstance = this;
@@ -124,7 +126,7 @@ char* AliFMDAnaParameters::GetPath(const char* species) {
                fTrigger,
                fMagField,
                fSpecies,
-               0,
+               fInelGtZero,
                0);
   if(species == fgkEnergyDistributionID)
     path = Form("%s/%s_%d_%d_%d_%d_%d_%d.root",
@@ -144,7 +146,7 @@ char* AliFMDAnaParameters::GetPath(const char* species) {
                fTrigger,
                fMagField,
                fSpecies,
-               0,
+               fInelGtZero,
                0);
   if(species == fgkSharingEffID)
     path = Form("%s/%s_%d_%d_%d_%d_%d_%d.root",
@@ -163,7 +165,16 @@ char* AliFMDAnaParameters::GetPath(const char* species) {
 void AliFMDAnaParameters::Init(Bool_t forceReInit, UInt_t what)
 {
   // Initialize the parameters manager.  We need to get stuff from files here.
-   
+  
+  /*  AliPhysicsSelection* test = (AliPhysicsSelection*)((AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->GetEventSelection();
+  
+    if(fPhysicsSelection) {
+    if(!fRealData) {
+      fPhysicsSelection->SetAnalyzeMC(kTRUE);
+    }
+    else fPhysicsSelection->SetAnalyzeMC(kFALSE);
+  }
+  */
   if (forceReInit) fIsInit = kFALSE;
   if (fIsInit) return;
   if (what & kBackgroundCorrection)       InitBackground();
@@ -176,11 +187,7 @@ void AliFMDAnaParameters::Init(Bool_t forceReInit, UInt_t what)
   if(fBackground)
     FindEtaLimits();
   
-  if(!fRealData) {
-    fPhysicsSelection->SetAnalyzeMC(kTRUE);
-  }
-  else fPhysicsSelection->SetAnalyzeMC(kFALSE);
-  
     
 }
 //____________________________________________________________________
@@ -323,13 +330,17 @@ void AliFMDAnaParameters::PrintStatus() const
   default:
     datastring.Form("Unknown"); break ;
   }
-    
-  std::cout<<"Energy      = "<<energystring.Data()<<std::endl;
-  std::cout<<"Trigger     = "<<triggerstring.Data()<<std::endl;
-  std::cout<<"Mag Field   = "<<magstring.Data()<<std::endl;
-  std::cout<<"Coll System = "<<collsystemstring.Data()<<std::endl;
-  std::cout<<"Data origin = "<<datastring.Data()<<std::endl;
   
+  TString InelString;
+  if(fInelGtZero) InelString = "INEL > 0";
+  else InelString = "INEL";
+  
+  std::cout<<"Energy       = "<<energystring.Data()<<std::endl;
+  std::cout<<"Trigger      = "<<triggerstring.Data()<<std::endl;
+  std::cout<<"Mag Field    = "<<magstring.Data()<<std::endl;
+  std::cout<<"Coll System  = "<<collsystemstring.Data()<<std::endl;
+  std::cout<<"Data origin  = "<<datastring.Data()<<std::endl;
+  std::cout<<"Basic trigger: "<<InelString.Data()<<std::endl;
   
   
 }
@@ -516,6 +527,28 @@ TH2F* AliFMDAnaParameters::GetBackgroundCorrection(Int_t det,
   return fBackground->GetBgCorrection(det,ring,vtxbin);
 }
 //____________________________________________________________________
+TH2F* AliFMDAnaParameters::GetBackgroundCorrectionNSD(Int_t det, 
+                                                     Char_t ring, 
+                                                     Int_t vtxbin) {
+  //Get background correction histogram for NSD event class
+  if(!fIsInit) {
+    AliWarning("Not initialized yet. Call Init() to remedy");
+    return 0;
+  }
+  
+  if(vtxbin > fBackground->GetNvtxBins()) {
+    AliWarning(Form("No background object for vertex bin %d", vtxbin));
+    return 0;
+  } 
+  
+  if(fBackground->GetNSDBgCorrection(det,ring,vtxbin))
+    return fBackground->GetNSDBgCorrection(det,ring,vtxbin);
+  else 
+    AliWarning("No NSD background map. You get usual one. Difference is probablyu negligible");
+  
+  return fBackground->GetBgCorrection(det,ring,vtxbin); 
+}
+//____________________________________________________________________
 
 TH1F* AliFMDAnaParameters::GetDoubleHitCorrection(Int_t det, 
                                                  Char_t ring) {
@@ -564,7 +597,7 @@ TH2F* AliFMDAnaParameters::GetEventSelectionEfficiency(Char_t* trig, Int_t vtxbi
   //Get event selection efficiency object
   
   TString test = trig;
-  if(!test.Contains("NSD") && test.Contains("INEL")) {
+  if(!test.Contains("NSD") && !test.Contains("INEL")) {
     AliWarning("Event selection efficiency only available for INEL and NSD");
     return 0;
   }
@@ -732,34 +765,53 @@ void AliFMDAnaParameters::SetTriggerStatus(const AliESDEvent *esd) {
 
   //ULong64_t triggerMask = esd->GetTriggerMask();
   
-  TString triggers = esd->GetFiredTriggerClasses();
-  
-  //if(triggers.Contains("CINT1B-ABCE-NOPF-ALL") || triggers.Contains("CINT1B-E-NOPF-ALL")) return kTRUE;
-  //else return kFALSE;
-  //if(triggers.Contains("CINT1B-E-NOPF-ALL"))    return kFALSE;
+  AliPhysicsSelection* centralPhysicsSelection = (AliPhysicsSelection*)((AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->GetEventSelection();
   
-  // if(triggers.Contains("CINT1A-ABCE-NOPF-ALL")) return kFALSE;
-  // if(triggers.Contains("CINT1C-ABCE-NOPF-ALL")) return kFALSE;
+  if(!centralPhysicsSelection && !fPhysicsSelection) {
+    
+    std::cout<<"Creating AliPhysicsSelection object due to absence of central object"<<std::endl;
+    fPhysicsSelection = new AliPhysicsSelection;
+    fPhysicsSelection->SetAnalyzeMC(!fRealData);
+    // fPhysicsSelection->SetUseBXNumbers(kFALSE);
+    
+    
+    AliBackgroundSelection* backgroundSelection = new AliBackgroundSelection("bg","bg");
+    backgroundSelection->Init();
+    fPhysicsSelection->AddBackgroundIdentification(backgroundSelection);
+    
+  }
   
-  // definitions from p-p.cfg
-  //ULong64_t spdFO = (1 << 14);
-  // ULong64_t v0left = (1 << 11);
-  // ULong64_t v0right = (1 << 12);
+  TString triggers = esd->GetFiredTriggerClasses();
   
   AliTriggerAnalysis tAna;
-    
-  //REMOVE WHEN FINISHED PLAYING WITH TRIGGERS!
-  //fPhysicsSelection->IsCollisionCandidate(esd);
-  
-  //if(!fRealData) {
-  //  fPhysicsSelection->SetAnalyzeMC(kTRUE);
-  // }
   
   fTriggerInel  = kFALSE;
   fTriggerNSD   = kFALSE;
   fTriggerEmpty = kFALSE;
   
-  if(fPhysicsSelection->IsCollisionCandidate(esd)) {
+  UInt_t inel = kFALSE;
+  
+  if(centralPhysicsSelection) {
+    inel= ((AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->IsEventSelected();
+  }
+  else
+    inel = fPhysicsSelection->IsCollisionCandidate(esd);
+  
+  
+  
+  if(fInelGtZero && inel) {
+    const AliMultiplicity* spdmult = esd->GetMultiplicity();
+    Int_t nCentralTracklets = 0;
+    Int_t j = 0;
+    while( nCentralTracklets < 1 && j< spdmult->GetNumberOfTracklets() ) {
+      if(TMath::Abs(spdmult->GetEta(j)) < 1) nCentralTracklets++;
+      j++;
+    }
+    if(nCentralTracklets < 1) inel = kFALSE;      
+  }
+  
+  //std::cout<<fTriggerInel<<std::endl;
+  if(inel) {
     fTriggerInel = kTRUE;
   }
   
index 8bc947d..70f42ec 100644 (file)
@@ -45,6 +45,8 @@
 #include <TString.h>
 //#include "AliPWG0Helper.h"
 #include "AliESDEvent.h"
+#include "AliInputEventHandler.h"
+#include "AliAnalysisManager.h"
 //class AliESDEvent;
 
 /**
@@ -96,6 +98,7 @@ public:
   static const char* GetEventSelectionEffID()      { return fgkEventSelectionEffID;}
   static const char* GetSharingEffID()      { return fgkSharingEffID;}
   TH2F* GetBackgroundCorrection(Int_t det, Char_t ring, Int_t vtxbin);
+  TH2F* GetBackgroundCorrectionNSD(Int_t det, Char_t ring, Int_t vtxbin);
   TH1F* GetDoubleHitCorrection(Int_t det, Char_t ring);
   TH1F* GetSPDDeadCorrection(Int_t vtxbin);
   
@@ -113,6 +116,7 @@ public:
   void     SetEnergyPath(const Char_t* epath) {fEnergyPath = epath;}
   void     SetEventSelectionPath(const Char_t* evpath) {fEventSelectionEffPath = evpath;}
   void     SetSharingEfficiencyPath(const Char_t* sharpath) {fSharingEffPath = sharpath;}
+  void     SetInelGtZero(Bool_t InelGtZero) {fInelGtZero = InelGtZero;}
   void     SetProcessPrimary(Bool_t prim=kTRUE) {fProcessPrimary = prim;}
   void     SetProcessHits(Bool_t hits=kTRUE) {fProcessHits = hits;}
   Bool_t   GetProcessPrimary() const {return fProcessPrimary;} 
@@ -131,11 +135,11 @@ public:
   Species  GetCollisionSystem() const {return fSpecies;}
   void     PrintStatus() const;
   void     Print(Option_t* /* option */) const { PrintStatus(); }
-  TString  GetDndetaAnalysisName() const {return "PWG2forwardDnDeta";}
+  const Char_t*  GetDndetaAnalysisName() const {return "PWG2forwardDnDeta";}
   TH1F*    GetEnergyDistribution(Int_t det, Char_t ring, Float_t eta);
   TH1F*    GetEmptyEnergyDistribution(Int_t det, Char_t ring);
   TH1F*    GetRingEnergyDistribution(Int_t det, Char_t ring);
-  AliPhysicsSelection* GetPhysicsSelection() const {return fPhysicsSelection;}
+  AliPhysicsSelection* GetPhysicsSelection() const { return fPhysicsSelection ? fPhysicsSelection : (AliPhysicsSelection*)((AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->GetEventSelection();  /*return fPhysicsSelection;*/ }
   Bool_t   IsRealData() const {return fRealData; }
   void     SetRealData(Bool_t realdata) {fRealData = realdata;}
   Float_t  GetLowSPDLimit() const {return fSPDlowLimit;}
@@ -184,7 +188,9 @@ protected:
       fEtaHighBinLimits(o.fEtaHighBinLimits),
       fTriggerInel(o.fTriggerInel),
       fTriggerNSD(o.fTriggerNSD),
-      fTriggerEmpty(o.fTriggerEmpty)
+      fTriggerEmpty(o.fTriggerEmpty),
+      fUseBuiltInNSD(o.fUseBuiltInNSD),
+      fInelGtZero(o.fInelGtZero)
   {}
   AliFMDAnaParameters& operator=(const AliFMDAnaParameters&) { return *this; }
   virtual ~AliFMDAnaParameters() {}
@@ -245,7 +251,7 @@ protected:
   Bool_t   fTriggerNSD;               //If the NSD trigger fired
   Bool_t   fTriggerEmpty;             //Event should be empty (empty bunches)
   Bool_t   fUseBuiltInNSD;            //Should we use the internal NSD trigger by A. Hansen
-  
+  Bool_t   fInelGtZero;               //Should INEL be INEL>0
   ClassDef(AliFMDAnaParameters,1) // Manager of parameters
 };
 
index 00bbfe0..251ef49 100644 (file)
@@ -221,8 +221,7 @@ void AliFMDAnalysisTaskBackgroundCorrection::Exec(Option_t */*option*/)
     
   }
   
-  AliESDInputHandler* eventHandler = dynamic_cast<AliESDInputHandler*> (AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler());
-  AliESDEvent* esd = eventHandler->GetEvent();
   Bool_t nsd = pars->IsEventTriggered(AliFMDAnaParameters::kNSD);
   for(UShort_t det=1;det<=3;det++) {
     
@@ -240,7 +239,7 @@ void AliFMDAnalysisTaskBackgroundCorrection::Exec(Option_t */*option*/)
       hHits->Add(hMultInput);
       
       TH2F* hBg        = pars->GetBackgroundCorrection(det, ringChar, vtxbin);
-      
+      TH2F* hBgNSD     = pars->GetBackgroundCorrectionNSD(det, ringChar, vtxbin);
       hMult->Add(hMultInput);
       hMultTrVtx->Add(hMultInput);
       
@@ -304,6 +303,9 @@ void AliFMDAnalysisTaskBackgroundCorrection::Exec(Option_t */*option*/)
   TH2F* hSPDMultTrVtx = (TH2F*)fOutputList->FindObject(Form("multTrVtx_SPD_vtxbin%d",vtxbin));
   TH2F* hSPDMultNSD   = (TH2F*)fOutputList->FindObject(Form("multNSD_SPD_vtxbin%d",vtxbin));
   
+  AliESDInputHandler* eventHandler = dynamic_cast<AliESDInputHandler*> (AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler());
+  AliESDEvent* esd = eventHandler->GetEvent();
+  
   const AliMultiplicity* spdmult = esd->GetMultiplicity();
   for(Int_t j = 0; j< spdmult->GetNumberOfTracklets();j++) {
     hSPDMult->Fill(spdmult->GetEta(j),spdmult->GetPhi(j));
index 473b893..8a6408d 100644 (file)
@@ -28,7 +28,7 @@
 //#include "TParticlePDG.h"
 #include "AliFMDStripIndex.h"
 #include "AliESDInputHandler.h"
-
+#include "AliGenDPMjetEventHeader.h"
 ClassImp(AliFMDAnalysisTaskDndeta)
 
 
@@ -376,17 +376,28 @@ void AliFMDAnalysisTaskDndeta::ProcessPrimary() {
   AliGenEventHeader* genHeader = header->GenEventHeader();
   
   AliGenPythiaEventHeader* pythiaGenHeader = dynamic_cast<AliGenPythiaEventHeader*>(genHeader);
+  AliGenDPMjetEventHeader* dpmHeader = dynamic_cast<AliGenDPMjetEventHeader*>(header->GenEventHeader());
   Bool_t nsd = kTRUE;
-  if (!pythiaGenHeader) {
-    std::cout<<" no pythia header!"<<std::endl;
-    //  return; 
+  
+  if (!pythiaGenHeader && !dpmHeader) {
+    std::cout<<" no pythia or dpm header!"<<std::endl;
   }
   else {
-    Int_t pythiaType = pythiaGenHeader->ProcessType();
+    if(pythiaGenHeader)        {
+      Int_t pythiaType = pythiaGenHeader->ProcessType();
+      
+      if(pythiaType==92||pythiaType==93)
+       nsd = kFALSE;
+      
+    }
+    if(dpmHeader) {
+      Int_t processType = dpmHeader->ProcessType();
+      if(processType == 5 || processType == 6)  
+       nsd = kFALSE;
     
-    if(pythiaType==92||pythiaType==93)
-      nsd = kFALSE;
+    }
   }
+  
   TArrayF vertex;
   genHeader->PrimaryVertex(vertex);
   if(TMath::Abs(vertex.At(2)) > pars->GetVtxCutZ())
index d75edec..0654ae7 100644 (file)
@@ -24,6 +24,8 @@
 #include "TSystem.h"
 #include "TROOT.h"
 #include "TAxis.h"
+#include "AliGenDPMjetEventHeader.h"
+
 ClassImp(AliFMDAnalysisTaskGenerateCorrection)
 
 //_____________________________________________________________________
@@ -71,6 +73,9 @@ void AliFMDAnalysisTaskGenerateCorrection::UserCreateOutputObjects()
 //
   
   std::cout<<"Creating output objects"<<std::endl;
+  
+  SelectCollisionCandidates(AliVEvent::kAny);
+  
   for(Int_t v=0; v<fNvtxBins;v++) {
     
     TH2F* hSPDhits       = new TH2F(Form("hSPDhits_vtx%d",v),
@@ -88,6 +93,12 @@ void AliFMDAnalysisTaskGenerateCorrection::UserCreateOutputObjects()
                                      fNbinsEta, -4,6, nSec, 0,2*TMath::Pi());
       hPrimary->Sumw2();
       fListOfPrimaries.Add(hPrimary);
+      TH2F* hPrimaryNSD       = new TH2F(Form("hPrimaryNSD_FMD_%c_vtx%d",ringChar,v),
+                                        Form("hPrimaryNSD_FMD_%c_vtx%d",ringChar,v),
+                                        fNbinsEta, -4,6, nSec, 0,2*TMath::Pi());
+      hPrimaryNSD->Sumw2();
+      fListOfPrimaries.Add(hPrimaryNSD);
+      
       
       
     }
@@ -117,6 +128,12 @@ void AliFMDAnalysisTaskGenerateCorrection::UserCreateOutputObjects()
                               fNbinsEta, -4,6, nSec, 0, 2*TMath::Pi());
        hHits->Sumw2();
        fListOfHits.Add(hHits);
+       TH2F* hHitsNSD = new TH2F(Form("hHitsNSD_FMD%d%c_vtx%d", det,ringChar,v),
+                              Form("hHitsNSD_FMD%d%c_vtx%d", det,ringChar,v),
+                              fNbinsEta, -4,6, nSec, 0, 2*TMath::Pi());
+       hHitsNSD->Sumw2();
+       fListOfHits.Add(hHitsNSD);
+       
        
       } 
     }
@@ -192,6 +209,8 @@ void AliFMDAnalysisTaskGenerateCorrection::UserCreateOutputObjects()
   fVertexBins.SetName("VertexBins");
   fVertexBins.GetXaxis()->Set(fNvtxBins,-1*fZvtxCut,fZvtxCut);
   
+  
 }
 //_____________________________________________________________________
 void AliFMDAnalysisTaskGenerateCorrection::Init()
@@ -229,8 +248,10 @@ void AliFMDAnalysisTaskGenerateCorrection::UserExec(Option_t */*option*/)
   AliGenEventHeader* genHeader = header->GenEventHeader();
   
   AliGenPythiaEventHeader* pythiaGenHeader = dynamic_cast<AliGenPythiaEventHeader*>(genHeader);
-  if (!pythiaGenHeader) {
-    std::cout<<" no pythia header! - NSD selection unusable"<<std::endl;
+  AliGenDPMjetEventHeader* dpmHeader = dynamic_cast<AliGenDPMjetEventHeader*>(header->GenEventHeader());
+  
+  if (!pythiaGenHeader && !dpmHeader) {
+    std::cout<<" no pythia or dpm header! - NSD selection unusable"<<std::endl;
     //return; 
   }
   Bool_t nsd = kTRUE;
@@ -240,10 +261,13 @@ void AliFMDAnalysisTaskGenerateCorrection::UserExec(Option_t */*option*/)
     if(pythiaType==92 || pythiaType==93)
       nsd = kFALSE;
   }
-  //if(pythiaType==94){
-  //  std::cout<<"double diffractive"<<std::endl;
-  //  return;
-  //}
+  if(dpmHeader) {
+    Int_t processType = dpmHeader->ProcessType();
+    if(processType == 5 || processType == 6)  
+      nsd = kFALSE;
+    
+  }
+  
   
   TArrayF vertex;
   genHeader->PrimaryVertex(vertex);
@@ -315,6 +339,12 @@ void AliFMDAnalysisTaskGenerateCorrection::UserExec(Option_t */*option*/)
       TH2F* hPrimaryOuter = (TH2F*)fListOfPrimaries.FindObject( Form("hPrimary_FMD_%c_vtx%d",'O',vertexBin));
       hPrimaryInner->Fill(particle->Eta(),particle->Phi());
       hPrimaryOuter->Fill(particle->Eta(),particle->Phi());
+      if( isTriggeredNSD) {
+       TH2F* hPrimaryInnerNSD = (TH2F*)fListOfPrimaries.FindObject( Form("hPrimaryNSD_FMD_%c_vtx%d",'I',vertexBin));
+       TH2F* hPrimaryOuterNSD = (TH2F*)fListOfPrimaries.FindObject( Form("hPrimaryNSD_FMD_%c_vtx%d",'O',vertexBin));
+       hPrimaryInnerNSD->Fill(particle->Eta(),particle->Phi());
+       hPrimaryOuterNSD->Fill(particle->Eta(),particle->Phi());
+      }
       TH2F* hAnalysedInner = (TH2F*)fListOfPrimaries.FindObject( Form("Analysed_FMD%c_vtx%d",'I',vertexBin));
       TH2F* hAnalysedOuter = (TH2F*)fListOfPrimaries.FindObject( Form("Analysed_FMD%c_vtx%d",'O',vertexBin));
       TH2F* hAnalysedNSDInner = (TH2F*)fListOfPrimaries.FindObject( Form("AnalysedNSD_FMD%c_vtx%d",'I',vertexBin));
@@ -358,6 +388,11 @@ void AliFMDAnalysisTaskGenerateCorrection::UserExec(Option_t */*option*/)
        
        TH2F* hHits = (TH2F*)fListOfHits.FindObject(Form("hHits_FMD%d%c_vtx%d", det,ring,vertexBin));
        hHits->Fill(eta,phi);
+       if( isTriggeredNSD) {
+         TH2F* hHitsNSD = (TH2F*)fListOfHits.FindObject(Form("hHitsNSD_FMD%d%c_vtx%d", det,ring,vertexBin));
+         hHitsNSD->Fill(eta,phi);
+       }
+       
        Float_t nstrips = (ring =='O' ? 256 : 512);
        fHitsByStrip(det,ring,sec,strip) +=1;
        TH1F* allHits = (TH1F*)fListOfHits.FindObject(Form("allHits_FMD%d%c",det,ring));
@@ -457,9 +492,6 @@ void AliFMDAnalysisTaskGenerateCorrection::GenerateCorrection() {
     hNSDOuter->Scale((hEventsAllNSD->GetBinContent(v+1) == 0 ? 0 : 1/hEventsAllNSD->GetBinContent(v+1)));
     
 
-    
-    //hAnalysedInner->Scale(1./0.84);  //numbers for real data, run104892
-    //hAnalysedOuter->Scale(1./0.84);
     hAnalysedInner->Divide(hInelInner);
     hAnalysedOuter->Divide(hInelOuter);
     
@@ -525,15 +557,23 @@ void AliFMDAnalysisTaskGenerateCorrection::GenerateCorrection() {
       
       for(Int_t vertexBin=0;vertexBin<fNvtxBins  ;vertexBin++) {
        TH2F* hHits          = (TH2F*)fListOfHits.FindObject(Form("hHits_FMD%d%c_vtx%d", det,ring,vertexBin));
-       TH2F* hPrimary  = (TH2F*)fListOfPrimaries.FindObject( Form("hPrimary_FMD_%c_vtx%d",ring,vertexBin));
-       TH2F* hCorrection = (TH2F*)hHits->Clone(Form("FMD%d%c_vtxbin_%d_correction",det,ring,vertexBin));
+       TH2F* hPrimary       = (TH2F*)fListOfPrimaries.FindObject( Form("hPrimary_FMD_%c_vtx%d",ring,vertexBin));
+       TH2F* hCorrection    = (TH2F*)hHits->Clone(Form("FMD%d%c_vtxbin_%d_correction",det,ring,vertexBin));
        hCorrection->Divide(hPrimary);
+       
+       TH2F* hHitsNSD       = (TH2F*)fListOfHits.FindObject(Form("hHitsNSD_FMD%d%c_vtx%d", det,ring,vertexBin));
+       TH2F* hPrimaryNSD    = (TH2F*)fListOfPrimaries.FindObject( Form("hPrimaryNSD_FMD_%c_vtx%d",ring,vertexBin));
+       TH2F* hCorrectionNSD = (TH2F*)hHitsNSD->Clone(Form("FMDNSD%d%c_vtxbin_%d_correction",det,ring,vertexBin));
+       hCorrectionNSD->Divide(hPrimaryNSD);
 
        
        hCorrection->SetTitle(hCorrection->GetName());
+       hCorrectionNSD->SetTitle(hCorrectionNSD->GetName());
+       
        fListOfCorrection.Add(hCorrection);
+       fListOfCorrection.Add(hCorrectionNSD);
        fBackground->SetBgCorrection(det,ring,vertexBin,hCorrection);
-       
+       fBackground->SetNSDBgCorrection(det,ring,vertexBin,hCorrectionNSD);
        
       }
       
@@ -629,6 +669,8 @@ void AliFMDAnalysisTaskGenerateCorrection::ReadFromFile(const Char_t* filename,
              
              TH2F* hHits          = (TH2F*)listOfHits->FindObject(Form("hHits_FMD%d%c_vtx%d", det,ringChar,v));
              fListOfHits.Add(hHits);
+             TH2F* hHitsNSD       = (TH2F*)listOfHits->FindObject(Form("hHitsNSD_FMD%d%c_vtx%d", det,ringChar,v));
+             fListOfHits.Add(hHitsNSD);
            }
        }
     }
@@ -641,12 +683,15 @@ void AliFMDAnalysisTaskGenerateCorrection::ReadFromFile(const Char_t* filename,
       
       
       TH2F* hPrimary       = (TH2F*)listOfPrim->FindObject( Form("hPrimary_FMD_%c_vtx%d",ringChar,v));
+      TH2F* hPrimaryNSD       = (TH2F*)listOfPrim->FindObject( Form("hPrimaryNSD_FMD_%c_vtx%d",ringChar,v));
+      
       TH2F* hAnalysed      = (TH2F*)listOfPrim->FindObject(Form("Analysed_FMD%c_vtx%d",ringChar,v));
       TH2F* hAnalysedNSD   = (TH2F*)listOfPrim->FindObject(Form("AnalysedNSD_FMD%c_vtx%d",ringChar,v));
       TH2F* hInel          = (TH2F*)listOfPrim->FindObject(Form("Inel_FMD%c_vtx%d",ringChar,v));
       TH2F* hNSD           = (TH2F*)listOfPrim->FindObject(Form("NSD_FMD%c_vtx%d",ringChar,v));
       
       fListOfPrimaries.Add(hPrimary);      
+      fListOfPrimaries.Add(hPrimaryNSD);      
       fListOfPrimaries.Add(hAnalysed);
       fListOfPrimaries.Add(hInel);      
       fListOfPrimaries.Add(hAnalysedNSD);
index 5d7649c..4906680 100644 (file)
@@ -51,6 +51,8 @@ void AliFMDAnalysisTaskSE::UserCreateOutputObjects()
 {
 // Create the output containers
 //
+  
+  
   fListOfHistos = new TList();
   
   AliESDFMD* fmd = new AliESDFMD();
index facccca..ca6c5c6 100644 (file)
@@ -30,6 +30,7 @@
 #include "AliFMDStripIndex.h"
 #include "AliESDVZERO.h"
 #include "AliESDtrack.h"
+#include "AliGenDPMjetEventHeader.h"
 
 // This is the task to do the FMD sharing or hit merging.
 // It reads the input ESDFMD data and posts an ESDFMD object to
@@ -782,32 +783,31 @@ void AliFMDAnalysisTaskSharing::ProcessPrimary() {
   AliGenEventHeader* genHeader = header->GenEventHeader();
   
   AliGenPythiaEventHeader* pythiaGenHeader = dynamic_cast<AliGenPythiaEventHeader*>(genHeader);
+  AliGenDPMjetEventHeader* dpmHeader = dynamic_cast<AliGenDPMjetEventHeader*>(header->GenEventHeader());
+  
   Bool_t nsd = kTRUE;
-  if (!pythiaGenHeader) {
-    std::cout<<" no pythia header!"<<std::endl;
-    //  return; 
-  }
-  else {
   
-       
-  Int_t pythiaType = pythiaGenHeader->ProcessType();
   
-  if(pythiaType==92||pythiaType==93)
-    nsd = kFALSE;
+  if (!pythiaGenHeader && !dpmHeader) {
+    std::cout<<" no pythia or dpm header!"<<std::endl;
   }
-  
-  /*if(pythiaType==92||pythiaType==93){
-      std::cout<<"single diffractive"<<std::endl;
-      return;
-     }
-  if(pythiaType==94){
-    std::cout<<"double diffractive"<<std::endl;
-    return;
+  else {
+    if(pythiaGenHeader)        {
+      Int_t pythiaType = pythiaGenHeader->ProcessType();
+      
+      if(pythiaType==92||pythiaType==93)
+       nsd = kFALSE;
+      
+    }
+    if(dpmHeader) {
+      Int_t processType = dpmHeader->ProcessType();
+      if(processType == 5 || processType == 6)  
+       nsd = kFALSE;
+    
+    }
   }
-  */
-  //std::cout<<pythiaType<<std::endl;
-  
-  
+
   TArrayF vertex;
   genHeader->PrimaryVertex(vertex);
   
index 7a9c1ee..0fb60a6 100644 (file)
@@ -222,7 +222,7 @@ void AliFMDDndeta::Init(const Char_t* filename) {
   AliFMDAnaParameters* pars =  AliFMDAnaParameters::Instance();
   //pars->Init();
   
-  TList* list = (TList*)fin->Get(Form("%s/BackgroundCorrected",pars->GetDndetaAnalysisName().Data()));
+  TList* list = (TList*)fin->Get(Form("%s/BackgroundCorrected",pars->GetDndetaAnalysisName()));
   
   if(!list) //an old file ? Perhaps...
     list = (TList*)fin->Get("BackgroundCorrected");
@@ -556,6 +556,9 @@ void AliFMDDndeta::DrawDndeta(Analysis what, Int_t rebin, Bool_t realdata, TStri
   
   //Published ALICE data
   // Plot: p7742_d1x1y1
+  
+  // INEL
+  
   TGraphAsymmErrors* p7742_d1x1y1 = 0;
   double p7742_d1x1y1_xval[] = { -1.3, -1.1, -0.9, -0.7, -0.5, -0.3, -0.1, 0.1, 0.3, 
     0.5, 0.7, 0.9, 1.1, 1.3 };
@@ -576,13 +579,55 @@ void AliFMDDndeta::DrawDndeta(Analysis what, Int_t rebin, Bool_t realdata, TStri
   p7742_d1x1y1->SetMarkerStyle(21);
   p7742_d1x1y1->SetMarkerColor(kRed);
   // p7742_d1x1y1->Draw("Psame");
+  
+  
+  //NSD
+  TGraphAsymmErrors*  p7742_d2x1y1 = 0;
+ double p7742_d2x1y1_xval[] = { -1.3, -1.1, -0.9, -0.7, -0.5, -0.3, -0.1, 0.1, 0.3, 
+    0.5, 0.7, 0.9, 1.1, 1.3 };
+  double p7742_d2x1y1_xerrminus[] = { 0.09999999999999987, 0.09999999999999987, 0.09999999999999998, 0.10000000000000009, 0.09999999999999998, 0.10000000000000003, 0.1, 0.1, 0.09999999999999998, 
+    0.09999999999999998, 0.09999999999999998, 0.09999999999999998, 0.10000000000000009, 0.10000000000000009 };
+  double p7742_d2x1y1_xerrplus[] = { 0.10000000000000009, 0.10000000000000009, 0.09999999999999998, 0.09999999999999998, 0.09999999999999998, 0.09999999999999998, 0.1, 0.1, 0.10000000000000003, 
+    0.09999999999999998, 0.10000000000000009, 0.09999999999999998, 0.09999999999999987, 0.09999999999999987 };
+  double p7742_d2x1y1_yval[] = { 3.9, 3.89, 3.81, 3.7, 3.64, 3.59, 3.53, 3.58, 3.59, 
+    3.61, 3.74, 3.8, 3.87, 3.95 };
+  double p7742_d2x1y1_yerrminus[] = { 0.13341664064126335, 0.13152946437965907, 0.13152946437965907, 0.1216552506059644, 0.1216552506059644, 0.1216552506059644, 0.1216552506059644, 0.1216552506059644, 0.1216552506059644, 
+    0.1216552506059644, 0.1216552506059644, 0.13152946437965907, 0.13152946437965907, 0.13341664064126335 };
+  double p7742_d2x1y1_yerrplus[] = { 0.13341664064126335, 0.13152946437965907, 0.13152946437965907, 0.1216552506059644, 0.1216552506059644, 0.1216552506059644, 0.1216552506059644, 0.1216552506059644, 0.1216552506059644, 
+    0.1216552506059644, 0.1216552506059644, 0.13152946437965907, 0.13152946437965907, 0.13341664064126335 };
+  int p7742_d2x1y1_numpoints = 14;
+
+  p7742_d2x1y1 = new TGraphAsymmErrors(p7742_d2x1y1_numpoints, p7742_d2x1y1_xval, p7742_d2x1y1_yval, p7742_d2x1y1_xerrminus, p7742_d2x1y1_xerrplus, p7742_d2x1y1_yerrminus, p7742_d2x1y1_yerrplus);
+  p7742_d2x1y1->SetName("/HepData/7742/d2x1y1");
+  p7742_d2x1y1->SetTitle("/HepData/7742/d2x1y1");
+  p7742_d2x1y1->SetMarkerStyle(21);
+  p7742_d2x1y1->SetMarkerColor(kRed);
+  //p7742_d2x1y1.Draw("AP");
+
+
 
 
 
 
   //End official data
   
+  // CMS published NSD data
+  
+  TGraphAsymmErrors* p7743_d8x1y1 = 0;
+  double p7743_d8x1y1_xval[] = { -2.25, -1.75, -1.25, -0.75, -0.25, 0.25, 0.75, 1.25, 1.75, 
+    2.25 };
+  double p7743_d8x1y1_xerrminus[] = { 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25 };
+  double p7743_d8x1y1_xerrplus[] = { 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25 };
+  double p7743_d8x1y1_yval[] = { 3.6, 3.73, 3.62, 3.54, 3.48, 3.48, 3.54, 3.62, 3.73,  3.6 };
+  double p7743_d8x1y1_yerrminus[] = { 0.13, 0.14, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.14,0.13 };
+  double p7743_d8x1y1_yerrplus[] = { 0.13, 0.14, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.14, 0.13 };
+  int p7743_d8x1y1_numpoints = 10;
+  p7743_d8x1y1 = new TGraphAsymmErrors(p7743_d8x1y1_numpoints, p7743_d8x1y1_xval, p7743_d8x1y1_yval, p7743_d8x1y1_xerrminus, p7743_d8x1y1_xerrplus, p7743_d8x1y1_yerrminus, p7743_d8x1y1_yerrplus);
+
+  p7743_d8x1y1->SetMarkerStyle(20);
+  p7743_d8x1y1->SetMarkerColor(kBlack);
   
+  //End CMS
   
   
   TH1I* hEvents   = (TH1I*)fList->FindObject(fEvents.Data());
@@ -598,7 +643,7 @@ void AliFMDDndeta::DrawDndeta(Analysis what, Int_t rebin, Bool_t realdata, TStri
     TH1D* hSPDanalysisNSD = (TH1D*)fList->FindObject(Form("dNdetaNSD_SPD_vtxbin%d_proj",nn));
     
     Float_t nEventsSPD = (Float_t)hEvents->GetBinContent(nn+1);
-    
+    if(!nEventsSPD) continue; 
     hSPDanalysis->Scale(1/nEventsSPD);
     hSPDanalysisTrVtx->Scale(1/nEventsSPD);
     hSPDanalysisNSD->Scale(1/nEventsSPD);
@@ -1080,6 +1125,8 @@ void AliFMDDndeta::DrawDndeta(Analysis what, Int_t rebin, Bool_t realdata, TStri
       else{
        graph->Draw("PEsame");
        graph2->Draw("PEsame");
+       p7742_d2x1y1->Draw("PEsame");
+       p7743_d8x1y1->Draw("PEsame");
 
       }
        
@@ -1129,8 +1176,12 @@ void AliFMDDndeta::DrawDndeta(Analysis what, Int_t rebin, Bool_t realdata, TStri
   }
     //leg->AddEntry(hPythiaMB,"Pythia MB","l");
   leg->AddEntry(hSPDcombi,"HHD SPD clusters","p");
-  leg->AddEntry(p7742_d1x1y1,"ALICE INEL published","p");
-    
+  if(what == kMult)
+    leg->AddEntry(p7742_d1x1y1,"ALICE INEL published","p");
+  if(what == kMultNSD) {
+    leg->AddEntry(p7742_d2x1y1,"ALICE NSD published","p");
+    leg->AddEntry(p7743_d8x1y1, "CMS NSD published","p");
+  }
   }
   leg->Draw();
   
@@ -1149,15 +1200,17 @@ void AliFMDDndeta::DrawDndeta(Analysis what, Int_t rebin, Bool_t realdata, TStri
     xval=yval=0;
     
     if(hRatioMultUA5_rebin5->GetBinCenter(bb) >= 0) {
-      
-      graphinel->GetPoint(ipos,xval,yval);
+      if(what == kMultNSD)
+       graph->GetPoint(ipos,xval,yval);
+      else
+       graphinel->GetPoint(ipos,xval,yval);
       
       if(yval>0) {
        hRatioMultUA5_rebin5->SetBinContent(bb,yval);
        hRatioMultUA5_rebin5->SetBinError(bb,graphinel->GetErrorY(ipos));
        if(hRatioMultUA5_rebin5->GetBinCenter(bb) < 4) {
          hRatioMultUA5_rebin5->SetBinContent(hRatioMultUA5_rebin5->FindBin(-1*hRatioMultUA5_rebin5->GetBinCenter(bb)),yval);
-         hRatioMultUA5_rebin5->SetBinError(hRatioMultUA5_rebin5->FindBin(-1*hRatioMultUA5_rebin5->GetBinCenter(bb)),graphinel->GetErrorY(ipos));
+         hRatioMultUA5_rebin5->SetBinError(hRatioMultUA5_rebin5->FindBin(-1*hRatioMultUA5_rebin5->GetBinCenter(bb)),(what == kMultNSD ? graph->GetErrorY(ipos) : graph->GetErrorY(ipos)));
        
        }
        ipos++;
@@ -1186,56 +1239,9 @@ void AliFMDDndeta::DrawDndeta(Analysis what, Int_t rebin, Bool_t realdata, TStri
       hPythiaMB->Scale(ratio);
     }
     
-    //hRatioMultPythia->Divide(hPythiaMB);
-    /*
-    for(Int_t j=1;j<=hRatioMultUA5->GetNbinsX(); j++) {
-      Float_t data = hRatioMultUA5->GetBinContent(j);
-      Float_t errordata = hRatioMultUA5->GetBinError(j);
-      Float_t ua5  = 0;
-      Float_t ua5error = 0;
-      
-      
-      if(hRatioMultUA5->GetBinCenter(j) > 0) {
-       Double_t* xv  = graphinel->GetX();
-       Double_t* yv  = graphinel->GetY();
-       Double_t* eyv = graphinel->GetEY();
-
-       for(Int_t kk =0; kk<graphinel->GetN();kk++) {
-         if(xv[kk] < hRatioMultUA5->GetBinCenter(j) &&  xv[kk+1] > hRatioMultUA5->GetBinCenter(j)) {
-           ua5 = yv[kk];
-           ua5error = eyv[kk];
-           }
-       }
-         
-         }
-      else {
-       Double_t* xv = graphinel2->GetX();
-       Double_t* yv = graphinel2->GetY();
-       Double_t* eyv = graphinel->GetEY();
-       
-       for(Int_t kk =0; kk<graphinel2->GetN();kk++) {
-         if(xv[kk+1] < hRatioMultUA5->GetBinCenter(j) &&  xv[kk] > hRatioMultUA5->GetBinCenter(j)) {
-           ua5 = yv[kk];
-           ua5error = eyv[kk];
-         }
-       }
-       
-      }
-      
-      Float_t ratio2 = 1;
-      if(ua5> 0) {
-       ratio2 =  data / ua5;
-       Float_t errorratio = 0;
-       if(ua5 != 0 && data !=0) 
-         errorratio = ratio2*TMath::Sqrt(TMath::Power(ua5error/ua5,2)+TMath::Power(errordata/data,2));
-       hRatioMultUA5->SetBinContent(j,ratio2);
-       hRatioMultUA5->SetBinError(j,errorratio);
-      }
-      
-      */
     if(rebin !=5) {
-    TGraphErrors* tmp1;
-    if(what == kMultNSD)
+      TGraphErrors* tmp1;
+      if(what == kMultNSD)
       tmp1 = (TGraphErrors*)graph->Clone("UA5tmp");
     else
       tmp1 = (TGraphErrors*)graphinel->Clone("UA5tmp");
@@ -1315,14 +1321,19 @@ void AliFMDDndeta::DrawDndeta(Analysis what, Int_t rebin, Bool_t realdata, TStri
   // sumMultSystNeg->DrawCopy("sameE5");
   //hTestdNdeta->DrawCopy("same");
   //hSPDcombi->DrawCopy("same");
-  p7742_d1x1y1->Draw("PEsame");
-  
+  if(what == kMult)
+    p7742_d1x1y1->Draw("PEsame");
+  if(what == kMultNSD) {
+    p7742_d2x1y1->Draw("PEsame");
+    p7743_d8x1y1->Draw("PEsame");
+  }
+
   TLegend* leg2 = new TLegend(0.3,0.2,0.7,0.45,"");
   if(what == kMult)
     leg2->AddEntry(sumMult,"FMD INEL","p");
   else if(what == kMultTrVtx)
     leg2->AddEntry(sumMult,"FMD TrVtx","p");
-  else if(what == kMultNSD)
+  else if(what == kMultNSD) 
     leg2->AddEntry(sumMult,"FMD NSD","p");
   
   if(realdata) {
@@ -1343,8 +1354,12 @@ void AliFMDDndeta::DrawDndeta(Analysis what, Int_t rebin, Bool_t realdata, TStri
   }
     //leg2->AddEntry(hPythiaMB,"Pythia MB","l");
     //leg2->AddEntry(hSPDcombi,"HHD SPD clusters","p");
+  if(what == kMult)
     leg2->AddEntry(p7742_d1x1y1,"ALICE INEL published","p");
-    
+  if(what == kMultNSD) {
+    leg2->AddEntry(p7742_d2x1y1,"ALICE NSD published","p");
+    leg2->AddEntry(p7743_d8x1y1,"CMS NSD published","p");
+  }
   }
   leg2->Draw();
   
index 66e43dc..867b227 100644 (file)
@@ -1,4 +1,4 @@
-void SubmitFMDCorrections(const Char_t* filename, Bool_t store, Float_t energy, Int_t trigger, Float_t mag, Int_t collsystem) {
+void SubmitFMDCorrections(const Char_t* filename, Bool_t store, Float_t energy, Int_t trigger, Float_t mag, Int_t collsystem,Bool_t inelGtZero=kFALSE) {
   
   gSystem->Load("libANALYSIS");
   gSystem->Load("libANALYSISalice");
@@ -33,6 +33,8 @@ void SubmitFMDCorrections(const Char_t* filename, Bool_t store, Float_t energy,
   else if(collsystem == 1)
     pars->SetCollisionSystem(AliFMDAnaParameters::kPbPb);
   
+  
+  pars->SetInelGtZero(inelGtZero);
   pars->PrintStatus();
   
   std::cout<<"creating background object"<<std::endl;