Heavy ion Analysis Libriares
Loading...
Searching...
No Matches
Hal::Event Class Referenceabstract

#include <Event.h>

Inheritance diagram for Hal::Event:
Hal::ComplexEvent Hal::ExpEvent Hal::McEvent Hal::VirtualEvent MyHal::EventTemplate Hal::SmearedEvent HalDbg::ComplexEvent HalOTF::ComplexEvent Hal::ExpEventHelix HalDbg::RecoEvent HalOTF::RecoEvent HalDbg::McEvent HalOTF::McEvent HalUni::UnigenEvent

Public Member Functions

 Event ()
 
 Event (const Event &other)
 
void Build (Event *event, const CompressionMap &map)
 
void Build (Event *event)
 
void Compress (const CompressionMap &map)
 
virtual void Update (EventInterface *interface)
 
virtual void Clear (Option_t *opt=" ")
 
void SetEventID (Int_t newID)
 
void SetPhi (Double_t phi, Double_t phi_error=0)
 
virtual void RotateZ (Double_t phi)
 
virtual void Print (Option_t *opt="") const
 
TrackGetTrack (Int_t i) const
 
TrackAddTrack ()
 
virtual Bool_t ExistInTree () const
 
virtual Bool_t IsCompatible (const Event *non_buffered) const
 
Int_t GetEventID () const
 
Int_t GetTotalTrackNo () const
 
Int_t GetTotalV0No () const
 
Int_t GetMutliplicity () const
 
Double_t GetPhi () const
 
Double_t GetPhiError () const
 
TLorentzVector * GetVertex () const
 
virtual EFormatType GetFormatType () const
 
virtual TString GetFormatName () const
 
TrackGetNewTrack () const
 
virtual EventInterfaceCreateInterface () const =0
 
virtual Float_t GetFieldVal (Int_t fieldID) const
 
virtual TString GetFieldName (Int_t fieldID) const
 
TClonesArray * GetV0HiddenInfo () const
 
virtual ~Event ()
 
virtual void CopyHiddenSettings (const Event *)
 
virtual void Boost (Double_t vx, Double_t vy, Double_t vz)
 
virtual EventGetNewEvent () const
 
virtual Int_t GetMaxExpectedLinks () const
 
virtual Bool_t HasHiddenSettings () const
 
virtual PackageReport () const
 

Protected Member Functions

Double_t CalculateCharge (Int_t pdg) const
 
void ResetHiddenInfoCounter ()
 
void CopyData (Event *event)
 
void CopyCompress (Event *event, const CompressionMap &map)
 
void Compress (TClonesArray *array, const CompressionMap &map)
 
virtual void ShallowCopyTracks (Event *event)
 
virtual void ShallowCopyCompressTracks (Event *event, const CompressionMap &map)
 
virtual void ShallowCopyEvent (Event *event)
 
Bool_t CheckBranches (Int_t n...) const
 
Bool_t CheckBranches (std::initializer_list< TString > list) const
 
 Event (TString track_class, TString v0_class="Hal::V0Track", TString xi_class="Hal::XiTrack")
 

Protected Attributes

TDatabasePDG * fPDG
 
TClonesArray * fTracks
 
TClonesArray * fV0sHiddenInfo
 
TClonesArray * fXisHiddenInfo
 
TLorentzVector * fVertex
 
Double_t fPhi
 
Double_t fPhiError
 
Int_t fEventId
 
Int_t fTotalTracksNo
 
Int_t fMultiplicity
 

Friends

class SmearedEvent
 
class ComplexEvent
 
class Track
 

Detailed Description

Abstract class for storing events. It contains representation of basic paramters, and Track array.

Warning
You should not use base constructor in analysis but construtor with TString parameter In this constructor yous should specify type of tracks in this event.

Currently all classes work in folllowing way: Event-derived classes is basic class that store most important inforrmations. Getters/setters here are usually inlined to improve performance (crutial if analysis call getters frequently). Event also might contains so called EventInterface . EventInterface based classes are used to store and acces "real event" in 'oryginal structure" from tree. Event interface is always present in "current event". If you don;t want to store event interface in buffered events you can call "DisableSource". In such case only data from Event-based events are stored in memory. Another option of compression is calling Compress() method, in such case only tracks that passed cuts are stored..

See also
EventInterface

Definition at line 50 of file Event.h.

Constructor & Destructor Documentation

◆ Event() [1/3]

Hal::Event::Event ( TString track_class,
TString v0_class = "Hal::V0Track",
TString xi_class = "Hal::XiTrack" )
protected

constructor used by derived classes

