AliPhysics  97344c9 (97344c9)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ana.C File Reference

Example of execution macro. More...

Go to the source code of this file.

Enumerations

enum  anaModes {
  mLocal = 0, mPROOF = 1, mPlugin = 2, mGRID = 3,
  mLocal, mGRID, mLocal = 0, mPROOF = 1,
  mPlugin = 2, mGRID = 3, mLocal, mLocalCAF,
  mPROOF, mGRID, mLocal, mLocalCAF,
  mPROOF, mGRID
}
 Different analysis modes. More...
 

Functions

void ana (Int_t mode=mGRID)
 
void LoadLibraries (Int_t mode)
 Load analysis libraries. More...
 
void SetupPar (char *pararchivename)
 
void CheckInputData (const anaModes mode)
 Sets input data and tree strings. More...
 
void CreateChain (const anaModes mode, TChain *chain, TChain *chainxs)
 Fills chain with data files paths. More...
 
void CheckEnvironmentVariables ()
 
Bool_t GetAverageXsection (TTree *tree, Double_t &xs, Float_t &ntr, Int_t &n)
 

Variables

char * kInDir = "/user/data/files/"
 
char * kPattern = ""
 Global, path to data files. More...
 
Int_t kFile = 2
 Data are in files kInDir/kPattern+i. More...
 
char * kDatasetPROOF = "/alice/vernet/LHC11b_149646"
 Number of files to analyze in local mode. More...
 
Int_t kDatasetNMaxFiles = 20
 
TString ccin2p3UserName = "arbor"
 
TString alienUserName = "narbor"
 
char * kXML = "collection.xml"
 
const char * kXSFileName = "pyxsec.root"
 Global name for the xml collection file with data on grid. More...
 
TArrayF * xsArr
 Name of file with pT-hard cross sections. More...
 
TArrayItrArr
 
Bool_t kMC = kFALSE
 
TString kInputData = "ESD"
 With real data kMC = kFALSE. More...
 
Int_t kYear = 2011
 ESD, AOD, MC, deltaAOD. More...
 
TString kCollision = "pp"
 
Bool_t outAOD = kFALSE
 
TString kTreeName
 Some tasks doesnt need it. More...
 
TString kPass = ""
 
char kTrigger [1024]
 
Int_t kRun = 0
 

Detailed Description

Example of execution macro.

Example macro to do analysis with the analysis classes in CaloTrackCorrelations, in local, grid or plugin modes.

Pay attention to the options and definitions set in the lines below

Author
: Gustavo Conesa Balbastre Gusta.nosp@m.vo.C.nosp@m.onesa.nosp@m..Bal.nosp@m.bastr.nosp@m.e@ce.nosp@m.rn.ch, (LPSC-CNRS)

Definition in file ana.C.

Enumeration Type Documentation

enum anaModes

Different analysis modes.

Enumerator
mLocal 
mPROOF 

Analyze locally files in your computer.

mPlugin 

Analyze files on GRID with Plugin.

mGRID 

Analyze files on GRID with Plugin.

mLocal 
mGRID 
mLocal 
mPROOF 

Analyze locally files in your computer.

mPlugin 

Analyze files on GRID with Plugin.

mGRID 

Analyze files on GRID with Plugin.

mLocal 
mLocalCAF 
mPROOF 
mGRID 
mLocal 
mLocalCAF 
mPROOF 
mGRID 

Definition at line 16 of file ana.C.

Function Documentation

void ana ( Int_t  mode = mGRID)

Main execution method. It:

  • 1) loads the needed libraries in method LoadLibraries
  • 2) depending on the files path, run etc, the variables year, collision type, data type, are obtained in methods CheckInputData and CheckEnvironmentVariables
  • 3) put the data files in a list to be passed to the analysis frame in method CreateChain
  • 4) In case of MC pt-Hard bin simulations, the file containing the cross sections is read and scaling parameter is obtained via the method GetAverageXsection
  • 5) The analysis frame is initialized via de analysis manager
  • 6) Different general analysis are initialized: Physics selection, centrality etc.
  • 7) Specialized analysis are initialized: AliAnalysistaskCounter, AliAnalysisTaskEMCALClusterizer, AliAnalysisTaskCaloTrackCorrelations and executed for different settings.
  • 8) The output/input containers are passed to the analysis manager
  • 9) The analysis is executed
Parameters
modeanalysis mode defined in enum anaModes

Definition at line 86 of file ana.C.

