CbmRoot
Loading...
Searching...
No Matches
CbmStsResolution Class Reference

Task for estimating the spatial resolution of the STS detector using track-hit residuals. More...

#include <CbmStsResolution.h>

Inheritance diagram for CbmStsResolution:
[legend]
Collaboration diagram for CbmStsResolution:
[legend]

Public Member Functions

 CbmStsResolution ()=default
 
 ~CbmStsResolution ()=default
 
 CbmStsResolution (double)
 Constructor.
 
InitStatus Init ()
 
void Exec (Option_t *)
 
void Finish ()
 
void SetInputType (InputType type)
 
void EnableRefSensor (int32_t)
 
void SetMinTrkHitQ (double q)
 
void TrackUseTwoSts ()
 
void SetCutMap (CbmCutMap *map)
 Set the cut map for analysis.
 
void UserAlignment (const std::map< int32_t, std::vector< double > > &user_mat)
 User defined sensor translations.
 
virtual void DrawResults ()
 Virtual function to draw analysis results.
 

Protected Member Functions

void LoadSetup ()
 Load the STS setup and fill the map with XYZ boundaries for each STS setup element. It maps the first z strip for each module depending on the size of the sensor.
 
void SaveToFile ()
 It write all mapped objects to the FairRunAna sink file.
 
 ClassDef (CbmStsAnaBase, 1)
 

Protected Attributes

uint entry_ {0}
 
std::unique_ptr< TFile > fReportFile
 
std::unordered_set< int32_t > fAddressBook
 
std::map< std::string, std::unique_ptr< TGraphErrors > > fG1D
 
std::map< std::string, std::unique_ptr< TH1D > > fH1D
 
std::map< std::string, std::unique_ptr< TH2D > > fH2D
 
std::map< std::string, std::shared_ptr< TH2D > > fH2DShared
 
std::map< std::string, std::unique_ptr< TCanvas > > fCanvas
 
int nb_sts_station_ {8}
 
std::unordered_map< int32_t, std::vector< double > > fStsGeoInfo
 
std::map< int32_t, std::vector< double > > fUserAlignment
 
std::unordered_map< int32_t, int > fFirstZStrip
 
CbmCutMapfAnalysisCuts {nullptr}
 
int fRunId {-1}
 

Private Member Functions

void BookHistograms ()
 
void ProcessEvent (CbmEvent *)
 Process an Cbm events It filters event based on the provided CbmCutMap.
 
void ProcessHit (CbmStsHit *)
 Process an STS hit It filters hits based on the provided CbmCutMap.
 
void ProcessGlobalTrack (CbmGlobalTrack *trk)
 
void BuildResidual ()
 
 ClassDef (CbmStsResolution, 1)
 

Private Attributes

double fImpactParMax {-1}
 
double fTrkHitQmin {-1}
 
std::vector< CbmGlobalTrack * > fGlbTrks
 
std::map< int32_t, std::vector< CbmStsHit * > > fStsHits
 
InputType fInputType = InputType::kEventMode
 
bool tracking_use_two_sts_ {false}
 
std::vector< int32_t > fActiveRefSensors
 
TClonesArray * fCbmEvtArray {nullptr}
 
TClonesArray * fGlbTrkArray {nullptr}
 
TClonesArray * fStsTrkArray {nullptr}
 
TClonesArray * fRchTrkArray {nullptr}
 
TClonesArray * fMchTrkArray {nullptr}
 
TClonesArray * fTrdTrkArray {nullptr}
 
TClonesArray * fTofTrkArray {nullptr}
 
TClonesArray * fStsHitArray {nullptr}
 
TClonesArray * fStsCluArray {nullptr}
 

Detailed Description

Task for estimating the spatial resolution of the STS detector using track-hit residuals.

The CbmStsResolution class is responsible for calculating the residuals between the hits in the Silicon Tracking System (STS) and the corresponding reconstructed tracks. These residuals are used to estimate the spatial resolution of the STS detector.

Output:

The class produces a set of 2D histograms showing the distribution of residuals as a function of the reconstructed hit coordinates. These histograms provide insight into the detector's resolution performance across different spatial regions.

If functon EnableRefSensor() is called during analysis configuration, the residuals will be only produced when the track hit the selected sensors. This is especially useful to restrict bad performing sensors.

Track Extrapolation Modes:

The residuals can be computed using two approaches:

  1. Local STS-based extrapolation: Uses only two STS hits to form a straight-line extrapolation to calculate the expected hit position.
  2. Global track-based extrapolation: Utilizes the full set of global track parameters obtained from the reconstruction process to extrapolate the expected position at the hit.

The residual are calculated in two modes:alignas

  • ":all": All hits are used for the residual calculation. (large combinatoric)
  • ":trk": Only the hits clsosest to the extrapolation point is used (selection bias, less combinatoric).

Track selection:

It can be configured using the CbmCutMap class. Additionally, the user can set a minimum charge threshold for the STS hits attached to the track and set a cut to the maximun value for the impact parameter.

