BmnRoot 26.10.0-233-gb9bbe585
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
BmnRootIterator Class Reference

#include <BmnRootIterator.h>

Inheritance diagram for BmnRootIterator:
Collaboration diagram for BmnRootIterator:

Public Types

typedef CbmStsTrack Track_t
typedef CbmStsHit Hit_t

Public Member Functions

 BmnRootIterator ()=delete
 BmnRootIterator (const char *filesPathList, const BmnDetectorModel &detModel, TrackFilter_t trackFilter, HitFilter_t hitFilter, BmnSimpleProgressBar *pb=nullptr, Bool_t verbose=kFALSE, Int_t maxTracks=0)
virtual ~BmnRootIterator ()
void CountElements ()
virtual void ResetAll () override
virtual void NextTrack () override
virtual void ResetHits () override
virtual void NextHit () override
virtual Double_t HitX () const override
virtual Double_t HitY () const override
virtual Double_t HitZ () const override
virtual Double_t HitWx () const override
virtual Double_t HitWy () const override
virtual Int_t HitDetectorID () const override
virtual Int_t HitsInTrack () const override
UInt_t EventID () const noexcept
Long64_t GetTotalEvents () const noexcept
Int_t GetTotalTracks () const noexcept
Int_t GetTotalHits () const noexcept
const Hit_t * GetHit () const noexcept
const Track_t * GetTrack () const noexcept
Bool_t IsNewEvent () const noexcept
Bool_t HasVertexHit () const noexcept
Double_t VertexVarX () const noexcept
Double_t VertexVarY () const noexcept
TChain & GetChain () const noexcept
const TClonesArray * GetBeamHits () const
Public Member Functions inherited from BmnDataIterator
 BmnDataIterator (BmnSimpleProgressBar *pb=nullptr)
virtual ~BmnDataIterator ()=default
Bool_t Initialized () const noexcept
Bool_t EndOfTracks () const noexcept
Bool_t EndOfHits () const noexcept

Private Member Functions

Hit_t * HitAt (Int_t idx) const
Int_t NextUsableHit (Int_t from) const
Int_t CountUsableHits ()
void UnsetProperties ()
void ScanEvent ()

Private Attributes

const BmnDetectorModel * fpDetModel
TrackFilter_t fTrackFilter
HitFilter_t fHitFilter
 kTRUE keeps the track
BmnDataReader * fpData {nullptr}
 kTRUE keeps the hit
TTreeReader * fpReader {nullptr}
TTreeReaderValue< TClonesArray > * fpRootTracks {nullptr}
TTreeReaderValue< TClonesArray > * fpRootHits {nullptr}
TTreeReaderValue< TClonesArray > * fpRootBeamHits {nullptr}
TTreeReaderValue< DstEventHeader > * fpRootEventHeader {nullptr}
Track_t * fpCurrentTrack {nullptr}
Hit_t * fpCurrentHit {nullptr}
Long64_t fTotalEvents {0}
Int_t fTotalTracks {0}
Int_t fTotalHits {0}
Int_t fTracksInEvent {0}
Int_t fHitsInTrack {0}
Int_t fHitsRaw {0}
Int_t fTrackIdx {-1}
Int_t fHitIdx {-1}
Int_t fTrackLimit {0}
Int_t fTrackCount {0}
Int_t fEventTracks {0}
UInt_t fEventID {0}
std::vector< Bool_t > fVertexTrack
Double_t fVertexX {0.0}
 per track of the event: kTRUE if it takes the vertex hit
Double_t fVertexY {0.0}
Double_t fVertexZ {0.0}
Double_t fVertexVarX {0.0}
Double_t fVertexVarY {0.0}
Double_t fVertexWx {0.0}
Double_t fVertexWy {0.0}
Bool_t fHasVertex {kFALSE}
Bool_t fAtVertex {kFALSE}
Bool_t fProgressByTracks {kTRUE}

Additional Inherited Members

