]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
minor changes for DiHadronPID code (Misha Veldhoen <Misha.Veldhoen@cern.ch>)
authormiweber <miweber@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 29 Apr 2013 11:30:11 +0000 (11:30 +0000)
committermiweber <miweber@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 29 Apr 2013 11:30:11 +0000 (11:30 +0000)
12 files changed:
PWGCF/Correlations/DPhi/DiHadronPID/AliAODEventCutsDiHadronPID.cxx
PWGCF/Correlations/DPhi/DiHadronPID/AliAODEventCutsDiHadronPID.h
PWGCF/Correlations/DPhi/DiHadronPID/AliAODTrackCutsDiHadronPID.cxx
PWGCF/Correlations/DPhi/DiHadronPID/AliAODTrackCutsDiHadronPID.h
PWGCF/Correlations/DPhi/DiHadronPID/AliAnalysisTaskDiHadronPID.cxx
PWGCF/Correlations/DPhi/DiHadronPID/AliAnalysisTaskDiHadronPID.h
PWGCF/Correlations/DPhi/DiHadronPID/AliHistToolsDiHadronPID.cxx
PWGCF/Correlations/DPhi/DiHadronPID/AliHistToolsDiHadronPID.h
PWGCF/Correlations/DPhi/DiHadronPID/AliTrackDiHadronPID.cxx
PWGCF/Correlations/DPhi/DiHadronPID/AliTrackDiHadronPID.h
PWGCF/EBYE/macros/drawBalanceFunction2DPsi.C
PWGCF/EBYE/macros/drawBalanceFunctionPsi.C

index c961f248135125cbcdb3429078c2dd009bbae665..b8e8ac6104c328f6d71e565542190b325b2d3954 100644 (file)
@@ -1,7 +1,22 @@
-// -------------------------------------------------------------------------
-// Object managing event cuts, and holding QA histograms.
-// -------------------------------------------------------------------------
-// Author: Misha Veldhoen (misha.veldhoen@cern.ch)
+/************************************************************************* 
+* Copyright(c) 1998-2008, ALICE Experiment at CERN, All rights reserved. * 
+*                                                                        * 
+* Author: The ALICE Off-line Project.                                    * 
+* Contributors are mentioned in the code where appropriate.              * 
+*                                                                        * 
+* 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.                  * 
+**************************************************************************/
+
+// -----------------------------------------------------------------------
+//  Event Cut class for the DiHadronPID analysis.
+// -----------------------------------------------------------------------
+//  Author: Misha Veldhoen (misha.veldhoen@cern.ch)
 
 #include <iostream>
 #include "TList.h"
@@ -22,7 +37,7 @@ using namespace std;
 
 ClassImp(AliAODEventCutsDiHadronPID);
 
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
 AliAODEventCutsDiHadronPID::AliAODEventCutsDiHadronPID():
        TNamed(),
        fIsPbPb(kTRUE),
@@ -57,7 +72,7 @@ AliAODEventCutsDiHadronPID::AliAODEventCutsDiHadronPID():
 
 }
 
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
 AliAODEventCutsDiHadronPID::AliAODEventCutsDiHadronPID(const char* name):
        TNamed(name,"AOD Event Cuts"),
        fIsPbPb(kTRUE),
@@ -92,7 +107,7 @@ AliAODEventCutsDiHadronPID::AliAODEventCutsDiHadronPID(const char* name):
 
 }
 
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
 AliAODEventCutsDiHadronPID::~AliAODEventCutsDiHadronPID() {
 
        //
@@ -109,7 +124,7 @@ AliAODEventCutsDiHadronPID::~AliAODEventCutsDiHadronPID() {
 
 }
 
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
 Long64_t AliAODEventCutsDiHadronPID::Merge(TCollection* list) {
 
        //
@@ -165,7 +180,7 @@ Long64_t AliAODEventCutsDiHadronPID::Merge(TCollection* list) {
 
 }
 
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
 void AliAODEventCutsDiHadronPID::CreateHistos() {
 
        cout<<"AliAODEventCutsDiHadronPID - Creating histograms"<<endl;
@@ -225,7 +240,7 @@ void AliAODEventCutsDiHadronPID::CreateHistos() {
 
 }
 
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
 Bool_t AliAODEventCutsDiHadronPID::IsSelected(AliAODEvent* event) {
        
        if (fDebug > 1) {cout << Form("File: %s, Line: %i, Function: %s",__FILE__,__LINE__,__func__) << endl;}
@@ -315,7 +330,7 @@ Bool_t AliAODEventCutsDiHadronPID::IsSelected(AliAODEvent* event) {
 
 }
 
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
 void AliAODEventCutsDiHadronPID::PrintCuts() {
 
        // NOT IMPLEMENTED.
index 978e09b1b83e249ab04fca692207fb7cd1bcc11c..f858eb130b6be8cdb0e33b70cc173a3929333c8a 100644 (file)
@@ -1,5 +1,8 @@
 #ifndef ALIAODEVENTCUTSDIHADRONPID_H 
 #define ALIAODEVENTCUTSDIHADRONPID_H
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * 
+* See cxx source for full Copyright notice */ 
+/* $Id$ */
 
 #include "TString.h"
 #include "TH1F.h"
index 55e41da8db95af7bcbe17618175faad9c0dca96d..018f905bb0d919a41d897598688cd8aa907f3f32 100644 (file)
@@ -1,7 +1,22 @@
-// -------------------------------------------------------------------------
-// Object to handle AOD Track cuts for the DiHadronPID analysis.
-// -------------------------------------------------------------------------
-// Author: Misha Veldhoen (misha.veldhoen@cern.ch)
+/************************************************************************* 
+* Copyright(c) 1998-2008, ALICE Experiment at CERN, All rights reserved. * 
+*                                                                        * 
+* Author: The ALICE Off-line Project.                                    * 
+* Contributors are mentioned in the code where appropriate.              * 
+*                                                                        * 
+* 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.                  * 
+**************************************************************************/
+
+// -----------------------------------------------------------------------
+//  Track Cut class for the DiHadronPID analysis.
+// -----------------------------------------------------------------------
+//  Author: Misha Veldhoen (misha.veldhoen@cern.ch)
 
 #include <iostream>
 
@@ -33,7 +48,7 @@ using namespace std;
 
 ClassImp(AliAODTrackCutsDiHadronPID);
 
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
 AliAODTrackCutsDiHadronPID::AliAODTrackCutsDiHadronPID():
        TNamed(),
        fMinPt(0.),
@@ -94,6 +109,7 @@ AliAODTrackCutsDiHadronPID::AliAODTrackCutsDiHadronPID():
                                for (Int_t iPtClass = 0; iPtClass < 5; iPtClass++) {
                                        fHistDataPID[iHistoName][iSpecies][iPtClass] = 0x0;
                                        fHistTOFMismatch[iHistoName][iSpecies][iPtClass] = 0x0;                                                                         
+                                       fHistTPCTOFMismatch[iHistoName][iSpecies][iPtClass] = 0x0;
                                }
                        }
                }
@@ -128,7 +144,7 @@ AliAODTrackCutsDiHadronPID::AliAODTrackCutsDiHadronPID():
 
 }
 
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
 AliAODTrackCutsDiHadronPID::AliAODTrackCutsDiHadronPID(const char* name):
        TNamed(name,"AOD Track Cuts"),
        fMinPt(0.),
@@ -184,6 +200,8 @@ AliAODTrackCutsDiHadronPID::AliAODTrackCutsDiHadronPID(const char* name):
                                for (Int_t iPtClass = 0; iPtClass < 5; iPtClass++) {
                                        fHistDataPID[iHistoName][iSpecies][iPtClass] = 0x0;
                                        fHistTOFMismatch[iHistoName][iSpecies][iPtClass] = 0x0;                                                                         
+                                       fHistTPCTOFMismatch[iHistoName][iSpecies][iPtClass] = 0x0;                                                                      
+
                                }
                        }
                }
