AliPhysics  251aa1e (251aa1e)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
FastSim Struct Reference
Inheritance diagram for FastSim:

Public Member Functions

 FastSim (const char *eg="", ULong_t runNo=0, Double_t bMin=0, Double_t bMax=20, Long64_t nEvents=0, Int_t monitor=0)
 
const char * FileName () const
 
const char * GetName () const
 
const char * GetTitle () const
 
virtual UShort_t GetSNN () const
 
virtual const char * GetEGTitle () const
 
Bool_t SetupOutput ()
 
virtual void SetupSeed ()
 
virtual Bool_t SetupGRP ()
 
virtual Bool_t SetupGen ()
 
virtual Bool_t SetupRun ()
 
Bool_t ReadGRPLine ()
 
void OverrideGRP ()
 
void AddOverride (const TString &field, const TString &value)
 
virtual void Init (TTree *)
 
virtual void Begin (TTree *)
 
void SlaveBegin (TTree *)
 
virtual Bool_t PreEvent (Long64_t iEv)
 
virtual Bool_t ProcessHeader ()
 
virtual Bool_t ProcessParticles (Bool_t selected)
 
virtual void PostEvent ()
 
virtual void Generate ()
 
virtual Bool_t Process (Long64_t iEv)
 
virtual void FinishRun ()
 
void SlaveTerminate ()
 
void FlushList (TCollection *c, TDirectory *dir)
 
void Terminate ()
 
TFile * GetGAlice ()
 
TFile * GetKine ()
 
void MoveAliceFiles ()
 
Int_t Version () const
 
 ClassDef (FastSim, 3)
 

Static Public Member Functions

static Bool_t LocalRun (Long64_t nev, UInt_t run, const TString &gen, Double_t bMin, Double_t bMax, Int_t monitor, Bool_t verbose, const TString &overrides="")
 
static void ProofLoadLibs ()
 
static Bool_t ProofRun (const TUrl &url, Long64_t nev, UInt_t run, const TString &gen, Double_t bMin, Double_t bMax, Int_t monitor=-1, Bool_t verbose=false, const TString &overrides="", const TString &save="none", const char *opt="")
 
static Bool_t Str2KeyVal (const TString &in, TString &key, TString &val, const char sep='=')
 
static void SetOverrides (FastSim *sim, const TString &override)
 
static Bool_t Run (const char *url, const char *opt="")
 

Public Attributes

Bool_t fVerbose
 Output file name. More...
 
Int_t fMonitor
 
FastShortHeader fShortHead
 
Parameters
TString fEGName
 
Int_t fRunNo
 
Double_t fBMin
 
Double_t fBMax
 
TObjectfGRP
 
TListfOverrides
 GRP in one line. More...
 
Long64_t fNEvents
 GRP setting to override. More...
 
Bool_t fIsTgtA
 
Bool_t fIsProjA
 True if target beam is nuclei. More...
 
ALICE EG interface

True if projectile beam is nuclei

AliGenerator * fGenerator
 
AliRunLoader * fRunLoader
 Event generator. More...
 
AliStack * fStack
 Loader of trees. More...
 
AliHeader * fHeader
 Stack of particles. More...
 
Custom output

Header handler

TTreefTree
 
TClonesArray * fParticles
 Custom tree. More...
 
Diagnostics

List of particles

TListfList
 
TH1fHEta
 List of outputs. More...
 
TH1fHY
 dN/deta More...
 
TH1fHIpz
 dN/dy More...
 
TH1fHType
 IPz histogram. More...
 
TH1fHCent
 Event type histogram. More...
 
TH1fHB
 Event type histogram. More...
 
TH1fHPhiR
 B histogram. More...
 
TH1fHTime
 Reaction plane. More...
 
Centrality

Timing

BCentEstimatorfBEstimator
 
TListfCentEstimators
 
Output files
TProofOutputFile * fProofFile
 
TProofOutputFile * fAliceFile
 Proof output file. More...
 
