BmnRoot 26.10.0-19-g6979a6c6
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
BmnRootIterator.h
Go to the documentation of this file.
1/*
2 BM@N alignment routine
3 BM@N experiment at NICA complex, JINR, 2025
4
5 Department: Math & Soft Group of HEP lab
6 Author: Igor Polev, polev@jinr.ru
7
8 BmnRootIterator class declaration
9 Iterator for tracks and hits stored in ROOT files
10*/
11
12#ifndef BMNROOTITERATOR_H
13#define BMNROOTITERATOR_H
14
15#include "BmnAlignDefines.h"
16#include "BmnDataIterator.h"
17#include "BmnDataReader.h"
18#include "BmnDetectorModel.h"
20#include "CbmStsHit.h"
21#include "CbmStsTrack.h"
22#include "TTreeReaderValue.h"
23
24#define BMN_TRACKS_BRACH_NAME "StsVector"
25#define BMN_HITS_BRACH_NAME "StsHit"
26#define BMN_HIT_CLASS_NAME "CbmStsHit"
27
29{
30 private:
32
33 public:
36
37 BmnRootIterator() = delete;
38 BmnRootIterator(const char* filesPathList, const BmnDetectorModel& detModel, BmnSimpleProgressBar* pb = nullptr);
39 virtual ~BmnRootIterator();
40
41 virtual void ResetHits() override;
42 virtual void ResetAll() override;
43 virtual void NextTrack() override;
44 virtual void NextHit() override;
45 virtual Double_t HitX() const override;
46 virtual Double_t HitY() const override;
47 virtual Double_t HitZ() const override;
48 virtual Double_t HitWx() const override;
49 virtual Double_t HitWy() const override;
50 virtual Int_t HitDetectorID() const override;
51 virtual Int_t HitsInTrack() const override;
52
53 void CountElements();
54 Long64_t GetTotalEvents() const noexcept { return fTotalEvents; }
55 Int_t GetTotalTracks() const noexcept { return fTotalTracks; }
56 Int_t GetTotalHits() const noexcept { return fTotalHits; }
57 const Hit_t* GetHit() const noexcept { return fpCurrentHit; }
58
59 private:
61 // the class is involved into ROOT dictionary schema which utilizes forward
62 // declarations - only pointers (or refs) to classes are possible as a field
66
71
73
74 void UnsetProperties();
75};
76
77#endif
#define BMN_CLOSE_TO_ZERO
bool Bool_t
int Int_t
double Double_t
long long Long64_t
constexpr Bool_t kTRUE
BmnDataIterator(BmnSimpleProgressBar *pb=nullptr)
virtual Double_t HitY() const override
virtual void ResetAll() override
virtual Double_t HitWy() const override
const BmnDetectorModel * fpDetModel
virtual Int_t HitDetectorID() const override
const Hit_t * GetHit() const noexcept
Track_t * fpCurrentTrack
virtual Double_t HitZ() const override
BmnRootIterator()=delete
BmnDataReader * fpData
virtual Double_t HitX() const override
Int_t GetTotalTracks() const noexcept
virtual Int_t HitsInTrack() const override
virtual Double_t HitWx() const override
TTreeReader * fpReader
Int_t GetTotalHits() const noexcept
static constexpr Double_t MAX_WEIGHT
virtual void ResetHits() override
CbmStsTrack Track_t
TTreeReaderValue< TClonesArray > * fpRootHits
Long64_t GetTotalEvents() const noexcept
virtual ~BmnRootIterator()
virtual void NextTrack() override
TTreeReaderValue< TClonesArray > * fpRootTracks
virtual void NextHit() override