ROOT logo
AliRoot » MUON » AliMUONMCDataInterface

class AliMUONMCDataInterface: public TObject

 \class AliMUONMCDataInterface

 Easy to use MC data accessor

 \author Laurent Aphecetche, Subatech

 Moved parts of old AliMUONDataInterface interface to AliMUONMCDataInterface
  Artur Szostak <artursz@iafrica.com> (University of Cape Town)

Function Members (Methods)

public:
AliMUONMCDataInterface(const char* filename = "galice.root")
virtual~AliMUONMCDataInterface()
voidTObject::AbstractMethod(const char* method) const
virtual voidTObject::AppendPad(Option_t* option = "")
virtual voidTObject::Browse(TBrowser* b)
static TClass*Class()
virtual const char*TObject::ClassName() const
virtual voidTObject::Clear(Option_t* = "")
virtual TObject*TObject::Clone(const char* newname = "") const
virtual Int_tTObject::Compare(const TObject* obj) const
virtual voidTObject::Copy(TObject& object) const
Int_tCurrentEvent() const
virtual voidTObject::Delete(Option_t* option = "")MENU
AliMUONVDigit*Digit(Int_t detElemId, Int_t index)
AliMUONVDigit*Digit(Int_t chamber, Int_t cathode, Int_t index)
AliMUONVDigitStore*DigitStore(Int_t event)
virtual Int_tTObject::DistancetoPrimitive(Int_t px, Int_t py)
virtual voidTObject::Draw(Option_t* option = "")
virtual voidTObject::DrawClass() constMENU
virtual TObject*TObject::DrawClone(Option_t* option = "") constMENU
virtual voidTObject::Dump() constMENU
voidDumpDigits(Int_t event, Bool_t sorted = kTRUE)
voidDumpHits(Int_t event)
voidDumpKine(Int_t event)
voidDumpSDigits(Int_t event, Bool_t sorted = kTRUE)
voidDumpTrackRefs(Int_t event)
voidDumpTrigger(Int_t event)
virtual voidTObject::Error(const char* method, const char* msgfmt) const
virtual voidTObject::Execute(const char* method, const char* params, Int_t* error = 0)
virtual voidTObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0)
virtual voidTObject::ExecuteEvent(Int_t event, Int_t px, Int_t py)
virtual voidTObject::Fatal(const char* method, const char* msgfmt) const
virtual TObject*TObject::FindObject(const char* name) const
virtual TObject*TObject::FindObject(const TObject* obj) const
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
Bool_tGetEvent(Int_t event = 0)
virtual const char*TObject::GetIconName() const
virtual const char*TObject::GetName() const
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
virtual Option_t*TObject::GetOption() const
virtual const char*TObject::GetTitle() const
virtual UInt_tTObject::GetUniqueID() const
AliMUONGlobalTrigger*GlobalTrigger()
virtual Bool_tTObject::HandleTimer(TTimer* timer)
virtual ULong_tTObject::Hash() const
AliMUONHit*Hit(Int_t track, Int_t index)
AliMUONVHitStore*HitStore(Int_t event, Int_t track)
virtual voidTObject::Info(const char* method, const char* msgfmt) const
virtual Bool_tTObject::InheritsFrom(const char* classname) const
virtual Bool_tTObject::InheritsFrom(const TClass* cl) const
virtual voidTObject::Inspect() constMENU
voidTObject::InvertBit(UInt_t f)
virtual TClass*IsA() const
virtual Bool_tTObject::IsEqual(const TObject* obj) const
virtual Bool_tTObject::IsFolder() const
Bool_tTObject::IsOnHeap() const
virtual Bool_tTObject::IsSortable() const
Bool_tIsValid() const
Bool_tTObject::IsZombie() const
AliMUONLocalTrigger*LocalTrigger(Int_t index)
virtual voidTObject::ls(Option_t* option = "") const
voidTObject::MayNotUse(const char* method) const
virtual Bool_tTObject::Notify()
Int_tNumberOfDigits(Int_t detElemId)
Int_tNumberOfDigits(Int_t chamber, Int_t cathode)
Int_tNumberOfEvents() const
Int_tNumberOfHits(Int_t track)
Int_tNumberOfLocalTriggers()
Int_tNumberOfParticles()
Int_tNumberOfRegionalTriggers()
Int_tNumberOfSDigits(Int_t detElemId)
Int_tNumberOfSDigits(Int_t chamber, Int_t cathode)
Int_tNumberOfTrackRefs()
Int_tNumberOfTrackRefs(Int_t event)
Int_tNumberOfTracks()
Int_tNumberOfTracks(Int_t event)
voidTObject::Obsolete(const char* method, const char* asOfVers, const char* removedFromVers) const
voidOpen(const char* filename)
static voidTObject::operator delete(void* ptr)
static voidTObject::operator delete(void* ptr, void* vp)
static voidTObject::operator delete[](void* ptr)
static voidTObject::operator delete[](void* ptr, void* vp)
void*TObject::operator new(size_t sz)
void*TObject::operator new(size_t sz, void* vp)
void*TObject::operator new[](size_t sz)
void*TObject::operator new[](size_t sz, void* vp)
virtual voidTObject::Paint(Option_t* option = "")
TParticle*Particle(Int_t index)
virtual voidTObject::Pop()
virtual voidTObject::Print(Option_t* option = "") const
virtual Int_tTObject::Read(const char* name)
virtual voidTObject::RecursiveRemove(TObject* obj)
AliMUONRegionalTrigger*RegionalTrigger(Int_t index)
voidTObject::ResetBit(UInt_t f)
virtual voidTObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU
virtual voidTObject::SavePrimitive(basic_ostream<char,char_traits<char> >& out, Option_t* option = "")
AliMUONVDigit*SDigit(Int_t detElemId, Int_t index)
AliMUONVDigit*SDigit(Int_t chamber, Int_t cathode, Int_t index)
AliMUONVDigitStore*SDigitStore(Int_t event)
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
virtual voidTObject::SetDrawOption(Option_t* option = "")MENU
static voidTObject::SetDtorOnly(void* obj)
static voidTObject::SetObjectStat(Bool_t stat)
virtual voidTObject::SetUniqueID(UInt_t uid)
virtual voidShowMembers(TMemberInspector&)
AliStack*Stack(Int_t event)
virtual voidStreamer(TBuffer&)
voidStreamerNVirtual(TBuffer& ClassDef_StreamerNVirtual_b)
virtual voidTObject::SysError(const char* method, const char* msgfmt) const
Bool_tTObject::TestBit(UInt_t f) const
Int_tTObject::TestBits(UInt_t f) const
TClonesArray*TrackRefs(Int_t track)
TClonesArray*TrackRefs(Int_t event, Int_t track)
AliMUONVTriggerStore*TriggerStore(Int_t event)
virtual voidTObject::UseCurrentStyle()
virtual voidTObject::Warning(const char* method, const char* msgfmt) const
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0)
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) const
protected:
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
voidTObject::MakeZombie()
private:
AliMUONMCDataInterface(const AliMUONMCDataInterface&)
Int_tCountObjects(TIterator* iter)
voidDumpSorted(const AliMUONVStore& store) const
TObject*FetchObject(TIterator* iter, Int_t index)
TIterator*GetIterator(AliMUONMCDataInterface::IteratorType type, Int_t x = 0, Int_t y = 0)
Bool_tLoadEvent(Int_t event)
AliMUONMCDataInterface&operator=(const AliMUONMCDataInterface&)
voidResetIterator()
voidResetStores()

