#include <AliESD.h>
#include <AliESDVertex.h>
-#include <AliGenEventHeader.h>
-#include <AliGenPythiaEventHeader.h>
-#include <AliGenCocktailEventHeader.h>
-
-
//____________________________________________________________________
ClassImp(AliPWG0Helper)
return kTRUE;
}
-//____________________________________________________________________
-const Int_t AliPWG0Helper::GetPythiaEventProcessType(AliHeader* aHeader, Bool_t adebug) {
- //
- // get the process type of the event.
- //
-
- // can only read pythia headers, either directly or from cocktalil header
- AliGenPythiaEventHeader* pythiaGenHeader = dynamic_cast<AliGenPythiaEventHeader*>(aHeader->GenEventHeader());
-
- if (!pythiaGenHeader) {
-
- AliGenCocktailEventHeader* genCocktailHeader = dynamic_cast<AliGenCocktailEventHeader*>(aHeader->GenEventHeader());
- if (!genCocktailHeader) {
- printf("AliPWG0Helper::GetProcessType : Unknown header type (not Pythia or Cocktail). \n");
- return -1;
- }
-
- TList* headerList = genCocktailHeader->GetHeaders();
- if (!headerList) {
- return -1;
- }
-
- for (Int_t i=0; i<headerList->GetEntries(); i++) {
- pythiaGenHeader = dynamic_cast<AliGenPythiaEventHeader*>(headerList->At(i));
- if (pythiaGenHeader)
- break;
- }
-
- if (!pythiaGenHeader) {
- printf("AliPWG0Helper::GetProcessType : Could not find Pythia header. \n");
- return -1;
- }
- }
-
- if (adebug) {
- printf("AliPWG0Helper::GetProcessType : Pythia process type found: %d \n",pythiaGenHeader->ProcessType());
- }
-
- return pythiaGenHeader->ProcessType();
-}
-
//____________________________________________________________________
void AliPWG0Helper::CreateProjections(TH3* hist)
{
static Bool_t IsVertexReconstructed(AliESD* aEsd);
static Bool_t IsPrimaryCharged(TParticle* aParticle, Int_t aTotalPrimaries, Bool_t adebug = kFALSE);
- static const Int_t GetPythiaEventProcessType(AliHeader* aHeader, Bool_t adebug = kFALSE);
-
static void CreateProjections(TH3* hist);
static void CreateDividedProjections(TH3* hist, TH3* hist2, const char* axis = 0, Bool_t putErrors = kFALSE);
- static const char* GetAxisTitle(TH3* hist, const char axis);
+ static const char* GetAxisTitle(TH3* hist, const char axis);
protected:
ClassDef(AliPWG0Helper, 0)
--- /dev/null
+/* $Id$ */
+
+#include <AliPWG0depHelper.h>
+
+#include <AliHeader.h>
+
+#include <AliGenEventHeader.h>
+#include <AliGenPythiaEventHeader.h>
+#include <AliGenCocktailEventHeader.h>
+
+//____________________________________________________________________
+ClassImp(AliPWG0depHelper)
+
+//____________________________________________________________________
+const Int_t AliPWG0depHelper::GetPythiaEventProcessType(AliHeader* aHeader, Bool_t adebug) {
+ //
+ // get the process type of the event.
+ //
+
+ // can only read pythia headers, either directly or from cocktalil header
+ AliGenPythiaEventHeader* pythiaGenHeader = dynamic_cast<AliGenPythiaEventHeader*>(aHeader->GenEventHeader());
+
+ if (!pythiaGenHeader) {
+
+ AliGenCocktailEventHeader* genCocktailHeader = dynamic_cast<AliGenCocktailEventHeader*>(aHeader->GenEventHeader());
+ if (!genCocktailHeader) {
+ printf("AliPWG0depHelper::GetProcessType : Unknown header type (not Pythia or Cocktail). \n");
+ return -1;
+ }
+
+ TList* headerList = genCocktailHeader->GetHeaders();
+ if (!headerList) {
+ return -1;
+ }
+
+ for (Int_t i=0; i<headerList->GetEntries(); i++) {
+ pythiaGenHeader = dynamic_cast<AliGenPythiaEventHeader*>(headerList->At(i));
+ if (pythiaGenHeader)
+ break;
+ }
+
+ if (!pythiaGenHeader) {
+ printf("AliPWG0depHelper::GetProcessType : Could not find Pythia header. \n");
+ return -1;
+ }
+ }
+
+ if (adebug) {
+ printf("AliPWG0depHelper::GetProcessType : Pythia process type found: %d \n",pythiaGenHeader->ProcessType());
+ }
+
+ return pythiaGenHeader->ProcessType();
+}
--- /dev/null
+/* $Id$ */
+
+#ifndef ALIPWG0DEPHELPER_H
+#define ALIPWG0DEPHELPER_H
+
+#include <TObject.h>
+
+// static helper functions that depend on more than ESD
+
+class AliHeader;
+
+class AliPWG0depHelper : public TObject
+{
+ public:
+ static const Int_t GetPythiaEventProcessType(AliHeader* aHeader, Bool_t adebug = kFALSE);
+
+ protected:
+ ClassDef(AliPWG0depHelper, 0)
+
+ private:
+ AliPWG0depHelper(const AliPWG0depHelper&);
+ AliPWG0depHelper& operator=(const AliPWG0depHelper&);
+};
+
+#endif
+
return 0;
}
- proof->SetParallel(20);
-
// enable the new packetizer
//proof->AddInput(new TNamed("PROOF_Packetizer", "TPacketizerProgressive"));
{
printf("Enabling package %s locally...\n", package);
+ TString currentDir(gSystem->pwd());
if (!gSystem->cd(package))
return kFALSE;
gROOT->ProcessLine(".x PROOF-INF/SETUP.C");
- gSystem->cd("..");
+ gSystem->cd(currentDir);
return kTRUE;
}
#pragma link off all classes;
#pragma link off all functions;
-#pragma link C++ class AliSelector+;
-
#pragma link C++ class dNdEtaAnalysis+;
#pragma link C++ class AlidNdEtaCorrection+;
#pragma link off all classes;
#pragma link off all functions;
-#pragma link C++ class AliSelectorRL+;
+#pragma link C++ class AliPWG0depHelper+;
#endif
#pragma link C++ class AlidNdEtaCorrectionSelector+;
#pragma link C++ class AlidNdEtaAnalysisMCSelector+;
#pragma link C++ class AlidNdEtaAnalysisESDSelector+;
-#pragma link C++ class AlidNdEtaVertexRecEffSelector+;
#pragma link C++ class AliMultiplicityESDSelector+;
#pragma link C++ class AliMultiplicityMCSelector+;
#pragma link C++ class AlidNdEtaSystematicsSelector+;
+#pragma link C++ class AliTestESDtrackCutsSelector+;
#endif
return kTRUE;
}
- Float_t triggerCorr = fdNdEtaCorrection->GetTriggerCorrection(vtx[2], nGoodTracks);
+ Float_t triggerCorr = fdNdEtaCorrection->GetTriggerBiasCorrection(vtx[2], nGoodTracks);
if (triggerCorr <= 0)
{
AliDebug(AliLog::kError, Form("INFO: Skipping event because triggerCorr is <= 0 (%f)", triggerCorr));
fdNdEtaAnalysis(0),
fVertex(0),
fPartEta(0),
+ fPartPt(0),
fEvents(0)
{
//
fdNdEtaAnalysis = new dNdEtaAnalysis("dndeta", "dndeta");
fVertex = new TH3F("vertex_check", "vertex_check", 50, -50, 50, 50, -50, 50, 50, -50, 50);
fPartEta = new TH1F("dndeta_check", "dndeta_check", 120, -6, 6);
+ fPartPt = new TH1F("dndeta_check_pt", "dndeta_check_pt", 1000, 0, 10);
fPartEta->Sumw2();
}
{
AliSelectorRL::Init(tree);
- tree->SetBranchStatus("ESD", 0);
+ tree->SetBranchStatus("*", 0);
}
Bool_t AlidNdEtaAnalysisMCSelector::Process(Long64_t entry)
fVertex->Fill(particle->Vx(), particle->Vy(), particle->Vz());
fPartEta->Fill(particle->Eta());
+
+ if (TMath::Abs(particle->Eta()) < 0.8)
+ fPartPt->Fill(particle->Pt());
}
fdNdEtaAnalysis->FillEvent(vtxMC[2], 1);
}
fOutput->Add(fdNdEtaAnalysis);
+ fOutput->Add(fPartPt);
}
void AlidNdEtaAnalysisMCSelector::Terminate()
AliSelectorRL::Terminate();
fdNdEtaAnalysis = dynamic_cast<dNdEtaAnalysis*> (fOutput->FindObject("dndeta"));
+ fPartPt = dynamic_cast<TH1F*> (fOutput->FindObject("dndeta_check_pt"));
- if (!fdNdEtaAnalysis)
+ if (!fdNdEtaAnalysis || !fPartPt)
{
- AliDebug(AliLog::kError, Form("ERROR: Histograms not available %p", (void*) fdNdEtaAnalysis));
+ AliDebug(AliLog::kError, Form("ERROR: Histograms not available %p %p", (void*) fdNdEtaAnalysis, (void*) fPartPt));
return;
}
canvas->cd(2);
fPartEta->Draw();
}
+
+ if (fPartPt)
+ {
+ fPartPt->Scale(1.0/fEvents);
+ fPartPt->Scale(1.0/fPartPt->GetBinWidth(1));
+
+ new TCanvas("control2", "control2", 500, 500);
+ fPartPt->Draw();
+ }
}
TH3F* fVertex; //! vertex of counted particles
TH1F* fPartEta; //! counted particles as function of eta
+ TH1F* fPartPt; //! counted particles as function of pt
Int_t fEvents; //! number of processed events
AlidNdEtaAnalysisMCSelector(const AlidNdEtaAnalysisMCSelector&);
// constructor
//
- Float_t binLimitsPt[] = {0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0, 1.5, 2.0, 10.0, 100.0};
+ Float_t binLimitsPt[] = {0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0, 1.5, 2.0, 5.0, 10.0, 100.0};
TString matrixName;
matrixName.Form("%s_nTrackToNPart", name);
- fTrack2ParticleCorrection = new AliCorrectionMatrix3D(matrixName, matrixName, 40, -20, 20, 60, -6, 6, 14, binLimitsPt);
+ fTrack2ParticleCorrection = new AliCorrectionMatrix3D(matrixName, matrixName, 40, -20, 20, 20, -2, 2, 15, binLimitsPt);
Float_t binLimitsN[] = {-0.5, 0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 6.5, 7.5, 8.5, 9.5,
10.5, 12.5, 14.5, 16.5, 18.5, 20.5, 25.5, 30.5, 40.5, 50.5, 100.5, 300.5};
fTriggerBiasCorrectionMBToINEL ->SetAxisTitles("vtx z [cm]", "Ntracks");
fTriggerBiasCorrectionMBToNSD ->SetAxisTitles("vtx z [cm]", "Ntracks");
fTriggerBiasCorrectionMBToND ->SetAxisTitles("vtx z [cm]", "Ntracks");
-
}
//____________________________________________________________________
#include <AliHeader.h>
#include <AliGenEventHeader.h>
-#include <AliGenPythiaEventHeader.h>
-#include <AliGenCocktailEventHeader.h>
+#include <../PYTHIA6/AliGenPythiaEventHeader.h>
+#include <../EVGEN/AliGenCocktailEventHeader.h>
#include "esdTrackCuts/AliESDtrackCuts.h"
#include "dNdEta/AlidNdEtaCorrection.h"
#include "AliPWG0Helper.h"
+#include "AliPWG0depHelper.h"
ClassImp(AlidNdEtaCorrectionSelector)
fClustersTPCNeg = new TH1F("clusters_tpc_neg", "clusters_tpc_neg", 160, -0.5, 159.5);
}
+void AlidNdEtaCorrectionSelector::Init(TTree* tree)
+{
+ // read the user objects
+
+ AliSelectorRL::Init(tree);
+
+ // Enable only the needed branches
+ if (tree)
+ {
+ tree->SetBranchStatus("*", 0);
+ tree->SetBranchStatus("fTriggerMask", 1);
+ tree->SetBranchStatus("fSPDVertex*", 1);
+ tree->SetBranchStatus("fTracks.fLabel", 1);
+ tree->SetBranchStatus("fTracks.fITSncls", 1);
+ tree->SetBranchStatus("fTracks.fTPCncls", 1);
+
+ AliESDtrackCuts::EnableNeededBranches(tree);
+ }
+}
+
Bool_t AlidNdEtaCorrectionSelector::Process(Long64_t entry)
{
// The Process() function is called for each entry in the tree (or possibly
}
// getting process information
- Int_t processtype = AliPWG0Helper::GetPythiaEventProcessType(header);
+ Int_t processtype = AliPWG0depHelper::GetPythiaEventProcessType(header);
AliDebug(AliLog::kDebug+1,Form(" Found pythia procces type %d", processtype));
if (processtype<0)
void ReadUserObjects(TTree* tree);
virtual void Begin(TTree *tree);
virtual void SlaveBegin(TTree *tree);
+ virtual void Init(TTree *tree);
virtual Bool_t Process(Long64_t entry);
virtual void SlaveTerminate();
virtual void Terminate();
#include <AliStack.h>
#include <AliHeader.h>
#include <AliGenEventHeader.h>
-#include <AliGenPythiaEventHeader.h>
-#include <AliGenCocktailEventHeader.h>
-
+#include <../PYTHIA6/AliGenPythiaEventHeader.h>
+#include <../EVGEN/AliGenCocktailEventHeader.h>
#include "esdTrackCuts/AliESDtrackCuts.h"
#include "AliPWG0Helper.h"
+#include "AliPWG0depHelper.h"
#include "dNdEta/AlidNdEtaCorrection.h"
ClassImp(AlidNdEtaSystematicsSelector)
}
// getting process information
- Int_t processtype = AliPWG0Helper::GetPythiaEventProcessType(header);
+ Int_t processtype = AliPWG0depHelper::GetPythiaEventProcessType(header);
AliDebug(AliLog::kInfo, Form("Pythia process type %d.",processtype));
if (triggerBiasStudy) fdNdEtaCorrectionTriggerBias[0]->FillEventAll(vtxMC[2], nGoodTracks);
if (eventTriggered) {
- if (triggerBiasStudy) fdNdEtaCorrectionTriggerBias[0]->FillEventWithTrigger(vtxMC[2], nGoodTracks);
- if (vertexRecoStudy) fdNdEtaCorrectionVertexReco[0]->FillEventWithTrigger(vtxMC[2], nGoodTracks);
+ if (triggerBiasStudy) fdNdEtaCorrectionTriggerBias[0]->FillEventWithTrigger(vtxMC[2], nGoodTracks);
+ if (vertexRecoStudy) fdNdEtaCorrectionVertexReco[0]->FillEventWithTrigger(vtxMC[2], nGoodTracks);
- if (vertexReconstructed)
- if (vertexRecoStudy) fdNdEtaCorrectionVertexReco[0]->FillEventWithTriggerWithReconstructedVertex(vtxMC[2], nGoodTracks);
+ if (vertexReconstructed)
+ if (vertexRecoStudy) fdNdEtaCorrectionVertexReco[0]->FillEventWithTriggerWithReconstructedVertex(vtxMC[2], nGoodTracks);
}
}
if (triggerBiasStudy) fdNdEtaCorrectionTriggerBias[1]->FillEventAll(vtxMC[2], nGoodTracks);
if (eventTriggered) {
- if (triggerBiasStudy) fdNdEtaCorrectionTriggerBias[1]->FillEventWithTrigger(vtxMC[2], nGoodTracks);
- if (vertexRecoStudy) fdNdEtaCorrectionVertexReco[1]->FillEventWithTrigger(vtxMC[2], nGoodTracks);
+ if (triggerBiasStudy) fdNdEtaCorrectionTriggerBias[1]->FillEventWithTrigger(vtxMC[2], nGoodTracks);
+ if (vertexRecoStudy) fdNdEtaCorrectionVertexReco[1]->FillEventWithTrigger(vtxMC[2], nGoodTracks);
- if (vertexReconstructed)
- if (vertexRecoStudy) fdNdEtaCorrectionVertexReco[1]->FillEventWithTriggerWithReconstructedVertex(vtxMC[2], nGoodTracks);
+ if (vertexReconstructed)
+ if (vertexRecoStudy) fdNdEtaCorrectionVertexReco[1]->FillEventWithTriggerWithReconstructedVertex(vtxMC[2], nGoodTracks);
}
}
if (triggerBiasStudy) fdNdEtaCorrectionTriggerBias[2]->FillEventAll(vtxMC[2], nGoodTracks);
if (eventTriggered) {
- if (triggerBiasStudy) fdNdEtaCorrectionTriggerBias[2]->FillEventWithTrigger(vtxMC[2], nGoodTracks);
- if (vertexRecoStudy) fdNdEtaCorrectionVertexReco[2]->FillEventWithTrigger(vtxMC[2], nGoodTracks);
+ if (triggerBiasStudy) fdNdEtaCorrectionTriggerBias[2]->FillEventWithTrigger(vtxMC[2], nGoodTracks);
+ if (vertexRecoStudy) fdNdEtaCorrectionVertexReco[2]->FillEventWithTrigger(vtxMC[2], nGoodTracks);
- if (vertexReconstructed)
- if (vertexRecoStudy) fdNdEtaCorrectionVertexReco[2]->FillEventWithTriggerWithReconstructedVertex(vtxMC[2], nGoodTracks);
+ if (vertexReconstructed)
+ if (vertexRecoStudy) fdNdEtaCorrectionVertexReco[2]->FillEventWithTriggerWithReconstructedVertex(vtxMC[2], nGoodTracks);
}
}
}
fdNdEtaCorrectionSpecies[i] = dynamic_cast<AlidNdEtaCorrection*> (fOutput->FindObject(Form("correction_%d", i)));
fSigmaVertex = dynamic_cast<TH1F*> (fOutput->FindObject("fSigmaVertex"));
+ fdNdEtaCorrectionVertexReco[0] = dynamic_cast<AlidNdEtaCorrection*> (fOutput->FindObject("vertexRecoND"));
+ fdNdEtaCorrectionVertexReco[1] = dynamic_cast<AlidNdEtaCorrection*> (fOutput->FindObject("vertexRecoSD"));
+ fdNdEtaCorrectionVertexReco[2] = dynamic_cast<AlidNdEtaCorrection*> (fOutput->FindObject("vertexRecoDD"));
+
+ fdNdEtaCorrectionTriggerBias[0] = dynamic_cast<AlidNdEtaCorrection*> (fOutput->FindObject("triggerBiasND"));
+ fdNdEtaCorrectionTriggerBias[1] = dynamic_cast<AlidNdEtaCorrection*> (fOutput->FindObject("triggerBiasSD"));
+ fdNdEtaCorrectionTriggerBias[2] = dynamic_cast<AlidNdEtaCorrection*> (fOutput->FindObject("triggerBiasDD"));
+
if (fPIDParticles)
{
TDatabasePDG* pdgDB = new TDatabasePDG;
+++ /dev/null
-/* $Id$ */
-
-#include "AlidNdEtaVertexRecEffSelector.h"
-
-#include <TCanvas.h>
-#include <TH1F.h>
-#include <TTree.h>
-#include <TParticle.h>
-#include <TFile.h>
-
-#include <AliLog.h>
-#include <AliGenEventHeader.h>
-#include <AliHeader.h>
-#include <AliESD.h>
-#include <AliESDVertex.h>
-
-#include "AliPWG0Helper.h"
-
-//
-// This class plots the vertex reconstruction efficiency
-// If a vertex was reconstructed is decided by the function CheckVertex()
-// In any case the *generated* multiplicity is filled into the histogram
-//
-
-ClassImp(AlidNdEtaVertexRecEffSelector)
-
-const Float_t AlidNdEtaVertexRecEffSelector::fkEtaRange = 0.9;
-
-AlidNdEtaVertexRecEffSelector::AlidNdEtaVertexRecEffSelector() :
- AliSelectorRL(),
- fdNGen(0),
- fdNRec(0),
- fVtxGen(0),
- fVtxRec(0)
-{
- //
- // Constructor. Initialization of pointers
- //
-}
-
-AlidNdEtaVertexRecEffSelector::~AlidNdEtaVertexRecEffSelector()
-{
- //
- // Destructor
- //
-
- // histograms are in the output list and deleted when the output
- // list is deleted by the TSelector dtor
-}
-
-void AlidNdEtaVertexRecEffSelector::SlaveBegin(TTree * tree)
-{
- // initializes the histograms
-
- AliSelectorRL::SlaveBegin(tree);
-
- fdNGen = new TH1F("dNGen", "dNGen", 90, 0, 50);
- fdNRec = dynamic_cast<TH1F*>(fdNGen->Clone("dNRec"));
-
- fdNGen->SetTitle("Generated Events;dN_{Gen};Count");
- fdNRec->SetTitle("Events with reconstructed vertex;dN_{Gen};Count");
-
- fVtxGen = new TH1F("VtxGen", "VtxGen", 200, -20, 20);
- fVtxRec = dynamic_cast<TH1F*>(fVtxGen->Clone("VtxRec"));
-}
-
-Bool_t AlidNdEtaVertexRecEffSelector::CheckVertex()
-{
- //
- // check if the vertex has been reconstructed well enough
- //
- if (!fESD)
- return kFALSE;
-
- const AliESDVertex* vtxESD = fESD->GetVertex();
-
- // the vertex should be reconstructed
- if (strcmp(vtxESD->GetName(),"default")==0)
- return kFALSE;
-
- Double_t vtxRes[3];
- vtxRes[0] = vtxESD->GetXRes();
- vtxRes[1] = vtxESD->GetYRes();
- vtxRes[2] = vtxESD->GetZRes();
-
- // the resolution should be reasonable???
- if (vtxRes[2]==0 || vtxRes[2]>0.1)
- return kFALSE;
-
- return kTRUE;
-}
-
-Bool_t AlidNdEtaVertexRecEffSelector::Process(Long64_t entry)
-{
- //
- // fills fdNGen and fdNRec
- //
-
- if (AliSelectorRL::Process(entry) == kFALSE)
- return kFALSE;
-
- // check prerequisites
- if (!fESD)
- {
- AliDebug(AliLog::kError, "ESD branch not available");
- return kFALSE;
- }
-
- AliHeader* header = GetHeader();
- if (!header)
- {
- AliDebug(AliLog::kError, "Header not available");
- return kFALSE;
- }
-
-
- // loop over mc particles
- TTree* particleTree = GetKinematics();
- TParticle* particle = 0;
- particleTree->SetBranchAddress("Particles", &particle);
-
- Int_t nPrim = header->GetNprimary();
- Int_t nTotal = header->GetNtrack();
-
- Int_t n = 0;
-
- for (Int_t iMc = nTotal - nPrim; iMc < nTotal; ++iMc)
- {
- particleTree->GetEntry(iMc);
-
- if (!particle)
- continue;
-
- if (AliPWG0Helper::IsPrimaryCharged(particle, nPrim) == kFALSE)
- continue;
-
- if (TMath::Abs(particle->Eta()) < fkEtaRange)
- ++n;
- }// end of mc particle
-
- Float_t dN = (Float_t) n / (fkEtaRange*2);
-
- fdNGen->Fill(dN);
-
- // check vertex reconstruction
- if (CheckVertex() != kFALSE)
- fdNRec->Fill(dN);
-
- AliGenEventHeader* genHeader = header->GenEventHeader();
-
- TArrayF vtxMC(3);
- genHeader->PrimaryVertex(vtxMC);
-
- fVtxGen->Fill(vtxMC[2]);
-
- if (CheckVertex() != kFALSE)
- fVtxRec->Fill(vtxMC[2]);
-
- return kTRUE;
-}
-
-void AlidNdEtaVertexRecEffSelector::SlaveTerminate()
-{
- // The SlaveTerminate() function is called after all entries or objects
- // have been processed. When running with PROOF SlaveTerminate() is called
- // on each slave server.
-
- AliSelectorRL::SlaveTerminate();
-
- // Add the histograms to the output on each slave server
- if (!fOutput)
- {
- AliDebug(AliLog::kError, "ERROR: Output list not initialized");
- return;
- }
-
- fOutput->Add(fdNGen);
- fOutput->Add(fdNRec);
- fOutput->Add(fVtxGen);
- fOutput->Add(fVtxRec);
-}
-
-void AlidNdEtaVertexRecEffSelector::Terminate()
-{
- // The Terminate() function is the last function to be called during
- // a query. It always runs on the client, it can be used to present
- // the results graphically or save the results to file.
-
- AliSelectorRL::Terminate();
-
- if (!fOutput)
- {
- AliDebug(AliLog::kError, "ERROR: Output list not initialized");
- return;
- }
-
- fdNGen = dynamic_cast<TH1F*> (fOutput->FindObject("dNGen"));
- fdNRec = dynamic_cast<TH1F*> (fOutput->FindObject("dNRec"));
- fVtxGen = dynamic_cast<TH1F*> (fOutput->FindObject("VtxGen"));
- fVtxRec = dynamic_cast<TH1F*> (fOutput->FindObject("VtxRec"));
- if (!fdNGen || !fdNRec || !fVtxGen || !fVtxRec)
- {
- AliDebug(AliLog::kError, Form("ERROR: Histograms not available %p %p %p %p", (void*) fdNGen, (void*) fdNRec, (void*) fVtxGen, (void*) fVtxRec));
- return;
- }
-
- TFile* fout = new TFile("vertexRecEff.root","RECREATE");
-
- fdNGen->Write();
- fdNRec->Write();
-
- fVtxGen->Write();
- fVtxRec->Write();
-
- fout->Write();
- fout->Close();
-
- TCanvas* canvas = new TCanvas("dN", "dN", 900, 450);
- canvas->Divide(2, 1);
-
- canvas->cd(1);
- fdNGen->Draw();
- fdNRec->SetLineColor(kRed);
- fdNRec->Draw("SAME");
-
- canvas->cd(2);
- fVtxGen->Draw();
- fVtxRec->SetLineColor(kRed);
- fVtxRec->Draw("SAME");
-}
+++ /dev/null
-/* $Id$ */
-
-#ifndef ALIDNDETAVERTEXRECEFFSELECTOR_H
-#define ALIDNDETAVERTEXRECEFFSELECTOR_H
-
-// This class plots the vertex reconstruction efficiency
-
-#include "AliSelectorRL.h"
-
-class TH1F;
-
-class AlidNdEtaVertexRecEffSelector : public AliSelectorRL {
- public:
- AlidNdEtaVertexRecEffSelector();
- virtual ~AlidNdEtaVertexRecEffSelector();
-
- virtual void SlaveBegin(TTree *tree);
- virtual Bool_t Process(Long64_t entry);
- virtual void SlaveTerminate();
- virtual void Terminate();
-
- protected:
- static const Float_t fkEtaRange;
-
- Bool_t CheckVertex();
-
- TH1F* fdNGen; //! generated multiplicity
- TH1F* fdNRec; //! generated multiplicity of events with reconstructed vertex
-
- TH1F* fVtxGen; //! generated vertex z
- TH1F* fVtxRec; //! generated vertex z of events with reconstructed vertex
-
- private:
- AlidNdEtaVertexRecEffSelector(const AlidNdEtaVertexRecEffSelector&);
- AlidNdEtaVertexRecEffSelector& operator=(const AlidNdEtaVertexRecEffSelector&);
-
- ClassDef(AlidNdEtaVertexRecEffSelector, 0);
-};
-
-#endif
dummy->SetYTitle("dN_{ch}/d#eta");
dummy->GetYaxis()->SetTitleOffset(1);
- histESDMBVtx->GetXaxis()->SetRangeUser(-0.7999, 0.7999);
- histESDMB->GetXaxis()->SetRangeUser(-0.7999, 0.7999);
- histESD->GetXaxis()->SetRangeUser(-0.7999, 0.7999);
- histESDNoPt->GetXaxis()->SetRangeUser(-0.7999, 0.7999);
+ Float_t etaLimit = 1.1999;
+
+ histESDMBVtx->GetXaxis()->SetRangeUser(-etaLimit, etaLimit);
+ histESDMB->GetXaxis()->SetRangeUser(-etaLimit, etaLimit);
+ histESD->GetXaxis()->SetRangeUser(-etaLimit, etaLimit);
+ histESDNoPt->GetXaxis()->SetRangeUser(-etaLimit, etaLimit);
dummy->DrawCopy();
histESDMBVtx->Draw("SAME");
ratio->Draw();
ratioNoPt->Draw("SAME");
+ TLegend* legend = new TLegend(0.6, 0.7, 0.95, 0.9);
+ legend->SetFillColor(0);
+ legend->AddEntry(ratio, "mc/esd");
+ legend->AddEntry(ratioNoPt, "mc/esd, not pt cut off corrected");
+ legend->Draw();
}
void ptSpectrum()
pave->Draw();
canvas->SaveAs(Form("Track2Particle1D_etapt_%s_%f.eps", fileName, upperPtLimit));
+ canvas->SaveAs(Form("Track2Particle1D_etapt_%s_%f.gif", fileName, upperPtLimit));
}
void CompareTrack2Particle1D(Float_t upperPtLimit = 9.9)
if (aProof)
connectProof("proof01@lxb6046");
- TString libraries("libEG;libGeom;libESD;libPWG0base;libVMC;libMinuit;libSTEER;libPWG0dep;libEVGEN;libFASTSIM;libmicrocern;libpdf;libpythia6;libEGPythia6;libAliPythia6");
+ TString libraries("libEG;libGeom;libESD;libVMC;libMinuit;libSTEER;libEVGEN;libFASTSIM;libmicrocern;libpdf;libpythia6;libEGPythia6;libAliPythia6;libPWG0base;libPWG0dep");
TString packages("PWG0base;PWG0dep");
if (!prepareQuery(libraries, packages, kTRUE))
-/* $Id$ */
+# /* $Id$ */
# This script runs the dN/dEta analysis with different correction maps to gather systematics
# It runs with the "normal map", and with 4 other different cases where particle species are enhanced
function run
{
- root -l -q testAnalysis2.C\(\"analysisInput.txt\",10000,0,kFALSE,kFALSE,kTRUE,\"$1\",\"$2\"\)
+ root -l -q testAnalysis2.C\(\"analysisInputMerged.txt\",10000,0,kFALSE,kFALSE,kTRUE,\"$1\",\"$2\"\)
mv analysis_esd.root $3
if [ "$?" -ne "0" ]
rm analysis_esd.root
+## this runs particle composition study
#run correction_map.root dndeta_correction systematics_dndeta_reference.root
#run new_compositions.root KBoosted systematics_dndeta_KBoosted.root
#run new_compositions.root KReduced systematics_dndeta_KReduced.root
-run new_compositions.root pBoosted systematics_dndeta_pBoosted.root
-run new_compositions.root pReduced systematics_dndeta_pReduced.root
+#run new_compositions.root pBoosted systematics_dndeta_pBoosted.root
+#run new_compositions.root pReduced systematics_dndeta_pReduced.root
+## this runs vertex reco study
+
+#run systematics_vtxtrigger_compositions.root dndeta_correction_syst_vertexreco_pythia systematics_vtxreco_pythia.root
+#run systematics_vtxtrigger_compositions.root dndeta_correction_syst_vertexreco_ddmore systematics_vtxreco_ddmore.root
+#run systematics_vtxtrigger_compositions.root dndeta_correction_syst_vertexreco_ddless systematics_vtxreco_ddless.root
+#run systematics_vtxtrigger_compositions.root dndeta_correction_syst_vertexreco_sdmore systematics_vtxreco_sdmore.root
+#run systematics_vtxtrigger_compositions.root dndeta_correction_syst_vertexreco_sdless systematics_vtxreco_sdless.root
+#run systematics_vtxtrigger_compositions.root dndeta_correction_syst_vertexreco_dmore systematics_vtxreco_dmore.root
+#run systematics_vtxtrigger_compositions.root dndeta_correction_syst_vertexreco_dless systematics_vtxreco_dless.root
+
+
+## this runs trigger bias study
+
+#run systematics_vtxtrigger_compositions.root dndeta_correction_syst_trigger_pythia systematics_trigger_pythia.root
+#run systematics_vtxtrigger_compositions.root dndeta_correction_syst_trigger_ddmore systematics_trigger_ddmore.root
+run systematics_vtxtrigger_compositions.root dndeta_correction_syst_trigger_ddless systematics_trigger_ddless.root
+run systematics_vtxtrigger_compositions.root dndeta_correction_syst_trigger_sdmore systematics_trigger_sdmore.root
+run systematics_vtxtrigger_compositions.root dndeta_correction_syst_trigger_sdless systematics_trigger_sdless.root
+run systematics_vtxtrigger_compositions.root dndeta_correction_syst_trigger_dmore systematics_trigger_dmore.root
+run systematics_vtxtrigger_compositions.root dndeta_correction_syst_trigger_dless systematics_trigger_dless.root
+
+
+## this runs trigger bias and vertex reco study
+
+#run systematics_vtxtrigger_compositions.root dndeta_correction_syst_vtxtrigger_pythia systematics_vtxtrigger_pythia.root
+run systematics_vtxtrigger_compositions.root dndeta_correction_syst_vtxtrigger_ddmore systematics_vtxtrigger_ddmore.root
+run systematics_vtxtrigger_compositions.root dndeta_correction_syst_vtxtrigger_ddless systematics_vtxtrigger_ddless.root
+run systematics_vtxtrigger_compositions.root dndeta_correction_syst_vtxtrigger_sdmore systematics_vtxtrigger_sdmore.root
+run systematics_vtxtrigger_compositions.root dndeta_correction_syst_vtxtrigger_sdless systematics_vtxtrigger_sdless.root
+run systematics_vtxtrigger_compositions.root dndeta_correction_syst_vtxtrigger_dmore systematics_vtxtrigger_dmore.root
+run systematics_vtxtrigger_compositions.root dndeta_correction_syst_vtxtrigger_dless systematics_vtxtrigger_dless.root
#include "../CreateESDChain.C"
#include "../PWG0Helper.C"
-void testAnalysis2(Char_t* data, Int_t nRuns=20, Int_t offset=0, Bool_t aMC = kFALSE, Bool_t aDebug = kFALSE, Bool_t aProof = kFALSE, const char* correctionMapFile = "correction_map.root", const char* correctionMapFolder = "dndeta_correction", const char* option = "")
+void testAnalysis2(Char_t* data, Int_t nRuns=20, Int_t offset=0, Bool_t aMC = kFALSE, Bool_t aDebug = kFALSE, Bool_t aProof = kFALSE, const char* correctionMapFile = "correction_map.root", const char* correctionMapFolder = "dndeta_correction", const char* option = "", const char* proofServer = "jgrosseo@lxb6046")
{
if (aProof)
- connectProof("proof01@lxb6046");
+ connectProof(proofServer);
TString libraries("libEG;libGeom;libESD;libPWG0base");
TString packages("PWG0base");
if (aMC != kFALSE)
{
- libraries += ";libVMC;libMinuit;libSTEER;libPWG0dep;libEVGEN;libFASTSIM;libmicrocern;libpdf;libpythia6;libEGPythia6;libAliPythia6";
+ libraries += ";libVMC;libMinuit;libSTEER;libEVGEN;libFASTSIM;libmicrocern;libpdf;libpythia6;libEGPythia6;libAliPythia6;libPWG0dep";
packages += ";PWG0dep";
}
TChain* chain = CreateESDChain(data, nRuns, offset);
- // selection of esd tracks
- AliESDtrackCuts* esdTrackCuts = CreateTrackCuts();
- if (!esdTrackCuts)
- {
- printf("ERROR: esdTrackCuts could not be created\n");
- return;
- }
TList inputList;
- inputList.Add(esdTrackCuts);
if (aMC == kFALSE)
{
+ // selection of esd tracks
+ AliESDtrackCuts* esdTrackCuts = CreateTrackCuts();
+ if (!esdTrackCuts)
+ {
+ printf("ERROR: esdTrackCuts could not be created\n");
+ return;
+ }
+
+ inputList.Add(esdTrackCuts);
+
AlidNdEtaCorrection* dNdEtaCorrection = new AlidNdEtaCorrection(correctionMapFolder, correctionMapFolder);
dNdEtaCorrection->LoadHistograms(correctionMapFile, correctionMapFolder);
dNdEtaCorrection->ReduceInformation();
TString selectorName = ((aMC == kFALSE) ? "AlidNdEtaAnalysisESDSelector" : "AlidNdEtaAnalysisMCSelector");
AliLog::SetClassDebugLevel(selectorName, AliLog::kInfo);
- selectorName += ".cxx++";
+ selectorName += ".cxx+";
if (aDebug != kFALSE)
selectorName += "g";
# $Id$
-HDRS = AliSelector.h \
- dNdEta/dNdEtaAnalysis.h \
+HDRS = dNdEta/dNdEtaAnalysis.h \
dNdEta/AlidNdEtaCorrection.h \
esdTrackCuts/AliESDtrackCuts.h \
AliCorrectionMatrix.h \
DHDR= PWG0baseLinkDef.h
-EINCLUDE=
+EINCLUDE=
all-PWG0: all-PWG0base all-PWG0selectors all-PWG0dep
# this library contains classed that depend on STEER
-HDRS = AliSelectorRL.h
+HDRS = AliPWG0depHelper.h
SRCS = $(HDRS:.h=.cxx)
DHDR= PWG0depLinkDef.h
-EINCLUDE=
+EINCLUDE= EVGEN PYTHIA6
HDRS = dNdEta/AlidNdEtaCorrectionSelector.h \
dNdEta/AlidNdEtaAnalysisMCSelector.h \
dNdEta/AlidNdEtaAnalysisESDSelector.h \
- dNdEta/AlidNdEtaVertexRecEffSelector.h \
dNdEta/AliMultiplicityESDSelector.h \
dNdEta/AliMultiplicityMCSelector.h \
- dNdEta/AlidNdEtaSystematicsSelector.h
+ dNdEta/AlidNdEtaSystematicsSelector.h \
+ esdTrackCuts/AliTestESDtrackCutsSelector.h
SRCS = $(HDRS:.h=.cxx)