Parameters
track_classname of track class, e.g. if you have MagicEvent class with MagicTrack your constructor should look like MagicEvent():Event("MagicTrack"){... .
v0_class- name of class with V0 data
xi_class- name of class with Xi data

Definition at line 49 of file Event.cxx.

◆ Event() [2/3]

Hal::Event::Event ( )

default constructor - should no be used

Definition at line 32 of file Event.cxx.

◆ Event() [3/3]

Hal::Event::Event ( const Event & other)

copy c-tor

Parameters
other

Definition at line 58 of file Event.cxx.

◆ ~Event()

Hal::Event::~Event ( )
virtual

default destructor

Definition at line 73 of file Event.cxx.

Member Function Documentation

◆ AddTrack()

Track * Hal::Event::AddTrack ( )
Returns
newly added track

Definition at line 209 of file Event.cxx.

◆ Boost()

void Hal::Event::Boost ( Double_t vx,
Double_t vy,
Double_t vz )
virtual

boost this event and all tracks inside

Parameters
vx
vy
vz

Definition at line 124 of file Event.cxx.

◆ Build() [1/2]

void Hal::Event::Build ( Event * event)

make copy of event into this object, if map is specifed then build "minievent"

Parameters
eventevent to copy (will be the same class)
mapmap of tracks
map_size- map size

Definition at line 98 of file Event.cxx.

◆ Build() [2/2]

void Hal::Event::Build ( Event * event,
const CompressionMap & map )

make copy of event into this object, if map is specifed then build "minievent"

Parameters
eventevent to copy (will be the same class)
mapmap of tracks
map_size- map size

Definition at line 96 of file Event.cxx.

◆ CalculateCharge()

Double_t Hal::Event::CalculateCharge ( Int_t pdg) const
protected
Parameters
pdg
Returns
charge of particle

Definition at line 146 of file Event.cxx.

◆ CheckBranches() [1/2]

Bool_t Hal::Event::CheckBranches ( Int_t n...) const
protected
Parameters
nnumber of branches, names of branches
Returns
true if all branches are present in tree

Definition at line 221 of file Event.cxx.

◆ CheckBranches() [2/2]

Bool_t Hal::Event::CheckBranches ( std::initializer_list< TString > list) const
protected
Parameters
listof branches to check
Returns
true if all branches are present in tree

Definition at line 234 of file Event.cxx.

◆ Clear()

void Hal::Event::Clear ( Option_t * opt = " ")
virtual

used for clear (usually track array)

Parameters
optoption of Clear

Reimplemented in Hal::ComplexEvent, Hal::SmearedEvent, HalUni::UnigenEvent, and MyHal::EventTemplate.

Definition at line 82 of file Event.cxx.

◆ Compress() [1/2]

void Hal::Event::Compress ( const CompressionMap & map)

creates "compressed event" by removing tracks that are not present in map

Parameters
mapmap that contains indexes of tracks that should be copied
map_sizesize of this map

Definition at line 131 of file Event.cxx.

◆ Compress() [2/2]

void Hal::Event::Compress ( TClonesArray * array,
const CompressionMap & map )
protected

compress given clones array

Parameters
arrayarray of clones to compress
map_sizesize of map

◆ CopyCompress()

void Hal::Event::CopyCompress ( Event * event,
const CompressionMap & map )
protected

copy into this and compress event and source (if needed)

Parameters
eventevent to copy
mapmap of tracks to copy
map_idsmap to convert old ID's into new
map_sizesize of map

Definition at line 141 of file Event.cxx.

◆ CopyData()

void Hal::Event::CopyData ( Event * event)
protected

copy into this event and source (if needed)

Parameters
eventevent to copy

Definition at line 136 of file Event.cxx.

◆ CopyHiddenSettings()

virtual void Hal::Event::CopyHiddenSettings ( const Event * )
inlinevirtual

copy settings of this event - but not values stored!

Parameters
event

Definition at line 311 of file Event.h.

◆ CreateInterface()

virtual EventInterface * Hal::Event::CreateInterface ( ) const
pure virtual

create interface - original structure of event, by allocating memory

Implemented in Hal::ComplexEvent, Hal::VirtualEvent, HalDbg::McEvent, HalDbg::RecoEvent, HalOTF::McEvent, HalOTF::RecoEvent, HalUni::UnigenEvent, and MyHal::EventTemplate.

◆ ExistInTree()

virtual Bool_t Hal::Event::ExistInTree ( ) const
inlinevirtual
Returns
true if needed branches exist in tree

Reimplemented in Hal::ComplexEvent, Hal::VirtualEvent, HalDbg::McEvent, HalDbg::RecoEvent, HalOTF::McEvent, HalOTF::RecoEvent, HalUni::UnigenEvent, and MyHal::EventTemplate.

Definition at line 218 of file Event.h.

◆ GetEventID()

Int_t Hal::Event::GetEventID ( ) const
inline
Returns
event number

Definition at line 231 of file Event.h.

◆ GetFieldName()

TString Hal::Event::GetFieldName ( Int_t fieldID) const
virtual

return name of the track property by ID

Parameters
fieldID
Returns

Reimplemented in Hal::ComplexEvent, Hal::ExpEvent, and Hal::McEvent.

Definition at line 272 of file Event.cxx.

◆ GetFieldVal()

Float_t Hal::Event::GetFieldVal ( Int_t fieldID) const
virtual

return track property by ID, this should be positive number larger than 200 (for ID outside of framework)

Parameters
fieldID
Returns

Reimplemented in Hal::ComplexEvent, Hal::ExpEvent, and Hal::McEvent.

Definition at line 254 of file Event.cxx.

◆ GetFormatName()

TString Hal::Event::GetFormatName ( ) const
virtual
Returns
name of current format, should be reimplemented only if class name doesn't uniquely define format

Reimplemented in Hal::SmearedEvent, HalDbg::ComplexEvent, HalDbg::McEvent, HalDbg::RecoEvent, HalOTF::ComplexEvent, HalOTF::McEvent, HalOTF::RecoEvent, HalUni::UnigenEvent, and MyHal::EventTemplate.

Definition at line 155 of file Event.cxx.

◆ GetFormatType()

virtual EFormatType Hal::Event::GetFormatType ( ) const
inlinevirtual
Returns
format type

Reimplemented in Hal::ComplexEvent, and Hal::McEvent.

Definition at line 266 of file Event.h.

◆ GetMaxExpectedLinks()

virtual Int_t Hal::Event::GetMaxExpectedLinks ( ) const
inlinevirtual
Returns
maximum number of expected links, used by memory map manager to get fast links

Definition at line 330 of file Event.h.

◆ GetMutliplicity()

Int_t Hal::Event::GetMutliplicity ( ) const
inline
Returns
multiplicity of event

Definition at line 246 of file Event.h.

◆ GetNewEvent()

Event * Hal::Event::GetNewEvent ( ) const
virtual

for allocation event should be reimpleneted only if default constructor + CopyHiddenVariabels is not enough to create complete empty new event

Returns
new object of this class for SetFormat()

Reimplemented in Hal::VirtualEvent.

Definition at line 215 of file Event.cxx.

◆ GetNewTrack()

Track * Hal::Event::GetNewTrack ( ) const
Returns
allocated track compatible with current format

Definition at line 204 of file Event.cxx.

◆ GetPhi()

Double_t Hal::Event::GetPhi ( ) const
inline
Returns
reaction plane angle

Definition at line 251 of file Event.h.

◆ GetPhiError()

Double_t Hal::Event::GetPhiError ( ) const
inline
Returns
error of reaction plane

Definition at line 256 of file Event.h.

◆ GetTotalTrackNo()

Int_t Hal::Event::GetTotalTrackNo ( ) const
inline
Returns
total number of tracks STORED in event

Definition at line 236 of file Event.h.

◆ GetTotalV0No()

Int_t Hal::Event::GetTotalV0No ( ) const
inline
Returns
total number of STORED V0

Definition at line 241 of file Event.h.

◆ GetTrack()

Track * Hal::Event::GetTrack ( Int_t i) const
inline

fill fake track with track data

Parameters
iposition of track in track array

Definition at line 208 of file Event.h.

◆ GetV0HiddenInfo()

TClonesArray * Hal::Event::GetV0HiddenInfo ( ) const
inline
Returns
pointer to hidden info

Definition at line 299 of file Event.h.

◆ GetVertex()

TLorentzVector * Hal::Event::GetVertex ( ) const
inline
Returns
vertex position in 4D

Definition at line 261 of file Event.h.

◆ HasHiddenSettings()

virtual Bool_t Hal::Event::HasHiddenSettings ( ) const
inlinevirtual

this function should be reimplemented only if hidden settings are used - the settings that are used during calculation of event properties

Returns
true if this format have some hidden settings that doesn't depend on data stored in tree

Reimplemented in Hal::ComplexEvent.

Definition at line 337 of file Event.h.

◆ IsCompatible()

Bool_t Hal::Event::IsCompatible ( const Event * non_buffered) const
virtual

check if this buffered and "non-buffered" format are compatible this function should be reimplemented only if user want to copy data from other format

Parameters
bufferedreturn true if formats are compatible
Returns

Reimplemented in Hal::ComplexEvent.

Definition at line 245 of file Event.cxx.

◆ Print()

void Hal::Event::Print ( Option_t * opt = "") const
virtual

print basic info about event

Definition at line 91 of file Event.cxx.

◆ Report()

Package * Hal::Event::Report ( ) const
virtual

creates report about this event, this should be reimplented only if hidden variables/ additional options are used in event

Returns

Definition at line 252 of file Event.cxx.

◆ ResetHiddenInfoCounter()

void Hal::Event::ResetHiddenInfoCounter ( )
inlineprotected

set total V0s to zero

Definition at line 77 of file Event.h.

◆ RotateZ()

void Hal::Event::RotateZ ( Double_t phi)
virtual

rotate this event

Parameters
phirotation angle

Definition at line 290 of file Event.cxx.

◆ SetEventID()

void Hal::Event::SetEventID ( Int_t newID)
inline

set new eventID

Parameters
newID

Definition at line 185 of file Event.h.

◆ SetPhi()

void Hal::Event::SetPhi ( Double_t phi,
Double_t phi_error = 0 )
inline

set event reaction plane with error

Parameters
phirection plane
phi_errorreaction plane error

Definition at line 191 of file Event.h.

◆ ShallowCopyCompressTracks()

void Hal::Event::ShallowCopyCompressTracks ( Event * event,
const CompressionMap & map )
protectedvirtual

copy only track data from "event" into this

Parameters
eventevent to copy
compressionmap

Reimplemented in Hal::ComplexEvent.

Definition at line 190 of file Event.cxx.

◆ ShallowCopyEvent()

void Hal::Event::ShallowCopyEvent ( Event * event)
protectedvirtual

copy only event data from "event" into this

Parameters
eventevent to copy

Reimplemented in Hal::ComplexEvent, Hal::ExpEvent, and Hal::McEvent.

Definition at line 100 of file Event.cxx.

◆ ShallowCopyTracks()

void Hal::Event::ShallowCopyTracks ( Event * event)
protectedvirtual

copy only track data from "event" into this

Parameters
eventevent to copy

Reimplemented in Hal::ComplexEvent, and Hal::McEvent.

Definition at line 111 of file Event.cxx.

◆ Update()

void Hal::Event::Update ( EventInterface * interface)
virtual

update fields by using "source event", it's better to implement this method due to improve performance. In such case you can use directly getters/setters from oryginal structure instead of calling virtual methods from EventInterface

Parameters
interface- interface to event stored in tree

Reimplemented in Hal::ComplexEvent, Hal::McEvent, Hal::SmearedEvent, Hal::VirtualEvent, HalDbg::ComplexEvent, HalDbg::McEvent, HalDbg::RecoEvent, HalOTF::ComplexEvent, HalOTF::McEvent, HalOTF::RecoEvent, HalUni::UnigenEvent, and MyHal::EventTemplate.

Definition at line 157 of file Event.cxx.

Friends And Related Symbol Documentation

◆ ComplexEvent

friend class ComplexEvent
friend

Definition at line 53 of file Event.h.

◆ SmearedEvent

friend class SmearedEvent
friend

Definition at line 52 of file Event.h.

◆ Track

friend class Track
friend

Definition at line 54 of file Event.h.

Member Data Documentation

◆ fEventId

Int_t Hal::Event::fEventId
protected

Definition at line 65 of file Event.h.

◆ fMultiplicity

Int_t Hal::Event::fMultiplicity
protected

Definition at line 67 of file Event.h.

◆ fPDG

TDatabasePDG* Hal::Event::fPDG
protected

Definition at line 59 of file Event.h.

◆ fPhi

Double_t Hal::Event::fPhi
protected

Definition at line 64 of file Event.h.

◆ fPhiError

Double_t Hal::Event::fPhiError
protected

Definition at line 64 of file Event.h.

◆ fTotalTracksNo

Int_t Hal::Event::fTotalTracksNo
protected

Definition at line 66 of file Event.h.

◆ fTracks

TClonesArray* Hal::Event::fTracks
protected

Definition at line 60 of file Event.h.

◆ fV0sHiddenInfo

TClonesArray* Hal::Event::fV0sHiddenInfo
protected

Definition at line 61 of file Event.h.

◆ fVertex

TLorentzVector* Hal::Event::fVertex
protected

Definition at line 63 of file Event.h.

◆ fXisHiddenInfo

TClonesArray* Hal::Event::fXisHiddenInfo
protected

Definition at line 62 of file Event.h.


The documentation for this class was generated from the following files: