![]() |
AliRoot Core
3dc7879 (3dc7879)
|
Base class for reading in various FMD data. The class loops over all found events. For each event the specified data is read in. The class then loops over all elements of the read data, and process these with user defined code. More...
#include <AliFMDInput.h>
Public Types | |
enum | ETrees { kHits = 1, kKinematics, kDigits, kSDigits, kHeader, kRecPoints, kESD, kRaw, kGeometry, kTrackRefs, kRawCalib, kUser } |
Public Member Functions | |
AliFMDInput () | |
AliFMDInput (const char *gAliceFile) | |
virtual | ~AliFMDInput () |
virtual void | AddLoad (ETrees tree) |
virtual void | RemoveLoad (ETrees tree) |
virtual Int_t | NEvents () const |
virtual Bool_t | IsLoaded (ETrees tree) const |
virtual void | SetLoads (UInt_t mask) |
virtual void | SetLoads (const char *mask) |
virtual const char * | LoadedString (Bool_t dataOnly=false) const |
virtual Bool_t | Init () |
virtual Bool_t | Begin (Int_t event) |
virtual Bool_t | Event () |
virtual Bool_t | End () |
virtual Bool_t | Finish () |
virtual Bool_t | Run (UInt_t maxEvents=0) |
virtual Bool_t | ProcessHits () |
virtual Bool_t | ProcessTrackRefs () |
virtual Bool_t | ProcessTracks () |
virtual Bool_t | ProcessStack () |
virtual Bool_t | ProcessDigits () |
virtual Bool_t | ProcessSDigits () |
virtual Bool_t | ProcessRawDigits () |
virtual Bool_t | ProcessRawCalibDigits () |
virtual Bool_t | ProcessRecPoints () |
virtual Bool_t | ProcessESDs () |
virtual Bool_t | ProcessUsers () |
virtual Bool_t | ProcessHit (AliFMDHit *h, TParticle *p) |
virtual Bool_t | ProcessTrackRef (AliTrackReference *trackRef, TParticle *track) |
virtual Bool_t | ProcessTrack (Int_t i, TParticle *p, AliFMDHit *h) |
virtual Bool_t | ProcessParticle (Int_t i, TParticle *p) |
virtual Bool_t | ProcessDigit (AliFMDDigit *digit) |
virtual Bool_t | ProcessSDigit (AliFMDSDigit *sdigit) |
virtual Bool_t | ProcessRawDigit (AliFMDDigit *digit) |
virtual Bool_t | ProcessRawCalibDigit (AliFMDDigit *digit) |
virtual Bool_t | ProcessRecPoint (AliFMDRecPoint *point) |
virtual Bool_t | ProcessESD (UShort_t d, Char_t r, UShort_t s, UShort_t t, Float_t eta, Float_t mult) |
virtual Bool_t | ProcessUser (UShort_t d, Char_t r, UShort_t s, UShort_t t, Float_t v) |
void | SetRawFile (const char *file) |
void | SetInputDir (const char *dir) |
Static Public Member Functions | |
static TArrayF | MakeLogScale (Int_t n, Double_t min, Double_t max) |
static ETrees | ParseLoad (const char *what) |
Protected Member Functions | |
AliFMDInput (const AliFMDInput &o) | |
AliFMDInput & | operator= (const AliFMDInput &) |
virtual Float_t | GetSignal (UShort_t d, Char_t r, UShort_t s, UShort_t t) |
Static Protected Member Functions | |
static const char * | TreeName (ETrees tree, bool shortest=false) |
static TChain * | MakeChain (const char *what, const char *datadir, bool recursive=false) |
static void | ScanDirectory (TSystemDirectory *dir, const TString &olddir, TChain *chain, const char *pattern, bool recursive) |
Protected Attributes | |
TString | fGAliceFile |
AliRunLoader * | fLoader |
AliRun * | fRun |
AliStack * | fStack |
AliLoader * | fFMDLoader |
AliRawReader * | fReader |
AliFMDRawReader * | fFMDReader |
AliFMD * | fFMD |
AliESDFMD * | fESD |
AliESDEvent * | fESDEvent |
TTree * | fTreeE |
TTree * | fTreeH |
TTree * | fTreeTR |
TTree * | fTreeD |
TTree * | fTreeS |
TTree * | fTreeR |
TTree * | fTreeA |
TChain * | fChainE |
TClonesArray * | fArrayE |
TClonesArray * | fArrayH |
TClonesArray * | fArrayTR |
TClonesArray * | fArrayD |
TClonesArray * | fArrayS |
TClonesArray * | fArrayR |
TClonesArray * | fArrayA |
AliHeader * | fHeader |
TGeoManager * | fGeoManager |
Int_t | fTreeMask |
TString | fRawFile |
TString | fInputDir |
Bool_t | fIsInit |
Int_t | fEventCount |
Int_t | fNEvents |
Static Protected Attributes | |
static const ETrees | fgkAllLoads [kUser+1] |
Base class for reading in various FMD data. The class loops over all found events. For each event the specified data is read in. The class then loops over all elements of the read data, and process these with user defined code.
This class allows for writing small scripts, that can be compiled with AcLIC, to do all sorts of tests, quick prototyping, and so on. It has proven to be quiet useful. One can load more than one type of data in one derived class, to for example to make comparisons between hits and reconstructed points. See also the various scripts in FMD/scripts
.
Definition at line 106 of file AliFMDInput.h.
enum AliFMDInput::ETrees |
The kinds of data that can be read in.
Enumerator | |
---|---|
kHits | |
kKinematics | |
kDigits | |
kSDigits | |
kHeader | |
kRecPoints | |
kESD | |
kRaw | |
kGeometry | |
kTrackRefs | |
kRawCalib | |
kUser |
Definition at line 110 of file AliFMDInput.h.
AliFMDInput::AliFMDInput | ( | ) |
CTOR
Definition at line 89 of file AliFMDInput.cxx.
AliFMDInput::AliFMDInput | ( | const char * | gAliceFile | ) |
|
inlinevirtual |
DTOR
Definition at line 130 of file AliFMDInput.h.
|
inlineprotected |
|
inlinevirtual |
Add a data type to load
tree | Data to load |
Definition at line 134 of file AliFMDInput.h.
Referenced by AliFMDDisplay::AliFMDDisplay(), CheckAlign::CheckAlign(), CheckRaw::CheckRaw(), DisplayDigits(), DisplayESD(), DisplayHits(), DisplayRecs(), DrawBothDigits::DrawBothDigits(), DrawCalibRaw::DrawCalibRaw(), DrawDigits::DrawDigits(), DrawDigitsRecs::DrawDigitsRecs(), DrawESD::DrawESD(), DrawHits::DrawHits(), DrawHitsDigits::DrawHitsDigits(), DrawHitsRecs::DrawHitsRecs(), DrawHitsSDigits::DrawHitsSDigits(), DrawSDigits::DrawSDigits(), DrawTrackRefs::DrawTrackRefs(), FancyDigits(), FancyHits(), FindCommonModeNoise::FindCommonModeNoise(), PatternDigits(), PatternESD(), PatternHits(), PatternRaw(), PatternRecs(), PatternSDigits(), Poisson::Poisson(), PoissonHit::PoissonHit(), ReadHits::ReadHits(), SetLoads(), and SpectraMonitor().
|
virtual |
Callled at the beginning of each event. If a user class overloads this member function, then this must be explicitly called.
event | Event number |
false
on error Reimplemented in GetMedia, AliFMDFancy, DrawCalibRaw, AliFMDPattern, FindCommonModeNoise, DrawHitsRecs, AliFMDDisplay, PoissonHit, DrawESD, Poisson, DrawDigitsRecs, DrawHitsDigits, DrawHitsSDigits, and DrawBothDigits.
Definition at line 435 of file AliFMDInput.cxx.
Referenced by DrawBothDigits::Begin(), DrawDigitsRecs::Begin(), DrawHitsDigits::Begin(), DrawHitsSDigits::Begin(), Poisson::Begin(), DrawESD::Begin(), AliFMDDisplay::Begin(), DrawHitsRecs::Begin(), FindCommonModeNoise::Begin(), AliFMDPattern::Begin(), DrawCalibRaw::Begin(), AliFMDFancy::Begin(), IsLoaded(), and Run().
|
virtual |
Called at the end of each event.
false
on error Reimplemented in DrawCalibRaw, FindCommonModeNoise, AliFMDFancy, Poisson, AliFMDDisplay, and PoissonHit.
Definition at line 906 of file AliFMDInput.cxx.
Referenced by AliFMDDisplay::End(), Poisson::End(), AliFMDFancy::End(), FindCommonModeNoise::End(), DrawCalibRaw::End(), IsLoaded(), and Run().
|
virtual |
Process one event. This loops over all the loaded data. Users can overload this member function, but then it's strongly recommended to explicitly call this classes version.
false
on error Definition at line 556 of file AliFMDInput.cxx.
Referenced by IsLoaded(), AliFMDDisplay::Redisplay(), and Run().
|
inlinevirtual |
Called at the end of the run.
false
on error Reimplemented in GetMedia, FindCommonModeNoise, DrawCalibRaw, DrawTrackRefs, DrawESD, DrawHitsRecs, DrawHits, Poisson, DrawSDigits, CheckAlign, DrawHitsDigits, DrawHitsSDigits, DrawDigitsRecs, DrawBothDigits, ReadHits, and DrawDigits.
Definition at line 192 of file AliFMDInput.h.
Referenced by Poisson::Finish(), and Run().
|
inlineprotectedvirtual |
Get user supplued data
Reimplemented in FindCommonModeNoise.
Definition at line 465 of file AliFMDInput.h.
Referenced by operator=(), and ProcessUsers().
|
virtual |
Initialize the class. If a user class overloads this member function, then this must be explicitly called
false
on error Reimplemented in AliFMDFancy, GetMedia, AliFMDPattern, FindCommonModeNoise, AliFMDDisplay, DrawSDigits, DrawCalibRaw, CheckAlign, Poisson, PoissonHit, and CheckRaw.
Definition at line 299 of file AliFMDInput.cxx.
Referenced by CheckRaw::Init(), Poisson::Init(), CheckAlign::Init(), DrawCalibRaw::Init(), DrawSDigits::Init(), AliFMDDisplay::Init(), FindCommonModeNoise::Init(), AliFMDPattern::Init(), AliFMDFancy::Init(), IsLoaded(), and Run().
|
inlinevirtual |
Definition at line 141 of file AliFMDInput.h.
Referenced by Begin(), End(), Event(), Init(), LoadedString(), NEvents(), ProcessHits(), and ProcessTrackRefs().
|
virtual |
Get a string that represents the loaded trees
dataOnly | If true, then only show data |
Definition at line 226 of file AliFMDInput.cxx.
Referenced by IsLoaded().
|
staticprotected |
Make a chain of specified data
what | What data to chain. Possible values are
|
datadir | Data directory to scan |
recursive | Whether to recurse into sub-directories |
Definition at line 1052 of file AliFMDInput.cxx.
Referenced by Init(), and operator=().
|
static |
Service function to make a logarithmic axis.
n | Number of bins |
min | Minimum of axis |
max | Maximum of axis. |
Definition at line 976 of file AliFMDInput.cxx.
Referenced by DrawHits::DrawHits(), DrawHitsDigits::DrawHitsDigits(), DrawHitsRecs::DrawHitsRecs(), DrawHitsSDigits::DrawHitsSDigits(), and Finish().
|
virtual |
Reimplemented in FindCommonModeNoise.
Definition at line 287 of file AliFMDInput.cxx.
Referenced by RemoveLoad(), and Run().
|
inlineprotected |
|
static |
Parse a string as a load option
what | String to pass |
Definition at line 212 of file AliFMDInput.cxx.
Referenced by SetInputDir(), and SetLoads().
|
inlinevirtual |
Process one digit. Users should over this to process each digit.
digit | Digit |
false
on error Reimplemented in AliFMDSpectraDisplay, DrawHitsRecs, AliFMDDisplay, CheckAlign, DrawHitsDigits, DrawBothDigits, DrawDigitsRecs, DrawDigits, and CheckRaw.
Definition at line 456 of file AliFMDInput.h.
Referenced by Finish(), and ProcessDigits().
|
virtual |
Loop over all digits, and call ProcessDigit for each digit.
false
on error Definition at line 719 of file AliFMDInput.cxx.
|
inlinevirtual |
Process ESD data for the FMD. Users should overload this to deal with ESD data.
d | Detector number (1-3) |
r | Ring identifier ('I' or 'O') |
s | Sector number (0-19, or 0-39) |
t | Strip number (0-511, or 0-255) |
eta | Psuedo-rapidity |
mult | Psuedo-multiplicity |
false
on error Reimplemented in AliFMDSpectraDisplay, AliFMDDisplay, and DrawESD.
Definition at line 461 of file AliFMDInput.h.
Referenced by Finish(), and ProcessESDs().
|
virtual |
Loop over all ESD data, and call ProcessESD for each entry.
false
on error Reimplemented in DrawESD.
Definition at line 860 of file AliFMDInput.cxx.
Referenced by Event(), Finish(), and DrawESD::ProcessESDs().
|
inlinevirtual |
Process one hit, and optionally it's corresponding kinematics track. Users should over this to process each hit.
h | Hit |
p | Associated track |
false
on error Reimplemented in AliFMDSpectraDisplay, AliFMDFancy, GetMedia, AliFMDPattern, DrawHitsRecs, AliFMDDisplay, CheckAlign, DrawHits, PoissonHit, DrawHitsDigits, DrawHitsSDigits, and ReadHits.
Definition at line 450 of file AliFMDInput.h.
Referenced by Finish(), and ProcessHits().
|
virtual |
Loop over all hits, and call ProcessHit with that hit, and optionally the corresponding kinematics track.
false
on error Definition at line 584 of file AliFMDInput.cxx.
|
inlinevirtual |
Process stack particle
i | Track number |
p | Track |
false
on error Reimplemented in DrawTrackRefs.
Definition at line 455 of file AliFMDInput.h.
Referenced by Finish(), and ProcessStack().
|
inlinevirtual |
Process one digit from raw data files. Users should over this to process each raw digit.
digit | Raw digit |
false
on error Reimplemented in DrawCalibRaw, and AliFMDDisplay.
Definition at line 459 of file AliFMDInput.h.
Referenced by Finish(), and ProcessRawCalibDigits().
|
virtual |
Loop over all digits read from raw data files, and call ProcessRawDigit for each digit.
false
on error Definition at line 808 of file AliFMDInput.cxx.
|
inlinevirtual |
Process one digit from raw data files. Users should over this to process each raw digit.
digit | Raw digit |
false
on error Reimplemented in AliFMDSpectraDisplay, FindCommonModeNoise, AliFMDDisplay, and CheckRaw.
Definition at line 458 of file AliFMDInput.h.
Referenced by Finish(), and ProcessRawDigits().
|
virtual |
Loop over all digits read from raw data files, and call ProcessRawDigit for each digit.
false
on error Definition at line 785 of file AliFMDInput.cxx.
|
inlinevirtual |
Process one reconstructed point. Users should over this to process each reconstructed point.
point | Reconstructed point |
false
on error Reimplemented in AliFMDSpectraDisplay, DrawHitsRecs, AliFMDDisplay, and DrawDigitsRecs.
Definition at line 460 of file AliFMDInput.h.
Referenced by Finish(), and ProcessRecPoints().
|
virtual |
Loop over all reconstructed points, and call ProcessRecPoint for each reconstructed point.
false
on error Definition at line 831 of file AliFMDInput.cxx.
|
inlinevirtual |
Process one summable digit. Users should over this to process each summable digit.
sdigit | Summable digit |
false
on error Reimplemented in AliFMDSpectraDisplay, AliFMDDisplay, DrawSDigits, DrawHitsSDigits, and DrawBothDigits.
Definition at line 457 of file AliFMDInput.h.
Referenced by Finish(), and ProcessSDigits().
|
virtual |
Loop over all summable digits, and call ProcessSDigit for each digit.
false
on error Definition at line 750 of file AliFMDInput.cxx.
|
virtual |
Loop over all tracks, and call ProcessTrack with each hit for that track
false
on error Definition at line 699 of file AliFMDInput.cxx.
|
inlinevirtual |
Process one hit per track. Users should over this to process each hit.
i | Track number |
p | Track |
h | Associated Hit |
false
on error Definition at line 453 of file AliFMDInput.h.
Referenced by Finish(), and ProcessTracks().
|
inlinevirtual |
Process one track reference, and optionally it's corresponding kinematics track. Users should overload this to process each track reference.
trackRef | Track Reference |
track | Associated track |
false
on error Reimplemented in DrawTrackRefs, and ReadHits.
Definition at line 451 of file AliFMDInput.h.
Referenced by Finish(), and ProcessTrackRefs().
|
virtual |
Loop over all track refs, and call ProcessTrackRef with that hit, and optionally the corresponding kinematics track.
false
on error Definition at line 621 of file AliFMDInput.cxx.
|
virtual |
Loop over all tracks, and call ProcessTrack with each hit for that track
false
on error Definition at line 656 of file AliFMDInput.cxx.
|
inlinevirtual |
Process User data for the FMD. Users should overload this to deal with ESD data.
d | Detector number (1-3) |
r | Ring identifier ('I' or 'O') |
s | Sector number (0-19, or 0-39) |
t | Strip number (0-511, or 0-255) |
v | Value |
false
on error Reimplemented in FindCommonModeNoise.
Definition at line 463 of file AliFMDInput.h.
Referenced by Finish(), and ProcessUsers().
|
virtual |
Loop over all strips and ask user routine to supply the data.
false
on error Definition at line 885 of file AliFMDInput.cxx.
|
inlinevirtual |
Remove a data type to load
tree | Data to not load |
Definition at line 137 of file AliFMDInput.h.
|
virtual |
Run a full job.
false
on error Definition at line 950 of file AliFMDInput.cxx.
Referenced by DisplayDigits(), DisplayESD(), DisplayHits(), DisplayRecs(), FancyDigits(), FancyHits(), Finish(), PatternDigits(), PatternESD(), PatternHits(), PatternRaw(), PatternRecs(), PatternSDigits(), and SpectraMonitor().
|
staticprotected |
Scan a directory (optionally recursive) for data files to add to the chain. Only ROOT files, and files which name contain the passed pattern are considered.
dir | Directory to scan |
chain | Chain to add data to |
pattern | Pattern that the file name must contain |
recursive | Whether to scan recursively |
Definition at line 1000 of file AliFMDInput.cxx.
Referenced by MakeChain(), and operator=().
|
inline |
Definition at line 319 of file AliFMDInput.h.
|
virtual |
Set the trees to load.
mask | Bit mask of trees to load. Should be constructed like for example |
Definition at line 180 of file AliFMDInput.cxx.
Referenced by IsLoaded().
|
virtual |
Set the trees to load.
mask | A comma or space separated list of trees to load. The case is not important, and a short from of the tree name can be used. |
Definition at line 196 of file AliFMDInput.cxx.
|
inline |
Set the raw data input
file | File name - if empty, assume simulated raw. |
Definition at line 318 of file AliFMDInput.h.
Referenced by DrawCalibRaw::DrawCalibRaw(), FindCommonModeNoise::FindCommonModeNoise(), PatternRaw(), and SpectraMonitor().
|
staticprotected |
Definition at line 249 of file AliFMDInput.cxx.
Referenced by Init(), LoadedString(), operator=(), and ParseLoad().
|
protected |
Definition at line 437 of file AliFMDInput.h.
Referenced by Begin(), Init(), ProcessRawCalibDigits(), and ProcessRawDigits().
|
protected |
Definition at line 434 of file AliFMDInput.h.
Referenced by Begin(), and ProcessDigits().
|
protected |
Definition at line 431 of file AliFMDInput.h.
|
protected |
Definition at line 432 of file AliFMDInput.h.
Referenced by Begin(), ProcessHits(), and ProcessTracks().
|
protected |
Definition at line 436 of file AliFMDInput.h.
Referenced by Begin(), and ProcessRecPoints().
|
protected |
Definition at line 435 of file AliFMDInput.h.
Referenced by Begin(), and ProcessSDigits().
|
protected |
Definition at line 433 of file AliFMDInput.h.
Referenced by Begin(), and ProcessTrackRefs().
|
protected |
Definition at line 430 of file AliFMDInput.h.
|
protected |
Definition at line 421 of file AliFMDInput.h.
Referenced by Begin(), DrawESD::ProcessESD(), and ProcessESDs().
|
protected |
Definition at line 422 of file AliFMDInput.h.
Referenced by AliFMDPattern::Begin(), Begin(), and Init().
|
protected |
Definition at line 444 of file AliFMDInput.h.
Referenced by Begin(), DrawHits::Finish(), FindCommonModeNoise::Finish(), and Init().
|
protected |
Definition at line 420 of file AliFMDInput.h.
|
protected |
Definition at line 417 of file AliFMDInput.h.
|
protected |
Definition at line 419 of file AliFMDInput.h.
Referenced by Begin(), AliFMDDisplay::GetADCThreshold(), Init(), and DrawCalibRaw::ProcessRawCalibDigit().
|
protected |
Definition at line 413 of file AliFMDInput.h.
Referenced by Init(), and ReadHits::ReadHits().
|
protected |
Definition at line 439 of file AliFMDInput.h.
Referenced by AliFMDDisplay::Begin(), and AliFMDDisplay::ShowOnlyFMD().
|
staticprotected |
Definition at line 446 of file AliFMDInput.h.
Referenced by Init(), LoadedString(), ParseLoad(), and SetLoads().
|
protected |
Definition at line 438 of file AliFMDInput.h.
Referenced by Begin(), and DrawTrackRefs::ProcessTrackRef().
|
protected |
Definition at line 442 of file AliFMDInput.h.
Referenced by Init(), and SetInputDir().
|
protected |
Definition at line 443 of file AliFMDInput.h.
|
protected |
Definition at line 414 of file AliFMDInput.h.
|
protected |
Definition at line 445 of file AliFMDInput.h.
Referenced by Run().
|
protected |
Definition at line 441 of file AliFMDInput.h.
Referenced by Begin(), FindCommonModeNoise::FindCommonModeNoise(), DrawCalibRaw::Init(), Init(), and SetRawFile().
|
protected |
Definition at line 418 of file AliFMDInput.h.
Referenced by Begin(), FindCommonModeNoise::Finish(), Init(), FindCommonModeNoise::NEvents(), and NEvents().
|
protected |
Definition at line 415 of file AliFMDInput.h.
Referenced by Init().
|
protected |
Definition at line 416 of file AliFMDInput.h.
Referenced by Begin(), End(), DrawHits::ProcessHit(), DrawHitsRecs::ProcessHit(), ProcessHits(), ProcessStack(), ProcessTrackRefs(), and ProcessTracks().
|
protected |
Definition at line 429 of file AliFMDInput.h.
|
protected |
Definition at line 426 of file AliFMDInput.h.
Referenced by Begin(), End(), and ProcessDigits().
|
protected |
Definition at line 423 of file AliFMDInput.h.
|
protected |
Definition at line 424 of file AliFMDInput.h.
Referenced by Begin(), End(), ProcessHits(), and ProcessTracks().
|
protected |
Definition at line 440 of file AliFMDInput.h.
Referenced by AddLoad(), AliFMDDisplay::ChangeCut(), AliFMDDisplay::Init(), Init(), IsLoaded(), AliFMDDisplay::MakeAux(), AliFMDDisplay::MakeCanvas(), and RemoveLoad().
|
protected |
Definition at line 428 of file AliFMDInput.h.
Referenced by Begin(), End(), and ProcessRecPoints().
|
protected |
Definition at line 427 of file AliFMDInput.h.
Referenced by Begin(), End(), and ProcessSDigits().
|
protected |
Definition at line 425 of file AliFMDInput.h.
Referenced by Begin(), and ProcessTrackRefs().