SpaceChargeProtoDUNEdp.h
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 // \file SpaceChargeProtoDUNEdp.h
3 //
4 // \brief header of class for storing/accessing space charge distortions for ProtoDUNE
5 //
6 // based on \author mrmooney@bnl.gov
7 // \author jdawson@in2p3.fr
8 ////////////////////////////////////////////////////////////////////////
9 #ifndef SPACECHARGE_SPACECHARGEPROTODUNEDP_H
10 #define SPACECHARGE_SPACECHARGEPROTODUNEDP_H
11 // LArSoft libraries
15 // FHiCL libraries
16 #include "fhiclcpp/ParameterSet.h"
17 // ROOT includes
18 #include "TGraph.h"
19 #include "TF1.h"
20 #include "TFile.h"
21 #include "TH3.h"
22 #include "TTree.h"
23 #include "TLeaf.h"
24 // C/C++ standard libraries
25 #include <string>
26 #include <vector>
27 namespace spacecharge {
29 
30  public:
31  explicit SpaceChargeProtoDUNEdp(fhicl::ParameterSet const& pset);
33  virtual ~SpaceChargeProtoDUNEdp() = default;
34 
36  bool Update(uint64_t ts=0);
37 
38  bool EnableSimSpatialSCE() const override;
39  bool EnableSimEfieldSCE() const override;
40  bool EnableCalSpatialSCE() const override;
41  bool EnableCalEfieldSCE() const override;
42 
43  bool EnableCorrSCE() const override {return (EnableCalSpatialSCE()||EnableCalEfieldSCE()) ;}
44 
45  geo::Vector_t GetPosOffsets(geo::Point_t const& point) const override;
46  geo::Vector_t GetEfieldOffsets(geo::Point_t const& point) const override;
47  geo::Vector_t GetCalPosOffsets(geo::Point_t const& point, int const& TPCid) const override;
48  geo::Vector_t GetCalEfieldOffsets(geo::Point_t const& point, int const& TPCid) const override;
49 
50  private:
51  protected:
52 
53  std::vector<double> GetOffsetsVoxel(geo::Point_t const& point, TH3F* hX, TH3F* hY, TH3F* hZ) const;
54 
55  std::vector<TH3F*> SCEhistograms = std::vector<TH3F*>(7); //Histograms are Dx, Dy, Dz, dEx/E0, dEy/E0, dEz/E0 (positive; repeat for negative)
56  std::vector<TH3F*> CalSCEhistograms = std::vector<TH3F*>(6);
57 
58  short int driftcoordinate;
59  Double_t Anodebin;
60 
61  // geo::Point_t PretendAtBoundary(geo::Point_t const& point) const; //?
62 
68 
69  double fEfield;
70 
74 
75 
76 
77  }; // class SpaceChargeProtoDUNEdp
78 } //namespace spacecharge
79 #endif // SPACECHARGE_SPACECHARGEPROTODUNEDP_H
geo::Vector_t GetCalEfieldOffsets(geo::Point_t const &point, int const &TPCid) const override
bool Configure(fhicl::ParameterSet const &pset, detinfo::DetectorPropertiesData const &)
bool EnableCalEfieldSCE() const override
Return boolean indicating whether or not to apply SCE corrections.
std::string string
Definition: nybbler.cc:12
SpaceChargeProtoDUNEdp(fhicl::ParameterSet const &pset)
geo::Vector_t GetCalPosOffsets(geo::Point_t const &point, int const &TPCid) const override
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double >, ROOT::Math::GlobalCoordinateSystemTag > Vector_t
Type for representation of momenta in 3D space.
Definition: geo_vectors.h:164
std::vector< double > GetOffsetsVoxel(geo::Point_t const &point, TH3F *hX, TH3F *hY, TH3F *hZ) const
Provides position offsets using voxelized interpolation.
geo::Vector_t GetPosOffsets(geo::Point_t const &point) const override
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:184
virtual ~SpaceChargeProtoDUNEdp()=default
Definitions of geometry vector data types.
geo::Vector_t GetEfieldOffsets(geo::Point_t const &point) const override
bool EnableCalSpatialSCE() const override
Return boolean indicating whether or not to apply SCE corrections.