LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
SpaceChargeStandard.h
Go to the documentation of this file.
1 // \file SpaceChargeStandard.h
3 //
4 // \brief header of class for storing/accessing space charge distortions
5 //
6 // \author mrmooney@bnl.gov
7 //
9 #ifndef SPACECHARGE_SPACECHARGESTANDARD_H
10 #define SPACECHARGE_SPACECHARGESTANDARD_H
11 
12 // LArSoft libraries
15 
16 // FHiCL libraries
17 namespace fhicl {
18  class ParameterSet;
19 }
20 
21 // ROOT includes
22 #include "TF1.h"
23 class TGraph;
24 
25 // C/C++ standard libraries
26 #include <stdint.h>
27 #include <string>
28 #include <vector>
29 
30 namespace spacecharge {
31 
33 
34  public:
35  explicit SpaceChargeStandard(fhicl::ParameterSet const& pset);
37  virtual ~SpaceChargeStandard() = default;
38 
39  bool Configure(fhicl::ParameterSet const& pset);
40  bool Update(uint64_t ts = 0);
41 
42  bool EnableSimSpatialSCE() const override;
43  bool EnableSimEfieldSCE() const override;
44  bool EnableCorrSCE() const override;
45  bool EnableCalSpatialSCE() const override;
46  bool EnableCalEfieldSCE() const override;
47 
48  geo::Vector_t GetPosOffsets(geo::Point_t const& point) const override;
49  geo::Vector_t GetEfieldOffsets(geo::Point_t const& point) const override;
50  geo::Vector_t GetCalPosOffsets(geo::Point_t const& point, int const& TPCid) const override;
51  geo::Vector_t GetCalEfieldOffsets(geo::Point_t const& point, int const& TPCid) const override;
52 
53  private:
54  protected:
55  std::vector<double> GetPosOffsetsParametric(double xVal, double yVal, double zVal) const;
56  double GetOnePosOffsetParametric(double xVal, double yVal, double zVal, std::string axis) const;
57  std::vector<double> GetEfieldOffsetsParametric(double xVal, double yVal, double zVal) const;
58  double GetOneEfieldOffsetParametric(double xVal,
59  double yVal,
60  double zVal,
61  std::string axis) const;
62  double TransformX(double xVal) const;
63  double TransformY(double yVal) const;
64  double TransformZ(double zVal) const;
65  bool IsInsideBoundaries(double xVal, double yVal, double zVal) const;
66 
72 
73  std::string fRepresentationType;
74  std::string fInputFilename;
75 
76  TGraph** g1_x = new TGraph*[7];
77  TGraph** g2_x = new TGraph*[7];
78  TGraph** g3_x = new TGraph*[7];
79  TGraph** g4_x = new TGraph*[7];
80  TGraph** g5_x = new TGraph*[7];
81 
82  TGraph** g1_y = new TGraph*[7];
83  TGraph** g2_y = new TGraph*[7];
84  TGraph** g3_y = new TGraph*[7];
85  TGraph** g4_y = new TGraph*[7];
86  TGraph** g5_y = new TGraph*[7];
87  TGraph** g6_y = new TGraph*[7];
88 
89  TGraph** g1_z = new TGraph*[7];
90  TGraph** g2_z = new TGraph*[7];
91  TGraph** g3_z = new TGraph*[7];
92  TGraph** g4_z = new TGraph*[7];
93 
94  TF1* f1_x = new TF1("f1_x", "pol6");
95  TF1* f2_x = new TF1("f2_x", "pol6");
96  TF1* f3_x = new TF1("f3_x", "pol6");
97  TF1* f4_x = new TF1("f4_x", "pol6");
98  TF1* f5_x = new TF1("f5_x", "pol6");
99  TF1* fFinal_x = new TF1("fFinal_x", "pol4");
100 
101  TF1* f1_y = new TF1("f1_y", "pol5");
102  TF1* f2_y = new TF1("f2_y", "pol5");
103  TF1* f3_y = new TF1("f3_y", "pol5");
104  TF1* f4_y = new TF1("f4_y", "pol5");
105  TF1* f5_y = new TF1("f5_y", "pol5");
106  TF1* f6_y = new TF1("f6_y", "pol5");
107  TF1* fFinal_y = new TF1("fFinal_y", "pol5");
108 
109  TF1* f1_z = new TF1("f1_z", "pol4");
110  TF1* f2_z = new TF1("f2_z", "pol4");
111  TF1* f3_z = new TF1("f3_z", "pol4");
112  TF1* f4_z = new TF1("f4_z", "pol4");
113  TF1* fFinal_z = new TF1("fFinal_z", "pol3");
114 
115  TGraph** g1_Ex = new TGraph*[7];
116  TGraph** g2_Ex = new TGraph*[7];
117  TGraph** g3_Ex = new TGraph*[7];
118  TGraph** g4_Ex = new TGraph*[7];
119  TGraph** g5_Ex = new TGraph*[7];
120 
121  TGraph** g1_Ey = new TGraph*[7];
122  TGraph** g2_Ey = new TGraph*[7];
123  TGraph** g3_Ey = new TGraph*[7];
124  TGraph** g4_Ey = new TGraph*[7];
125  TGraph** g5_Ey = new TGraph*[7];
126  TGraph** g6_Ey = new TGraph*[7];
127 
128  TGraph** g1_Ez = new TGraph*[7];
129  TGraph** g2_Ez = new TGraph*[7];
130  TGraph** g3_Ez = new TGraph*[7];
131  TGraph** g4_Ez = new TGraph*[7];
132 
133  TF1* f1_Ex = new TF1("f1_Ex", "pol6");
134  TF1* f2_Ex = new TF1("f2_Ex", "pol6");
135  TF1* f3_Ex = new TF1("f3_Ex", "pol6");
136  TF1* f4_Ex = new TF1("f4_Ex", "pol6");
137  TF1* f5_Ex = new TF1("f5_Ex", "pol6");
138  TF1* fFinal_Ex = new TF1("fFinal_Ex", "pol4");
139 
140  TF1* f1_Ey = new TF1("f1_Ey", "pol5");
141  TF1* f2_Ey = new TF1("f2_Ey", "pol5");
142  TF1* f3_Ey = new TF1("f3_Ey", "pol5");
143  TF1* f4_Ey = new TF1("f4_Ey", "pol5");
144  TF1* f5_Ey = new TF1("f5_Ey", "pol5");
145  TF1* f6_Ey = new TF1("f6_Ey", "pol5");
146  TF1* fFinal_Ey = new TF1("fFinal_Ey", "pol5");
147 
148  TF1* f1_Ez = new TF1("f1_Ez", "pol4");
149  TF1* f2_Ez = new TF1("f2_Ez", "pol4");
150  TF1* f3_Ez = new TF1("f3_Ez", "pol4");
151  TF1* f4_Ez = new TF1("f4_Ez", "pol4");
152  TF1* fFinal_Ez = new TF1("fFinal_Ez", "pol3");
153 
154  }; // class SpaceChargeStandard
155 } //namespace spacecharge
156 #endif // SPACECHARGE_SPACECHARGESTANDARD_H
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double >, ROOT::Math::GlobalCoordinateSystemTag > Vector_t
Type for representation of momenta in 3D space.
Definition: geo_vectors.h:160
bool Update(detinfo::DetectorPropertiesData const &detProp, const TCSlice &slc, PFPStruct &pfp)
Definition: PFPUtils.cxx:1055
Definitions of geometry vector data types.
parameter set interface
ROOT::Math::PositionVector3D< ROOT::Math::Cartesian3D< double >, ROOT::Math::GlobalCoordinateSystemTag > Point_t
Type for representation of position in physical 3D space.
Definition: geo_vectors.h:180