![]() |
Project
|
Gain calibration class. More...
#include <CalibPadGainTracks.h>
Inherits o2::tpc::CalibPadGainTracksBase.
Public Types | |
| enum | DEdxType : unsigned char { dedxTrack , dedxTracking , dedxBB } |
| mode of normalizing qmax More... | |
| enum | DEdxRegion : unsigned char { chamber , stack , sector } |
Public Types inherited from o2::tpc::CalibPadGainTracksBase | |
| enum | NormType : unsigned char { none , stack , region } |
| normalization type of the extracted gain map More... | |
| using | DataTHisto = FastHisto< unsigned int > |
| using | DataTHistos = CalDet< DataTHisto > |
Public Member Functions | |
| CalibPadGainTracks (const bool initCalPad=true) | |
| ~CalibPadGainTracks ()=default | |
| default destructor | |
| void | processTracks (const int nMaxTracks=-1) |
| void | setMembers (gsl::span< const o2::tpc::TrackTPC > *vTPCTracksArrayInp, gsl::span< const o2::tpc::TPCClRefElem > *tpcTrackClIdxVecInput, const o2::tpc::ClusterNativeAccess &clIndex, gsl::span< const unsigned char > TPCRefitterShMap, gsl::span< const unsigned int > TPCRefitterOccMap) |
| void | setMode (DEdxType iMode) |
| void | setMomentumRange (const float momMin, const float momMax) |
| void | setMaxEta (const float eta) |
| void | setdEdxMin (const float mindedx) |
| void | setdEdxMax (const float maxdEdx) |
| void | doNotNomalize (const bool doNotNormCharge) |
| void | setMinNClusters (const int nCl) |
| void | setPropagateTrack (const bool propagate) |
| void | setFieldNominalGPUBz (const float field) |
| void | setChargeType (const ChargeType chargeType) |
| void | setRefGainMap (const char *inpFile, const char *mapName) |
| void | setRefGainMap (const CalPad &gainmap) |
| void | setdEdxRegion (const DEdxRegion dedx) |
| set how the dedx is calculated which is used for normalizing the cluster charge | |
| float | getMomMin () const |
| float | getMomMax () const |
| float | getEtaMax () const |
| float | getdEdxMin () const |
| float | getdEdxMax () const |
| bool | getdoNotNomalize () const |
| float | getMinNClusters () const |
| bool | getPropagateTrack () const |
| float | getFieldNominalGPUBz () const |
| void | dumpToFile (const char *outFileName="calPadGainTracks.root", const char *outName="calPadGain") const |
| void | loadPolTopologyCorrectionFromFile (std::string_view fileName) |
| void | setPolTopologyCorrectionFromContainer (const CalibdEdxTrackTopologyPolContainer &polynomials) |
| void | drawReferenceGainMapSector (const int sector, const std::string filename="GainMapSector.pdf", const float minZ=0, const float maxZ=-1) const |
| void | drawReferenceGainMapSide (const o2::tpc::Side side, const std::string filename="GainMapSide.pdf", const float minZ=0, const float maxZ=-1) const |
| void | dumpReferenceExtractedGainMap (const char *outFileName="GainMapRefExtracted.root", const char *outName="GainMap") const |
| void | setTPCVDrift (const o2::tpc::VDriftCorrFact &v) |
| set VDrift correction | |
| void | setTPCCorrMaps (const o2::gpu::TPCFastTransformPOD *maph) |
| set cluster correction maps helper | |
Public Member Functions inherited from o2::tpc::CalibPadGainTracksBase | |
| CalibPadGainTracksBase (const bool initCalPad=true) | |
| void | initCalPadMemory () |
| initializing CalPad object for gainmap | |
| void | initCalPadStdDevMemory () |
| initializing CalPad object for std dev map | |
| void | initCalPadStat () |
| initializing CalPad object for std dev map | |
| CalibPadGainTracksBase (const CalibPadGainTracksBase &other) | |
| copy constructor | |
| void | fill (const gsl::span< const DataTHistos > &caldets) |
| void | fill (const DataTHistos &caldet) |
| void | print () const |
| Print the total number of entries and minimum number of entries (ToDo add some more informations which will be printed) | |
| void | merge (const CalibPadGainTracksBase *other) |
| Add histograms from other container. | |
| bool | hasEnoughData (const int minEntries) const |
| void | finalize (const int minEntries=10, const float minRelgain=0.1f, const float maxRelgain=2.f, const float low=0.05f, const float high=0.6f, const float minStDev=0.01) |
| const auto & | getHistos () const |
| returns calpad containing pad-by-pad histograms | |
| const CalPad & | getPadGainMap () const |
| CalPad & | getPadGainMap () |
| const CalPad & | getSigmaMap () const |
| const CalPad & | getNTracksMap () const |
| DataTHisto | getHistogram (const int sector, const int region, const int lrow, const int pad) const |
| DataTHisto | getHistogram (const int sector, const int grow, const int pad) const |
| void | drawExtractedGainMapSector (const int sector, const std::string filename="GainMapSector.pdf", const float minZ=0, const float maxZ=-1) const |
| void | drawExtractedGainMapSide (const o2::tpc::Side side, const std::string filename="GainMapSide.pdf", const float minZ=0, const float maxZ=-1) const |
| void | drawNClustersMapSide (const o2::tpc::Side side, const std::string filename="NClustersMapSide.pdf", const float minZ=0, const float maxZ=-1) const |
| void | drawExtractedSigmaMapSector (const int sector, const bool norm=false, const std::string filename="StdDevMapSector.pdf", const float minZ=0, const float maxZ=-1) const |
| void | drawExtractedSigmaMapSide (const o2::tpc::Side side, const bool norm=false, const std::string filename="StdDevMapSide.pdf", const float minZ=0, const float maxZ=-1) const |
| void | drawNClustersMapSector (const int sector, const std::string filename="NClustersMapSector.pdf", const float minZ=0, const float maxZ=-1) const |
| TCanvas * | drawExtractedGainMapPainter () const |
| draw gain map using painter functionality | |
| void | divideGainMap (const char *inpFile, const char *mapName) |
| void | dumpGainMap (const char *fileName="GainMap.root") const |
| void | dumpToFile (const char *outFileName="calPadGainTracksBase.root", const char *outName="calPadGain") const |
| void | dumpToTree (const std::string filename="map_debug.root") const |
| void | setGainMap (const char *inpFile, const char *mapName) |
| void | setGainMap (const CalPad &gainmap) |
| setting the gain map | |
| void | setRMSMap (const CalPad &rmsMap) |
| setting the RMS map | |
| void | setNClMap (const CalPad &nclMap) |
| setting number of clusters map | |
| void | setNormalizationType (const NormType type) |
| set how the extracted gain map is normalized | |
| auto | getNormalizationType () const |
| bool | setLogTransformQ (const bool logTransformQ) |
| set if the cluster charge is transformed using log(1+Q) | |
| bool | getLogTransformQ () const |
| void | resetHistos () |
| resetting the histograms which are used for extraction of the gain map | |
| void | init (const unsigned int nBins, const float xmin, const float xmax, const bool useUnderflow, const bool useOverflow) |
| void | fillPadByPadHistogram (const size_t roc, const size_t padInROC, const float val) |
Gain calibration class.
This class is used to produce pad wise gain calibration information with reconstructed tracks. The idea is to use the self calibrated probe qMax/dEdx and store the information for each pad in an histogram. The dEdx can be used from the track itself or from some bethe-bloch parametrization. Using the dEdx information from the bethe bloch avoids biases in the dEdx of the track itself. However the use of a bethe bloch parametrization is not yet implemented and shouldnt be used yet. When enough thata is collected, the truncated mean of each histogram delivers the relative gain of each pad. This method can be used to study the pad-by-pad gain as a function of time (i.e. performing this method n times with n different consecutive data samples)
origin: TPC
how to use: example: CalibPadGainTracks cGain{}; cGain.init(20, 0, 3, 1, 1); // set the binning which will be used: 20 bins, minimum x=0, maximum x=10, use underflow and overflow bin start loop over the data cGain.setMembers(tpcTracks, tpcTrackClIdxVecInput, clusterIndex); // set the member variables: TrackTPC, TPCClRefElem, o2::tpc::ClusterNativeAccess cGain.setMomentumRange(.1, 3); cGain.processTracks(); after looping of the data (filling the histograms) is done cGain.fillgainMap(); // fill the gainmap with the truncated mean from each histogram cGain.dumpGainMap(); // write the gainmap to file
Definition at line 74 of file CalibPadGainTracks.h.
| enum o2::tpc::CalibPadGainTracks::DEdxRegion : unsigned char |
| Enumerator | |
|---|---|
| chamber | use the dE/dx from IROC and OROC |
| stack | use the dE/dx from IROC, OROC1, OROC2, OROC3 |
| sector | use the dE/dx from the whole sector |
Definition at line 85 of file CalibPadGainTracks.h.
| enum o2::tpc::CalibPadGainTracks::DEdxType : unsigned char |
mode of normalizing qmax
Definition at line 79 of file CalibPadGainTracks.h.
default constructor
| initCalPad | initialisation of the calpad for the gain map (if the gainmap is not extracted it can be false to save some memory) |
Definition at line 93 of file CalibPadGainTracks.h.
|
default |
default destructor
| mDoNotNormCharge | minimmum do not normalize the cluster charge to the dE/dx |
Definition at line 127 of file CalibPadGainTracks.h.
|
inline |
draw reference gain map sector
| sector | sector which will be drawn |
| filename | name of the output file. If empty the canvas is drawn |
| minZ | min z value for drawing (if minZ > maxZ automatic z axis) |
| maxZ | max z value for drawing (if minZ > maxZ automatic z axis) |
Definition at line 198 of file CalibPadGainTracks.h.
|
inline |
draw reference gain map side
| side | side of the TPC which will be drawn |
| filename | name of the output file. If empty the canvas is drawn |
| minZ | min z value for drawing (if minZ > maxZ automatic z axis) |
| maxZ | max z value for drawing (if minZ > maxZ automatic z axis) |
Definition at line 205 of file CalibPadGainTracks.h.
| void CalibPadGainTracks::dumpReferenceExtractedGainMap | ( | const char * | outFileName = "GainMapRefExtracted.root", |
| const char * | outName = "GainMap" |
||
| ) | const |
dump the extracted residual multiplied with the applied reference gain map to disc
| outFileName | name of the output file |
| outName | name of the object in the output file |
Definition at line 382 of file CalibPadGainTracks.cxx.
| void CalibPadGainTracks::dumpToFile | ( | const char * | outFileName = "calPadGainTracks.root", |
| const char * | outName = "calPadGain" |
||
| ) | const |
dump object to disc
| outFileName | name of the output file |
| outName | name of the object in the output file |
Definition at line 303 of file CalibPadGainTracks.cxx.
|
inline |
Definition at line 166 of file CalibPadGainTracks.h.
|
inline |
Definition at line 163 of file CalibPadGainTracks.h.
|
inline |
Definition at line 169 of file CalibPadGainTracks.h.
|
inline |
Definition at line 160 of file CalibPadGainTracks.h.
|
inline |
Definition at line 178 of file CalibPadGainTracks.h.
|
inline |
Definition at line 172 of file CalibPadGainTracks.h.
|
inline |
Definition at line 157 of file CalibPadGainTracks.h.
|
inline |
Definition at line 154 of file CalibPadGainTracks.h.
|
inline |
Definition at line 175 of file CalibPadGainTracks.h.
| void CalibPadGainTracks::loadPolTopologyCorrectionFromFile | ( | std::string_view | fileName | ) |
loading the track topology correction from a file
| fileName | name of the file containing the object |
Definition at line 353 of file CalibPadGainTracks.cxx.
| void CalibPadGainTracks::processTracks | ( | const int | nMaxTracks = -1 | ) |
processes input tracks and filling the histograms with self calibrated probe qMax/dEdx
| nMaxTracks | max number of tracks to process (-1 to process all tracks) |
Definition at line 36 of file CalibPadGainTracks.cxx.
|
inline |
| chargeType | type of charge which is used for the dE/dx and the pad-by-pad histograms |
Definition at line 139 of file CalibPadGainTracks.h.
| mDedxMax | maximum accepted dE/dx |
Definition at line 124 of file CalibPadGainTracks.h.
| mindedx | minimmum accepted dE/dx |
Definition at line 121 of file CalibPadGainTracks.h.
| void CalibPadGainTracks::setdEdxRegion | ( | const DEdxRegion | dedx | ) |
set how the dedx is calculated which is used for normalizing the cluster charge
Definition at line 297 of file CalibPadGainTracks.cxx.
| field | magnetic field in kG, used for track propagation |
Definition at line 136 of file CalibPadGainTracks.h.
| eta | maximum accpeted eta of the tracks |
Definition at line 118 of file CalibPadGainTracks.h.
| void CalibPadGainTracks::setMembers | ( | gsl::span< const o2::tpc::TrackTPC > * | vTPCTracksArrayInp, |
| gsl::span< const o2::tpc::TPCClRefElem > * | tpcTrackClIdxVecInput, | ||
| const o2::tpc::ClusterNativeAccess & | clIndex, | ||
| gsl::span< const unsigned char > | TPCRefitterShMap, | ||
| gsl::span< const unsigned int > | TPCRefitterOccMap | ||
| ) |
set the member variables
| vTPCTracksArrayInp | vector of tpc tracks |
| tpcTrackClIdxVecInput | set the TPCClRefElem member variable |
| clIndex | set the ClusterNativeAccess member variable |
Definition at line 310 of file CalibPadGainTracks.cxx.
|
inline |
| nCl | minimum number of clusters required of the tracks |
Definition at line 130 of file CalibPadGainTracks.h.
this function sets the mode of the class. e.g. mode=0 -> use the truncated mean from the track for normalizing the dedx mode=1 -> use the value from the BB-fit for normalizing the dedx. NOT implemented yet
Definition at line 111 of file CalibPadGainTracks.h.
| momMin | minimum accpeted momentum of the tracks |
| momMax | maximum accpeted momentum of the tracks |
Definition at line 319 of file CalibPadGainTracks.cxx.
| void CalibPadGainTracks::setPolTopologyCorrectionFromContainer | ( | const CalibdEdxTrackTopologyPolContainer & | polynomials | ) |
setting the track topology correction
| polynomials | polynomials which will be set |
Definition at line 359 of file CalibPadGainTracks.cxx.
| propagate | propagate the tracks to extract the track parameters instead of performing a refit |
Definition at line 133 of file CalibPadGainTracks.h.
setting a gain map
| gainmap | CalDet containing the gain map |
Definition at line 148 of file CalibPadGainTracks.h.
setting a reference gain map from a file which is used to correct the cluster charge
| inpFile | input file containing some caldet |
| mapName | name of the caldet |
Definition at line 325 of file CalibPadGainTracks.cxx.
| void CalibPadGainTracks::setTPCCorrMaps | ( | const o2::gpu::TPCFastTransformPOD * | maph | ) |
set cluster correction maps helper
Definition at line 410 of file CalibPadGainTracks.cxx.
| void CalibPadGainTracks::setTPCVDrift | ( | const o2::tpc::VDriftCorrFact & | v | ) |
set VDrift correction
Definition at line 401 of file CalibPadGainTracks.cxx.