![]() |
Project
|
Class that creates dE/dx histograms from a sequence of tracks objects. More...
#include <CalibdEdx.h>
Public Types | |
enum | Axis { dEdx , Tgl , Snp , Sector , Stack , Charge , Size } |
using | IntAxis = boost::histogram::axis::integer< int, boost::histogram::use_default, boost::histogram::axis::option::none_t > |
using | FloatAxis = boost::histogram::axis::regular< float, boost::histogram::use_default, boost::histogram::use_default, boost::histogram::axis::option::none_t > |
using | TFIDInfo = o2::dataformats::TFIDInfo |
using | AxesType = std::tuple< FloatAxis, FloatAxis, FloatAxis, IntAxis, IntAxis, IntAxis > |
using | Hist = boost::histogram::histogram< AxesType > |
Public Member Functions | |
CalibdEdx (const CalibdEdx &other) | |
copy ctor | |
CalibdEdx (int dEdxBins=70, float mindEdx=10, float maxdEdx=90, int angularBins=36, bool fitSnp=false) | |
void | setCuts (const TrackCuts &cuts) |
void | setApplyCuts (bool apply) |
bool | getApplyCuts () const |
void | setSectorFitThreshold (int minEntries) |
void | set1DFitThreshold (int minEntries) |
void | set2DFitThreshold (int minEntries) |
int | getSectorFitThreshold () const |
int | getTglFitThreshold () const |
int | getSnpFitThreshold () const |
void | setElectronCut (float cut, int passes=3, float lowCutFactor=1.5) |
Params used to remove electron points from the fit. The fit to find the MIP peak will be performed passes times, from the second time and afterwords any points with dEdx values above the previous fit * (1 + cut ) and blow previous fit * (1 - lowCutFactor * cut ) will be cut out. | |
void | setMaterialType (o2::base::Propagator::MatCorrType materialType) |
setting the material type for track propagation | |
void | fill (const TrackTPC &tracks) |
Fill histograms using tracks data. | |
void | fill (const gsl::span< const TrackTPC >) |
void | fill (const std::vector< TrackTPC > &tracks) |
void | fill (const TFIDInfo &tfid, const gsl::span< const TrackTPC > tracks) |
void | fill (const TFIDInfo &tfid, const std::vector< TrackTPC > &tracks) |
void | merge (const CalibdEdx *other) |
Add counts from another container. | |
void | finalize (const bool useGausFits=true) |
const Hist & | getHist () const |
Return calib data histogram. | |
THnF * | getRootHist () const |
Return calib data as a THn. | |
const CalibdEdxCorrection & | getCalib () const |
void | setCalibrationInput (const CalibdEdxCorrection &calib) |
calibration used during reconstruction | |
const CalibdEdxCorrection & | getCalibrationInput () const |
int | minStackEntries () const |
Return the number of hist entries of the gem stack with less statistics. | |
bool | hasEnoughData (float minEntries) const |
Check if there are enough data to compute the calibration. | |
void | print () const |
Print statistics info. | |
void | writeTTree (std::string_view fileName) const |
Save the histograms to a TTree. | |
void | enableDebugOutput (std::string_view fileName) |
Enable debug output to file of the time slots calibrations outputs and dE/dx histograms. | |
void | disableDebugOutput () |
Disable debug output to file. Also writes and closes stored time slots. | |
void | finalizeDebugOutput () const |
Write debug output to file. | |
bool | hasDebugOutput () const |
void | dumpToFile (const char *outFile, const char *outName) const |
dump this object to a file - the boost histogram is converted to a ROOT histogram - | |
void | setSigmaFitRange (const float lowerSigma, const float upperSigma) |
Static Public Member Functions | |
static int | findTrackSector (const TrackTPC &track, GEMstack, bool &ok) |
Find the sector of a track at a given GEM stack type. | |
static constexpr float | scaleTgl (float tgl, GEMstack rocType) |
static constexpr float | recoverTgl (float scaledTgl, GEMstack rocType) |
static CalibdEdx | readFromFile (const char *inFile, const char *inName) |
read the object from a file | |
Static Public Attributes | |
static constexpr float | MipScale = 1.0 / 50.0 |
Inverse of target dE/dx value for MIPs. | |
Class that creates dE/dx histograms from a sequence of tracks objects.
Definition at line 42 of file CalibdEdx.h.
using o2::tpc::CalibdEdx::AxesType = std::tuple< FloatAxis, FloatAxis, FloatAxis, IntAxis, IntAxis, IntAxis > |
Definition at line 63 of file CalibdEdx.h.
using o2::tpc::CalibdEdx::FloatAxis = boost::histogram::axis::regular<float, boost::histogram::use_default, boost::histogram::use_default, boost::histogram::axis::option::none_t> |
Definition at line 58 of file CalibdEdx.h.
using o2::tpc::CalibdEdx::Hist = boost::histogram::histogram<AxesType> |
Definition at line 72 of file CalibdEdx.h.
using o2::tpc::CalibdEdx::IntAxis = boost::histogram::axis::integer<int, boost::histogram::use_default, boost::histogram::axis::option::none_t> |
Definition at line 56 of file CalibdEdx.h.
Definition at line 60 of file CalibdEdx.h.
Enumerator | |
---|---|
dEdx | |
Tgl | |
Snp | |
Sector | |
Stack | |
Charge | |
Size | Number of axes. |
Definition at line 45 of file CalibdEdx.h.
CalibdEdx::CalibdEdx | ( | const CalibdEdx & | other | ) |
copy ctor
Definition at line 62 of file CalibdEdx.cxx.
CalibdEdx::CalibdEdx | ( | int | dEdxBins = 70 , |
float | mindEdx = 10 , |
||
float | maxdEdx = 90 , |
||
int | angularBins = 36 , |
||
bool | fitSnp = false |
||
) |
angularBins | number of bins for Tgl and Snp |
fitSnp | enable Snp correction |
Definition at line 49 of file CalibdEdx.cxx.
void CalibdEdx::disableDebugOutput | ( | ) |
Disable debug output to file. Also writes and closes stored time slots.
Definition at line 732 of file CalibdEdx.cxx.
dump this object to a file - the boost histogram is converted to a ROOT histogram -
Definition at line 746 of file CalibdEdx.cxx.
void CalibdEdx::enableDebugOutput | ( | std::string_view | fileName | ) |
Enable debug output to file of the time slots calibrations outputs and dE/dx histograms.
Definition at line 727 of file CalibdEdx.cxx.
Definition at line 168 of file CalibdEdx.cxx.
Definition at line 115 of file CalibdEdx.h.
|
inline |
Definition at line 117 of file CalibdEdx.h.
|
inline |
Definition at line 122 of file CalibdEdx.h.
Fill histograms using tracks data.
Definition at line 84 of file CalibdEdx.cxx.
void CalibdEdx::finalize | ( | const bool | useGausFits = true | ) |
Compute MIP position from dEdx histograms and save result in the correction container. To retrieve the correction call CalibdEdx::getCalib()
useGausFits | make gaussian fits of dEdx vs tgl instead of fitting the mean dEdx |
Definition at line 535 of file CalibdEdx.cxx.
void CalibdEdx::finalizeDebugOutput | ( | ) | const |
Write debug output to file.
Definition at line 738 of file CalibdEdx.cxx.
|
static |
Find the sector of a track at a given GEM stack type.
|
inline |
Definition at line 83 of file CalibdEdx.h.
|
inline |
Definition at line 137 of file CalibdEdx.h.
|
inline |
Definition at line 141 of file CalibdEdx.h.
|
inline |
Return calib data histogram.
Definition at line 133 of file CalibdEdx.h.
THnF * CalibdEdx::getRootHist | ( | ) | const |
Return calib data as a THn.
Definition at line 615 of file CalibdEdx.cxx.
|
inline |
Definition at line 93 of file CalibdEdx.h.
|
inline |
Definition at line 95 of file CalibdEdx.h.
|
inline |
Definition at line 94 of file CalibdEdx.h.
|
inline |
Definition at line 169 of file CalibdEdx.h.
bool CalibdEdx::hasEnoughData | ( | float | minEntries | ) | const |
Check if there are enough data to compute the calibration.
Definition at line 591 of file CalibdEdx.cxx.
Add counts from another container.
Definition at line 175 of file CalibdEdx.cxx.
int CalibdEdx::minStackEntries | ( | ) | const |
Return the number of hist entries of the gem stack with less statistics.
Definition at line 581 of file CalibdEdx.cxx.
void CalibdEdx::print | ( | ) | const |
Print statistics info.
Definition at line 687 of file CalibdEdx.cxx.
read the object from a file
Definition at line 754 of file CalibdEdx.cxx.
|
inlinestaticconstexpr |
Definition at line 174 of file CalibdEdx.h.
|
inlinestaticconstexpr |
Definition at line 173 of file CalibdEdx.h.
minEntries | per GEM stack to enable Tgl fit |
Definition at line 88 of file CalibdEdx.h.
minEntries | per GEM stack to enable Tgl and Snp fit has no effect if fitSnp = false |
Definition at line 91 of file CalibdEdx.h.
|
inline |
Definition at line 82 of file CalibdEdx.h.
|
inline |
calibration used during reconstruction
Definition at line 140 of file CalibdEdx.h.
Definition at line 81 of file CalibdEdx.h.
|
inline |
Params used to remove electron points from the fit. The fit to find the MIP peak will be performed passes
times, from the second time and afterwords any points with dEdx values above the previous fit * (1 + cut
) and blow previous fit * (1 - lowCutFactor
* cut
) will be cut out.
passes
= 0 to disable this functionality Definition at line 102 of file CalibdEdx.h.
|
inline |
setting the material type for track propagation
Definition at line 110 of file CalibdEdx.h.
minEntries | per GEM stack to enable sector by sector correction. Below this value we only perform one fit per ROC type (IROC, OROC1, ...; no side nor sector information). |
Definition at line 86 of file CalibdEdx.h.
void CalibdEdx::setSigmaFitRange | ( | const float | lowerSigma, |
const float | upperSigma | ||
) |
set lower and upper range in units of sigma which are used for the gaussian fits
lowerSigma | low sigma range |
upperSigma | upper sigma range |
Definition at line 772 of file CalibdEdx.cxx.
void CalibdEdx::writeTTree | ( | std::string_view | fileName | ) | const |
Save the histograms to a TTree.
Definition at line 693 of file CalibdEdx.cxx.
|
staticconstexpr |
Inverse of target dE/dx value for MIPs.
Definition at line 171 of file CalibdEdx.h.