TProofOutputFile * fKineFile
 
TFile * fFile
 
TString fFileName
 Output file. More...
 

Detailed Description

Run a event generator simulation

Definition at line 111 of file FastSim.C.

Constructor & Destructor Documentation

FastSim::FastSim ( const char *  eg = "",
ULong_t  runNo = 0,
Double_t  bMin = 0,
Double_t  bMax = 20,
Long64_t  nEvents = 0,
Int_t  monitor = 0 
)
inline

Constructor

Parameters
egEvent generator
runNoRun number to simulate
bMinLease impact parameter
bMaxLargest impact parameter
nEventsNumber of events
monitorMonitor frequency

Definition at line 123 of file FastSim.C.

Referenced by LocalRun(), and ProofRun().

Member Function Documentation

void FastSim::AddOverride ( const TString field,
const TString value 
)
inline

Add an item to the list of things from GRP to override

Parameters
fieldField name of GRPData
valueField value of GRPData

Definition at line 664 of file FastSim.C.

Referenced by SetOverrides().

virtual void FastSim::Begin ( TTree )
inlinevirtual

Set up job

Reimplemented in EPosSim.

Definition at line 683 of file FastSim.C.

Referenced by EPosSim::Begin(), and LocalRun().

FastSim::ClassDef ( FastSim  ,
 
)
const char* FastSim::FileName ( ) const
inline

Definition at line 164 of file FastSim.C.

Referenced by SetupGen(), SetupOutput(), and Terminate().

virtual void FastSim::FinishRun ( )
inlinevirtual

Reimplemented in EPosSim.

Definition at line 1085 of file FastSim.C.

Referenced by SlaveTerminate().

void FastSim::FlushList ( TCollection c,
TDirectory *  dir 
)
inline

Write a collection to disk, transforming sub-collections to directories.

Parameters
c
dir

Definition at line 1151 of file FastSim.C.

Referenced by Terminate().

virtual void FastSim::Generate ( )
inlinevirtual

Reimplemented in EPosSim.

Definition at line 1046 of file FastSim.C.

Referenced by Process().

virtual const char* FastSim::GetEGTitle ( ) const
inlinevirtual

Get the event generator title

Returns
Event generator title

Reimplemented in EPosSim.

Definition at line 243 of file FastSim.C.

Referenced by SetupOutput().

TFile* FastSim::GetGAlice ( )
inline

Retrieve the galice.root file from ROOT

Returns
Pointer to file or null

Definition at line 1248 of file FastSim.C.

Referenced by SlaveTerminate().

TFile* FastSim::GetKine ( )
inline

Retrieve the Kinematics.root file from ROOT

Returns
Pointer to file or null

Definition at line 1265 of file FastSim.C.

Referenced by SlaveTerminate().

const char* FastSim::GetName ( ) const
inline

Get the name of the selector

Returns
Name of selector

Definition at line 210 of file FastSim.C.

virtual UShort_t FastSim::GetSNN ( ) const
inlinevirtual

Get collision energy either form generator or GRP

Returns
Collision energy in GeV

Definition at line 222 of file FastSim.C.

Referenced by SetupOutput().

const char* FastSim::GetTitle ( ) const
inline

Get the title of the selector

Returns
The title

Definition at line 216 of file FastSim.C.

virtual void FastSim::Init ( TTree )
inlinevirtual

Set up job

Reimplemented in EPosSim.

Definition at line 676 of file FastSim.C.

static Bool_t FastSim::LocalRun ( Long64_t  nev,
UInt_t  run,
const TString gen,
Double_t  bMin,
Double_t  bMax,
Int_t  monitor,
Bool_t  verbose,
const TString overrides = "" 
)
inlinestatic

Run this selector as a normal process

Parameters
nevNumber of events
runRun number to anchor in
genGenerator
bMinLeast impact parameter [fm]
bMaxLargest impact parameter [fm]
monitorMonitor frequency [s]
verboseBe verbose
overridesGRP overrides
Returns
true on succes