Protected Member Functions inherited from BmnDataIterator
BmnSimpleProgressBar * GetProgressBar () const noexcept
Float_t GetTickProgress () const noexcept
void SetTickProgress (Float_t progress)
void ProgressTick ()
void ProgressReset ()
void ProgressClear ()
Protected Attributes inherited from BmnDataIterator
Bool_t fInitialized {kFALSE}
Bool_t fEndOfTracks {kTRUE}
Bool_t fEndOfHits {kTRUE}

Detailed Description

Definition at line 40 of file BmnRootIterator.h.

Member Typedef Documentation

◆ Hit_t

Definition at line 44 of file BmnRootIterator.h.

◆ Track_t

Definition at line 43 of file BmnRootIterator.h.

Constructor & Destructor Documentation

◆ BmnRootIterator() [1/2]

BmnRootIterator::BmnRootIterator ( )
delete

◆ BmnRootIterator() [2/2]

BmnRootIterator::BmnRootIterator ( const char * filesPathList,
const BmnDetectorModel & detModel,
TrackFilter_t trackFilter,
HitFilter_t hitFilter,
BmnSimpleProgressBar * pb = nullptr,
Bool_t verbose = kFALSE,
Int_t maxTracks = 0 )

◆ ~BmnRootIterator()

BmnRootIterator::~BmnRootIterator ( )
virtual

Definition at line 87 of file BmnRootIterator.cxx.

References fpData, fpRootBeamHits, fpRootEventHeader, fpRootHits, and fpRootTracks.

Member Function Documentation

◆ CountElements()

void BmnRootIterator::CountElements ( )

Definition at line 96 of file BmnRootIterator.cxx.

References BmnDataIterator::EndOfTracks(), fProgressByTracks, fTotalEvents, fTotalHits, fTotalTracks, fTrackLimit, HitsInTrack(), NextTrack(), BmnDataIterator::ProgressClear(), BmnDataIterator::ProgressReset(), ResetAll(), and BmnDataIterator::SetTickProgress().

Referenced by histo(), and histoGL().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CountUsableHits()

Int_t BmnRootIterator::CountUsableHits ( )
inlineprivate

Definition at line 140 of file BmnRootIterator.h.

References fHitFilter, fHitsInTrack, fHitsRaw, fpCurrentTrack, HitAt(), and i.

Referenced by NextTrack(), ResetAll(), and ResetHits().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ EventID()

UInt_t BmnRootIterator::EventID ( ) const
inlinenoexcept

Definition at line 70 of file BmnRootIterator.h.

References fEventID.

Referenced by expdata().

Here is the caller graph for this function:

◆ GetBeamHits()

const TClonesArray * BmnRootIterator::GetBeamHits ( ) const
inline

Definition at line 83 of file BmnRootIterator.h.

References fpRootBeamHits.

Referenced by BmnAlignTestTask::Make().

Here is the caller graph for this function:

◆ GetChain()

TChain & BmnRootIterator::GetChain ( ) const
inlinenoexcept

Definition at line 81 of file BmnRootIterator.h.

References fpData.

Referenced by BmnAlignTestTask::Make().

Here is the caller graph for this function:

◆ GetHit()

const Hit_t * BmnRootIterator::GetHit ( ) const
inlinenoexcept

Definition at line 74 of file BmnRootIterator.h.

References fpCurrentHit.

Referenced by BmnAlignTestTask::Make(), and review().

Here is the caller graph for this function:

◆ GetTotalEvents()

Long64_t BmnRootIterator::GetTotalEvents ( ) const
inlinenoexcept

Definition at line 71 of file BmnRootIterator.h.

References fTotalEvents.

Referenced by expdataNN().

Here is the caller graph for this function:

◆ GetTotalHits()

Int_t BmnRootIterator::GetTotalHits ( ) const
inlinenoexcept

Definition at line 73 of file BmnRootIterator.h.

References fTotalHits.

◆ GetTotalTracks()

Int_t BmnRootIterator::GetTotalTracks ( ) const
inlinenoexcept

Definition at line 72 of file BmnRootIterator.h.

References fTotalTracks.

Referenced by histoGL().

Here is the caller graph for this function:

◆ GetTrack()

const Track_t * BmnRootIterator::GetTrack ( ) const
inlinenoexcept

Definition at line 75 of file BmnRootIterator.h.

References fpCurrentTrack.

Referenced by BmnAlignTestTask::Make().