@@ -216,7 +234,7 @@ AliAODTrackCutsDiHadronPID::AliAODTrackCutsDiHadronPID(const char* name):
 
 }
 
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
 void AliAODTrackCutsDiHadronPID::InitializeDefaultHistoNamesAndAxes() {
 
        // Initializes the histogram name conventions and the ranges of all the histograms
@@ -286,7 +304,7 @@ void AliAODTrackCutsDiHadronPID::InitializeDefaultHistoNamesAndAxes() {
 
 }
 
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
 AliAODTrackCutsDiHadronPID::~AliAODTrackCutsDiHadronPID() {
 
        //
@@ -309,7 +327,7 @@ AliAODTrackCutsDiHadronPID::~AliAODTrackCutsDiHadronPID() {
 
 }
 
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
 Long64_t AliAODTrackCutsDiHadronPID::Merge(TCollection* list) {
 
        //
@@ -400,10 +418,10 @@ Long64_t AliAODTrackCutsDiHadronPID::Merge(TCollection* list) {
        
 }
 
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
 void AliAODTrackCutsDiHadronPID::PrintCuts() {}
 
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
 void AliAODTrackCutsDiHadronPID::CreateHistos() {
 
        // Function should be called by the UserCreateOutput() function of the
@@ -475,7 +493,7 @@ void AliAODTrackCutsDiHadronPID::CreateHistos() {
        }
 }
 
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
 void AliAODTrackCutsDiHadronPID::StartNewEvent() {
 
        // FIXME: This method is now only suited for Data (3 histo classes only.) 
@@ -487,7 +505,7 @@ void AliAODTrackCutsDiHadronPID::StartNewEvent() {
        }
 }
 
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
 void AliAODTrackCutsDiHadronPID::EventIsDone(Bool_t IsMC) {
 
        // FIXME: This method is now only suited for Data (3 histo classes only.) 
@@ -512,7 +530,7 @@ void AliAODTrackCutsDiHadronPID::EventIsDone(Bool_t IsMC) {
        }
 }
 
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
 Bool_t AliAODTrackCutsDiHadronPID::IsSelectedData(AliTrackDiHadronPID* track, Double_t randomhittime) {
        
        //
@@ -562,7 +580,7 @@ Bool_t AliAODTrackCutsDiHadronPID::IsSelectedData(AliTrackDiHadronPID* track, Do
 
 }
 
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
 Bool_t AliAODTrackCutsDiHadronPID::IsSelectedGeneratedMC(AliAODMCParticle* particle) {
        
        //
@@ -620,7 +638,7 @@ Bool_t AliAODTrackCutsDiHadronPID::IsSelectedGeneratedMC(AliAODMCParticle* parti
 
 }
 
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
 Bool_t AliAODTrackCutsDiHadronPID::IsSelectedReconstructedMC(AliTrackDiHadronPID* track) {
 
        if (fDebug > 1) {cout << Form("File: %s, Line: %i, Function: %s",__FILE__,__LINE__,__func__) << endl;}
@@ -671,7 +689,7 @@ Bool_t AliAODTrackCutsDiHadronPID::IsSelectedReconstructedMC(AliTrackDiHadronPID
 
 }
 
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
 Bool_t AliAODTrackCutsDiHadronPID::FillDataHistos(Int_t histoclass, AliTrackDiHadronPID* track) {
 
        if (fDebug > 1) {cout << Form("File: %s, Line: %i, Function: %s",__FILE__,__LINE__,__func__) << endl;}
@@ -724,7 +742,7 @@ Bool_t AliAODTrackCutsDiHadronPID::FillDataHistos(Int_t histoclass, AliTrackDiHa
 
 }
 
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
 Bool_t AliAODTrackCutsDiHadronPID::FillTOFMismatchHistos(Int_t histoclass, AliTrackDiHadronPID* track, Double_t randomhittime) {
 
        if (fDebug > 1) {cout << Form("File: %s, Line: %i, Function: %s",__FILE__,__LINE__,__func__) << endl;}
@@ -737,6 +755,7 @@ Bool_t AliAODTrackCutsDiHadronPID::FillTOFMismatchHistos(Int_t histoclass, AliTr
 
                for (Int_t iPtClass = 0; iPtClass < 5; iPtClass++) {
                        fHistTOFMismatch[histoclass][iSpecies][iPtClass]->Fill(track->Pt(),randomhittime - track->GetTOFsignalExpected(iSpecies));              
+                       fHistTPCTOFMismatch[histoclass][iSpecies][iPtClass]->Fill(track->Pt(),randomhittime - track->GetTOFsignalExpected(iSpecies),track->GetTPCsignalMinusExpected(iSpecies));                        
                }
        }
 
@@ -744,7 +763,7 @@ Bool_t AliAODTrackCutsDiHadronPID::FillTOFMismatchHistos(Int_t histoclass, AliTr
 
 }
 
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
 Bool_t AliAODTrackCutsDiHadronPID::FillGenMCHistos(Int_t histoclass, AliAODMCParticle* particle) {
 
        if (fDebug > 1) {cout << Form("File: %s, Line: %i, Function: %s",__FILE__,__LINE__,__func__) << endl;}
@@ -760,7 +779,7 @@ Bool_t AliAODTrackCutsDiHadronPID::FillGenMCHistos(Int_t histoclass, AliAODMCPar
 
 }
 
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
 Bool_t AliAODTrackCutsDiHadronPID::FillRecMCHistos(Int_t histoclass, AliTrackDiHadronPID* track) {
 
        if (fDebug > 1) {cout << Form("File: %s, Line: %i, Function: %s",__FILE__,__LINE__,__func__) << endl;}
@@ -787,7 +806,7 @@ Bool_t AliAODTrackCutsDiHadronPID::FillRecMCHistos(Int_t histoclass, AliTrackDiH
 
 }
 
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
 Bool_t AliAODTrackCutsDiHadronPID::InitializeDataHistos(Int_t histoclass) {
 
        cout<<"AliAODTrackCutsDiHadronPID - Creating Data Histograms of Class "<<histoclass<<endl;
@@ -812,10 +831,17 @@ Bool_t AliAODTrackCutsDiHadronPID::InitializeDataHistos(Int_t histoclass) {
        // Add the PID histograms. (FIXME shoudl be able to turn the creation of these histos off.)
        for (Int_t iSpecies = 0; iSpecies < 3; iSpecies++) {
                for (Int_t iPtClass = 0; iPtClass < 5; iPtClass++) {
+                       
                        fHistDataPID[histoclass][iSpecies][iPtClass] = InitializePIDHisto("fHistDataPID",histoclass,iSpecies,iPtClass);
                        fDataTrackQAHistos->Add(fHistDataPID[histoclass][iSpecies][iPtClass]);
+                       
                        fHistTOFMismatch[histoclass][iSpecies][iPtClass] = InitializeTOFMismatchHisto("fHistTOFMismatch",histoclass,iSpecies,iPtClass);
                        fDataTrackQAHistos->Add(fHistTOFMismatch[histoclass][iSpecies][iPtClass]);
+
+                       fHistTPCTOFMismatch[histoclass][iSpecies][iPtClass] = InitializePIDHisto("fHistTPCTOFMismatch",histoclass,iSpecies,iPtClass);
+                       fHistTPCTOFMismatch[histoclass][iSpecies][iPtClass]->SetTitle(Form("PID %s (Exp: %s)",fHistoName[histoclass].Data(),fParticleName[iSpecies].Data()));
+                       fDataTrackQAHistos->Add(fHistTPCTOFMismatch[histoclass][iSpecies][iPtClass]);   
+               
                }
        }
 
@@ -823,7 +849,7 @@ Bool_t AliAODTrackCutsDiHadronPID::InitializeDataHistos(Int_t histoclass) {
 
 }
 
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
 Bool_t AliAODTrackCutsDiHadronPID::InitializeGenMCHistos(Int_t histoclass) {
 
        cout<<"AliAODTrackCutsDiHadronPID - Creating Generated MC Histograms of Class "<<histoclass<<endl;
@@ -841,7 +867,7 @@ Bool_t AliAODTrackCutsDiHadronPID::InitializeGenMCHistos(Int_t histoclass) {
 
 }
 
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
 Bool_t AliAODTrackCutsDiHadronPID::InitializeRecMCHistos(Int_t histoclass) {
 
        cout<<"AliAODTrackCutsDiHadronPID - Creating Reconstructed MC Histograms of Class "<<histoclass<<endl;
@@ -871,7 +897,7 @@ Bool_t AliAODTrackCutsDiHadronPID::InitializeRecMCHistos(Int_t histoclass) {
 
 }
 
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
 TH1F* AliAODTrackCutsDiHadronPID::InitializePtSpectrum(const char* name, Int_t histoclass) {
 
        if (fDebug > 1) {cout << Form("File: %s, Line: %i, Function: %s",__FILE__,__LINE__,__func__) << endl;}
@@ -885,7 +911,7 @@ TH1F* AliAODTrackCutsDiHadronPID::InitializePtSpectrum(const char* name, Int_t h
 
 }
 
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
 TH3F* AliAODTrackCutsDiHadronPID::InitializePhiEtaPt(const char* name, Int_t histoclass) {
 
        if (fDebug > 1) {cout << Form("File: %s, Line: %i, Function: %s",__FILE__,__LINE__,__func__) << endl;}
@@ -902,7 +928,7 @@ TH3F* AliAODTrackCutsDiHadronPID::InitializePhiEtaPt(const char* name, Int_t his
 
 }
 
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
 TH2F* AliAODTrackCutsDiHadronPID::InitializeDCASpectrum(const char* name, Int_t histoclass) {
 
        if (fDebug > 1) {cout << Form("File: %s, Line: %i, Function: %s",__FILE__,__LINE__,__func__) << endl;}
@@ -918,7 +944,7 @@ TH2F* AliAODTrackCutsDiHadronPID::InitializeDCASpectrum(const char* name, Int_t
 
 }
 
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
 TH1F* AliAODTrackCutsDiHadronPID::InitializeNTracksHisto(const char* name, Int_t histoclass) {
 
        if (fDebug > 1) {cout << Form("File: %s, Line: %i, Function: %s",__FILE__,__LINE__,__func__) << endl;}
@@ -933,7 +959,7 @@ TH1F* AliAODTrackCutsDiHadronPID::InitializeNTracksHisto(const char* name, Int_t
 
 }
 
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
 TH1F* AliAODTrackCutsDiHadronPID::InitializeDCAxyHisto(const char* name, Int_t histoclass) {
 
        if (fDebug > 1) {cout << Form("File: %s, Line: %i, Function: %s",__FILE__,__LINE__,__func__) << endl;}
@@ -947,7 +973,7 @@ TH1F* AliAODTrackCutsDiHadronPID::InitializeDCAxyHisto(const char* name, Int_t h
 
 }
 
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
 TH1F* AliAODTrackCutsDiHadronPID::InitializeDCAzHisto(const char* name, Int_t histoclass) {
 
        if (fDebug > 1) {cout << Form("File: %s, Line: %i, Function: %s",__FILE__,__LINE__,__func__) << endl;}
@@ -961,7 +987,7 @@ TH1F* AliAODTrackCutsDiHadronPID::InitializeDCAzHisto(const char* name, Int_t hi
 
 }
 
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
 TH3F* AliAODTrackCutsDiHadronPID::InitializeAcceptanceHisto(const char* /*name*/, Int_t /*histoclass*/) {
 
        if (fDebug > 1) {cout << Form("File: %s, Line: %i, Function: %s",__FILE__,__LINE__,__func__) << endl;}
@@ -969,7 +995,7 @@ TH3F* AliAODTrackCutsDiHadronPID::InitializeAcceptanceHisto(const char* /*name*/
 
 }
 
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
 TH3F* AliAODTrackCutsDiHadronPID::InitializePIDHisto(const char* name, Int_t histoclass, Int_t expspecies, Int_t ptclass) {
 
        if (fDebug > 1) {cout << Form("File: %s, Line: %i, Function: %s",__FILE__,__LINE__,__func__) << endl;}
@@ -986,7 +1012,7 @@ TH3F* AliAODTrackCutsDiHadronPID::InitializePIDHisto(const char* name, Int_t his
 
 }
 
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
 TH2F* AliAODTrackCutsDiHadronPID::InitializeTOFMismatchHisto(const char* name, Int_t histoclass, Int_t expspecies, Int_t ptclass) {
 
        if (fDebug > 1) {cout << Form("File: %s, Line: %i, Function: %s",__FILE__,__LINE__,__func__) << endl;}
@@ -1002,7 +1028,7 @@ TH2F* AliAODTrackCutsDiHadronPID::InitializeTOFMismatchHisto(const char* name, I
 
 }
 
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
 TH1F* AliAODTrackCutsDiHadronPID::GetHistDataTOFProjection(Int_t charge, Int_t species, Int_t ptbin) {
 
        // Returns a projection in TOF of the data histogram.
@@ -1027,7 +1053,23 @@ TH1F* AliAODTrackCutsDiHadronPID::GetHistDataTOFProjection(Int_t charge, Int_t s
 
 }
 
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
+TObjArray* AliAODTrackCutsDiHadronPID::GetDataTOFProjection(Int_t charge, Int_t species) {
+
+       // Returns a TObjArray with all TOF histograms (as needed by AliSpectrumDiHadronPID)
+       if (fDebug > 1) {cout << Form("File: %s, Line: %i, Function: %s",__FILE__,__LINE__,__func__) << endl;}
+
+       TObjArray* aout = new TObjArray(GetNPtBinsPID());
+       aout->SetOwner(kTRUE);
+       for (Int_t iPtBin = 1; iPtBin < (GetNPtBinsPID() + 1); iPtBin++) {
+               aout->AddLast((TH1F*)GetHistDataTOFProjection(charge, species, iPtBin));
+       }
+
+       return aout;
+
+}
+
+// -----------------------------------------------------------------------
 TH1F* AliAODTrackCutsDiHadronPID::GetHistDataTOFMismatch(Int_t charge, Int_t species, Int_t ptbin) {
 
        // Returns a projection in TOF of the mismatch histogram.
@@ -1051,3 +1093,19 @@ TH1F* AliAODTrackCutsDiHadronPID::GetHistDataTOFMismatch(Int_t charge, Int_t spe
        return htmp_proj;
 
 }
+
+// -----------------------------------------------------------------------
+TObjArray* AliAODTrackCutsDiHadronPID::GetDataTOFMismatch(Int_t charge, Int_t species) {
+
+       // Returns a TObjArray with all TOF mismatch histograms (as needed by AliSpectrumDiHadronPID)
+       if (fDebug > 1) {cout << Form("File: %s, Line: %i, Function: %s",__FILE__,__LINE__,__func__) << endl;}
+
+       TObjArray* aout = new TObjArray(GetNPtBinsPID());
+       aout->SetOwner(kTRUE);
+       for (Int_t iPtBin = 1; iPtBin < (GetNPtBinsPID() + 1); iPtBin++) {
+               aout->AddLast((TH1F*)GetHistDataTOFMismatch(charge, species, iPtBin));
+       }
+
+       return aout;
+
+}
index 9f18acde6234caf1186b019bd05473145d97d262..894cf67889085327650effe56cf19b5be128bd46 100644 (file)
@@ -1,5 +1,8 @@
 #ifndef ALIAODTRACKCUTSDIHADRONPID_H
 #define ALIAODTRACKCUTSDIHADRONPID_H
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * 
+* See cxx source for full Copyright notice */ 
+/* $Id$ */
 
 #include "TFormula.h"
 #include "TH1F.h"
@@ -27,10 +30,10 @@ private:
        AliAODTrackCutsDiHadronPID(const AliAODTrackCutsDiHadronPID&);
        AliAODTrackCutsDiHadronPID& operator=(const AliAODTrackCutsDiHadronPID&);
 
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
 //  Interface, methods used to get information about the track cuts, and to
 //  retrieve filled histograms. 
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
 
 public:
        void PrintCuts();                                                               // Gives an overview of the cuts.
@@ -96,7 +99,9 @@ public:
 // Since we will often want to have TOF histograms, here are a few methods which return the 
 // appropriate projections. The class does not own these projections, and the user must take care of them.
        TH1F* GetHistDataTOFProjection(Int_t charge, Int_t species, Int_t ptbin);
+       TObjArray* GetDataTOFProjection(Int_t charge, Int_t species);
        TH1F* GetHistDataTOFMismatch(Int_t charge, Int_t species, Int_t ptbin);
+       TObjArray* GetDataTOFMismatch(Int_t charge, Int_t species);
        Double_t GetPtMinPID(Int_t bin) const {
                Int_t ptclass = GetPtClass(bin);
                if (ptclass == -1) {return -999.;}
@@ -161,10 +166,10 @@ public:
 
        Int_t GetDebugLevel() const {return fDebug;}
 
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
 //  Methods used to configure the track cuts object, to be called at
 //  initialization, i.e., before the object is added to an analysis task.  
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
 
 public:
 
@@ -218,9 +223,9 @@ public:
 
        void SetDebugLevel(Int_t debuglevel) {fDebug = debuglevel;}
 
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
 //  Methods called by the analysis task. 
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
 
 public:
 
@@ -234,9 +239,9 @@ public:
        Bool_t IsSelectedGeneratedMC(AliAODMCParticle* particle);
        Bool_t IsSelectedReconstructedMC(AliTrackDiHadronPID* track);
 
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
 //  Internal methods.
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
 
 public:
 
@@ -336,9 +341,9 @@ private:
        TH3F* InitializePIDHisto(const char* name, Int_t histoclass, Int_t expspecies, Int_t ptclass);
        TH2F* InitializeTOFMismatchHisto(const char* name, Int_t histoclass, Int_t expspecies, Int_t ptclass);
 
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
 //  Data members.
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
 
 private:
 // Track Cuts
@@ -381,6 +386,7 @@ private:
 
        TH3F*                                   fHistDataPID[3][3][5];                  //! TPC/TOF v.s. pT, [charge][mass assumption][ptclass]
        TH2F*                                   fHistTOFMismatch[3][3][5];              //! TOF Mismatch histograms, [charge][mass assumption][ptclass]
+       TH3F*                                   fHistTPCTOFMismatch[3][3][5];   //! TPC/TOF mismatch histograms (Same as TOF, but now the TPC hit of the track is included.)
 
 // QA histograms for Primary Reconstructed MC tracks.
        TList*                                  fPrimRecMCTrackQAHistos;                //
@@ -427,7 +433,7 @@ private:
 
        Int_t                                   fDebug;                                                 // Debug flag.
 
-       ClassDef(AliAODTrackCutsDiHadronPID,4);
+       ClassDef(AliAODTrackCutsDiHadronPID,5);
 
 };
 
index 41f3abd1fd09d7efe1fd915be8856cc5b00d41a6..5f0358b0a1c99a6352247f07c1d77a9390b2034b 100644 (file)
@@ -1,6 +1,23 @@
-// -------------------------------------------------------------------------
-//  INFO
-// -------------------------------------------------------------------------
+/************************************************************************* 
+* Copyright(c) 1998-2008, ALICE Experiment at CERN, All rights reserved. * 
+*                                                                        * 
+* Author: The ALICE Off-line Project.                                    * 
+* Contributors are mentioned in the code where appropriate.              * 
+*                                                                        * 
+* 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.                  * 
+**************************************************************************/
+
+// -----------------------------------------------------------------------
+//  This analysis task fills histograms with PID information of tracks 
+//  associated to a high p_T trigger.
+// -----------------------------------------------------------------------
+//  Author: Misha Veldhoen (misha.veldhoen@cern.ch)
 
 #include <iostream>
 
@@ -47,7 +64,7 @@ using namespace std;
 
 ClassImp(AliAnalysisTaskDiHadronPID);
 
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
 AliAnalysisTaskDiHadronPID::AliAnalysisTaskDiHadronPID():
        AliAnalysisTaskSE(),
        fPIDResponse(0x0),
@@ -94,7 +111,7 @@ AliAnalysisTaskDiHadronPID::AliAnalysisTaskDiHadronPID():
 
 }
 
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
 AliAnalysisTaskDiHadronPID::AliAnalysisTaskDiHadronPID(const char* name):
        AliAnalysisTaskSE(name),
        fPIDResponse(0x0),
@@ -143,7 +160,7 @@ AliAnalysisTaskDiHadronPID::AliAnalysisTaskDiHadronPID(const char* name):
 
 }
 
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
 AliAnalysisTaskDiHadronPID::~AliAnalysisTaskDiHadronPID() {;
 
        //
@@ -154,7 +171,7 @@ AliAnalysisTaskDiHadronPID::~AliAnalysisTaskDiHadronPID() {;
 
 }
 
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
 void AliAnalysisTaskDiHadronPID::UserCreateOutputObjects() {
 
        //
@@ -258,7 +275,7 @@ void AliAnalysisTaskDiHadronPID::UserCreateOutputObjects() {
 
 }
 
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
 void AliAnalysisTaskDiHadronPID::LocalInit() {
 
        //
@@ -269,7 +286,7 @@ void AliAnalysisTaskDiHadronPID::LocalInit() {
        
 }
 
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
 void AliAnalysisTaskDiHadronPID::UserExec(Option_t*) {
 
        //
@@ -451,7 +468,7 @@ void AliAnalysisTaskDiHadronPID::UserExec(Option_t*) {
 
 }
 
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
 Bool_t AliAnalysisTaskDiHadronPID::LoadExtMismatchHistos() {
 
        //
@@ -509,7 +526,7 @@ Bool_t AliAnalysisTaskDiHadronPID::LoadExtMismatchHistos() {
 
 }
 
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
 Double_t AliAnalysisTaskDiHadronPID::GenerateRandomHit(Double_t eta) {
 
        //
@@ -555,7 +572,7 @@ Double_t AliAnalysisTaskDiHadronPID::GenerateRandomHit(Double_t eta) {
 
 }
 
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
 void AliAnalysisTaskDiHadronPID::PrintPoolManagerContents() {
 
        //
@@ -595,7 +612,7 @@ void AliAnalysisTaskDiHadronPID::PrintPoolManagerContents() {
 
 }
 
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
 void AliAnalysisTaskDiHadronPID::Terminate(Option_t*) {;
 
        //
index 39129334dea49e2520a05976bc986caf37e10bb8..e36f378b5ee1dfe3c9fd68bf4c7bd2137d5c136d 100644 (file)
@@ -1,5 +1,8 @@
 #ifndef ALIANALYSYSTASKDIHADRONPID_H
 #define ALIANALYSYSTASKDIHADRONPID_H
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * 
+* See cxx source for full Copyright notice */ 
+/* $Id$ */
 
 #include "AliAnalysisTaskSE.h"
 #include "AliEventPoolManager.h"
index a3114e6307470ad563912bb8db3011afc4313e0a..5e9ea7abeba7b2064ef4adce7a2e58fdc9e23edb 100644 (file)
@@ -1,8 +1,22 @@
-// -------------------------------------------------------------------------
-//  Tools for drawing/ manipulating histograms.
-//  ! NEEDS CLEANUP !
-// -------------------------------------------------------------------------
-// Author: Misha Veldhoen (misha.veldhoen@cern.ch)
+/************************************************************************* 
+* Copyright(c) 1998-2008, ALICE Experiment at CERN, All rights reserved. * 
+*                                                                        * 
+* Author: The ALICE Off-line Project.                                    * 
+* Contributors are mentioned in the code where appropriate.              * 
+*                                                                        * 
+* 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.                  * 
+**************************************************************************/
+
+// -----------------------------------------------------------------------
+//  Tools for drawing/ manipulating histograms. (NEEDS CLEANUP!)
+// -----------------------------------------------------------------------
+//  Author: Misha Veldhoen (misha.veldhoen@cern.ch)
 
 #include <iostream>
 #include "TCanvas.h"
@@ -20,7 +34,7 @@
 
 using namespace std;
 
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
 TObjArray* AliHistToolsDiHadronPID::CreateSpectraComparison(const char* name, 
        const char* title, TH1F* h1, TH1F* h2, Int_t markerstyle, Bool_t logy) {
 
@@ -123,7 +137,7 @@ TObjArray* AliHistToolsDiHadronPID::CreateSpectraComparison(const char* name,
 
 }
 
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
 TH1F* AliHistToolsDiHadronPID::RebinVariableBinning(
        TH1F* histIn, Double_t* binsx, Int_t Nbinsx, Bool_t density) {
 
@@ -263,7 +277,7 @@ TH1F* AliHistToolsDiHadronPID::RebinVariableBinning(
 
 }
 
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
 TH1F* AliHistToolsDiHadronPID::TrimHisto(TH1F* histo, Int_t firstbin, Int_t lastbin) {
 
        const char* name = histo->GetName();
index 7f4191ec242adbe1b010f3c4815722e7b096c417..25d882f89a9b2471bf6376b1c3239fc60992c11c 100644 (file)
@@ -1,5 +1,8 @@
 #ifndef ALIHISTTOOLSDIHADRONPID_H
 #define ALIHISTTOOLSDIHADRONPID_H
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * 
+* See cxx source for full Copyright notice */ 
+/* $Id$ */
 
 class AliHistToolsDiHadronPID {
 
index 9471582e4d7feeae95d14e645407219cff3cfb78..d67206afcf63aaa3bb07aeec8b2b77b365e3631f 100644 (file)
@@ -1,10 +1,22 @@
-// -------------------------------------------------------------------------
-// Copies all info that is needed for the DiHadronPID analysis.
-// Possible Extension: At this moment the object is protected for returning
-// pointers to the original tracks. It could at some point be beneficial to
-// be able to access this information.
-// -------------------------------------------------------------------------
-// Author: Misha Veldhoen (misha.veldhoen@cern.ch)
+/************************************************************************* 
+* Copyright(c) 1998-2008, ALICE Experiment at CERN, All rights reserved. * 
+*                                                                        * 
+* Author: The ALICE Off-line Project.                                    * 
+* Contributors are mentioned in the code where appropriate.              * 
+*                                                                        * 
+* 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.                  * 
+**************************************************************************/
+
+// -----------------------------------------------------------------------
+//  Track class for the DiHadronPID analysis.
+// -----------------------------------------------------------------------
+//  Author: Misha Veldhoen (misha.veldhoen@cern.ch)
 
 #include <iostream>
 using namespace std;
@@ -20,12 +32,12 @@ using namespace std;
 #include "AliPIDResponse.h"
 #include "AliTPCPIDResponse.h"
 
-// Objects own include.
+// Class header.
 #include "AliTrackDiHadronPID.h"
 
 ClassImp(AliTrackDiHadronPID);
 
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
 AliTrackDiHadronPID::AliTrackDiHadronPID():
        TObject(),
        fAODTrack(0x0),
@@ -87,7 +99,7 @@ AliTrackDiHadronPID::AliTrackDiHadronPID():
 
 }
 
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
 AliTrackDiHadronPID::AliTrackDiHadronPID(AliAODTrack* track, AliAODTrack* globaltrack, AliAODMCParticle* mcparticle, AliPIDResponse* pidresponse):
        TObject(),
        fAODTrack(0x0),
@@ -189,7 +201,7 @@ AliTrackDiHadronPID::AliTrackDiHadronPID(AliAODTrack* track, AliAODTrack* global
                if ( sigmaTPCProton < 1.0) {cout<<"tpcsigmabelowone: "<<sigmaTPCProton<<endl;}*/
 }
 
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
 Bool_t AliTrackDiHadronPID::CopyBasicTrackInfo() {
 
        //
@@ -219,7 +231,7 @@ Bool_t AliTrackDiHadronPID::CopyBasicTrackInfo() {
 
 }
 
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
 Bool_t AliTrackDiHadronPID::CopyFlags() {
 
        //
@@ -243,7 +255,7 @@ Bool_t AliTrackDiHadronPID::CopyFlags() {
 
 }
 
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
 Bool_t AliTrackDiHadronPID::CopyDCAInfo() {
 
        //
@@ -270,7 +282,7 @@ Bool_t AliTrackDiHadronPID::CopyDCAInfo() {
 
 }
 
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
 Bool_t AliTrackDiHadronPID::CopyITSInfo() {
 
        //
@@ -292,7 +304,7 @@ Bool_t AliTrackDiHadronPID::CopyITSInfo() {
 
 }
 
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
 Bool_t AliTrackDiHadronPID::CopyTPCInfo() {
 
        //
@@ -321,7 +333,7 @@ Bool_t AliTrackDiHadronPID::CopyTPCInfo() {
 
 }
 
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
 Bool_t AliTrackDiHadronPID::CopyTOFInfo() {
 
        //
@@ -349,7 +361,7 @@ Bool_t AliTrackDiHadronPID::CopyTOFInfo() {
 
 }
 
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
 Bool_t AliTrackDiHadronPID::CopyMCInfo() {
 
        // Copies MC info (needs an MC track with the same label)
index 07ac20ffceed498a5606b430ff31bd068602ed4a..0f761c51af014c080a2b6141f74f34d6bcd8c037 100644 (file)
@@ -1,5 +1,8 @@
 #ifndef ALITRACKDIHADRONPID_H
 #define ALITRACKDIHADRONPID_H
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * 
+* See cxx source for full Copyright notice */ 
+/* $Id$ */
 
 #include <iostream>
 using namespace std;
index debb2a8272987bd3058c9b23c2a356b2502ddd7b..c23ede0db702a20a8059aff875179e9c06de0e14 100644 (file)
@@ -1111,44 +1111,44 @@ void drawProjections(TH2D *gHistBalanceFunction2D = 0x0,
     // store in txt files
     TString meanFileName = filename;
     if(kProjectInEta) 
-      meanFileName= "deltaEtaProjection_Mean.txt";
-    //meanFileName.ReplaceAll(".root","_DeltaEtaProjection_Mean.txt");
+      //meanFileName= "deltaEtaProjection_Mean.txt";
+      meanFileName.ReplaceAll(".root","_DeltaEtaProjection_Mean.txt");
     else              
-      meanFileName = "deltaPhiProjection_Mean.txt";
-      //meanFileName.ReplaceAll(".root","_DeltaPhiProjection_Mean.txt");
+      //meanFileName = "deltaPhiProjection_Mean.txt";
+      meanFileName.ReplaceAll(".root","_DeltaPhiProjection_Mean.txt");
     ofstream fileMean(meanFileName.Data(),ios::app);
     fileMean << " " << gHistBalanceFunctionSubtracted->GetMean() << " " <<gHistBalanceFunctionSubtracted->GetMeanError()<<endl;
     fileMean.close();
 
     TString rmsFileName = filename;
     if(kProjectInEta) 
-      rmsFileName = "deltaEtaProjection_Rms.txt";
-      //rmsFileName.ReplaceAll(".root","_DeltaEtaProjection_Rms.txt");
+      //rmsFileName = "deltaEtaProjection_Rms.txt";
+      rmsFileName.ReplaceAll(".root","_DeltaEtaProjection_Rms.txt");
     else              
-      rmsFileName = "deltaPhiProjection_Rms.txt");
-      //rmsFileName.ReplaceAll(".root","_DeltaPhiProjection_Rms.txt");
+      //rmsFileName = "deltaPhiProjection_Rms.txt");
+      rmsFileName.ReplaceAll(".root","_DeltaPhiProjection_Rms.txt");
     ofstream fileRms(rmsFileName.Data(),ios::app);
     fileRms << " " << gHistBalanceFunctionSubtracted->GetRMS() << " " <<gHistBalanceFunctionSubtracted->GetRMSError()<<endl;
     fileRms.close();
 
     TString skewnessFileName = filename;
     if(kProjectInEta) 
-      skewnessFileName = "deltaEtaProjection_Skewness.txt";
-      //skewnessFileName.ReplaceAll(".root","_DeltaEtaProjection_Skewness.txt");
+      //skewnessFileName = "deltaEtaProjection_Skewness.txt";
+      skewnessFileName.ReplaceAll(".root","_DeltaEtaProjection_Skewness.txt");
     else              
-      skewnessFileName = "deltaPhiProjection_Skewness.txt";
-    //skewnessFileName.ReplaceAll(".root","_DeltaPhiProjection_Skewness.txt");
+      //skewnessFileName = "deltaPhiProjection_Skewness.txt";
+      skewnessFileName.ReplaceAll(".root","_DeltaPhiProjection_Skewness.txt");
     ofstream fileSkewness(skewnessFileName.Data(),ios::app);
     fileSkewness << " " << gHistBalanceFunctionSubtracted->GetSkewness(1) << " " <<gHistBalanceFunctionSubtracted->GetSkewness(11)<<endl;
     fileSkewness.close();
 
     TString kurtosisFileName = filename;
     if(kProjectInEta) 
-      kurtosisFileName = "deltaEtaProjection_Kurtosis.txt";
-      //kurtosisFileName.ReplaceAll(".root","_DeltaEtaProjection_Kurtosis.txt");
+      //kurtosisFileName = "deltaEtaProjection_Kurtosis.txt";
+      kurtosisFileName.ReplaceAll(".root","_DeltaEtaProjection_Kurtosis.txt");
     else
-      kurtosisFileName = "deltaPhiProjection_Kurtosis.txt";              
-      //kurtosisFileName.ReplaceAll(".root","_DeltaPhiProjection_Kurtosis.txt");
+      //kurtosisFileName = "deltaPhiProjection_Kurtosis.txt";              
+      kurtosisFileName.ReplaceAll(".root","_DeltaPhiProjection_Kurtosis.txt");
     ofstream fileKurtosis(kurtosisFileName.Data(),ios::app);
     fileKurtosis << " " << gHistBalanceFunctionSubtracted->GetKurtosis(1) << " " <<gHistBalanceFunctionSubtracted->GetKurtosis(11)<<endl;
     fileKurtosis.close();
@@ -1194,44 +1194,44 @@ void drawProjections(TH2D *gHistBalanceFunction2D = 0x0,
     // store in txt files
     TString meanFileName = filename;
     if(kProjectInEta) 
-      meanFileName = "deltaEtaProjection_Mean.txt";
-      //meanFileName.ReplaceAll(".root","_DeltaEtaProjection_Mean.txt");
+      //meanFileName = "deltaEtaProjection_Mean.txt";
+      meanFileName.ReplaceAll(".root","_DeltaEtaProjection_Mean.txt");
     else              
-      meanFileName = "deltaPhiProjection_Mean.txt";
-      //meanFileName.ReplaceAll(".root","_DeltaPhiProjection_Mean.txt");
+      //meanFileName = "deltaPhiProjection_Mean.txt";
+      meanFileName.ReplaceAll(".root","_DeltaPhiProjection_Mean.txt");
     ofstream fileMean(meanFileName.Data(),ios::app);
     fileMean << " " << meanAnalytical << " " <<meanAnalyticalError<<endl;
     fileMean.close();
 
     TString rmsFileName = filename;
     if(kProjectInEta) 
-      rmsFileName = "deltaEtaProjection_Rms.txt";
-      //rmsFileName.ReplaceAll(".root","_DeltaEtaProjection_Rms.txt");
+      //rmsFileName = "deltaEtaProjection_Rms.txt";
+      rmsFileName.ReplaceAll(".root","_DeltaEtaProjection_Rms.txt");
     else              
-      rmsFileName = "deltaPhiProjection_Rms.txt";
-//rmsFileName.ReplaceAll(".root","_DeltaPhiProjection_Rms.txt");
+      //rmsFileName = "deltaPhiProjection_Rms.txt";
+      rmsFileName.ReplaceAll(".root","_DeltaPhiProjection_Rms.txt");
     ofstream fileRms(rmsFileName.Data(),ios::app);
     fileRms << " " << sigmaAnalytical << " " <<sigmaAnalyticalError<<endl;
     fileRms.close();
 
     TString skewnessFileName = filename;
     if(kProjectInEta) 
-      skewnessFileName = "deltaEtaProjection_Skewness.txt";
-      //skewnessFileName.ReplaceAll(".root","_DeltaEtaProjection_Skewness.txt");
+      //skewnessFileName = "deltaEtaProjection_Skewness.txt";
+      skewnessFileName.ReplaceAll(".root","_DeltaEtaProjection_Skewness.txt");
     else              
-      skewnessFileName = "deltaPhiProjection_Skewness.txt";
-      //skewnessFileName.ReplaceAll(".root","_DeltaPhiProjection_Skewness.txt");
+      //skewnessFileName = "deltaPhiProjection_Skewness.txt";
+      skewnessFileName.ReplaceAll(".root","_DeltaPhiProjection_Skewness.txt");
     ofstream fileSkewness(skewnessFileName.Data(),ios::app);
     fileSkewness << " " << skewnessAnalytical << " " <<skewnessAnalyticalError<<endl;
     fileSkewness.close();
 
     TString kurtosisFileName = filename;
     if(kProjectInEta) 
-      kurtosisFileName = "deltaEtaProjection_Kurtosis.txt";
-      //kurtosisFileName.ReplaceAll(".root","_DeltaEtaProjection_Kurtosis.txt");
+      //kurtosisFileName = "deltaEtaProjection_Kurtosis.txt";
+      kurtosisFileName.ReplaceAll(".root","_DeltaEtaProjection_Kurtosis.txt");
     else              
-      kurtosisFileName = "deltaPhiProjection_Kurtosis.txt";
-      //kurtosisFileName.ReplaceAll(".root","_DeltaPhiProjection_Kurtosis.txt");
+      //kurtosisFileName = "deltaPhiProjection_Kurtosis.txt";
+      kurtosisFileName.ReplaceAll(".root","_DeltaPhiProjection_Kurtosis.txt");
     ofstream fileKurtosis(kurtosisFileName.Data(),ios::app);
     fileKurtosis << " " << kurtosisAnalytical << " " <<kurtosisAnalyticalError<<endl;
     fileKurtosis.close();
@@ -1429,4 +1429,11 @@ void drawBFPsi2DFromCorrelationFunctions(const char* lhcPeriod = "LHC10h",
                  kTRUE,
                  eventClass.Data(),
                  kFALSE);
+
+  TString outFileName = filename;
+  outFileName.ReplaceAll("correlationFunction","balanceFunction2D");
+  gHistBalanceFunction2D->SetName("gHistBalanceFunctionSubtracted");
+  TFile *fOut = TFile::Open(outFileName.Data(),"recreate");  
+  gHistBalanceFunction2D->Write();
+  fOut->Close();
 }
index 75d4622211bd9a670849219f2e385187f0e346c6..f059e9a6672bec2d025bc576205c93549ce3bd94 100644 (file)
@@ -104,6 +104,7 @@ TList *GetListOfObjects(const char* filename,
   else{
     listBF = dynamic_cast<TList *>(dir->Get(listBFName.Data()));
     cout<<"======================================================="<<endl;
+    cout<<"List name (control): "<<listBFName.Data()<<endl;
     cout<<"List name: "<<listBF->GetName()<<endl;
     //listBF->ls();