Definition at line 1434 of file FastSim.C.

Referenced by Run().

void FastSim::MoveAliceFiles ( )
inline

Move retrieved ALICE files (galice.root and Kinematics.root) to separate su-directories, and create a collection of the TE tree stored in the galice.root files.

Definition at line 1289 of file FastSim.C.

Referenced by Terminate().

void FastSim::OverrideGRP ( )
inline

Possibly override settings from GRP.

Definition at line 635 of file FastSim.C.

Referenced by Begin(), and SetupGRP().

virtual void FastSim::PostEvent ( )
inlinevirtual

Do final event processing (fill output)

Reimplemented in EPosSim.

Definition at line 1028 of file FastSim.C.

Referenced by Process().

virtual Bool_t FastSim::PreEvent ( Long64_t  iEv)
inlinevirtual

Reimplemented in EPosSim.

Definition at line 756 of file FastSim.C.

Referenced by Process().

virtual Bool_t FastSim::Process ( Long64_t  iEv)
inlinevirtual

Process one event

Parameters
iEvEvent number
Returns
true on success, false otherwize

Definition at line 1055 of file FastSim.C.

Referenced by LocalRun(), and EPosSim::LocalRun().

virtual Bool_t FastSim::ProcessHeader ( )
inlinevirtual

Process the event header

Returns
true if the event should be diagnosed

Reimplemented in EPosSim.

Definition at line 780 of file FastSim.C.

Referenced by Process().

virtual Bool_t FastSim::ProcessParticles ( Bool_t  selected)
inlinevirtual

Process all particles

Parameters
selectedTrue if particle information should be diagnosed
Returns
true on success

Along beam axis

Reimplemented in EPosSim.

Definition at line 984 of file FastSim.C.

Referenced by Process().

static void FastSim::ProofLoadLibs ( )
inlinestatic

Load needed libraries in a proof serssion

Definition at line 1463 of file FastSim.C.

Referenced by ProofRun(), and EPosSim::SetupProof().

static Bool_t FastSim::ProofRun ( const TUrl url,
Long64_t  nev,
UInt_t  run,
const TString gen,
Double_t  bMin,
Double_t  bMax,
Int_t  monitor = -1,
Bool_t  verbose = false,
const TString overrides = "",
const TString save = "none",
const char *  opt = "" 
)
inlinestatic

Run this selector in PROOF(Lite)

Parameters
urlProof URL
nevNumber of events
runRun number to anchor in
genGenerator
bMinLeast impact parameter [fm]
bMaxLargest impact parameter [fm]
monitorMonitor frequency [s]
optCompilation options
verboseBe verbose
overridesGRP overrides
saveWhere to save
Returns
true on succes

Definition at line 1510 of file FastSim.C.

Referenced by Run().

Bool_t FastSim::ReadGRPLine ( )
inline

Read the previously created grp.dat file

Definition at line 603 of file FastSim.C.

Referenced by Begin().

static Bool_t FastSim::Run ( const char *  url,
const char *  opt = "" 
)
inlinestatic

Run a simulation.

url is the execution URL of the form

PROTOCOL://[HOST[:PORT]]/[?OPTIONS]

Where PROTOCOL is one of

  • local for local (single thread) execution
  • lite for Proof-Lite execution
  • proof for Proof exection

HOST and PORT is only relevant for Proof.

Options is a list of & separated options

  • events=NEV Set the number of events to process
  • run=RUNNO Set the run number to anchor in
  • eg=NAME Set the event generator
  • b=RANGE Set the impact parameter range in fermi
  • monitor=SEC Set the update rate in seconds of monitor histograms
Parameters
urlExection URL
optOptimization used when compiling
Returns
true on success

Definition at line 1648 of file FastSim.C.

Referenced by RunFast().

static void FastSim::SetOverrides ( FastSim sim,
const TString override 
)
inlinestatic

Definition at line 1574 of file FastSim.C.

Referenced by LocalRun(), and ProofRun().

