SpaceChargeProtoDUNEdp.cxx
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 // \file SpaceChargeProtoDUNE-DP.cxx
3 //
4 // \brief implementation of class for storing/accessing space charge distortions for ProtoDUNE-DP
5 //
6 // based on\author mrmooney@colostate.edu
7 // \author jdawson@in2p3.fr
8 // \author zambelli@lapp.in2p3.fr
9 ////////////////////////////////////////////////////////////////////////
10 // C++ language includes
11 #include <iostream>
12 #include <fstream>
13 #include <string>
14 #include <vector>
15 #include "math.h"
16 #include "stdio.h"
17 // LArSoft includes
22 #
23 // Framework includes
24 #include "cetlib_except/exception.h"
25 
27 // ROOT includes
28 #include "TFile.h"
29 #include "TH3.h"
30 #include "TTree.h"
31 #include "TLeaf.h"
32 //-----------------------------------------------
33 bool isWithinHist(geo::Point_t const& point, TH3F* hist);
34 bool isWithinHistOuter(geo::Point_t const& point, TH3F* hist);
35 
36 double ExtrapolateAtEdge(TH3F *hist, double x, double y, double z);
37 bool IsBorder(TAxis *ax, double v);
38 double GetSymmetric(double x, double xc);
39 //-----------------------------------------------
41  fhicl::ParameterSet const& pset
42 )
43 {
45  //Configure(pset);
46 }
47 //------------------------------------------------
49  detinfo::DetectorPropertiesData const& detProp)
50 {
51 
52  fEnableSimSpatialSCE = pset.get<bool>("EnableSimSpatialSCE");
53  fEnableSimEfieldSCE = pset.get<bool>("EnableSimEfieldSCE");
54  fEnableCalSpatialSCE = pset.get<bool>("EnableCalSpatialSCE");
55  fEnableCalEfieldSCE = pset.get<bool>("EnableCalEfieldSCE");
56 
57  fEfield = detProp.Efield();
58  std::cout<<"Efield : "<<fEfield<<std::endl;
59 
61  // auto const* geom = lar::providerFrom<geo::GeometryCore>();
63  if( driftcoordinate==1 || driftcoordinate==2 )
64  {
65  std::cout<<" drift coordinate: "<<driftcoordinate<<std::endl;
66  }else{ throw cet::exception("CRTGen") << "unknown drift coordinate "<< driftcoordinate << " \n"; }
67 
68 
69  /* +1: positive x
70  +2: positive y
71  +3: positive z
72  -1: negative x
73  -2: negative y
74  -3: negative z
75  0: other (or algorithm failed)
76  */
77 
78 
79  if((fEnableSimSpatialSCE == true) || (fEnableSimEfieldSCE == true))
80  {
81 
82  //x,y, z (drift is x)
83 
84  fInputFilename = pset.get<std::string>("InputFilename");
85 
86 
88  cet::search_path sp("FW_SEARCH_PATH");
89  sp.find_file(fInputFilename,fname);
90  std::cout<<"spacecharge dualphase protodune: Find file: "<<fInputFilename<<" "<<fname<<std::endl;
91 
92  std::unique_ptr<TFile> infile(new TFile(fname.c_str(), "READ"));
93  if(!infile->IsOpen()) throw cet::exception("SpaceChargeProtoDUNEdp") << "Could not find the space charge effect file '" << fname << "'!\n";
94  // units are cm and V/cm
95  // if (fRepresentationType == "Voxelized_TH3") {
96  //set up for driftcoordinate=1, driftcoordinate=2 is y-axis drift
97  // drift coordinate uses -> hDeltaLength
98  TH3F* hDx_sim_orig;
99  TH3F* hDy_sim_orig;
100  TH3F* hEndPoint_sim_orig; //was X
101  if (driftcoordinate==1){
102  hDx_sim_orig= (TH3F*)infile->Get("hDeltaLength");
103  hDy_sim_orig = (TH3F*)infile->Get("hEndPointDY");
104  hEndPoint_sim_orig = (TH3F*)infile->Get("hEndPointX");
105  Anodebin = hEndPoint_sim_orig->GetXaxis()->GetXmax();
106 
107  }else if (driftcoordinate==2){
108  hDx_sim_orig= (TH3F*)infile->Get("hEndPointDX");
109  hDy_sim_orig = (TH3F*)infile->Get("hDeltaLength");
110  hEndPoint_sim_orig = (TH3F*)infile->Get("hEndPointY");
111  Anodebin = hEndPoint_sim_orig->GetYaxis()->GetXmax();//?
112  }else{
113  throw cet::exception("SpaceChargeProtoDUNEdp") << "Driftcoordinate "<<driftcoordinate<<" unknown\n";
114  }
115 
116  TH3F* hDz_sim_orig = (TH3F*)infile->Get("hEndPointDZ");
117  TH3F* hEx_sim_orig = (TH3F*)infile->Get("hEx");
118  TH3F* hEy_sim_orig = (TH3F*)infile->Get("hEy");
119  TH3F* hEz_sim_orig = (TH3F*)infile->Get("hEz");
120 
121 
122 
123  TH3F* hEndPointDrift_sim = (TH3F*) hEndPoint_sim_orig->Clone("hEndPointDrift");
124 
125  TH3F* hDx_sim = (TH3F*)hDx_sim_orig->Clone("hDx_sim");
126  TH3F* hDy_sim = (TH3F*)hDy_sim_orig->Clone("hDy_sim");
127  TH3F* hDz_sim = (TH3F*)hDz_sim_orig->Clone("hDz_sim");
128  TH3F* hEx_sim = (TH3F*)hEx_sim_orig->Clone("hEx_sim");
129  TH3F* hEy_sim = (TH3F*)hEy_sim_orig->Clone("hEy_sim");
130  TH3F* hEz_sim = (TH3F*)hEz_sim_orig->Clone("hEz_sim");
131 
132  hEndPointDrift_sim->SetDirectory(0);
133 
134  hDx_sim->SetDirectory(0);
135  hDy_sim->SetDirectory(0);
136  hDz_sim->SetDirectory(0);
137  hEx_sim->SetDirectory(0);
138  hEy_sim->SetDirectory(0);
139  hEz_sim->SetDirectory(0);
140 
141 
142 
143  SCEhistograms = {hDx_sim, hDy_sim, hDz_sim, hEx_sim, hEy_sim, hEz_sim, hEndPointDrift_sim};
144 
145  // } //other representations not included yet..
146 
147  }
148  fEnableCalEfieldSCE = false;
149  fEnableCalSpatialSCE = false;
150 
151  if((fEnableCalSpatialSCE == true) || (fEnableCalEfieldSCE == true))
152  {
153 
154 
155  fCalInputFilename = pset.get<std::string>("CalibrationInputFilename");
156 
158  cet::search_path sp("FW_SEARCH_PATH");
159  sp.find_file(fCalInputFilename,fname);
160  std::cout<<"spacecharge dualphase protodune: Find file: "<<fCalInputFilename<<" "<<fname<<std::endl;
161 
162  std::unique_ptr<TFile> calinfile(new TFile(fname.c_str(), "READ"));
163  if(!calinfile->IsOpen()) throw cet::exception("SpaceChargeProtoDUNEdp") << "Could not find the space charge effect calibration file '" << fname << "'!\n";
164 
165  TH3F* hDx_cal_orig = (TH3F*)calinfile->Get("hoffsetX");
166  TH3F* hDy_cal_orig = (TH3F*)calinfile->Get("hoffsetY");
167  TH3F* hDz_cal_orig = (TH3F*)calinfile->Get("hoffsetZ");
168 
169  TH3F* hEx_cal_orig = (TH3F*)calinfile->Get("hEx");
170  TH3F* hEy_cal_orig = (TH3F*)calinfile->Get("hEy");
171  TH3F* hEz_cal_orig = (TH3F*)calinfile->Get("hEz");
172 
173 
174 
175  TH3F* hDx_cal = (TH3F*)hDx_cal_orig->Clone("hDx_cal");
176  TH3F* hDy_cal = (TH3F*)hDy_cal_orig->Clone("hDy_cal");
177  TH3F* hDz_cal = (TH3F*)hDz_cal_orig->Clone("hDz_cal");
178  TH3F* hEx_cal = (TH3F*)hEx_cal_orig->Clone("hEx_cal");
179  TH3F* hEy_cal = (TH3F*)hEy_cal_orig->Clone("hEy_cal");
180  TH3F* hEz_cal = (TH3F*)hEz_cal_orig->Clone("hEz_cal");
181 
182  hDx_cal->SetDirectory(0);
183  hDy_cal->SetDirectory(0);
184  hDz_cal->SetDirectory(0);
185  hEx_cal->SetDirectory(0);
186  hEy_cal->SetDirectory(0);
187  hEz_cal->SetDirectory(0);
188 
189 
190 
191  CalSCEhistograms = {hDx_cal, hDy_cal, hDz_cal, hEx_cal, hEy_cal, hEz_cal};
192 
193 
194 
195 
196 
197  }
198 
199 
200  return true;
201 }
202 //------------------------------------------------
204 {
205  if (ts == 0) return false;
206  return true;
207 }
208 //----------------------------------------------------------------------------
209 /// Return boolean indicating whether or not to turn simulation of SCE on for
210 /// spatial distortions
212 {
213  return fEnableSimSpatialSCE;
214 }
215 //----------------------------------------------------------------------------
216 /// Return boolean indicating whether or not to turn simulation of SCE on for
217 /// E field distortions
219 {
220  return fEnableSimEfieldSCE;
221 }
222 //----------------------------------------------------------------------------
223 /// Return boolean indicating whether or not to apply SCE corrections
224 //bool spacecharge::SpaceChargeProtoDUNE::EnableCorrSCE() const
225 //{
226 // return fEnableCorrSCE;
227 //}
228 
229 /// Return boolean indicating whether or not to apply SCE corrections
231 {
232  return fEnableCalSpatialSCE;
233 }
234 
235 /// Return boolean indicating whether or not to apply SCE corrections
237 {
238  return fEnableCalEfieldSCE;
239 }
240 //----------------------------------------------------------------------------
241 /// Primary working method of service that provides position offsets to be
242 /// used in ionization electron drift
244 {
245  //x [-300,300], y [-300,300], z[0,600]
246  std::vector<double> thePosOffsets;
247  geo::Point_t point = {tmp_point.X(), tmp_point.Y(), tmp_point.Z()};
248 
249 
250  // if (fRepresentationType=="Voxelized_TH3"){
251 
252  thePosOffsets = GetOffsetsVoxel(point, SCEhistograms.at(0), SCEhistograms.at(1), SCEhistograms.at(2));
253  //drift offset = bended trajectory - straight, LArVoxelReadout requires (straight-bended), so flip
254 
255 
256  //} else thePosOffsets.resize(3,0.0);
257 
258  //CHECK EndPointX (does this point get to the anode?), if not make offsets so large point goes outside volume...
259  // std::cout<<"pos: "<< tmp_point.X()<<" "<< tmp_point.Y()<<std::endl;
260 
261  if(isWithinHist(point, SCEhistograms.at(6)))
262  {
263  // std::cout<<"within..?"<<SCEhistograms.at(6)->Interpolate(point.X(), point.Y(), point.Z())<<" "<<SCEhistograms.at(6)->GetXaxis()->GetXmax()<<std::endl;
264  if (SCEhistograms.at(6)->Interpolate(point.X(), point.Y(), point.Z()) >= Anodebin )
265  {
266 
267  // std::cout<<"hits anode: "<< tmp_point.X()<<" "<< tmp_point.Y()<<" "<< tmp_point.Z()<<" "<<thePosOffsets[0]<<" "<< thePosOffsets[1]<<" "<< thePosOffsets[2]<<std::endl;
268  if(driftcoordinate==1){
269  return {-thePosOffsets[0], thePosOffsets[1], thePosOffsets[2] };
270  }else if (driftcoordinate==2)
271  { //is Voxel ready for y-shift?
272  return {thePosOffsets[0], -thePosOffsets[1], thePosOffsets[2] };
273  }else{
274  throw cet::exception("SpaceChargeProtoDUNEdp") << "Driftcoordinate "<<driftcoordinate<<" unknown\n";
275  }
276  }
277  }
278 
279  return {9999999,9999999,9999999 };
280 
281  }
282 
283 //----------------------------------------------------------------------------
284 /// Primary working method of service that provides position offsets to be
285 /// used in calibration of space charge
287 {
288 
289  std::vector<double> thePosOffsets;
290  geo::Point_t point = tmp_point;
291 
292 
293  // if (fRepresentationType == "Voxelized_TH3"){
294 
295  thePosOffsets = GetOffsetsVoxel(point, CalSCEhistograms.at(0), CalSCEhistograms.at(1), CalSCEhistograms.at(2));
296 
297  // } else thePosOffsets.resize(3,0.0);
298 
299  return { thePosOffsets[0], thePosOffsets[1], thePosOffsets[2] };
300 }
301 //Laura Zambelli's code from 3x1x1 sim
302 bool IsBorder(TAxis *ax, double v) {
303 
304  /*
305  In the external half of the first/last bin or outside the range
306  */
307  if( ax->GetNbins()==1) return true;
308  if( v<= ax->GetBinCenter(1) ) return true;
309  //a->GetNbins() or GetNbins()-1..?
310  if( v>= ax->GetBinCenter(ax->GetNbins()) ) return true;
311 
312  return false;
313  }
314 double GetSymmetric(double x, double xc){
315  return xc + (xc-x);
316  }
317 
318 double ExtrapolateAtEdge(TH3F *hist, double x, double y, double z){
319  /*
320  Want to get the value at x, close to the wall
321  |----+----+--+--+---->
322  x c a b
323  c is the center of the voxel (interpolation limit)
324  b is the symetric of x wrt to c
325  a is between c and b
326  ->make linear interpolation from B, A to X
327 
328  */
329 
330  int binx = hist->GetXaxis()->FindBin(x);
331  int biny = hist->GetYaxis()->FindBin(y);
332  int binz = hist->GetZaxis()->FindBin(z);
333 
334 
335  //get coordinate of the center of the voxel
336  double xcenter = IsBorder(hist->GetXaxis(),x) ? hist->GetXaxis()->GetBinCenter(binx) : x;
337  double ycenter = IsBorder(hist->GetYaxis(),y) ? hist->GetYaxis()->GetBinCenter(biny) : y;
338  double zcenter = IsBorder(hist->GetZaxis(),z) ? hist->GetZaxis()->GetBinCenter(binz) : z;
339 
340  int Nx = hist->GetXaxis()->GetNbins();
341  int Ny = hist->GetYaxis()->GetNbins();
342  int Nz = hist->GetZaxis()->GetNbins();
343 
344  /* if (Nz==1){ // when the GAr map is used (only one Z bin at the moment)
345  return InterpolateAtEdge(x,y,z);// LZ
346  }*/
347 
348  //special case when the starting point is at the center of the voxel
349  if(x==xcenter && IsBorder(hist->GetXaxis(),x)){
350  int binx2 = (binx==Nx) ? binx-1 : 2;
351  xcenter = 0.5*(hist->GetXaxis()->GetBinCenter(binx2)+x);
352  }
353  if(y==ycenter&& IsBorder(hist->GetYaxis(),y)){
354  int biny2 = (biny==Ny) ? biny-1 : 2;
355  ycenter = 0.5*(hist->GetYaxis()->GetBinCenter(biny2)+y);
356  }
357  if(z==zcenter&& IsBorder(hist->GetZaxis(), z)){
358  int binz2 = (binz==Nz) ? binz-1 : 2;
359  zcenter = 0.5*(hist->GetZaxis()->GetBinCenter(binz2)+z);
360  }
361 
362 
363  //Get the symmetric of edgy point wrt to center
364  double xb = IsBorder(hist->GetXaxis(),x) ? GetSymmetric(x,xcenter) : x;
365  double yb = IsBorder(hist->GetYaxis(),y) ? GetSymmetric(y,ycenter) : y;
366  double zb = IsBorder(hist->GetZaxis(),z) ? GetSymmetric(z,zcenter) : z;
367 
368  //Get middle point of [symmetric, center]
369  double xa = IsBorder(hist->GetXaxis(),x) ? 0.5*(xcenter+xb) : x;
370  double ya = IsBorder(hist->GetYaxis(),y) ? 0.5*(ycenter+yb) : y;
371  double za = IsBorder(hist->GetZaxis(),z) ? 0.5*(zcenter+zb) : z;
372 
373  double valb = hist->Interpolate(xb, yb, zb); //symmetric point value
374  double vala = hist->Interpolate(xa, ya, za);
375  double val = 0.;
376 
377  double Nedges = 0.;
378  if(IsBorder(hist->GetXaxis(),x)) Nedges = Nedges+1.;
379  if(IsBorder(hist->GetYaxis(),y)) Nedges = Nedges+1.;
380  if(IsBorder(hist->GetZaxis(),z)) Nedges = Nedges+1.;
381 
382 
383 
384  double delta = vala - valb;//
385 
386  double dx = IsBorder(hist->GetXaxis(),x) ? xa-xb : 1;
387  double dy = IsBorder(hist->GetYaxis(),y) ? ya-yb : 1;
388  double dz = IsBorder(hist->GetZaxis(),z) ? za-zb : 1;
389 
390  val = x*delta/dx + (xa*valb - xb*vala)/dx
391  + y*delta/dy + (ya*valb - yb*vala)/dy
392  + z*delta/dz + (za*valb - zb*vala)/dz;
393 
394 
395  val = val/Nedges;
396  return val;
397 
398  }
399 //----------------------------------------------------------------------------
400 bool isWithinHistOuter(geo::Point_t const& point, TH3F* hist)
401 {
402  if(point.X()> hist->GetXaxis()->GetBinLowEdge(0) &&
403  point.X()< hist->GetXaxis()->GetBinLowEdge(hist->GetXaxis()->GetNbins()+1) &&
404  point.Y()> hist->GetYaxis()->GetBinLowEdge(0) &&
405  point.Y()< hist->GetYaxis()->GetBinLowEdge(hist->GetYaxis()->GetNbins()+1) &&
406  point.Z()> hist->GetZaxis()->GetBinLowEdge(0) &&
407  point.Z()< hist->GetZaxis()->GetBinLowEdge(hist->GetZaxis()->GetNbins()+1) ){
408 
409  return true;}
410  return false;
411 
412 }
413 
414 bool isWithinHist(geo::Point_t const& point, TH3F* hist)
415 {
416  if(point.X()> hist->GetXaxis()->GetBinCenter(1) &&
417  point.X()< hist->GetXaxis()->GetBinCenter(hist->GetXaxis()->GetNbins()) &&
418  point.Y()> hist->GetYaxis()->GetBinCenter(1) &&
419  point.Y()< hist->GetYaxis()->GetBinCenter(hist->GetYaxis()->GetNbins()) &&
420  point.Z()> hist->GetZaxis()->GetBinCenter(1) &&
421  point.Z()< hist->GetZaxis()->GetBinCenter(hist->GetZaxis()->GetNbins()) ){
422 
423  return true;}
424  return false;
425 
426 }
427 /// Provides position offsets using voxelized interpolation
429  (geo::Point_t const& point, TH3F* hX, TH3F* hY, TH3F* hZ) const
430 {
431 
432  if (isWithinHist(point, hX) && isWithinHist(point, hY) && isWithinHist(point, hZ)) {
433 
434  //need to check, X Y and Z on all three histograms..
435 
436  return {
437  hX->Interpolate(point.X(),point.Y(),point.Z()),
438  hY->Interpolate(point.X(),point.Y(),point.Z()),
439  hZ->Interpolate(point.X(),point.Y(),point.Z())
440  };
441  }
442  if (isWithinHistOuter(point, hX) && isWithinHistOuter(point, hY) && isWithinHistOuter(point, hZ)) {
443  //use Laura's extrapolation method
444  // std::cout<<"extrap: ";
445 
446  return {ExtrapolateAtEdge(hX, point.X(),point.Y(),point.Z()),
447  ExtrapolateAtEdge(hY,point.X(),point.Y(),point.Z()),
448  ExtrapolateAtEdge(hZ,point.X(),point.Y(),point.Z())};
449  }
450  // std::cout<<"outside: ";
451  return {0.0,0.0,0.0}; //no offset and no efield!
452 
453 
454 
455 }
456 
457 
458 //----------------------------------------------------------------------------
459 
460 /// Primary working method of service that provides E field offsets to be
461 /// used in charge/light yield calculation (e.g.)
463 {
464 
465  std::vector<double> theEfieldOffsets;
466  geo::Point_t point = {tmp_point.X(), tmp_point.Y(), tmp_point.Z()};
467 
468 
469 
470  theEfieldOffsets = GetOffsetsVoxel(point, SCEhistograms.at(3), SCEhistograms.at(4), SCEhistograms.at(5));
471  //THESE are the absoluted values of the Efield
472  //ISCalculation expects difference from expected field
473  /*
474  geo::Point_t midPoint
475  { ( step->GetPreStepPoint()->GetPosition() + step->GetPostStepPoint()->Ge\
476 tPosition() ) * 0.5/CLHEP::cm };
477  auto EfieldDelta = fEfield * SCE->GetEfieldOffsets(midPoint);
478  geo::Vector_t EfieldVec
479  = { fEfield + EfieldDelta.X(), EfieldDelta.Y(), EfieldDelta.Z() };
480  std::cout<<"ISCalculation : "<<EfieldVec.R()<<std::endl; return EfieldVe\
481 c.R();
482  */
483  // fEfield = detprop->Efield(); kV/cm..
484  // Efield in larsoft is in kV/cm
485  //std::cout<<"SpaceCharge efield: "<<pow( pow(theEfieldOffsets[0],2) + pow(theEfieldOffsets[1],2) +pow(theEfieldOffsets[2],2) ,0.5)/1000.0<<std::endl;
486 
487 
488  //These maps are in: V/cm
489  theEfieldOffsets[0]= theEfieldOffsets[0]/(-1000.0);
490  theEfieldOffsets[1]= theEfieldOffsets[1]/(-1000.0);
491  theEfieldOffsets[2]= theEfieldOffsets[2]/(-1000.0);
492 
493  if(driftcoordinate==1){
494  theEfieldOffsets[0]=theEfieldOffsets[0]-fEfield;
495 
496  }else if(driftcoordinate==2){
497  theEfieldOffsets[1]=theEfieldOffsets[1]-fEfield;
498  }else{
499  std::cout<<" Problem with drift field coordiate system for Efield calculation "<<std::endl;
500  }
501  theEfieldOffsets[0]= theEfieldOffsets[0]/(fEfield);
502  theEfieldOffsets[1]= theEfieldOffsets[1]/(fEfield);
503  theEfieldOffsets[2]= theEfieldOffsets[2]/(fEfield);
504 
505 
506 
507  // std::cout<<theEfieldOffsets[0]<<" "<<theEfieldOffsets[1]<<" "<<
508  //theEfieldOffsets[2]<<std::endl;
509 
510 
511  // } else theEfieldOffsets.resize(3,0.0);
512 
513  return { theEfieldOffsets[0], theEfieldOffsets[1], theEfieldOffsets[2] };
514  // }
515 
516 
517 }
518 //----------------------------------------------------------------------------
519 /// Primary working method of service that provides E field offsets to be
520 /// used in charge/light yield calculation (e.g.) for calibration
522 { //not implemented yet..
523  std::vector<double> theEfieldOffsets;
524  geo::Point_t point = tmp_point;
525 
526 
527  // Efieldoffset or ratio of Efield?
528 
529  //if (fRepresentationType == "Voxelized_TH3"){
530 
531  theEfieldOffsets = GetOffsetsVoxel(point, CalSCEhistograms.at(3), CalSCEhistograms.at(4), CalSCEhistograms.at(5));
532  // }else
533  //theEfieldOffsets.resize(3,0.0);
534 
535  return { -theEfieldOffsets[0], -theEfieldOffsets[1], -theEfieldOffsets[2] };
536 }
537 
538 //----------------------------------------------------------------------------
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
art framework interface to geometry description
double Efield(unsigned int planegap=0) const
kV/cm
double GetSymmetric(double x, double xc)
std::vector< double > GetOffsetsVoxel(geo::Point_t const &point, TH3F *hX, TH3F *hY, TH3F *hZ) const
Provides position offsets using voxelized interpolation.
bool isWithinHistOuter(geo::Point_t const &point, TH3F *hist)
string infile
T get(std::string const &key) const
Definition: ParameterSet.h:271
geo::Vector_t GetPosOffsets(geo::Point_t const &point) const override
double ExtrapolateAtEdge(TH3F *hist, double x, double y, double z)
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
bool isWithinHist(geo::Point_t const &point, TH3F *hist)
short int DetectDriftDirection() const
Returns the expected drift direction based on geometry.
Definition: TPCGeo.cxx:157
std::string find_file(std::string const &filename) const
Definition: search_path.cc:96
list x
Definition: train.py:276
geo::Vector_t GetEfieldOffsets(geo::Point_t const &point) const override
TPCGeo const & TPC(unsigned int const tpc=0, unsigned int const cstat=0) const
Returns the specified TPC.
cet::coded_exception< error, detail::translate > exception
Definition: exception.h:33
QTextStream & endl(QTextStream &s)
bool IsBorder(TAxis *ax, double v)
bool EnableCalSpatialSCE() const override
Return boolean indicating whether or not to apply SCE corrections.