Pixie16 Analysis Software Suite
Analysis code for processing of .ldf files
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Friends Macros Pages
WalkCorrector.hpp
Go to the documentation of this file.
1 
6 #ifndef WALKCORRECTOR_H
7 #define WALKCORRECTOR_H
8 
9 #include <vector>
10 #include <map>
11 #include <string>
12 
13 #include "Identifier.hpp"
14 
16 enum WalkModel {
17  walk_none,
18  walk_A,
19  walk_B1,
20  walk_B2
21 };
22 
27  double min;
28  double max;
29  std::vector<double> parameters;
30 };
31 
41 public:
44 
52  void AddChannel(const Identifier& chanID,
53  const std::string model,
54  double min, double max,
55  const std::vector<double>& par);
56 
66  double GetCorrection(Identifier& chanID, double raw) const;
67 
68 private:
72  std::map<Identifier, std::vector<CorrectionParams> > channels_;
73 
78  double Model_None() const;
79 
88  double Model_A(const std::vector<double>& par, double raw) const;
89 
100  double Model_B1(const std::vector<double>& par, double raw) const;
101 
112  double Model_B2(const std::vector<double>& par, double raw) const;
113 };
114 #endif
std::vector< double > parameters
coefficients for function
Definition: WalkCorrector.hpp:29
WalkCorrector()
Definition: WalkCorrector.hpp:43
std::map< Identifier, std::vector< CorrectionParams > > channels_
Definition: WalkCorrector.hpp:72
Defines identifying information for channels.
double Model_None() const
This structure holds walk calibration model identfier and vector of parameters needed for the functio...
Definition: WalkCorrector.hpp:25
void AddChannel(const Identifier &chanID, const std::string model, double min, double max, const std::vector< double > &par)
double Model_A(const std::vector< double > &par, double raw) const
double Model_B1(const std::vector< double > &par, double raw) const
double Model_B2(const std::vector< double > &par, double raw) const
Class to correct channels for walk in the onboard filters.
Definition: WalkCorrector.hpp:40
WalkModel model
The walk model that is used for the params.
Definition: WalkCorrector.hpp:26
double GetCorrection(Identifier &chanID, double raw) const
double max
maximum of range for the correction
Definition: WalkCorrector.hpp:28
WalkModel
Definition: WalkCorrector.hpp:16
double min
minimum of range for the correction
Definition: WalkCorrector.hpp:27
Channel identification.
Definition: Identifier.hpp:23