Here is the caller graph for this function:

◆ HasVertexHit()

Bool_t BmnRootIterator::HasVertexHit ( ) const
inlinenoexcept

Definition at line 77 of file BmnRootIterator.h.

References fHasVertex.

Referenced by BmnAlignTestTask::Make().

Here is the caller graph for this function:

◆ HitAt()

BmnRootIterator::Hit_t * BmnRootIterator::HitAt ( Int_t idx) const
inlineprivate

Definition at line 127 of file BmnRootIterator.h.

References fpCurrentTrack.

Referenced by CountUsableHits(), NextHit(), NextUsableHit(), and ResetHits().

Here is the caller graph for this function:

◆ HitDetectorID()

Int_t BmnRootIterator::HitDetectorID ( ) const
inlineoverridevirtual

Implements BmnDataIterator.

Definition at line 210 of file BmnRootIterator.h.

References fAtVertex, BmnDataIterator::fEndOfHits, BmnDataIterator::fInitialized, fpCurrentHit, and fpDetModel.

Referenced by expdata(), expdataNN(), histo(), mp2prep(), and review().

Here is the caller graph for this function:

◆ HitsInTrack()

Int_t BmnRootIterator::HitsInTrack ( ) const
inlineoverridevirtual

Implements BmnDataIterator.

Definition at line 220 of file BmnRootIterator.h.

References BmnDataIterator::fEndOfTracks, fHasVertex, fHitsInTrack, and BmnDataIterator::fInitialized.

Referenced by CountElements(), expdataNN(), and BmnAlignTestTask::Make().

Here is the caller graph for this function:

◆ HitWx()

Double_t BmnRootIterator::HitWx ( ) const
inlineoverridevirtual

Implements BmnDataIterator.

Definition at line 196 of file BmnRootIterator.h.

References fAtVertex, BmnDataIterator::fEndOfHits, BmnDataIterator::fInitialized, fpCurrentHit, fVertexWx, and BmnHitRecord::Weight().

Referenced by expdata(), histo(), histoGL(), and mp2prep().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ HitWy()

Double_t BmnRootIterator::HitWy ( ) const
inlineoverridevirtual

Implements BmnDataIterator.

Definition at line 203 of file BmnRootIterator.h.

References fAtVertex, BmnDataIterator::fEndOfHits, BmnDataIterator::fInitialized, fpCurrentHit, fVertexWy, and BmnHitRecord::Weight().

Referenced by expdata(), histo(), histoGL(), and mp2prep().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ HitX()

Double_t BmnRootIterator::HitX ( ) const
inlineoverridevirtual

Implements BmnDataIterator.

Definition at line 175 of file BmnRootIterator.h.

References fAtVertex, BmnDataIterator::fEndOfHits, BmnDataIterator::fInitialized, fpCurrentHit, and fVertexX.

Referenced by expdata(), expdataNN(), histo(), histoGL(), mp2prep(), and review().

Here is the caller graph for this function:

◆ HitY()

Double_t BmnRootIterator::HitY ( ) const
inlineoverridevirtual

Implements BmnDataIterator.

Definition at line 182 of file BmnRootIterator.h.

References fAtVertex, BmnDataIterator::fEndOfHits, BmnDataIterator::fInitialized, fpCurrentHit, and fVertexY.

Referenced by expdata(), expdataNN(), histo(), histoGL(), mp2prep(), and review().

Here is the caller graph for this function:

◆ HitZ()

Double_t BmnRootIterator::HitZ ( ) const
inlineoverridevirtual

Implements BmnDataIterator.

Definition at line 189 of file BmnRootIterator.h.

References fAtVertex, BmnDataIterator::fEndOfHits, BmnDataIterator::fInitialized, fpCurrentHit, and fVertexZ.

Referenced by expdata(), expdataNN(), histo(), histoGL(), mp2prep(), and review().

Here is the caller graph for this function:

◆ IsNewEvent()

Bool_t BmnRootIterator::IsNewEvent ( ) const
inlinenoexcept

Definition at line 76 of file BmnRootIterator.h.

References fEventTracks.

Referenced by BmnAlignTestTask::Make().