Referenced by AddAnalysisTasks(), anaGenKine(), ConfigureChargedAnalysis(), ConfigureClusterPileUpAnalysis(), ConfigureElectronAnalysis(), ConfigureEMCALTriggerClusterAnalysis(), ConfigureGenKine(), ConfigureGenKineAnalysis(), ConfigureHadronCorrelationAnalysis(), ConfigureInClusterIMAnalysis(), ConfigureIsolationAnalysis(), ConfigurePhotonAnalysis(), ConfigurePhotonJetAnalysis(), ConfigurePi0Analysis(), ConfigurePi0EbEAnalysis(), ConfigurePi0Flow(), ConfigurePi0KineAnalysis(), ConfigureQAAnalysis(), ConfigureRandomTriggerAnalysis(), AliAnaCaloTrackCorrMaker::FillAndGetAODBranchList(), AliAnaCaloTrackCorrMaker::GetListOfAnalysisCuts(), AliAnaCaloTrackCorrMaker::GetOutputContainer(), AliAnaCaloTrackCorrMaker::Init(), EMCalTriggerPtAnalysis::AliEMCalTriggerTaskGroup::InitialiseAnalysisComponents(), EMCalTriggerPtAnalysis::AliEMCalTriggerTaskGroup::Process(), EmpiricalMaker::ProcessCent(), AliAnaCaloTrackCorrMaker::ProcessEvent(), AliAnaPi0EbE::SetAnalysisType(), AliAnalysisTaskFullppJet::SetAnaType(), and AliAnaCaloTrackCorrMaker::Terminate().

void CheckEnvironmentVariables ( )

Access one data file and set the year, collision type and run number. It is possible to set them via external parameters.

Definition at line 1120 of file ana.C.

Referenced by ana().

void CheckInputData ( const anaModes  mode)

Sets input data and tree strings.

Definition at line 647 of file ana.C.

Referenced by ana().

void CreateChain ( const anaModes  mode,
TChain chain,
TChain chainxs 
)

Fills chain with data files paths.

Definition at line 889 of file ana.C.

Referenced by ana().

Bool_t GetAverageXsection ( TTree tree,
Double_t xs,
Float_t ntr,
Int_t n 
)

Read the PYTHIA statistics from the file pyxsec.root created by the function WriteXsection(): integrated cross section (xsection) and the number of Pyevent() calls (ntrials) and calculate the weight per one event xsection/ntrials The spectrum calculated by a user should be multiplied by this weight, something like this: TH1F *userSpectrum ... // book and fill the spectrum userSpectrum->Scale(weight)

Yuri Kharlov 19 June 2007 Gustavo Conesa 15 April 2008 Add recovery of xs from pyxsec_hists.root file 15/jan/2015

Definition at line 1212 of file ana.C.

Referenced by ana().

void LoadLibraries ( Int_t  mode)

Load analysis libraries.

Definition at line 533 of file ana.C.

Referenced by ana().

void SetupPar ( char *  pararchivename)

Load par files, create analysis libraries For testing, if par file already decompressed and modified classes then do not decompress.

Definition at line 601 of file ana.C.

Referenced by LoadPar().

Variable Documentation

TString alienUserName = "narbor"

Definition at line 40 of file ana.C.

TString ccin2p3UserName = "arbor"

Definition at line 39 of file ana.C.

TString kCollision = "pp"

Definition at line 65 of file ana.C.

Referenced by ana().

Int_t kDatasetNMaxFiles = 20

Definition at line 38 of file ana.C.

Referenced by CreateChain().

char* kDatasetPROOF = "/alice/vernet/LHC11b_149646"

Number of files to analyze in local mode.

Definition at line 37 of file ana.C.

Referenced by CheckInputData(), and CreateChain().

Int_t kFile = 2

Data are in files kInDir/kPattern+i.

Definition at line 31 of file ana.C.

Referenced by CheckInputData(), and CreateChain().

char* kInDir = "/user/data/files/"

Definition at line 29 of file ana.C.

Referenced by CheckInputData(), and CreateChain().

TString kInputData = "ESD"

With real data kMC = kFALSE.

Definition at line 63 of file ana.C.

Referenced by ConfigurePhotonAnalysis().

Bool_t kMC = kFALSE

Definition at line 62 of file ana.C.

Referenced by ana(), CheckEnvironmentVariables(), CheckInputData(), and emcalReclusterize().

TString kPass = ""

Definition at line 68 of file ana.C.

char* kPattern = ""

Global, path to data files.

Definition at line 30 of file ana.C.

Referenced by CheckInputData(), and CreateChain().

Int_t kRun = 0

Definition at line 70 of file ana.C.

Referenced by ana(), CheckEnvironmentVariables(), CheckInputData(), and emcalReclusterize().

TString kTreeName

Some tasks doesnt need it.

Definition at line 67 of file ana.C.

char kTrigger[1024]

Definition at line 69 of file ana.C.

Referenced by CheckEnvironmentVariables().

char* kXML = "collection.xml"

Definition at line 45 of file ana.C.

Referenced by CheckInputData(), and CreateChain().

const char* kXSFileName = "pyxsec.root"

Global name for the xml collection file with data on grid.

Definition at line 52 of file ana.C.

Referenced by CreateChain().

Int_t kYear = 2011

ESD, AOD, MC, deltaAOD.

Definition at line 64 of file ana.C.

Referenced by ana(), and CheckEnvironmentVariables().

TArrayI* trArr

Definition at line 56 of file ana.C.

TArrayF* xsArr

Name of file with pT-hard cross sections.

Definition at line 55 of file ana.C.

Referenced by CreateChain(), and GetAverageXsection().