Project
Loading...
Searching...
No Matches
o2::tpc::TPCFastSpaceChargeCorrectionHelper Class Reference

#include <TPCFastSpaceChargeCorrectionHelper.h>

Public Types

using SectorScales = std::array< double, TPCFastTransformGeo::getNumberOfSectors()>
 

Public Member Functions

 TPCFastSpaceChargeCorrectionHelper ()=default
 _____________ Constructors / destructors __________________________
 
 TPCFastSpaceChargeCorrectionHelper (const TPCFastSpaceChargeCorrectionHelper &)=delete
 Copy constructor: disabled.
 
TPCFastSpaceChargeCorrectionHelperoperator= (const TPCFastSpaceChargeCorrectionHelper &)=delete
 Assignment operator: disabled.
 
 ~TPCFastSpaceChargeCorrectionHelper ()=default
 Destructor.
 
void setNthreads (int n)
 _______________ Settings ________________________
 
void setNthreadsToMaximum ()
 sets number of threads to N cpu cores
 
int getNthreads () const
 get the number of threads
 
std::unique_ptr< TPCFastSpaceChargeCorrectioncreateFromLocalCorrection (std::function< void(int roc, int irow, double y, double z, double &dx, double &dy, double &dz)> correctionLocal, const int nKnotsY=10, const int nKnotsZ=20)
 _______________ Main functionality ________________________
 
std::unique_ptr< TPCFastSpaceChargeCorrectioncreateFromGlobalCorrection (std::function< void(int roc, double gx, double gy, double gz, double &dgx, double &dgy, double &dgz)> correctionGlobal, const int nKnotsY=10, const int nKnotsZ=20)
 creates TPCFastSpaceChargeCorrection object from a continious space charge correction in global coordinates
 
std::unique_ptr< o2::gpu::TPCFastSpaceChargeCorrectioncreateFromTrackResiduals (const o2::tpc::TrackResiduals &trackResiduals, TTree *voxResTree, TTree *voxResTreeInverse, bool useSmoothed, bool invertSigns, TPCFastSpaceChargeCorrectionMap *fitPointsDirect=nullptr, TPCFastSpaceChargeCorrectionMap *fitPointsInverse=nullptr)
 
const TPCFastTransformGeogetGeometry ()
 _______________ Utilities ________________________
 
TPCFastSpaceChargeCorrectionMapgetCorrectionMap ()
 
void testGeometry (const TPCFastTransformGeo &geo) const
 
void initInverse (o2::gpu::TPCFastSpaceChargeCorrection &correction, bool prn)
 initialise inverse transformation
 
void initInverse (std::vector< o2::gpu::TPCFastSpaceChargeCorrection * > &corrections, const std::vector< float > &scaling, bool prn)
 initialise inverse transformation from linear combination of several input corrections
 
void addCorrections (o2::gpu::TPCFastSpaceChargeCorrection &mainCorrection, double scale, const std::vector< std::pair< const o2::gpu::TPCFastSpaceChargeCorrection *, double > > &additionalCorrections)
 
void addCorrections (o2::gpu::TPCFastSpaceChargeCorrection &mainCorrection, SectorScales scale, const std::vector< std::pair< const o2::gpu::TPCFastSpaceChargeCorrection *, SectorScales > > &additionalCorrections)
 
void mergeCorrections (o2::gpu::TPCFastSpaceChargeCorrection &destinationCorrection, const o2::gpu::TPCFastSpaceChargeCorrection &sourceCorrection, const std::vector< int > &sectors)
 
void setVoxelMeanValidityRange (double range)
 how far the voxel mean is allowed to be outside of the voxel (1.1 means 10%)
 
double getVoxelMeanValidityRange () const
 
void setDebugUseVoxelCenters ()
 debug: if true, use voxel centers instead of the fitted positions for correction
 
bool isDebugUseVoxelCenters () const
 
void setDebugMirrorAdata2C ()
 debug: if true, mirror the data from the A side to the C side of the TPC
 
bool isDebugMirrorAdata2C () const
 

Static Public Member Functions

static TPCFastSpaceChargeCorrectionHelperinstance ()
 Singleton.
 

Detailed Description

Definition at line 42 of file TPCFastSpaceChargeCorrectionHelper.h.

Member Typedef Documentation

◆ SectorScales

Constructor & Destructor Documentation

◆ TPCFastSpaceChargeCorrectionHelper() [1/2]

o2::tpc::TPCFastSpaceChargeCorrectionHelper::TPCFastSpaceChargeCorrectionHelper ( )
default

_____________ Constructors / destructors __________________________

Default constructor

◆ TPCFastSpaceChargeCorrectionHelper() [2/2]

o2::tpc::TPCFastSpaceChargeCorrectionHelper::TPCFastSpaceChargeCorrectionHelper ( const TPCFastSpaceChargeCorrectionHelper )
delete

Copy constructor: disabled.

◆ ~TPCFastSpaceChargeCorrectionHelper()

o2::tpc::TPCFastSpaceChargeCorrectionHelper::~TPCFastSpaceChargeCorrectionHelper ( )
default

Destructor.

Member Function Documentation

◆ addCorrections() [1/2]

void o2::tpc::TPCFastSpaceChargeCorrectionHelper::addCorrections ( o2::gpu::TPCFastSpaceChargeCorrection mainCorrection,
double  scale,
const std::vector< std::pair< const o2::gpu::TPCFastSpaceChargeCorrection *, double > > &  additionalCorrections 
)

weighted add of several corrections

Parameters
mainCorrectionmain correction
scalescaling factor for the main correction
additionalCorrectionsvector of pairs of additional corrections and their scaling factors
Returns
main correction merged with additional corrections

weighted add of several corrections

Definition at line 1016 of file TPCFastSpaceChargeCorrectionHelper.cxx.

◆ addCorrections() [2/2]

void o2::tpc::TPCFastSpaceChargeCorrectionHelper::addCorrections ( o2::gpu::TPCFastSpaceChargeCorrection mainCorrection,
SectorScales  scale,
const std::vector< std::pair< const o2::gpu::TPCFastSpaceChargeCorrection *, SectorScales > > &  additionalCorrections 
)

weighted add of several corrections with sector-dependent scaling factors

Parameters
mainCorrectionmain correction
scalescaling factor for the main correction
additionalCorrectionsvector of pairs of additional corrections and their sector-dependent scaling factors
Returns
main correction merged with additional corrections

weighted add of several corrections

Definition at line 1033 of file TPCFastSpaceChargeCorrectionHelper.cxx.

◆ createFromGlobalCorrection()

std::unique_ptr< TPCFastSpaceChargeCorrection > o2::tpc::TPCFastSpaceChargeCorrectionHelper::createFromGlobalCorrection ( std::function< void(int roc, double gx, double gy, double gz, double &dgx, double &dgy, double &dgz)>  correctionGlobal,
const int  nKnotsY = 10,
const int  nKnotsZ = 20 
)

creates TPCFastSpaceChargeCorrection object from a continious space charge correction in global coordinates

creates TPCFastSpaceChargeCorrection object from a continious space charge correction in global coordinates

Definition at line 212 of file TPCFastSpaceChargeCorrectionHelper.cxx.

◆ createFromLocalCorrection()

std::unique_ptr< TPCFastSpaceChargeCorrection > o2::tpc::TPCFastSpaceChargeCorrectionHelper::createFromLocalCorrection ( std::function< void(int roc, int irow, double y, double z, double &dx, double &dy, double &dz)>  correctionLocal,
const int  nKnotsY = 10,
const int  nKnotsZ = 20 
)

_______________ Main functionality ________________________

creates TPCFastSpaceChargeCorrection object from a continious space charge correction in local coordinates

creates TPCFastSpaceChargeCorrection object from a continious space charge correction in local coordinates

set space charge correction in the local coordinates as a continious function

Definition at line 236 of file TPCFastSpaceChargeCorrectionHelper.cxx.

◆ createFromTrackResiduals()

std::unique_ptr< o2::gpu::TPCFastSpaceChargeCorrection > o2::tpc::TPCFastSpaceChargeCorrectionHelper::createFromTrackResiduals ( const o2::tpc::TrackResiduals trackResiduals,
TTree *  voxResTree,
TTree *  voxResTreeInverse,
bool  useSmoothed,
bool  invertSigns,
TPCFastSpaceChargeCorrectionMap fitPointsDirect = nullptr,
TPCFastSpaceChargeCorrectionMap fitPointsInverse = nullptr 
)

Create SpaceCharge correction out of the voxel tree

Parameters
trackResidualsTrackResiduals object
voxResTreeTTree with voxel residuals
voxResTreeInverseTTree with inverse voxel residuals
useSmoothedif true, use smoothed residuals
invertSignsif true, invert the signs of the residuals
fitPointsDirectdebug: pointer to the data used for the direct correction
fitPointsInversedebug: pointer to the data used for the inverse correction
Returns
pointer to the created TPCFastSpaceChargeCorrection object
Note
voxel trees wont be changed. They are read as non-const because of the ROOT::TTreeProcessorMT interface

Definition at line 381 of file TPCFastSpaceChargeCorrectionHelper.cxx.

◆ getCorrectionMap()

TPCFastSpaceChargeCorrectionMap & o2::tpc::TPCFastSpaceChargeCorrectionHelper::getCorrectionMap ( )
inline

Definition at line 111 of file TPCFastSpaceChargeCorrectionHelper.h.

◆ getGeometry()

const TPCFastTransformGeo & o2::tpc::TPCFastSpaceChargeCorrectionHelper::getGeometry ( )
inline

_______________ Utilities ________________________

