All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SpaceChargeICARUS.h
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 // \file SpaceChargeICARUS.h
3 //
4 // \brief header of class for storing/accessing space charge distortions for ICARUS
5 //
6 // \author rlazur@colostate.edu
7 //
8 ////////////////////////////////////////////////////////////////////////
9 
10 #ifndef SPACECHARGE_SPACECHARGEICARUS_H
11 #define SPACECHARGE_SPACECHARGEICARUS_H
12 
13 // LArSoft libraries
16 #include "art/Framework/Services/Registry/ServiceHandle.h"
17 #include "art/Framework/Principal/Handle.h"
18 
20 #include "canvas/Persistency/Common/Ptr.h"
21 #include "canvas/Persistency/Common/PtrVector.h"
22 #include "art/Framework/Principal/Event.h"
23 
24 // FHiCL libraries
25 #include "fhiclcpp/ParameterSet.h"
26 // c++
27 #include <string>
28 #include <map>
29 #include <vector>
30 //ROOT
31 #include <TGraph.h>
32 #include <TF1.h>
33 #include <TH3.h>
34 #include <TFile.h>
35 
36 namespace spacecharge
37 {
39  {
40 
41  public:
42 
43  explicit SpaceChargeICARUS(fhicl::ParameterSet const& pset);
44  SpaceChargeICARUS(SpaceChargeICARUS const&) = delete;
45  virtual ~SpaceChargeICARUS() = default;
46 
47  bool Configure(fhicl::ParameterSet const& pset);
48  bool Update(uint64_t ts = 0);
49 
50  // sim = forward; Cal = backward
51  bool EnableSimSpatialSCE() const override;
52  bool EnableSimEfieldSCE() const override;
53  bool EnableCalSpatialSCE() const override;
54  bool EnableCalEfieldSCE() const override;
55 
56  bool EnableCorrSCE() const override {return (EnableCalSpatialSCE()||EnableCalEfieldSCE()) ;}
57 
58  //Pos and Efield offsets are used primarily in larsim
59  //used to calculate e-lifetime, recombination, and dedx
60  geo::Vector_t GetPosOffsets(geo::Point_t const& point) const override;
61  geo::Vector_t GetEfieldOffsets(geo::Point_t const& point) const override;
62  //Cal offsets are for doing calibration and analysis (backwards map)
63  //require TPCid to disambiguate hits that cross cathode
64  geo::Vector_t GetCalPosOffsets(geo::Point_t const& point, int const& TPCid) const override;
65  geo::Vector_t GetCalPosOffsets(geo::Point_t const& point, geo::TPCID const& TPCid) const;
66  geo::Vector_t GetCalEfieldOffsets(geo::Point_t const& point, int const& TPCid = 1) const override { return {0.,0.,0.}; }
67 
68  private:
69  protected:
70 
71  /////////////////////////////
72  // DECLARE GLOBAL OBJECTS
73  ////////////////////////////
74  std::vector<TH3F*> SCEhistograms = std::vector<TH3F*>(9);
75 
76  //////////////////////////////
77  // DECLARE FHICL PARAMETERS
78  /////////////////////////////
84  std::string fRepresentationType;
85  std::string fInputFilename;
86 
87  ////////////////////////////////
88  // DECLARE SUPPLEMENTAL FUNCTIONS
89  ////////////////////////////////
90  void fixCoords(double* xx, double* yy, double* zz) const;
91  }; // class SpaceChargeICARUS
92 } //namespace spacecharge
93 #endif // SPACECHARGE_SPACECHARGEICARUS_H
bool EnableCalEfieldSCE() 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
void fixCoords(double *xx, double *yy, double *zz) const
bool EnableCorrSCE() const override
geo::Vector_t GetPosOffsets(geo::Point_t const &point) const override
virtual ~SpaceChargeICARUS()=default
geo::Vector_t GetEfieldOffsets(geo::Point_t const &point) const override
SpaceChargeICARUS(fhicl::ParameterSet const &pset)
bool EnableSimEfieldSCE() const override
geo::Vector_t GetCalEfieldOffsets(geo::Point_t const &point, int const &TPCid=1) const override
The data type to uniquely identify a TPC.
Definition: geo_types.h:386
std::vector< TH3F * > SCEhistograms
bool EnableCalSpatialSCE() const override
bool EnableSimSpatialSCE() const override
geo::Vector_t GetCalPosOffsets(geo::Point_t const &point, int const &TPCid) 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
art framework interface to geometry description
bool Configure(fhicl::ParameterSet const &pset)