Here is the caller graph for this function:

◆ NextHit()

void BmnRootIterator::NextHit ( )
inlineoverridevirtual

Implements BmnDataIterator.

Definition at line 160 of file BmnRootIterator.h.

References fAtVertex, BmnDataIterator::fEndOfHits, fHitIdx, fHitsRaw, BmnDataIterator::fInitialized, fpCurrentHit, HitAt(), and NextUsableHit().

Referenced by expdata(), expdataNN(), histo(), histoGL(), BmnAlignTestTask::Make(), mp2prep(), and review().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ NextTrack()

void BmnRootIterator::NextTrack ( )
overridevirtual

Implements BmnDataIterator.

Definition at line 167 of file BmnRootIterator.cxx.

References CountUsableHits(), BmnDataIterator::fEndOfTracks, fEventID, fEventTracks, BmnDataIterator::fInitialized, fpCurrentTrack, fpReader, fProgressByTracks, fpRootEventHeader, fTrackCount, fTrackFilter, fTrackIdx, fTrackLimit, fTracksInEvent, BmnDataIterator::ProgressTick(), ResetHits(), ScanEvent(), and UnsetProperties().

Referenced by CountElements(), expdata(), expdataNN(), histo(), histoGL(), BmnAlignTestTask::Make(), mp2prep(), ResetAll(), and review().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ NextUsableHit()

Int_t BmnRootIterator::NextUsableHit ( Int_t from) const
inlineprivate

Definition at line 132 of file BmnRootIterator.h.

References fHitFilter, fHitsRaw, HitAt(), and i.

Referenced by NextHit(), and ResetHits().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ResetAll()

void BmnRootIterator::ResetAll ( )
overridevirtual

Implements BmnDataIterator.

Definition at line 124 of file BmnRootIterator.cxx.

References CountUsableHits(), BmnDataIterator::fEndOfTracks, fEventID, fEventTracks, BmnDataIterator::fInitialized, fpCurrentTrack, fpDetModel, fpReader, fProgressByTracks, fpRootBeamHits, fpRootEventHeader, fTrackCount, fTrackFilter, fTrackIdx, fTracksInEvent, fVertexZ, NextTrack(), BmnDataIterator::ProgressTick(), ResetHits(), ScanEvent(), and UnsetProperties().

Referenced by CountElements(), expdata(), expdataNN(), histo(), histoGL(), BmnAlignTestTask::Make(), and mp2prep().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ResetHits()

void BmnRootIterator::ResetHits ( )
inlineoverridevirtual

Implements BmnDataIterator.

Definition at line 150 of file BmnRootIterator.h.

References CountUsableHits(), fAtVertex, BmnDataIterator::fEndOfHits, fHasVertex, fHitIdx, fHitsRaw, fpCurrentHit, fTrackIdx, fVertexTrack, HitAt(), and NextUsableHit().

Referenced by histo(), histoGL(), BmnAlignTestTask::Make(), NextTrack(), and ResetAll().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ScanEvent()

void BmnRootIterator::ScanEvent ( )
private

Definition at line 217 of file BmnRootIterator.cxx.

References BmnWeightedLine::Add(), BmnWeightedLine::At(), TObjArray::At(), fHitFilter, fpRootBeamHits, fTrackFilter, fTracksInEvent, fVertexTrack, fVertexVarX, fVertexVarY, fVertexWx, fVertexWy, fVertexX, fVertexY, fVertexZ, TObjArray::GetEntriesFast(), CbmStsTrack::GetNStsHits(), BmnHit::GetStation(), CbmStsTrack::GetStsHitIndex(), i, BmnWeightedLine::Var(), and BmnHitRecord::Weight().

Referenced by NextTrack(), and ResetAll().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ UnsetProperties()

void BmnRootIterator::UnsetProperties ( )
inlineprivate

Definition at line 227 of file BmnRootIterator.h.

References fAtVertex, BmnDataIterator::fEndOfHits, BmnDataIterator::fEndOfTracks, fEventID, fEventTracks, fHasVertex, fHitIdx, fHitsInTrack, fHitsRaw, fpCurrentHit, fpCurrentTrack, fTrackCount, fTrackIdx, fTracksInEvent, and fVertexTrack.

Referenced by NextTrack(), and ResetAll().

Here is the caller graph for this function:

◆ VertexVarX()

Double_t BmnRootIterator::VertexVarX ( ) const
inlinenoexcept

Definition at line 79 of file BmnRootIterator.h.

References fVertexVarX.

Referenced by BmnAlignTestTask::Make().

Here is the caller graph for this function:

◆ VertexVarY()

Double_t BmnRootIterator::VertexVarY ( ) const
inlinenoexcept

Definition at line 80 of file BmnRootIterator.h.

References fVertexVarY.

Referenced by BmnAlignTestTask::Make().

Here is the caller graph for this function:

Member Data Documentation

◆ fAtVertex

Bool_t BmnRootIterator::fAtVertex {kFALSE}
private

◆ fEventID

UInt_t BmnRootIterator::fEventID {0}
private

Definition at line 105 of file BmnRootIterator.h.

Referenced by EventID(), NextTrack(), ResetAll(), and UnsetProperties().

◆ fEventTracks

Int_t BmnRootIterator::fEventTracks {0}
private

Definition at line 104 of file BmnRootIterator.h.

Referenced by IsNewEvent(), NextTrack(), ResetAll(), and UnsetProperties().

◆ fHasVertex

Bool_t BmnRootIterator::fHasVertex {kFALSE}
private

Definition at line 113 of file BmnRootIterator.h.

Referenced by HasVertexHit(), HitsInTrack(), ResetHits(), and UnsetProperties().

◆ fHitFilter

HitFilter_t BmnRootIterator::fHitFilter
private

Definition at line 91 of file BmnRootIterator.h.

Referenced by BmnRootIterator(), CountUsableHits(), NextUsableHit(), and ScanEvent().

◆ fHitIdx

Int_t BmnRootIterator::fHitIdx {-1}
private

Definition at line 103 of file BmnRootIterator.h.

Referenced by NextHit(), ResetHits(), and UnsetProperties().

◆ fHitsInTrack

Int_t BmnRootIterator::fHitsInTrack {0}
private

Definition at line 101 of file BmnRootIterator.h.

Referenced by CountUsableHits(), HitsInTrack(), and UnsetProperties().

◆ fHitsRaw

Int_t BmnRootIterator::fHitsRaw {0}
private

◆ fpCurrentHit

Hit_t* BmnRootIterator::fpCurrentHit {nullptr}
private

◆ fpCurrentTrack

Track_t* BmnRootIterator::fpCurrentTrack {nullptr}
private

Definition at line 97 of file BmnRootIterator.h.

Referenced by CountUsableHits(), GetTrack(), HitAt(), NextTrack(), ResetAll(), and UnsetProperties().

◆ fpData

BmnDataReader* BmnRootIterator::fpData {nullptr}
private

Definition at line 92 of file BmnRootIterator.h.

Referenced by BmnRootIterator(), ~BmnRootIterator(), and GetChain().

◆ fpDetModel

const BmnDetectorModel* BmnRootIterator::fpDetModel
private

Definition at line 88 of file BmnRootIterator.h.

Referenced by BmnRootIterator(), HitDetectorID(), and ResetAll().

◆ fpReader

TTreeReader* BmnRootIterator::fpReader {nullptr}
private

Definition at line 93 of file BmnRootIterator.h.

Referenced by BmnRootIterator(), NextTrack(), and ResetAll().

◆ fProgressByTracks

Bool_t BmnRootIterator::fProgressByTracks {kTRUE}
private

Definition at line 116 of file BmnRootIterator.h.

Referenced by BmnRootIterator(), CountElements(), NextTrack(), and ResetAll().

◆ fpRootBeamHits

TTreeReaderValue<TClonesArray> * BmnRootIterator::fpRootBeamHits {nullptr}
private

Definition at line 94 of file BmnRootIterator.h.

Referenced by BmnRootIterator(), ~BmnRootIterator(), GetBeamHits(), ResetAll(), and ScanEvent().

◆ fpRootEventHeader

TTreeReaderValue<DstEventHeader>* BmnRootIterator::fpRootEventHeader {nullptr}
private

Definition at line 95 of file BmnRootIterator.h.

Referenced by BmnRootIterator(), ~BmnRootIterator(), NextTrack(), and ResetAll().

◆ fpRootHits

TTreeReaderValue<TClonesArray> * BmnRootIterator::fpRootHits {nullptr}
private

Definition at line 94 of file BmnRootIterator.h.

Referenced by BmnRootIterator(), and ~BmnRootIterator().

◆ fpRootTracks

TTreeReaderValue<TClonesArray>* BmnRootIterator::fpRootTracks {nullptr}
private

Definition at line 94 of file BmnRootIterator.h.

Referenced by BmnRootIterator(), and ~BmnRootIterator().

◆ fTotalEvents

Long64_t BmnRootIterator::fTotalEvents {0}
private

Definition at line 99 of file BmnRootIterator.h.

Referenced by BmnRootIterator(), CountElements(), and GetTotalEvents().

◆ fTotalHits

Int_t BmnRootIterator::fTotalHits {0}
private

Definition at line 100 of file BmnRootIterator.h.

Referenced by CountElements(), and GetTotalHits().

◆ fTotalTracks

Int_t BmnRootIterator::fTotalTracks {0}
private

Definition at line 100 of file BmnRootIterator.h.

Referenced by CountElements(), and GetTotalTracks().

◆ fTrackCount

Int_t BmnRootIterator::fTrackCount {0}
private

Definition at line 104 of file BmnRootIterator.h.

Referenced by NextTrack(), ResetAll(), and UnsetProperties().

◆ fTrackFilter

TrackFilter_t BmnRootIterator::fTrackFilter
private

Definition at line 90 of file BmnRootIterator.h.

Referenced by BmnRootIterator(), NextTrack(), ResetAll(), and ScanEvent().

◆ fTrackIdx

Int_t BmnRootIterator::fTrackIdx {-1}
private

Definition at line 103 of file BmnRootIterator.h.

Referenced by NextTrack(), ResetAll(), ResetHits(), and UnsetProperties().

◆ fTrackLimit

Int_t BmnRootIterator::fTrackLimit {0}
private

Definition at line 104 of file BmnRootIterator.h.

Referenced by BmnRootIterator(), CountElements(), and NextTrack().

◆ fTracksInEvent

Int_t BmnRootIterator::fTracksInEvent {0}
private

Definition at line 100 of file BmnRootIterator.h.

Referenced by NextTrack(), ResetAll(), ScanEvent(), and UnsetProperties().

◆ fVertexTrack

std::vector<Bool_t> BmnRootIterator::fVertexTrack
private

Definition at line 108 of file BmnRootIterator.h.

Referenced by ResetHits(), ScanEvent(), and UnsetProperties().

◆ fVertexVarX

Double_t BmnRootIterator::fVertexVarX {0.0}
private

Definition at line 112 of file BmnRootIterator.h.

Referenced by ScanEvent(), and VertexVarX().

◆ fVertexVarY

Double_t BmnRootIterator::fVertexVarY {0.0}
private

Definition at line 112 of file BmnRootIterator.h.

Referenced by ScanEvent(), and VertexVarY().

◆ fVertexWx

Double_t BmnRootIterator::fVertexWx {0.0}
private

Definition at line 112 of file BmnRootIterator.h.

Referenced by HitWx(), and ScanEvent().

◆ fVertexWy

Double_t BmnRootIterator::fVertexWy {0.0}
private

Definition at line 112 of file BmnRootIterator.h.

Referenced by HitWy(), and ScanEvent().

◆ fVertexX

Double_t BmnRootIterator::fVertexX {0.0}
private

Definition at line 109 of file BmnRootIterator.h.

Referenced by HitX(), and ScanEvent().

◆ fVertexY

Double_t BmnRootIterator::fVertexY {0.0}
private

Definition at line 109 of file BmnRootIterator.h.

Referenced by HitY(), and ScanEvent().

◆ fVertexZ

Double_t BmnRootIterator::fVertexZ {0.0}
private

Definition at line 110 of file BmnRootIterator.h.

Referenced by HitZ(), ResetAll(), and ScanEvent().


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