Data Members

public:
enum IteratorType { kNoIterator
kHitIterator
kSDigitIteratorByDetectorElement
kSDigitIteratorByChamberAndCathode
kDigitIteratorByDetectorElement
kDigitIteratorByChamberAndCathode
kLocalTriggerIterator
kRegionalTriggerIterator
};
enum TObject::EStatusBits { kCanDelete
kMustCleanup
kObjInCanvas
kIsReferenced
kHasUUID
kCannotPick
kNoContextMenu
kInvalidObject
};
enum TObject::[unnamed] { kIsOnHeap
kNotDeleted
kZombie
kBitMask
kSingleKey
kOverwrite
kWriteDelete
};
private:
Int_tfCurrentEvent!< Current event we've read in
Int_tfCurrentIndex!< A current index number maintained for certain iteration operations.
AliMUONMCDataInterface::IteratorTypefCurrentIteratorType!< The type of iterator that is currently set.
Int_tfDataX!< Extra data parameter about the iterator, can be the chamber number, detector element or track number.
Int_tfDataY!< Extra data parameter about the iterator, can be the cathode number.
AliMUONVDigitStore*fDigitStore!< current digit store (owner)
AliMUONVHitStore*fHitStore!< current hit store (owner)
Bool_tfIsValid!< whether we were initialized properly or not
TIterator*fIterator!< Iterator for various iteration operations.
AliLoader*fLoader!< Tree accessor
AliMUONVDigitStore*fSDigitStore!< current sdigit store (owner)
TClonesArray*fTrackRefs!< current trackrefs (owner)
AliMUONVTriggerStore*fTriggerStore!< current trigger store (owner)
static Int_tfgInstanceCounter!< To build unique folder name for each instance

Class Charts

Inheritance Chart:
TObject
AliMUONMCDataInterface

Function documentation

AliMUONMCDataInterface(const char* filename = "galice.root")
 ctor
~AliMUONMCDataInterface()
 dtor
HitStore(Int_t event, Int_t track)
 Return the hitStore for a given track of one event
 Return 0x0 if event and/or track not found
 Returned pointer should not be deleted

 \note If a previous store has been retrieved by one of the methods of
 this class, but for a different event number, then those stores will
 be deleted and no longer valid.
 If you require access to the data for the earlier retrieved store,
 but for different events, then you should deep copy / clone the object.
SDigitStore(Int_t event)
 Return the SDigit store for a given event.
 Return 0 if event not found
 Returned pointer should not be deleted

 \note If a previous store has been retrieved by one of the methods of
 this class, but for a different event number, then those stores will
 be deleted and no longer valid.
 If you require access to the data for the earlier retrieved store,
 but for different events, then you should deep copy / clone the object.
DigitStore(Int_t event)
 Return a pointer to the digitStore for a given event (or 0 if not found)
 Returned pointer should not be deleted

 \note If a previous store has been retrieved by one of the methods of
 this class, but for a different event number, then those stores will
 be deleted and no longer valid.
 If you require access to the data for the earlier retrieved store,
 but for different events, then you should deep copy / clone the object.
Stack(Int_t event)
 Get the Stack (list of generated particles) for one event
 Returned pointer should not be deleted

 \note If a previous store has been retrieved by one of the methods of
 this class, but for a different event number, then those stores will
 be deleted and no longer valid.
 If you require access to the data for the earlier retrieved store,
 but for different events, then you should deep copy / clone the object.
TrackRefs(Int_t event, Int_t track)
 Get the track references for a given (generated) track of one event
 Returned pointer should not be deleted

 \note If a previous store has been retrieved by one of the methods of
 this class, but for a different event number, then those stores will
 be deleted and no longer valid.
 If you require access to the data for the earlier retrieved store,
 but for different events, then you should deep copy / clone the object.
TriggerStore(Int_t event)
 Return the triggerStore for a given event.
 Return 0x0 if event not found.
 Returned pointer should not be deleted.

 \note If a previous store has been retrieved by one of the methods of
 this class, but for a different event number, then those stores will
 be deleted and no longer valid.
 If you require access to the data for the earlier retrieved store,
 but for different events, then you should deep copy / clone the object.
DumpDigits(Int_t event, Bool_t sorted = kTRUE)
 Dump the digits for a given event, sorted if requested.
DumpHits(Int_t event)
 Dump all the hits for one event
DumpKine(Int_t event)
 Dump all generated particles for one event
DumpSDigits(Int_t event, Bool_t sorted = kTRUE)
 Dump the SDigits for a given event, sorted if requested
DumpSorted(const AliMUONVStore& store) const
 Dump the given store in sorted order
DumpTrackRefs(Int_t event)
 Dump track references for one event
DumpTrigger(Int_t event)
 Dump trigger for a given event (trigger is read from TreeD)
LoadEvent(Int_t event)
 Load event if different from the current one.
 Returns kFALSE on error and kTRUE if the event was loaded.
NumberOfEvents() const
 Number of events in the file we're connected to
NumberOfTracks(Int_t event)
 Number of tracks in the event
NumberOfTrackRefs(Int_t event)
 Number of track references in the event
Open(const char* filename)
 Connect to a given galice.root file
Bool_t GetEvent(Int_t event = 0)
 Loads all simulated data for the given event.
Int_t NumberOfParticles()
 Returns the total number of particles in the kinematics tree.
TParticle* Particle(Int_t index)
 Returns the index'th particle in the kinematics tree.
 @param index  The index number of the particle in the range [0 ... N-1]
               where N = NumberOfParticles()
Int_t NumberOfTracks()
 Returns the number of primary tracks (from primary particles) in the current event.
Int_t NumberOfHits(Int_t track)
 Returns the number of hits for a given primary track/particle.
 @param track  The track number in the range [0 .. N-1]
               where N = NumberOfTracks()
Hit(Int_t track, Int_t index)
 Returns a pointer to the index'th hit object.
 @param track  The track number in the range [0 .. N-1]
               where N = NumberOfTracks()
 @param index  The index number of the hit in the range [0 ... M-1]
               where M = NumberOfHits(track)
Int_t NumberOfSDigits(Int_t detElemId)
 Returns the number of summable digits to be found on a given detector element.
 @param detElemId  The detector element ID number to search on.
AliMUONVDigit* SDigit(Int_t detElemId, Int_t index)
 Returns the a pointer to the index'th summable digit on the specified detector element.
 @param detElemId  The detector element ID number to search on.
 @param index  The index number of the digit to fetch in the range [0 .. N-1],
   where N = NumberOfDigits(detElemId)
Int_t NumberOfSDigits(Int_t chamber, Int_t cathode)
 Returns the number of summable digits to be found on a specific chamber and cathode.
 @param chamber  The chamber number in the range [0 .. 13].
 @param cathode  The cathode in the range [0 .. 1], where 0 is the bending and
   1 is the non-bending plane.
AliMUONVDigit* SDigit(Int_t chamber, Int_t cathode, Int_t index)
 Returns the a pointer to the index'th summable digit on the specified chamber and cathode.
 @param chamber  The chamber number in the range [0 .. 13].
 @param cathode  The cathode in the range [0 .. 1], where 0 is the bending and
   1 is the non-bending plane.
 @param index  The index number of the digit to fetch in the range [0 .. N-1],
   where N = NumberOfDigits(chamber, cathode)
Int_t NumberOfDigits(Int_t detElemId)
 Returns the number of simulated digits to be found on a given detector element.
 @param detElemId  The detector element ID number to search on.
AliMUONVDigit* Digit(Int_t detElemId, Int_t index)
 Returns the a pointer to the index'th simulated digit on the specified detector element.
 @param detElemId  The detector element ID number to search on.
 @param index  The index number of the digit to fetch in the range [0 .. N-1],
   where N = NumberOfDigits(detElemId)
Int_t NumberOfDigits(Int_t chamber, Int_t cathode)
 Returns the number of simulated digits to be found on a specific chamber and cathode.
 @param chamber  The chamber number in the range [0 .. 13].
 @param cathode  The cathode in the range [0 .. 1], where 0 is the bending and
   1 is the non-bending plane.