virtual Bool_t FastSim::SetupGen ( )
inlinevirtual

Set-up the generator.

Returns
true on success

Reimplemented in EPosSim.

Definition at line 495 of file FastSim.C.

Referenced by SlaveBegin().

virtual Bool_t FastSim::SetupGRP ( )
inlinevirtual

Definition at line 450 of file FastSim.C.

Referenced by SlaveBegin().

Bool_t FastSim::SetupOutput ( )
inline

Create our outputs

Returns
true on success

Definition at line 254 of file FastSim.C.

Referenced by SlaveBegin().

virtual Bool_t FastSim::SetupRun ( )
inlinevirtual

Setup the generator etc. of the job

Returns
true on success

Reimplemented in EPosSim.

Definition at line 534 of file FastSim.C.

Referenced by SlaveBegin().

virtual void FastSim::SetupSeed ( )
inlinevirtual

Set our seed. This will read a UInt_t worth of data from /dev/urandom

Reimplemented in EPosSim.

Definition at line 439 of file FastSim.C.

Referenced by SlaveBegin().

void FastSim::SlaveBegin ( TTree )
inline

Set-up this sub-job

Definition at line 741 of file FastSim.C.

Referenced by LocalRun(), and EPosSim::LocalRun().

void FastSim::SlaveTerminate ( )
inline

Finalize this sub-job

Definition at line 1097 of file FastSim.C.

Referenced by LocalRun(), and EPosSim::LocalRun().

static Bool_t FastSim::Str2KeyVal ( const TString in,
TString key,
TString val,
const char  sep = '=' 
)
inlinestatic

Extract key value pair from string

Parameters
inInput string
keyOn return, the key
valOn return, the value
sepSeparator between key an value
Returns
false of separator isn't found in input

Definition at line 1562 of file FastSim.C.

Referenced by Run(), EPosSim::Run(), and SetOverrides().

void FastSim::Terminate ( )
inline

Final processing of the data

Definition at line 1173 of file FastSim.C.

Referenced by LocalRun(), and EPosSim::LocalRun().

Int_t FastSim::Version ( ) const
inline

Interface version used

Returns
1y

Definition at line 1352 of file FastSim.C.

Member Data Documentation

TProofOutputFile* FastSim::fAliceFile

Proof output file.

Definition at line 1409 of file FastSim.C.

Referenced by SetupRun(), and SlaveTerminate().

BCentEstimator* FastSim::fBEstimator

Definition at line 1401 of file FastSim.C.

Referenced by Begin(), ProcessHeader(), and EPosSim::ProcessHeader().

Double_t FastSim::fBMax

Definition at line 1361 of file FastSim.C.

Referenced by SetupGen(), and SetupGRP().

Double_t FastSim::fBMin

Definition at line 1360 of file FastSim.C.

Referenced by SetupGen(), and SetupGRP().

TString FastSim::fEGName

Definition at line 1358 of file FastSim.C.

Referenced by FileName(), SetupGen(), and SetupGRP().

TFile* FastSim::fFile

Definition at line 1411 of file FastSim.C.

Referenced by SetupOutput(), SlaveTerminate(), and Terminate().

TString FastSim::fFileName
mutable

Output file.

Definition at line 1412 of file FastSim.C.

Referenced by FileName(), SetupGen(), SlaveTerminate(), and Terminate().

AliGenerator* FastSim::fGenerator
TObject* FastSim::fGRP

Definition at line 1362 of file FastSim.C.

Referenced by Begin(), FileName(), ReadGRPLine(), and SetupGRP().

TH1* FastSim::fHB

Event type histogram.

Definition at line 1393 of file FastSim.C.

Referenced by ProcessHeader(), EPosSim::ProcessHeader(), SetupOutput(), and Terminate().

TH1* FastSim::fHCent

Event type histogram.

Definition at line 1392 of file FastSim.C.

Referenced by ProcessHeader(), EPosSim::ProcessHeader(), SetupOutput(), and Terminate().