Future Extension:

The class is planned to be extended with functionality to support track refitting using only STS hits, which would allow for improved and more localized resolution studies decoupled from the global tracking performance.

Inherits from:

  • FairTask: Base class for FairRoot tasks, enabling integration with the FAIR framework.
  • CbmStsAnaBase: Provides STS-specific analysis utilities and interfaces.

Definition at line 69 of file CbmStsResolution.h.

Constructor & Destructor Documentation

◆ CbmStsResolution() [1/2]

CbmStsResolution::CbmStsResolution ( )
default

Referenced by ClassDef().

◆ ~CbmStsResolution()

CbmStsResolution::~CbmStsResolution ( )
default

◆ CbmStsResolution() [2/2]

CbmStsResolution::CbmStsResolution ( double d_max)

Constructor.

Definition at line 13 of file CbmStsResolution.cxx.

References fImpactParMax.

Member Function Documentation

◆ BookHistograms()

void CbmStsResolution::BookHistograms ( )
private

◆ BuildResidual()

◆ ClassDef() [1/2]

CbmStsAnaBase::ClassDef ( CbmStsAnaBase ,
1  )
protectedinherited

References CbmStsAnaBase().

◆ ClassDef() [2/2]

CbmStsResolution::ClassDef ( CbmStsResolution ,
1  )
private

References CbmStsResolution().

◆ DrawResults()

virtual void CbmStsAnaBase::DrawResults ( )
inlinevirtualinherited

Virtual function to draw analysis results.

Reimplemented in CbmStsTimeCal.

Definition at line 65 of file CbmStsAnaBase.h.

◆ EnableRefSensor()

void CbmStsResolution::EnableRefSensor ( int32_t address)

Definition at line 232 of file CbmStsResolution.cxx.

References fActiveRefSensors.

◆ Exec()

◆ Finish()

void CbmStsResolution::Finish ( )

Definition at line 355 of file CbmStsResolution.cxx.

References CbmStsAnaBase::SaveToFile().

◆ Init()

◆ LoadSetup()

◆ ProcessEvent()

void CbmStsResolution::ProcessEvent ( CbmEvent * evt)
private

Process an Cbm events It filters event based on the provided CbmCutMap.

Definition at line 80 of file CbmStsResolution.cxx.

References BuildResidual(), CbmStsAnaBase::fAnalysisCuts, fGlbTrkArray, fStsHitArray, CbmEvent::GetIndex(), CbmEvent::GetNofData(), kGlobalTrack, kStsHit, ProcessGlobalTrack(), and ProcessHit().

Referenced by Exec().

◆ ProcessGlobalTrack()

◆ ProcessHit()

void CbmStsResolution::ProcessHit ( CbmStsHit * hit)
private

Process an STS hit It filters hits based on the provided CbmCutMap.

Definition at line 220 of file CbmStsResolution.cxx.

References CbmStsAnaBase::fAnalysisCuts, fStsCluArray, fStsHits, CbmHit::GetAddress(), CbmStsAddress::GetElementId(), and kStsUnit.

Referenced by Exec(), and ProcessEvent().

◆ SaveToFile()

void CbmStsAnaBase::SaveToFile ( )
protectedinherited

◆ SetCutMap()

void CbmStsAnaBase::SetCutMap ( CbmCutMap * map)
inherited

Set the cut map for analysis.

Parameters
cutMapPointer to the CbmCutMap object.

Definition at line 21 of file CbmStsAnaBase.cxx.

References fAnalysisCuts.

◆ SetInputType()

void CbmStsResolution::SetInputType ( InputType type)
inline

Definition at line 82 of file CbmStsResolution.h.

References fInputType.

◆ SetMinTrkHitQ()

void CbmStsResolution::SetMinTrkHitQ ( double q)
inline

Definition at line 86 of file CbmStsResolution.h.

References fTrkHitQmin.

◆ TrackUseTwoSts()

void CbmStsResolution::TrackUseTwoSts ( )
inline

Definition at line 88 of file CbmStsResolution.h.

References tracking_use_two_sts_.

◆ UserAlignment()

void CbmStsAnaBase::UserAlignment ( const std::map< int32_t, std::vector< double > > & user_mat)
inlineinherited

User defined sensor translations.

Parameters
user_matInput translations.

Definition at line 60 of file CbmStsAnaBase.h.

References fUserAlignment.

Member Data Documentation

◆ entry_

◆ fActiveRefSensors

std::vector<int32_t> CbmStsResolution::fActiveRefSensors
private

Definition at line 101 of file CbmStsResolution.h.

Referenced by BuildResidual(), and EnableRefSensor().

◆ fAddressBook

◆ fAnalysisCuts

◆ fCanvas

std::map<std::string, std::unique_ptr<TCanvas> > CbmStsAnaBase::fCanvas
protectedinherited

Definition at line 75 of file CbmStsAnaBase.h.

◆ fCbmEvtArray

