![]() |
AliPhysics
d37ed96 (d37ed96)
|
Classes | |
struct | Factory |
struct | Maker |
Public Member Functions | |
FastAnalysis (Bool_t verb=false, Int_t monitor=0) | |
virtual | ~FastAnalysis () |
void | SetTrigger (UInt_t mask) |
void | SetTrigger (UInt_t mask, Bool_t isAnd) |
void | SetTrigger (const char *what) |
Bool_t | CheckTrigger () const |
void | SetVerbose (Bool_t verb) |
void | SetupMonitor () |
Selector interface | |
Bool_t | SetupBranches () |
virtual Bool_t | SetupEstimator () |
void | Init (TTree *tree) |
virtual void | Begin (TTree *) |
Bool_t | Notify () |
virtual Bool_t | Process (Long64_t entry) |
virtual void | SlaveTerminate () |
Int_t | Version () const |
virtual void | Print (Option_t *option="") const |
Some service functions | |
Double_t | GetCentrality () const |
Long_t | GetEventCount () |
TObject * | GetOutputObject (const char *name, TClass *cls) |
void | CopyEgHistogram () |
overloadable behaviour | |
virtual TList * | GetMonitorObjects () |
virtual void | Clear (Option_t *option="") |
virtual void | ProcessParticles () |
virtual Bool_t | AcceptSecondaries () const |
virtual Bool_t | AcceptNeutrals () const |
virtual Bool_t | ProcessParticle (const TParticle *p)=0 |
virtual Bool_t | ProcessHeader () |
Static Public Member Functions | |
Static interface for running | |
static Long_t | ProofExec (const char *cmd=0) |
static Bool_t | ProofLoad (const char *file, const char *opt) |
static Bool_t | Str2KeyVal (const TString &in, TString &key, TString &val, const char sep='=') |
static Bool_t | SetupProof (TUrl &url, const char *opt, const char *extra) |
static Bool_t | Run (const char *url, const char *output, FastAnalysis *a, const char *script, Long64_t nev=-1, Long64_t offset=0, Int_t monitor=-1, Bool_t verbose=false, const char *opt="") |
static Bool_t | Run (const char *url, const char *output, const char *opt="g") |
Public Attributes | |
TTree * | fTree |
FastShortHeader * | fHeader |
TClonesArray * | fParticles |
Bool_t | fVerbose |
TStopwatch | fTimer |
TString | fName |
ULong64_t | fEventMult |
TString | fCentMethod |
TH1 * | fCentHist |
ULong_t | fOK |
Int_t | fMonitor |
Bool_t | fCompatB |
UInt_t | fTrigMask |
Base class for processors
Definition at line 65 of file FastAnalysis.C.
Constructor. Opens the file passed and sets internal pointers to tree, header, and particle list.
verb | Whether to be verbose |
monitor | Enable monitoring if non-zero |
Definition at line 98 of file FastAnalysis.C.
|
inlinevirtual |
Destructor
Definition at line 115 of file FastAnalysis.C.
|
inlinevirtual |
Whether to accept neutral particles. By default this returns false, meaning we do not process neutral particles. A derived class can overload this to return true in case one want to look at neutral particles.
If one need finer control, this can be overwritten to return true, and one can inspect bit 15 of the object bits to see if a particle is a secondary.
Definition at line 618 of file FastAnalysis.C.
Referenced by ProcessParticles().
|
inlinevirtual |
Whether to accept secondary particles. By default this returns false, meaning we do not process secondary particles. A derived class can overload this to return true in case one want to look at secondary particles.
If one need finer control, this can be overwritten to return true, and one can inspect bit 14 of the object bits to see if a particle is a secondary.
Definition at line 605 of file FastAnalysis.C.
Referenced by ProcessParticles().
|
inlinevirtual |
At beginning of job
Definition at line 338 of file FastAnalysis.C.
|
inline |
Check trigger bits
Definition at line 173 of file FastAnalysis.C.
Referenced by dNdy::V0AND::ProcessHeader(), dNdeta::V0AND::ProcessHeader(), dNdeta::Cent::ProcessHeader(), spectra::V0AND::ProcessHeader(), spectra::Cent::ProcessHeader(), and ProcessHeader().
|
inlinevirtual |
Clear internal caches. Called at start of each event. Can be overloaded to do some more stuff if needed.
Reimplemented in spectra::Cent, dNdeta::Cent, dNdy::Cent, and MidNch::Base.
Definition at line 546 of file FastAnalysis.C.
Referenced by MidNch::Base::Clear(), dNdy::Cent::Clear(), dNdeta::Cent::Clear(), spectra::Cent::Clear(), and Process().
|
inline |
Definition at line 505 of file FastAnalysis.C.
Referenced by Notify().
|
inline |
Get the event centrality.
If the centrality estimator is not set, we use the centrality stored in the header.
Otherwise, we find the bin corresponding to the event multiplicity (as stored in the selected branch), of the estimator histogram, and return the corresponding centrality (bin content).
If the event multiplcity is below the range given by the estimator, we return -1. If the event multiplicity is above the range defined by the estimator, we return 1000.
Definition at line 442 of file FastAnalysis.C.
Referenced by MidNch::Base::ProcessHeader(), dNdy::Cent::ProcessHeader(), dNdeta::Cent::ProcessHeader(), and spectra::Cent::ProcessHeader().
|
inline |
Get the event count from internal counter, or if that is 0 or smaller, from the output
Definition at line 472 of file FastAnalysis.C.
Referenced by dNdy::Base::Terminate(), dNdeta::Base::Terminate(), MidNch::Base::Terminate(), dNdy::Cent::Terminate(), dNdeta::Cent::Terminate(), spectra::Base::Terminate(), and spectra::Cent::Terminate().
|
inlinevirtual |
Get the list of monitor objects. Sub-classes should overload this to return a TList of TNamed objects. The name of each entry must corresponding to the path of an object in the output list. The title encodes the draw option used for the object, and the unique id sets pad options, such as log scale, and scaling to number of events. If scaling to number of events is requested, then the number of events is assumed to be encode in the underflow bin.
Reimplemented in spectra::Cent, dNdy::Cent, spectra::Base, dNdeta::Cent, MidNch::Base, dNdeta::Base, and dNdy::Base.
Definition at line 541 of file FastAnalysis.C.
Referenced by SetupMonitor().
|
inline |
Get an object from the output list, possibly checking the type
name | Name of object |
cls | Possible class pointer |
Definition at line 490 of file FastAnalysis.C.
Referenced by GetEventCount(), dNdy::Base::Terminate(), dNdeta::Base::Terminate(), and MidNch::Base::Terminate().
|
inline |
Called on initialization
tree | Tree to analyse |
Definition at line 318 of file FastAnalysis.C.
|
inline |
Called when the file changes
Definition at line 347 of file FastAnalysis.C.
|
inlinevirtual |
Reimplemented in spectra::Cent, spectra::Base, and dNdeta::Cent.
Definition at line 403 of file FastAnalysis.C.
Referenced by dNdeta::Cent::Print(), spectra::Base::Print(), and Run().
Called on each event
entry | Entry in chain |
Reimplemented in MidNch::Base.
Definition at line 371 of file FastAnalysis.C.
Referenced by MidNch::Base::Process().
|
inlinevirtual |
Process the header. Shall return true if the event is accepted, false otherwise. Must be overloaded by derived class.
Reimplemented in spectra::Cent, spectra::V0AND, dNdeta::Cent, dNdy::Cent, dNdeta::V0AND, dNdy::V0AND, dNdeta::INELGt0, spectra::Base, dNdy::INELGt0, dNdeta::INEL, dNdy::INEL, MidNch::Base, dNdeta::NSD, and dNdy::NSD.
Definition at line 638 of file FastAnalysis.C.
Referenced by Process(), and MidNch::Base::ProcessHeader().
|
pure virtual |
Process a single particle.
In a derived class one can inspect bit 14 (15) to test of the particle is a secondary (neutral) particle. By default secondary (netrual) particles are not processes, unless the derived class overwrites AcceptSecondaries (AcceptNeutrals) to return true.
p | Pointer to TParticle object |
Implemented in spectra::Base, MidNch::Base, dNdy::Base, and dNdeta::Base.
Referenced by AcceptNeutrals(), and ProcessParticles().
|
inlinevirtual |
Process the particles. Called once for each event.
This in turn calls ProcessParticle for each particle.
By default secondaries and neutral particles are not processed. If a derived class need to look at these, that class should overwrite AcceptSecondaries and/or AcceptNeutrals to return true.
Reimplemented in spectra::Cent, dNdeta::Cent, dNdy::Cent, and spectra::Base.
Definition at line 561 of file FastAnalysis.C.
Referenced by Process(), spectra::Base::ProcessParticles(), dNdy::Cent::ProcessParticles(), and dNdeta::Cent::ProcessParticles().
|
inlinestatic |
Execute a PROOF command. Short hand convinience
cmd | Command, or empty string. |
Definition at line 653 of file FastAnalysis.C.
Referenced by ProofLoad(), and SetupProof().
|
inlinestatic |
Definition at line 661 of file FastAnalysis.C.
Referenced by SetupProof().
|
inlinestatic |
Run an analysis. Argument URL has format of
protocol://[[user@[password:]]host]/file?[options]#treeName
where
local
, lite
, or proof
url | Processing and input URL |
output | Output file name |
a | Analyser |
script | Script that defines analysis |
nev | Max number of events |
offset | Offset in events |
monitor | Monitor period in seconds (<0 disables) |
verbose | Whether to be verbose |
opt | Optimization used |
Definition at line 886 of file FastAnalysis.C.
Referenced by ProcessFast(), and Run().
|
inlinestatic |
Run this.
url | Url to process |
output | Output file |
opt | Compilation options |
Definition at line 976 of file FastAnalysis.C.
|
inline |
Set the trigger mask
mask | Mask |
Definition at line 125 of file FastAnalysis.C.
Referenced by dNdeta::INELGt0::INELGt0(), MidNchMaker::Make(), dNdetaMaker::Make(), spectraMaker::Make(), SetTrigger(), dNdy::V0AND::V0AND(), dNdeta::V0AND::V0AND(), and spectra::V0AND::V0AND().
Set the trigger mask
mask | The mask |
isAnd | If true, mark mask as and mask (otherwise or) |
Definition at line 132 of file FastAnalysis.C.
|
inline |
Set the trigger mask from a string. Valid options are
what | trigger string |
Definition at line 148 of file FastAnalysis.C.
|
inline |
Set-up our branches
Definition at line 230 of file FastAnalysis.C.
|
inlinevirtual |
Set-up the estimator is one is chosen. We get a pointer to the current file, and retrieve the relevant histogram from that.
Reimplemented in spectra::Cent, dNdeta::Cent, dNdy::Cent, and MidNch::Base.
Definition at line 250 of file FastAnalysis.C.
Referenced by Notify(), MidNch::Base::SetupEstimator(), dNdy::Cent::SetupEstimator(), dNdeta::Cent::SetupEstimator(), and spectra::Cent::SetupEstimator().
|
inline |
|
inlinestatic |
Set-up PROOF
Definition at line 708 of file FastAnalysis.C.
Referenced by Run().
|
inline |
Set the verbosity flag
verb | If true, be verbose |
Definition at line 187 of file FastAnalysis.C.
|
inlinevirtual |
Called at the end of the slave processing. Puts the event count into a parameter that is stored in the output list. Users can overload this to do more stuff should it be needed.
Definition at line 395 of file FastAnalysis.C.
|
inlinestatic |
Extract key value pair from string
in | Input string |
key | On return, the key |
val | On return, the value |
sep | Separator between key an value |
Definition at line 691 of file FastAnalysis.C.
Referenced by Run().
|
inline |
Definition at line 402 of file FastAnalysis.C.
TH1* FastAnalysis::fCentHist |
The centrality histogram to use - if any
Definition at line 84 of file FastAnalysis.C.
Referenced by MidNch::Base::SetupEstimator(), dNdy::Cent::SetupEstimator(), dNdeta::Cent::SetupEstimator(), and spectra::Cent::SetupEstimator().
TString FastAnalysis::fCentMethod |
The centrality method to use
Definition at line 82 of file FastAnalysis.C.
Referenced by MidNch::Base::Base(), dNdy::Cent::Cent(), dNdeta::Cent::Cent(), and spectra::Cent::Cent().
Bool_t FastAnalysis::fCompatB |
Definition at line 89 of file FastAnalysis.C.
ULong64_t FastAnalysis::fEventMult |
Cache of event discriminator
Definition at line 80 of file FastAnalysis.C.
Referenced by MidNch::Base::ProcessHeader(), dNdy::Cent::ProcessHeader(), dNdeta::Cent::ProcessHeader(), and spectra::Cent::ProcessHeader().
FastShortHeader* FastAnalysis::fHeader |
Cache of our header
Definition at line 70 of file FastAnalysis.C.
Referenced by dNdy::NSD::ProcessHeader(), dNdeta::NSD::ProcessHeader(), MidNch::Base::ProcessHeader(), dNdy::INELGt0::ProcessHeader(), dNdeta::INELGt0::ProcessHeader(), dNdy::Cent::ProcessHeader(), dNdeta::Cent::ProcessHeader(), spectra::Cent::ProcessHeader(), and ~FastAnalysis().
Int_t FastAnalysis::fMonitor |
Monitor frequency in seconds
Definition at line 88 of file FastAnalysis.C.
TString FastAnalysis::fName |
Name
Definition at line 78 of file FastAnalysis.C.
ULong_t FastAnalysis::fOK |
Number of good events
Definition at line 86 of file FastAnalysis.C.
Referenced by GetEventCount(), SlaveTerminate(), dNdy::Base::Terminate(), dNdeta::Base::Terminate(), MidNch::Base::Terminate(), dNdy::Cent::Terminate(), dNdeta::Cent::Terminate(), spectra::Base::Terminate(), and spectra::Cent::Terminate().
TClonesArray* FastAnalysis::fParticles |
TStopwatch FastAnalysis::fTimer |
A simple timer
Definition at line 76 of file FastAnalysis.C.
TTree* FastAnalysis::fTree |
Pointer to tree being analysed
Definition at line 68 of file FastAnalysis.C.
UInt_t FastAnalysis::fTrigMask |
Definition at line 90 of file FastAnalysis.C.
Referenced by dNdeta::Cent::Cent(), spectra::Cent::Cent(), and MidNch::XeXe::XeXe().
Bool_t FastAnalysis::fVerbose |
Whether to be verbose
Definition at line 74 of file FastAnalysis.C.
Referenced by dNdy::Cent::ProcessParticles(), and dNdeta::Cent::ProcessParticles().