AliHeader* FastSim::fHeader

Stack of particles.

Definition at line 1375 of file FastSim.C.

Referenced by PostEvent(), PreEvent(), ProcessHeader(), and SetupRun().

TH1* FastSim::fHEta

List of outputs.

Definition at line 1388 of file FastSim.C.

Referenced by ProcessHeader(), ProcessParticles(), EPosSim::ProcessParticles(), SetupOutput(), and Terminate().

TH1* FastSim::fHIpz

dN/dy

Definition at line 1390 of file FastSim.C.

Referenced by ProcessHeader(), EPosSim::ProcessHeader(), SetupOutput(), and Terminate().

TH1* FastSim::fHPhiR

B histogram.

Definition at line 1394 of file FastSim.C.

Referenced by ProcessHeader(), EPosSim::ProcessHeader(), SetupOutput(), and Terminate().

TH1* FastSim::fHTime

Reaction plane.

Definition at line 1395 of file FastSim.C.

Referenced by Process(), ProcessHeader(), SetupOutput(), and Terminate().

TH1* FastSim::fHType

IPz histogram.

Definition at line 1391 of file FastSim.C.

Referenced by ProcessHeader(), SetupOutput(), and Terminate().

TH1* FastSim::fHY

dN/deta

Definition at line 1389 of file FastSim.C.

Referenced by ProcessHeader(), ProcessParticles(), EPosSim::ProcessParticles(), SetupOutput(), and Terminate().

Bool_t FastSim::fIsProjA

True if target beam is nuclei.

Definition at line 1366 of file FastSim.C.

Referenced by FileName(), ProcessHeader(), SetupGen(), EPosSim::SetupGen(), and SetupOutput().

Bool_t FastSim::fIsTgtA

Definition at line 1365 of file FastSim.C.

Referenced by FileName(), ProcessHeader(), SetupGen(), EPosSim::SetupGen(), and SetupOutput().

TProofOutputFile* FastSim::fKineFile

Definition at line 1410 of file FastSim.C.

Referenced by SetupRun(), and SlaveTerminate().

TList* FastSim::fList

Definition at line 1387 of file FastSim.C.

Referenced by SetupOutput(), and Terminate().

Int_t FastSim::fMonitor

Definition at line 1415 of file FastSim.C.

Referenced by Begin().

Long64_t FastSim::fNEvents

GRP setting to override.

Definition at line 1364 of file FastSim.C.

Referenced by FileName(), and SetupRun().

TList* FastSim::fOverrides

GRP in one line.

Definition at line 1363 of file FastSim.C.

Referenced by AddOverride(), Begin(), OverrideGRP(), and SetupGRP().

TClonesArray* FastSim::fParticles

Custom tree.

Definition at line 1382 of file FastSim.C.

Referenced by PreEvent(), EPosSim::PreEvent(), and SetupOutput().

TProofOutputFile* FastSim::fProofFile

Definition at line 1408 of file FastSim.C.

Referenced by SetupOutput(), SetupRun(), SlaveTerminate(), and Terminate().

AliRunLoader* FastSim::fRunLoader

Event generator.

Definition at line 1373 of file FastSim.C.

Referenced by FinishRun(), GetGAlice(), GetKine(), PostEvent(), PreEvent(), and SetupRun().

Int_t FastSim::fRunNo

Definition at line 1359 of file FastSim.C.

Referenced by Begin(), FileName(), PreEvent(), EPosSim::PreEvent(), and SetupGRP().

FastShortHeader FastSim::fShortHead
AliStack* FastSim::fStack

Loader of trees.

Definition at line 1374 of file FastSim.C.

Referenced by PostEvent(), PreEvent(), ProcessHeader(), ProcessParticles(), and SetupRun().

TTree* FastSim::fTree

Definition at line 1381 of file FastSim.C.

Referenced by PostEvent(), EPosSim::PostEvent(), SetupOutput(), SlaveTerminate(), and Terminate().


The documentation for this struct was generated from the following file: