38#include <FairDetector.h>
39#include <FairRootManager.h>
43#include <TClonesArray.h>
46#include <boost/functional/hash.hpp>
54#include <unordered_map>
92 boost::hash_combine(res, key.
fFile);
93 boost::hash_combine(res, key.
fEntry);
94 boost::hash_combine(res, key.
fIndex);
111 using DFSET = std::set<std::pair<int, int>>;
171 virtual InitStatus
Init();
174 virtual InitStatus
ReInit();
241 switch (detectorID) {
274 LOG(warning) <<
"CbmL1::SetMvdMaterialBudgetFileName() is obsolete and will be deleted soon, don't call it\n"
275 <<
" ! The material budget files are not used anymore !";
281 LOG(warning) <<
"CbmL1::SetStsMaterialBudgetFileName() is obsolete and will be deleted soon, don't call it\n"
282 <<
" ! The material budget files are not used anymore !";
288 LOG(warning) <<
"CbmL1::SetMuchMaterialBudgetFileName() is obsolete and will be deleted soon, don't call it\n"
289 <<
" ! The material budget files are not used anymore !";
295 LOG(warning) <<
"CbmL1::SetTrdMaterialBudgetFileName() is obsolete and will be deleted soon, don't call it\n"
296 <<
" ! The material budget files are not used anymore !";
302 LOG(warning) <<
"CbmL1::SetTofMaterialBudgetFileName() is obsolete and will be deleted soon, don't call it\n"
303 <<
" ! The material budget files are not used anymore !";
327 template<ca::EDetectorID DetId>
342 LOG(warn) <<
"CbmL1::SetRandomSeed(unsigned int) does nothing! Please, remove it from your caller";
408 std::unique_ptr<cbm::ca::TimeSliceReader>
fpTSReader =
nullptr;
483 "CbmL1::fvMcHitDebugInfo"};
Input-output data manager for L1 tracking algorithm.
Data structure for internal tracking MC-information (header)
CA Tracking monitor class.
CA Tracking performance interface for CBM (header)
Time-slice/event reader for CA tracker in CBM (header)
Implementation of L1DetectorID enum class for CBM.
A class to collect statistics for kf::MaterialMap.
Class characterising one event by a collection of links (indices) to data objects,...
@ Param
Parameter initialization (when algorithm execution is not required)
@ Full
Full initialization (default)
std::shared_ptr< ca::DataManager > fpIODataManager
Input-output data manager.
bool fMatBudgetParallelProjection
int fNStations
number of total active detector stations
void SetMvdMaterialBudgetFileName(const TString &)
Obsolete setters to be removed.
void SetInitMode(EInitMode mode)
Sets initialization mode.
void SetMaterialBudgetNrays(int nRaysPerDimension)
Sets material budget n rays per dimansion in each bin.
static CbmL1 * Instance()
Pointer to CbmL1 instance.
TH1F * fTimeHisto[fNTimeHistos]
friend class L1AlgoEfficiencyPerformance
void Reconstruct(CbmEvent *event=nullptr)
double fTrackingTime
time of track finding procedure
std::string fInputDataFilename
File name to read/write input hits.
std::vector< cbm::algo::kf::MaterialMonitor > fMaterialMonitor
Material monitors for each material budget map.
static const int fNGhostHistos
void WriteHistosCurFile(TObject *obj)
void DefineSTAPNames()
Defines names for output in STAP mode.
const auto & GetQaHits() const
void EfficienciesPerformance(bool doFinish=kFALSE)
Calculates tracking efficiencies (counters)
double fTargetX
target position X
std::tuple< int, std::vector< int > > MatchHitWithMc(int iHit) const
Matches hit with MC point.
void SetMaterialBudgetNbins(int nBinsPerDimension)
Sets material budget binning.
TTree * fpMcTripletsTree
Tree to save MC-triplets.
void SetTrdMaterialBudgetFileName(const TString &)
Sets material budget file name for TRD.
void SetTofMaterialBudgetFileName(const TString &)
Sets material budget file name for TOF.
std::string fsMcTripletsOutputFilename
Name of file to save MC-triplets tree.
static std::istream & eatwhite(std::istream &is)
void Fill_vMCTracks()
Fills the fvMCTracks vector and the fmMCTracksMap.
double fMatBudgetPitch
material budget minimal bin size in cm
void WriteSTAPParamObject()
Writes initialized L1Parameters object to file "".
void ReadSTAPPerfInputData()
void SetConfigUser(const char *path)
Sets user configuration filename.
static CbmL1 * fpInstance
Instance of CbmL1.
cbm::algo::ca::McData fMCData
MC Data object.
virtual InitStatus Init()
Defines action in the beginning of the run (initialization)
cbm::ca::DetIdArr_t< std::set< int > > fvmDisabledStationIDs
CbmL1()
Default constructor.
void WriteSTAPAlgoInputData(int iJob=0)
const cbm::algo::ca::McData & GetMCData() const
Gets reference to MC data object.
void DisableTrackingStation(ca::EDetectorID detID, int iSt)
Disables tracking station for a given detector subsystem.
std::unique_ptr< cbm::ca::MCModule > fpMCModule
MC module.
void ReadSTAPAlgoInputData(int iJob=0)
int fSTAPDataMode
Option to work with files for the standalone mode.
ca::Vector< CbmL1HitId > fvExternalHits
Array of hits.
double fTargetZ
target position Z
Int_t fPerformance
performance mode: 0 - w\o perf. 1 - L1-Efficiency definition. 2 - QA-Eff.definition
int fEventNo
Current number of event/TS.
ca::Framework * fpAlgo
Pointer to the L1 track finder algorithm.
void FillFitHistos(cbm::algo::kf::TrackParamV &tr, const cbm::algo::ca::McPoint &mc, bool isTimeFitted, TH1F *h[])
CbmL1(const CbmL1 &)=delete
Copy constructor.
ca::TrackingMonitor fMonitor
Tracking monitor.
void FieldIntegralCheck()
std::string fsUserConfig
User config path.
TString fSTAPSetupFile
Name of the setup file (generated automatically, if not provided manually)
void WriteSTAPPerfInputData()
friend class CbmL1PFFitter
static constexpr std::string_view kSTAPParamSuffix
Extension for IO of the L1Parameters object.
EInitMode fInitMode
Initialization mode.
ca::Vector< CbmL1Track > fvRecoTracks
Reconstructed tracks container.
static constexpr std::string_view kSTAPAlgoIDataDir
Name of subdirectory for handling ca::InputData objects.
bool fDoSafeMaterialInitialization
void IdealTrackFinder()
Runs ideal track finder: copies all MC-tracks into reconstructed tracks.
void SetParameterFilename(const char *filename)
Sets a name for the ca-parameter file.
void SetOutputMcTripletsTreeFilename(const char *filename)
Sets output file for MC triplets tree If the filename is empty string, tree is not filled.
void TrackFitPerformance()
double fTargetY
target position Y
TString fSTAPParamFile
Name of the parameter file (generated automatically, if not provided manually)
TFile * fPerfFile
Array of local indices of disabled tracking stations.
void Finish()
Defines action in the end of the run (saves results)
CbmL1 & operator=(CbmL1 &&)=delete
Move assignment operator.
TString fSTAPDataPrefix
Name of input/output file prefix. The prefix is defined by output TTree file.
void DumpMaterialToFile(TString fileName, std::shared_ptr< const cbm::algo::ca::Parameters< double > > par)
void SetRandomSeed(unsigned int)
Sets random seed to CA internal random generator.
CbmL1 & operator=(const CbmL1 &)=delete
Copy assignment operator.
CbmL1(CbmL1 &&)=delete
Move constructor.
bool fExtrapolateToTheEndOfSTS
int fMatBudgetNbins
n bins in mat budget maps (fMatBudgetNbins x fMatBudgetNbins)
ca::TrackingMode fTrackingMode
Tracking mode.
void SetSafeMaterialInitialization(bool val=true)
void DumpMCTripletsToTree()
std::unique_ptr< cbm::ca::TimeSliceReader > fpTSReader
event/TS reader
static constexpr const char * GetDetectorName(ca::EDetectorID detectorID)
Utility to map the L1DetectorID items into detector names.
std::set< std::pair< int, int > > DFSET
void SetMaterialBudgetParallelProjection()
static constexpr std::string_view kSTAPSetupSuffix
int fMatBudgetNrays
material budget n rays per dimansion in each bin
void HistoPerformance()
Fills performance histograms.
void SetMaterialBudgetPitch(double pitchCm)
Sets material budget minimal bin size in cm.
void ReadSTAPParamObject()
TString fSTAPDataDir
Name of input/output directory for running in a STAP mode.
ca::Vector< cbm::algo::ca::McHitInfo > fvHitDebugInfo
Container of hits with extended information.
TH1F * fGhostHisto[fNGhostHistos]
void SetExtrapolateToTheEndOfSTS(bool b)
void SetMuchMaterialBudgetFileName(const TString &)
Sets material budget file name for MuCh.
static void writedir2current(TObject *obj)
static constexpr std::string_view kSTAPAlgoIDataSuffix
int fNofRecoTracks
Total number of reconstructed tracks.
static const int fNTimeHistos
void SetStsMaterialBudgetFileName(const TString &)
Sets material budget file name for STS.
void SetSetupFilename(const char *filename)
Sets a name for the kf-setup file.
void SetOutputDataDir(const char *dirname)
Sets a name for parameters output dir.
static double boundedGaus(double sigma)
virtual InitStatus ReInit()
Reruns the initialization.
TFile * fpMcTripletsOutFile
File to save MC-triplets tree.
Access to a MC data branch for time-based analysis.
Data class with information on a STS local track.
This class represents a package for tracking-related data.
Class describes a unified MC-point, used in CA tracking QA analysis.
A container for all external parameters of the CA tracking algorithm.
A monitor specialization for cbm::algo::ca::Framework class.
TODO: SZh 8.11.2022: add selection of parameterisation.
EDetectorID
Enumeration for the tracking detector subsystems in CBM-CA.
TrackParam< fvec > TrackParamV
cbm::core::EnumArray< ca::EDetectorID, T > DetIdArr_t
Alias to array, indexed by L1DetectorID enum.
Internal structure to handle link keys.
int32_t fFile
index of link file
int32_t fEntry
index of link entry
int32_t fIndex
index of point/track, saved to link
CbmL1LinkKey(int32_t index, int32_t entry, int32_t file)
Constructor from links.
bool operator==(const CbmL1LinkKey &other) const
std::size_t operator()(const CbmL1LinkKey &key) const