Definition at line 109 of file TPCFastSpaceChargeCorrectionHelper.h.

◆ getNthreads()

int o2::tpc::TPCFastSpaceChargeCorrectionHelper::getNthreads ( ) const
inline

get the number of threads

Definition at line 74 of file TPCFastSpaceChargeCorrectionHelper.h.

◆ getVoxelMeanValidityRange()

double o2::tpc::TPCFastSpaceChargeCorrectionHelper::getVoxelMeanValidityRange ( ) const
inline

Definition at line 154 of file TPCFastSpaceChargeCorrectionHelper.h.

◆ initInverse() [1/2]

void o2::tpc::TPCFastSpaceChargeCorrectionHelper::initInverse ( o2::gpu::TPCFastSpaceChargeCorrection correction,
bool  prn 
)

initialise inverse transformation

Definition at line 880 of file TPCFastSpaceChargeCorrectionHelper.cxx.

◆ initInverse() [2/2]

void o2::tpc::TPCFastSpaceChargeCorrectionHelper::initInverse ( std::vector< o2::gpu::TPCFastSpaceChargeCorrection * > &  corrections,
const std::vector< float > &  scaling,
bool  prn 
)

initialise inverse transformation from linear combination of several input corrections

initialise inverse transformation

Definition at line 886 of file TPCFastSpaceChargeCorrectionHelper.cxx.

◆ instance()

TPCFastSpaceChargeCorrectionHelper * o2::tpc::TPCFastSpaceChargeCorrectionHelper::instance ( )
static

Singleton.

Definition at line 47 of file TPCFastSpaceChargeCorrectionHelper.cxx.

◆ isDebugMirrorAdata2C()

bool o2::tpc::TPCFastSpaceChargeCorrectionHelper::isDebugMirrorAdata2C ( ) const
inline

Definition at line 164 of file TPCFastSpaceChargeCorrectionHelper.h.

◆ isDebugUseVoxelCenters()

bool o2::tpc::TPCFastSpaceChargeCorrectionHelper::isDebugUseVoxelCenters ( ) const
inline

Definition at line 159 of file TPCFastSpaceChargeCorrectionHelper.h.

◆ mergeCorrections()

void o2::tpc::TPCFastSpaceChargeCorrectionHelper::mergeCorrections ( o2::gpu::TPCFastSpaceChargeCorrection destinationCorrection,
const o2::gpu::TPCFastSpaceChargeCorrection sourceCorrection,
const std::vector< int > &  sectors 
)

merge of two corrections sector-wise

Parameters
destinationCorrectionmain correction to which the source correction will be added
sourceCorrectioncorrection to be added to the main correction
sectorsvector of sector indices for which the correction will be added
Returns
main correction merged with the source correction

merge of two corrections sector-wise

Definition at line 1179 of file TPCFastSpaceChargeCorrectionHelper.cxx.

◆ operator=()

TPCFastSpaceChargeCorrectionHelper & o2::tpc::TPCFastSpaceChargeCorrectionHelper::operator= ( const TPCFastSpaceChargeCorrectionHelper )
delete

Assignment operator: disabled.

◆ setDebugMirrorAdata2C()

void o2::tpc::TPCFastSpaceChargeCorrectionHelper::setDebugMirrorAdata2C ( )

debug: if true, mirror the data from the A side to the C side of the TPC

Definition at line 1271 of file TPCFastSpaceChargeCorrectionHelper.cxx.

◆ setDebugUseVoxelCenters()

void o2::tpc::TPCFastSpaceChargeCorrectionHelper::setDebugUseVoxelCenters ( )

debug: if true, use voxel centers instead of the fitted positions for correction

Definition at line 1265 of file TPCFastSpaceChargeCorrectionHelper.cxx.

◆ setNthreads()

void o2::tpc::TPCFastSpaceChargeCorrectionHelper::setNthreads ( int  n)

_______________ Settings ________________________

sets number of threads to use

Definition at line 98 of file TPCFastSpaceChargeCorrectionHelper.cxx.

◆ setNthreadsToMaximum()

void o2::tpc::TPCFastSpaceChargeCorrectionHelper::setNthreadsToMaximum ( )

sets number of threads to N cpu cores

sets number of threads to N cpu cores

Definition at line 104 of file TPCFastSpaceChargeCorrectionHelper.cxx.

◆ setVoxelMeanValidityRange()

void o2::tpc::TPCFastSpaceChargeCorrectionHelper::setVoxelMeanValidityRange ( double  range)
inline

how far the voxel mean is allowed to be outside of the voxel (1.1 means 10%)

Definition at line 149 of file TPCFastSpaceChargeCorrectionHelper.h.

◆ testGeometry()

void o2::tpc::TPCFastSpaceChargeCorrectionHelper::testGeometry ( const TPCFastTransformGeo geo) const

Definition at line 327 of file TPCFastSpaceChargeCorrectionHelper.cxx.


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