AliMUONVDigit* Digit(Int_t chamber, Int_t cathode, Int_t index)
 Returns the a pointer to the index'th simulated digit on the specified chamber and cathode.
 @param chamber  The chamber number in the range [0 .. 13].
 @param cathode  The cathode in the range [0 .. 1], where 0 is the bending and
   1 is the non-bending plane.
 @param index  The index number of the digit to fetch in the range [0 .. N-1],
   where N = NumberOfDigits(chamber, cathode)
Int_t NumberOfLocalTriggers()
 Returns the number of simulated local trigger objects.
AliMUONLocalTrigger* LocalTrigger(Int_t index)
 Returns a pointer to the index'th simulated local trigger object.
 @param index  The index number of the local trigger object to fetch in the range [0 .. N-1],
   where N = NumberOfLocalTriggers()
Int_t NumberOfRegionalTriggers()
 Returns the number of simulated regional trigger objects.
AliMUONRegionalTrigger* RegionalTrigger(Int_t index)
 Returns a pointer to the index'th simulated regional trigger object.
 @param index  The index number of the regional trigger object to fetch in the range [0 .. N-1],
   where N = NumberOfRegionalTriggers()
AliMUONGlobalTrigger* GlobalTrigger()
 Returns a pointer to the simulated global trigger object for the event.
Int_t NumberOfTrackRefs()
 Number of track references in the currently selected event.
TClonesArray* TrackRefs(Int_t track)
 Returns the track references for a given track in the current event.
 @param track  The track to returns track references for. In the range [0 .. N-1]
               where N = NumberOfTrackRefs()
void ResetStores()
 Deletes all the store objects that have been created and resets the pointers to 0x0.
 The temporary iterator object is automatically reset. See ResetIterator for more details.
TIterator* GetIterator(AliMUONMCDataInterface::IteratorType type, Int_t x = 0, Int_t y = 0)
 Creates an appropriate iterator object and returns it.
 If the iterator has already been created then that one is returned otherwise
 a new object is created.
 Depending on the value of 'type' the semantics of parameters x and y can change.
 @param type  The type of iterator to create.
 @param x  This is the detector element ID if type equals kDigitIteratorByDetectorElement
           or kSDigitIteratorByDetectorElement.
           If type equals kDigitIteratorByChamberAndCathode or
           kSDigitIteratorByChamberAndCathode then this is the chamber number.
           For type == kHitIterator the parameter x is the track number.
           In all other cases this parameter is ignored.
 @param y  If type equals kDigitIteratorByChamberAndCathode or
           kSDigitIteratorByChamberAndCathode then this parameter is the cathode
           number. In all other cases this parameter is ignored.
void ResetIterator()
 The temporary iterator object is deleted if it exists and the pointer reset to 0x0.
 The iterator type and temporary data indicating the state of the iterator are
 also reset.
Int_t CountObjects(TIterator* iter)
 Counts the number of objects in the iterator and resets it.
 @return The number of objects in 'iter'.
TObject* FetchObject(TIterator* iter, Int_t index)
 Fetches the index'th object from the iterator counting the first object
 returned by iterator after it is reset as index == 0. The next object
 has index == 1 and so on where the last object returned by the iterator
 has index == N-1 where N = CountObjects(iter)
 This method will only reset the iterator if index is smaller than
 fCurrentIndex, which is used to track the iteration progress and is
 updated when a new object if returned by this method.
 @param iter  The iterator to fetch an object from.
 @param index The index number of the object to fetch in the range [0 .. N-1]
        where N = CountObjects(iter)
AliMUONMCDataInterface(const char* filename = "galice.root")
Bool_t IsValid() const
 Returns true if the data interface was able to open the root file correctly.
{ return fIsValid; }
Int_t CurrentEvent() const
 Returns the index number of the current event loaded.
 This is the event number as was used in the last calls to any of the methods
 in this interface that have 'Int_t event' in the parameter list.
 GetEvent(Int_t event) for example.
{ return fCurrentEvent; }
AliMUONMCDataInterface& operator=(const AliMUONMCDataInterface& )
 Not implemented