-// -------------------------------------------------------------------------
-// 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"
ClassImp(AliAODEventCutsDiHadronPID);
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
AliAODEventCutsDiHadronPID::AliAODEventCutsDiHadronPID():
TNamed(),
fIsPbPb(kTRUE),
}
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
AliAODEventCutsDiHadronPID::AliAODEventCutsDiHadronPID(const char* name):
TNamed(name,"AOD Event Cuts"),
fIsPbPb(kTRUE),
}
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
AliAODEventCutsDiHadronPID::~AliAODEventCutsDiHadronPID() {
//
}
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
Long64_t AliAODEventCutsDiHadronPID::Merge(TCollection* list) {
//
}
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
void AliAODEventCutsDiHadronPID::CreateHistos() {
cout<<"AliAODEventCutsDiHadronPID - Creating histograms"<<endl;
}
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
Bool_t AliAODEventCutsDiHadronPID::IsSelected(AliAODEvent* event) {
if (fDebug > 1) {cout << Form("File: %s, Line: %i, Function: %s",__FILE__,__LINE__,__func__) << endl;}
}
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
void AliAODEventCutsDiHadronPID::PrintCuts() {
// NOT IMPLEMENTED.
#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"
-// -------------------------------------------------------------------------
-// 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>
ClassImp(AliAODTrackCutsDiHadronPID);
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
AliAODTrackCutsDiHadronPID::AliAODTrackCutsDiHadronPID():
TNamed(),
fMinPt(0.),
for (Int_t iPtClass = 0; iPtClass < 5; iPtClass++) {
fHistDataPID[iHistoName][iSpecies][iPtClass] = 0x0;
fHistTOFMismatch[iHistoName][iSpecies][iPtClass] = 0x0;
+ fHistTPCTOFMismatch[iHistoName][iSpecies][iPtClass] = 0x0;
}
}
}
}
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
AliAODTrackCutsDiHadronPID::AliAODTrackCutsDiHadronPID(const char* name):
TNamed(name,"AOD Track Cuts"),
fMinPt(0.),
for (Int_t iPtClass = 0; iPtClass < 5; iPtClass++) {
fHistDataPID[iHistoName][iSpecies][iPtClass] = 0x0;
fHistTOFMismatch[iHistoName][iSpecies][iPtClass] = 0x0;
+ fHistTPCTOFMismatch[iHistoName][iSpecies][iPtClass] = 0x0;
+
}
}
}
}
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
void AliAODTrackCutsDiHadronPID::InitializeDefaultHistoNamesAndAxes() {
// Initializes the histogram name conventions and the ranges of all the histograms
}
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
AliAODTrackCutsDiHadronPID::~AliAODTrackCutsDiHadronPID() {
//
}
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
Long64_t AliAODTrackCutsDiHadronPID::Merge(TCollection* list) {
//
}
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
void AliAODTrackCutsDiHadronPID::PrintCuts() {}
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
void AliAODTrackCutsDiHadronPID::CreateHistos() {
// Function should be called by the UserCreateOutput() function of the
}
}
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
void AliAODTrackCutsDiHadronPID::StartNewEvent() {
// FIXME: This method is now only suited for Data (3 histo classes only.)
}
}
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
void AliAODTrackCutsDiHadronPID::EventIsDone(Bool_t IsMC) {
// FIXME: This method is now only suited for Data (3 histo classes only.)
}
}
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
Bool_t AliAODTrackCutsDiHadronPID::IsSelectedData(AliTrackDiHadronPID* track, Double_t randomhittime) {
//
}
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
Bool_t AliAODTrackCutsDiHadronPID::IsSelectedGeneratedMC(AliAODMCParticle* particle) {
//
}
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
Bool_t AliAODTrackCutsDiHadronPID::IsSelectedReconstructedMC(AliTrackDiHadronPID* track) {
if (fDebug > 1) {cout << Form("File: %s, Line: %i, Function: %s",__FILE__,__LINE__,__func__) << endl;}
}
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
Bool_t AliAODTrackCutsDiHadronPID::FillDataHistos(Int_t histoclass, AliTrackDiHadronPID* track) {
if (fDebug > 1) {cout << Form("File: %s, Line: %i, Function: %s",__FILE__,__LINE__,__func__) << endl;}
}
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
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;}
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));
}
}
}
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
Bool_t AliAODTrackCutsDiHadronPID::FillGenMCHistos(Int_t histoclass, AliAODMCParticle* particle) {
if (fDebug > 1) {cout << Form("File: %s, Line: %i, Function: %s",__FILE__,__LINE__,__func__) << endl;}
}
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
Bool_t AliAODTrackCutsDiHadronPID::FillRecMCHistos(Int_t histoclass, AliTrackDiHadronPID* track) {
if (fDebug > 1) {cout << Form("File: %s, Line: %i, Function: %s",__FILE__,__LINE__,__func__) << endl;}
}
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
Bool_t AliAODTrackCutsDiHadronPID::InitializeDataHistos(Int_t histoclass) {
cout<<"AliAODTrackCutsDiHadronPID - Creating Data Histograms of Class "<<histoclass<<endl;
// 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]);
+
}
}
}
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
Bool_t AliAODTrackCutsDiHadronPID::InitializeGenMCHistos(Int_t histoclass) {
cout<<"AliAODTrackCutsDiHadronPID - Creating Generated MC Histograms of Class "<<histoclass<<endl;
}
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
Bool_t AliAODTrackCutsDiHadronPID::InitializeRecMCHistos(Int_t histoclass) {
cout<<"AliAODTrackCutsDiHadronPID - Creating Reconstructed MC Histograms of Class "<<histoclass<<endl;
}
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
TH1F* AliAODTrackCutsDiHadronPID::InitializePtSpectrum(const char* name, Int_t histoclass) {
if (fDebug > 1) {cout << Form("File: %s, Line: %i, Function: %s",__FILE__,__LINE__,__func__) << endl;}
}
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
TH3F* AliAODTrackCutsDiHadronPID::InitializePhiEtaPt(const char* name, Int_t histoclass) {
if (fDebug > 1) {cout << Form("File: %s, Line: %i, Function: %s",__FILE__,__LINE__,__func__) << endl;}
}
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
TH2F* AliAODTrackCutsDiHadronPID::InitializeDCASpectrum(const char* name, Int_t histoclass) {
if (fDebug > 1) {cout << Form("File: %s, Line: %i, Function: %s",__FILE__,__LINE__,__func__) << endl;}
}
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
TH1F* AliAODTrackCutsDiHadronPID::InitializeNTracksHisto(const char* name, Int_t histoclass) {
if (fDebug > 1) {cout << Form("File: %s, Line: %i, Function: %s",__FILE__,__LINE__,__func__) << endl;}
}
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
TH1F* AliAODTrackCutsDiHadronPID::InitializeDCAxyHisto(const char* name, Int_t histoclass) {
if (fDebug > 1) {cout << Form("File: %s, Line: %i, Function: %s",__FILE__,__LINE__,__func__) << endl;}
}
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
TH1F* AliAODTrackCutsDiHadronPID::InitializeDCAzHisto(const char* name, Int_t histoclass) {
if (fDebug > 1) {cout << Form("File: %s, Line: %i, Function: %s",__FILE__,__LINE__,__func__) << endl;}
}
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
TH3F* AliAODTrackCutsDiHadronPID::InitializeAcceptanceHisto(const char* /*name*/, Int_t /*histoclass*/) {
if (fDebug > 1) {cout << Form("File: %s, Line: %i, Function: %s",__FILE__,__LINE__,__func__) << endl;}
}
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
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;}
}
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
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;}
}
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
TH1F* AliAODTrackCutsDiHadronPID::GetHistDataTOFProjection(Int_t charge, Int_t species, Int_t ptbin) {
// Returns a projection in TOF of the data histogram.
}
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
+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.
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;
+
+}
#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"
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.
// 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.;}
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:
void SetDebugLevel(Int_t debuglevel) {fDebug = debuglevel;}
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
// Methods called by the analysis task.
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
public:
Bool_t IsSelectedGeneratedMC(AliAODMCParticle* particle);
Bool_t IsSelectedReconstructedMC(AliTrackDiHadronPID* track);
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
// Internal methods.
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
public:
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
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; //
Int_t fDebug; // Debug flag.
- ClassDef(AliAODTrackCutsDiHadronPID,4);
+ ClassDef(AliAODTrackCutsDiHadronPID,5);
};
-// -------------------------------------------------------------------------
-// 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>
ClassImp(AliAnalysisTaskDiHadronPID);
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
AliAnalysisTaskDiHadronPID::AliAnalysisTaskDiHadronPID():
AliAnalysisTaskSE(),
fPIDResponse(0x0),
}
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
AliAnalysisTaskDiHadronPID::AliAnalysisTaskDiHadronPID(const char* name):
AliAnalysisTaskSE(name),
fPIDResponse(0x0),
}
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
AliAnalysisTaskDiHadronPID::~AliAnalysisTaskDiHadronPID() {;
//
}
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
void AliAnalysisTaskDiHadronPID::UserCreateOutputObjects() {
//
}
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
void AliAnalysisTaskDiHadronPID::LocalInit() {
//
}
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
void AliAnalysisTaskDiHadronPID::UserExec(Option_t*) {
//
}
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
Bool_t AliAnalysisTaskDiHadronPID::LoadExtMismatchHistos() {
//
}
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
Double_t AliAnalysisTaskDiHadronPID::GenerateRandomHit(Double_t eta) {
//
}
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
void AliAnalysisTaskDiHadronPID::PrintPoolManagerContents() {
//
}
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
void AliAnalysisTaskDiHadronPID::Terminate(Option_t*) {;
//
#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"
-// -------------------------------------------------------------------------
-// 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"
using namespace std;
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
TObjArray* AliHistToolsDiHadronPID::CreateSpectraComparison(const char* name,
const char* title, TH1F* h1, TH1F* h2, Int_t markerstyle, Bool_t logy) {
}
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
TH1F* AliHistToolsDiHadronPID::RebinVariableBinning(
TH1F* histIn, Double_t* binsx, Int_t Nbinsx, Bool_t density) {
}
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
TH1F* AliHistToolsDiHadronPID::TrimHisto(TH1F* histo, Int_t firstbin, Int_t lastbin) {
const char* name = histo->GetName();
#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 {
-// -------------------------------------------------------------------------
-// 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;
#include "AliPIDResponse.h"
#include "AliTPCPIDResponse.h"
-// Objects own include.
+// Class header.
#include "AliTrackDiHadronPID.h"
ClassImp(AliTrackDiHadronPID);
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
AliTrackDiHadronPID::AliTrackDiHadronPID():
TObject(),
fAODTrack(0x0),
}
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
AliTrackDiHadronPID::AliTrackDiHadronPID(AliAODTrack* track, AliAODTrack* globaltrack, AliAODMCParticle* mcparticle, AliPIDResponse* pidresponse):
TObject(),
fAODTrack(0x0),
if ( sigmaTPCProton < 1.0) {cout<<"tpcsigmabelowone: "<<sigmaTPCProton<<endl;}*/
}
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
Bool_t AliTrackDiHadronPID::CopyBasicTrackInfo() {
//
}
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
Bool_t AliTrackDiHadronPID::CopyFlags() {
//
}
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
Bool_t AliTrackDiHadronPID::CopyDCAInfo() {
//
}
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
Bool_t AliTrackDiHadronPID::CopyITSInfo() {
//
}
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
Bool_t AliTrackDiHadronPID::CopyTPCInfo() {
//
}
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
Bool_t AliTrackDiHadronPID::CopyTOFInfo() {
//
}
-// -------------------------------------------------------------------------
+// -----------------------------------------------------------------------
Bool_t AliTrackDiHadronPID::CopyMCInfo() {
// Copies MC info (needs an MC track with the same label)
#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;
// 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();
// 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();
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();
}
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();