Project
Loading...
Searching...
No Matches
TPCMShapeCorrection.h
Go to the documentation of this file.
1// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3// All rights not expressly granted are reserved.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
11
14
15#ifndef ALICEO2_TPC_TPCMSHAPECORRECTION
16#define ALICEO2_TPC_TPCMSHAPECORRECTION
17
18#include "DataFormatsTPC/Defs.h"
19#include <vector>
20
21class TTree;
22
23namespace o2::tpc
24{
25
29 void addValue(float potential, float z)
30 {
31 mPotential.emplace_back(potential);
32 mZPosition.emplace_back(z);
33 }
34 std::vector<float> mPotential;
35 std::vector<float> mZPosition;
37};
38
40struct TPCMShape {
42 double getStartTimeMS() const { return mTimeMS.front(); }
43
45 double getEndTimeMS() const { return mTimeMS.back(); }
46
49 {
50 mTimeMS.emplace_back(time);
51 mBoundaryPotentialIFC.emplace_back(pot);
52 }
53
54 std::vector<double> mTimeMS;
55 std::vector<BoundaryPotentialIFC> mBoundaryPotentialIFC;
56 int mZ{129};
57 int mR{129};
58 int mPhi{5};
59 int mBField{5};
61};
62
63/*
64Class for storing the scalers (obtained from DCAs) which are used to correct for the M-shape distortions
65*/
66
68{
69 public:
72
74 void setRun(int run) { mRun = run; }
75
79 void dumpToFile(const char* file, const char* name);
80
84 void dumpToFileSlices(const char* file, const char* name, int nSlices);
85
89 void loadFromFile(const char* inpf, const char* name);
90
92 void setFromTree(TTree& tpcMShapeTree);
93
95 float setMaxDeltaTimeMS(float deltaTMS) { return mMaxDeltaTimeMS = deltaTMS; }
96
98 void setMShapes(const TPCMShape& mshapes) { mMShapes = mshapes; }
99
101 int getRun() const { return mRun; }
102
105 BoundaryPotentialIFC getBoundaryPotential(const double timestamp) const;
106
108 float getMaxDeltaTimeMS() const { return mMaxDeltaTimeMS; }
109
111 const auto& getMShapes() const { return mMShapes; }
112
113 private:
114 int mRun{};
115 float mMaxDeltaTimeMS = 50;
116 TPCMShape mMShapes;
117
118 ClassDefNV(TPCMShapeCorrection, 1);
119};
120
121} // namespace o2::tpc
122#endif
int16_t time
Definition RawEventData.h:4
configStandalone Light OpenGL display display_light Apply smoothing to points Enable Z buffer Highlight links Highlight seeds Highlight sector tracks Highlight final tracks Show individual Show related Highlight grid Show only individual collision Color clusters belonging to track objects Set line Enable drawing TPC data Enable drawing TOF data Enable drawing magnetic field Set field line step count Invert colors configStandalone Heavy OpenGL display display_heavy Show tracks with ITS contribution Show tracks with TOF contribution Enable propagation of loopers Show clusters at nominal x of pad row for early transformed data Split CE tracks when they cross the central Mark clusters Mark adjacent clusters Hide rejected tracks Apply filter on tracks to be displayed Separate increase X h configStandalone Camera window renderer OpenGL display display_camera Orient the camera such that the y axis is always upwards Full Screen MultiSample Anti Downsampling Anti Enable Vertical Sync Target frame or if the backend cannot limit to the refresh Use OpenGL indirect draws to reduce number of draw calls Display h configStandalone Vulkan display display_vulkan Have uniform buffers in host accessible device memory h configStandalone Internal display display_internal Number of updates the Qt GUI may send ahead of the last one the display has before it waits for the display Opacity of the console background Number of console lines the history is shortened to this when it reaches twice the size Time in seconds an info message fades out after setInfoTime h OpenGL display display Font size Do not use Freetype for font Renderer for event Frontend to use for event ROOT macros used as track filter Console script file
TPCMShapeCorrection()=default
default constructor
void loadFromFile(const char *inpf, const char *name)
float setMaxDeltaTimeMS(float deltaTMS)
set maximum delta time when searching for nearest boundary potential
void dumpToFileSlices(const char *file, const char *name, int nSlices)
void setMShapes(const TPCMShape &mshapes)
adding M-shapes
void dumpToFile(const char *file, const char *name)
BoundaryPotentialIFC getBoundaryPotential(const double timestamp) const
void setFromTree(TTree &tpcMShapeTree)
set this object from input tree
GLuint const GLchar * name
Definition glcorearb.h:781
GLdouble GLdouble GLdouble z
Definition glcorearb.h:843
Global TPC definitions and constants.
arbitrary boundary potential at the IFC
ClassDefNV(BoundaryPotentialIFC, 1)
std::vector< float > mPotential
boundary potential
void addValue(float potential, float z)
add boundary potential at given z coordinate
std::vector< float > mZPosition
z-position of the delta potential
struct containing all M-Shape boundary potentials
double getEndTimeMS() const
get time of first stored boundary potential
void addBoundaryPotentialIFC(const BoundaryPotentialIFC &pot, double time)
adding boundary potential for given timestamp
ClassDefNV(TPCMShape, 1)
double getStartTimeMS() const
get time of last stored boundary potential
std::vector< BoundaryPotentialIFC > mBoundaryPotentialIFC
definition of boundary potential
int mR
number of vertices for boundary potential in radial direction
std::vector< double > mTimeMS
time of the boundary potential
int mPhi
number of vertices for boundary potential in phi direction
int mZ
number of vertices for boundary potential in z direction