TClonesArray* CbmStsResolution::fCbmEvtArray {nullptr}
private

Definition at line 103 of file CbmStsResolution.h.

Referenced by Exec(), and Init().

◆ fFirstZStrip

std::unordered_map<int32_t, int> CbmStsAnaBase::fFirstZStrip
protectedinherited

Definition at line 82 of file CbmStsAnaBase.h.

Referenced by LoadSetup().

◆ fG1D

std::map<std::string, std::unique_ptr<TGraphErrors> > CbmStsAnaBase::fG1D
protectedinherited

◆ fGlbTrkArray

TClonesArray* CbmStsResolution::fGlbTrkArray {nullptr}
private

Definition at line 105 of file CbmStsResolution.h.

Referenced by Exec(), Init(), and ProcessEvent().

◆ fGlbTrks

std::vector<CbmGlobalTrack*> CbmStsResolution::fGlbTrks
private

Definition at line 94 of file CbmStsResolution.h.

Referenced by BuildResidual(), and ProcessGlobalTrack().

◆ fH1D

◆ fH2D

◆ fH2DShared

std::map<std::string, std::shared_ptr<TH2D> > CbmStsAnaBase::fH2DShared
protectedinherited

Definition at line 74 of file CbmStsAnaBase.h.

Referenced by CbmEventVertexDca::BookHistograms(), and SaveToFile().

◆ fImpactParMax

double CbmStsResolution::fImpactParMax {-1}
private

Definition at line 91 of file CbmStsResolution.h.

Referenced by BuildResidual(), and CbmStsResolution().

◆ fInputType

InputType CbmStsResolution::fInputType = InputType::kEventMode
private

Definition at line 97 of file CbmStsResolution.h.

Referenced by Exec(), and SetInputType().

◆ fMchTrkArray

TClonesArray* CbmStsResolution::fMchTrkArray {nullptr}
private

Definition at line 108 of file CbmStsResolution.h.

Referenced by Init(), and ProcessGlobalTrack().

◆ fRchTrkArray

TClonesArray* CbmStsResolution::fRchTrkArray {nullptr}
private

Definition at line 107 of file CbmStsResolution.h.

Referenced by Init(), and ProcessGlobalTrack().

◆ fReportFile

std::unique_ptr<TFile> CbmStsAnaBase::fReportFile
protectedinherited

Definition at line 69 of file CbmStsAnaBase.h.

Referenced by CbmStsTimeCal::DrawResults(), and CbmStsTimeCal::Init().

◆ fRunId

int CbmStsAnaBase::fRunId {-1}
protectedinherited

Definition at line 86 of file CbmStsAnaBase.h.

Referenced by CbmStsTimeCal::CbmStsTimeCal(), and CbmStsTimeCal::Init().

◆ fStsCluArray

TClonesArray* CbmStsResolution::fStsCluArray {nullptr}
private

Definition at line 113 of file CbmStsResolution.h.

Referenced by BuildResidual(), Init(), and ProcessHit().

◆ fStsGeoInfo

◆ fStsHitArray

TClonesArray* CbmStsResolution::fStsHitArray {nullptr}
private

Definition at line 112 of file CbmStsResolution.h.

Referenced by BuildResidual(), Exec(), Init(), and ProcessEvent().

◆ fStsHits

std::map<int32_t, std::vector<CbmStsHit*> > CbmStsResolution::fStsHits
private

Definition at line 95 of file CbmStsResolution.h.

Referenced by BuildResidual(), and ProcessHit().

◆ fStsTrkArray

TClonesArray* CbmStsResolution::fStsTrkArray {nullptr}
private

Definition at line 106 of file CbmStsResolution.h.

Referenced by BuildResidual(), Init(), and ProcessGlobalTrack().

◆ fTofTrkArray

TClonesArray* CbmStsResolution::fTofTrkArray {nullptr}
private

Definition at line 110 of file CbmStsResolution.h.

Referenced by Init(), and ProcessGlobalTrack().

◆ fTrdTrkArray

TClonesArray* CbmStsResolution::fTrdTrkArray {nullptr}
private

Definition at line 109 of file CbmStsResolution.h.

Referenced by Init(), and ProcessGlobalTrack().

◆ fTrkHitQmin

double CbmStsResolution::fTrkHitQmin {-1}
private

Definition at line 92 of file CbmStsResolution.h.

Referenced by BuildResidual(), and SetMinTrkHitQ().

◆ fUserAlignment

std::map<int32_t, std::vector<double> > CbmStsAnaBase::fUserAlignment
protectedinherited

Definition at line 80 of file CbmStsAnaBase.h.

Referenced by UserAlignment().

◆ nb_sts_station_

int CbmStsAnaBase::nb_sts_station_ {8}
protectedinherited

◆ tracking_use_two_sts_

bool CbmStsResolution::tracking_use_two_sts_ {false}
private

Definition at line 99 of file CbmStsResolution.h.

Referenced by BuildResidual(), and TrackUseTwoSts().


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