LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
util::GeometryUtilities Class Reference

#include "GeometryUtilities.h"

Public Member Functions

 GeometryUtilities ()
 Default constructor = private for singleton. More...
 
 ~GeometryUtilities ()
 Default destructor. More...
 
void Reconfigure ()
 
Int_t Get3DaxisN (Int_t iplane0, Int_t iplane1, Double_t omega0, Double_t omega1, Double_t &phi, Double_t &theta) const
 
Double_t CalculatePitch (UInt_t iplane0, Double_t phi, Double_t theta) const
 
Double_t CalculatePitchPolar (UInt_t iplane0, Double_t phi, Double_t theta) const
 
Double_t Get3DSpecialCaseTheta (Int_t iplane0, Int_t iplane1, Double_t dw0, Double_t dw1) const
 
Double_t Get2Dangle (Double_t deltawire, Double_t deltatime) const
 
Double_t Get2Dangle (Double_t wireend, Double_t wirestart, Double_t timeend, Double_t timestart) const
 
double Get2Dangle (const util::PxPoint *endpoint, const util::PxPoint *startpoint) const
 
double Get2DangleFrom3D (unsigned int plane, double phi, double theta) const
 
double Get2DangleFrom3D (unsigned int plane, TVector3 dir_vector) const
 
Double_t Get2Dslope (Double_t deltawire, Double_t deltatime) const
 
Double_t Get2Dslope (Double_t wireend, Double_t wirestart, Double_t timeend, Double_t timestart) const
 
double Get2Dslope (const util::PxPoint *endpoint, const util::PxPoint *startpoint) const
 
Double_t Get2DDistance (Double_t wire1, Double_t time1, Double_t wire2, Double_t time2) const
 
double Get2DDistance (const util::PxPoint *point1, const util::PxPoint *point2) const
 
Double_t Get2DPitchDistance (Double_t angle, Double_t inwire, Double_t wire) const
 
Double_t Get2DPitchDistanceWSlope (Double_t slope, Double_t inwire, Double_t wire) const
 
Int_t GetPointOnLine (Double_t slope, Double_t intercept, Double_t wire1, Double_t time1, Double_t &wireout, Double_t &timeout) const
 
Int_t GetPointOnLine (Double_t slope, Double_t wirestart, Double_t timestart, Double_t wire1, Double_t time1, Double_t &wireout, Double_t &timeout) const
 
int GetPointOnLine (Double_t slope, const util::PxPoint *startpoint, const util::PxPoint *point1, util::PxPoint &pointout) const
 
int GetPointOnLine (double slope, double intercept, const util::PxPoint *point1, util::PxPoint &pointout) const
 
Int_t GetPointOnLineWSlopes (Double_t slope, Double_t intercept, Double_t ort_intercept, Double_t &wireout, Double_t &timeout) const
 
Int_t GetPointOnLineWSlopes (double slope, double intercept, double ort_intercept, util::PxPoint &pointonline) const
 
PxPoint Get2DPointProjection (Double_t *xyz, Int_t plane) const
 
PxPoint Get2DPointProjectionCM (std::vector< double > xyz, int plane) const
 
PxPoint Get2DPointProjectionCM (double *xyz, int plane) const
 
PxPoint Get2DPointProjectionCM (TLorentzVector *xyz, int plane) const
 
Double_t GetTimeTicks (Double_t x, Int_t plane) const
 
Int_t GetProjectedPoint (const PxPoint *p0, const PxPoint *p1, PxPoint &pN) const
 
util::PxHit FindClosestHit (std::vector< util::PxHit > hitlist, unsigned int wirein, double timein) const
 
unsigned int FindClosestHitIndex (std::vector< util::PxHit > hitlist, unsigned int wirein, double timein) const
 
Int_t GetYZ (const PxPoint *p0, const PxPoint *p1, Double_t *yz) const
 
Int_t GetXYZ (const PxPoint *p0, const PxPoint *p1, Double_t *xyz) const
 
Double_t PitchInView (UInt_t plane, Double_t phi, Double_t theta) const
 
void GetDirectionCosines (Double_t phi, Double_t theta, Double_t *dirs) const
 
void SelectLocalHitlist (const std::vector< util::PxHit > &hitlist, std::vector< const util::PxHit * > &hitlistlocal, util::PxPoint &startHit, Double_t &linearlimit, Double_t &ortlimit, Double_t &lineslopetest)
 
void SelectLocalHitlist (const std::vector< util::PxHit > &hitlist, std::vector< const util::PxHit * > &hitlistlocal, util::PxPoint &startHit, Double_t &linearlimit, Double_t &ortlimit, Double_t &lineslopetest, util::PxHit &averageHit)
 
void SelectLocalHitlistIndex (const std::vector< util::PxHit > &hitlist, std::vector< unsigned int > &hitlistlocal_index, util::PxPoint &startHit, Double_t &linearlimit, Double_t &ortlimit, Double_t &lineslopetest)
 
void SelectPolygonHitList (const std::vector< util::PxHit > &hitlist, std::vector< const util::PxHit * > &hitlistlocal)
 
std::vector< size_t > PolyOverlap (std::vector< const util::PxHit * > ordered_hits, std::vector< size_t > candidate_polygon)
 
bool Clockwise (double Ax, double Ay, double Bx, double By, double Cx, double Cy)
 
Double_t TimeToCm () const
 
Double_t WireToCm () const
 
Double_t WireTimeToCmCm () const
 
UInt_t Nplanes () const
 

Static Public Member Functions

static const GeometryUtilitiesGetME ()
 

Private Attributes

const geo::GeometryCoregeom
 
const detinfo::DetectorPropertiesdetp
 
std::vector< Double_t > vertangle
 
Double_t fWirePitch
 
Double_t fTimeTick
 
Double_t fDriftVelocity
 
UInt_t fNPlanes
 
Double_t fWiretoCm
 
Double_t fTimetoCm
 
Double_t fWireTimetoCmCm
 

Static Private Attributes

static GeometryUtilities_me = 0
 

Detailed Description

Definition at line 38 of file GeometryUtilities.h.

Constructor & Destructor Documentation

util::GeometryUtilities::GeometryUtilities ( )

Default constructor = private for singleton.

Definition at line 35 of file GeometryUtilities.cxx.

References detp, geom, and Reconfigure().

Referenced by GetME().

36  {
37  //_name = "GeometryUtilities";
38  geom = lar::providerFrom<geo::Geometry>();
39  detp = lar::providerFrom<detinfo::DetectorPropertiesService>();
40 
41  Reconfigure();
42  }
const detinfo::DetectorProperties * detp
const geo::GeometryCore * geom
util::GeometryUtilities::~GeometryUtilities ( )

Default destructor.

Definition at line 68 of file GeometryUtilities.cxx.

Referenced by GetME().

69  {
70 
71  }

Member Function Documentation

Double_t util::GeometryUtilities::CalculatePitch ( UInt_t  iplane0,
Double_t  phi,
Double_t  theta 
) const

Definition at line 316 of file GeometryUtilities.cxx.

References geom, geo::k3D, geo::kUnknown, geo::GeometryCore::Nplanes(), util::pi(), geo::GeometryCore::Plane(), geo::PlaneGeo::View(), geo::GeometryCore::WireAngleToVertical(), and geo::GeometryCore::WirePitch().

319  {
320 
321  Double_t pitch = -1.;
322 
323  if(geom->Plane(iplane).View() == geo::kUnknown ||
324  geom->Plane(iplane).View() == geo::k3D){
325  mf::LogError(
326  Form("Warning : no Pitch foreseen for view %d", geom->Plane(iplane).View()));
327  return pitch;
328  }
329  else{
330 
331  Double_t pi=TMath::Pi();
332 
333  Double_t fTheta=pi/2-theta;
334 
335  Double_t fPhi=-(phi+pi/2);
336  //Double_t fPhi=pi/2-phi;
337  //if(fPhi<0)
338  // fPhi=phi-pi/2;
339 
340  //fTheta=TMath::Pi()/2;
341 
342 
343 
344  for(UInt_t i = 0; i < geom->Nplanes(); ++i) {
345  if(i == iplane){
346  Double_t wirePitch = geom->WirePitch(i);
347  Double_t angleToVert =0.5*TMath::Pi() - geom->WireAngleToVertical(geom->Plane(i).View());
348 
349  // // //std::cout <<" %%%%%%%%%% " << i << " angle "
350  // << angleToVert*180/pi << " "
351  // << geom->Plane(i).Wire(0).ThetaZ(false)*180/pi
352  // <<" wirePitch " << wirePitch
353  // <<"\n %%%%%%%%%% " << fTheta << " " << fPhi<< std::endl;
354  //
355 
356  Double_t cosgamma = TMath::Abs(TMath::Sin(angleToVert)*TMath::Cos(fTheta)
357  +TMath::Cos(angleToVert)*TMath::Sin(fTheta)*TMath::Sin(fPhi));
358 
359  if (cosgamma>0) pitch = wirePitch/cosgamma;
360  } // end if the correct view
361  } // end loop over planes
362  } // end if a reasonable view
363 
364  return pitch;
365  }
PlaneGeo const & Plane(unsigned int const p, unsigned int const tpc=0, unsigned int const cstat=0) const
Returns the specified wire.
Unknown view.
Definition: geo_types.h:83
MaybeLogger_< ELseverityLevel::ELsev_error, false > LogError
geo::Length_t WirePitch(geo::PlaneID const &planeid) const
Returns the distance between two consecutive wires.
3-dimensional objects, potentially hits, clusters, prongs, etc.
Definition: geo_types.h:82
View_t View() const
Which coordinate does this plane measure.
Definition: PlaneGeo.h:171
unsigned int Nplanes(unsigned int tpc=0, unsigned int cstat=0) const
Returns the total number of wire planes in the specified TPC.
const geo::GeometryCore * geom
constexpr T pi()
Returns the constant pi (up to 35 decimal digits of precision)
double WireAngleToVertical(geo::View_t view, geo::TPCID const &tpcid) const
Returns the angle of the wires in the specified view from vertical.
Double_t util::GeometryUtilities::CalculatePitchPolar ( UInt_t  iplane0,
Double_t  phi,
Double_t  theta 
) const

Definition at line 373 of file GeometryUtilities.cxx.

References geom, geo::k3D, geo::kUnknown, geo::GeometryCore::Nplanes(), geo::GeometryCore::Plane(), geo::PlaneGeo::View(), geo::GeometryCore::WireAngleToVertical(), and geo::GeometryCore::WirePitch().

376  {
377 
378  Double_t pitch = -1.;
379 
380  if(geom->Plane(iplane).View() == geo::kUnknown ||
381  geom->Plane(iplane).View() == geo::k3D){
382  mf::LogError(
383  Form("Warning : no Pitch foreseen for view %d", geom->Plane(iplane).View()));
384  return pitch;
385  }
386  else{
387 
388  Double_t fTheta=theta;
389  Double_t fPhi=phi;
390 
391 
392  //fTheta=TMath::Pi()/2;
393 
394 
395 
396  for(UInt_t i = 0; i < geom->Nplanes(); ++i){
397  if(i == iplane){
398  Double_t wirePitch = geom->WirePitch(i);
399  Double_t angleToVert =0.5*TMath::Pi() - geom->WireAngleToVertical(geom->Plane(i).View());
400 
401  // //std::cout <<" %%%%%%%%%% " << i << " angle "
402  // << angleToVert*180/pi << " "
403  // << geom->Plane(i).Wire(0).ThetaZ(false)*180/pi
404  // <<" wirePitch " << wirePitch
405  // <<"\n %%%%%%%%%% " << fTheta << " " << fPhi<< std::endl;
406 
407 
408  Double_t cosgamma = TMath::Abs(TMath::Sin(angleToVert)*TMath::Cos(fTheta)
409  +TMath::Cos(angleToVert)*TMath::Sin(fTheta)*TMath::Sin(fPhi));
410 
411  if (cosgamma>0) pitch = wirePitch/cosgamma;
412  } // end if the correct view
413  } // end loop over planes
414  } // end if a reasonable view
415 
416  return pitch;
417  }
PlaneGeo const & Plane(unsigned int const p, unsigned int const tpc=0, unsigned int const cstat=0) const
Returns the specified wire.
Unknown view.
Definition: geo_types.h:83
MaybeLogger_< ELseverityLevel::ELsev_error, false > LogError
geo::Length_t WirePitch(geo::PlaneID const &planeid) const
Returns the distance between two consecutive wires.
3-dimensional objects, potentially hits, clusters, prongs, etc.
Definition: geo_types.h:82
View_t View() const
Which coordinate does this plane measure.
Definition: PlaneGeo.h:171
unsigned int Nplanes(unsigned int tpc=0, unsigned int cstat=0) const
Returns the total number of wire planes in the specified TPC.
const geo::GeometryCore * geom
double WireAngleToVertical(geo::View_t view, geo::TPCID const &tpcid) const
Returns the angle of the wires in the specified view from vertical.
bool util::GeometryUtilities::Clockwise ( double  Ax,
double  Ay,
double  Bx,
double  By,
double  Cx,
double  Cy 
)

Definition at line 1359 of file GeometryUtilities.cxx.

Referenced by PolyOverlap().

1359  {
1360  return (Cy-Ay)*(Bx-Ax) > (By-Ay)*(Cx-Ax);
1361  }
util::PxHit util::GeometryUtilities::FindClosestHit ( std::vector< util::PxHit hitlist,
unsigned int  wirein,
double  timein 
) const

Definition at line 1401 of file GeometryUtilities.cxx.

References FindClosestHitIndex().

1404  {
1405 
1406  return hitlist[FindClosestHitIndex(hitlist, wirein,timein)];
1407 
1408  }
unsigned int FindClosestHitIndex(std::vector< util::PxHit > hitlist, unsigned int wirein, double timein) const
unsigned int util::GeometryUtilities::FindClosestHitIndex ( std::vector< util::PxHit hitlist,
unsigned int  wirein,
double  timein 
) const

Definition at line 1412 of file GeometryUtilities.cxx.

References Get2DDistance(), util::PxPoint::t, and util::PxPoint::w.

Referenced by evd::HitSelector::ChangeHit(), FindClosestHit(), and evd::HitSelector::SaveHits().

1415  {
1416  double min_length_from_start=99999;
1417  util::PxHit nearHit;
1418 
1419  unsigned int wire;
1420  double time;
1421  unsigned int ret_ind=0;
1422 
1423  for(unsigned int ii=0; ii<hitlist.size();ii++){
1424 
1425  util::PxHit * theHit = &(hitlist[ii]);
1426  time = theHit->t ;
1427  wire=theHit->w;
1428  // plane=theHit->WireID().Plane;
1429 
1430  double dist_mod=Get2DDistance(wirein,timein,wire,time);
1431  if(dist_mod<min_length_from_start){
1432  //wire_start[plane]=wire;
1433  //time_start[plane]=time;
1434  nearHit=(hitlist[ii]);
1435  min_length_from_start=dist_mod;
1436  ret_ind=ii;
1437  }
1438  }
1439 
1440 
1441  return ret_ind;
1442  }
Double_t Get2DDistance(Double_t wire1, Double_t time1, Double_t wire2, Double_t time2) const
double t
Definition: PxUtils.h:11
double w
Definition: PxUtils.h:10
Double_t util::GeometryUtilities::Get2Dangle ( Double_t  deltawire,
Double_t  deltatime 
) const

Definition at line 492 of file GeometryUtilities.cxx.

Referenced by Get2Dangle(), Get2DangleFrom3D(), Get2Dslope(), cluster::ClusterParamsAlg::GetFinalSlope(), and evd::TWQProjectionView::SaveSelection().

494  {
495 
496 
497  Double_t BC,AC;
498  Double_t omega;
499 
500  BC = ((Double_t)dwire); // in cm
501  AC = ((Double_t)dtime); //in cm
502  omega = std::asin( AC/std::sqrt(pow(AC,2)+pow(BC,2)) );
503  if(BC<0) // for the time being. Will check if it works for AC<0
504  {
505  if(AC>0){
506  omega= TMath::Pi()-std::abs(omega); //
507  }
508  else if(AC<0){
509  omega=-TMath::Pi()+std::abs(omega);
510  }
511  else {
512  omega=TMath::Pi();
513  }
514  }
515  //return omega;
516  return omega; //*fWirePitch/(fTimeTick*fDriftVelocity);
517 
518  }
Double_t util::GeometryUtilities::Get2Dangle ( Double_t  wireend,
Double_t  wirestart,
Double_t  timeend,
Double_t  timestart 
) const

Definition at line 467 of file GeometryUtilities.cxx.

References fTimetoCm, fWiretoCm, and Get2Dangle().

471  {
472 
473  return Get2Dangle((wireend-wirestart)*fWiretoCm,(timeend-timestart)*fTimetoCm);
474 
475  }
Double_t Get2Dangle(Double_t deltawire, Double_t deltatime) const
Double_t util::GeometryUtilities::Get2Dangle ( const util::PxPoint endpoint,
const util::PxPoint startpoint 
) const

Definition at line 481 of file GeometryUtilities.cxx.

References Get2Dangle(), util::PxPoint::t, and util::PxPoint::w.

483  {
484  return Get2Dangle(endpoint->w - startpoint->w, endpoint->t - startpoint->t);
485 
486  }
Double_t Get2Dangle(Double_t deltawire, Double_t deltatime) const
double t
Definition: PxUtils.h:11
double w
Definition: PxUtils.h:10
double util::GeometryUtilities::Get2DangleFrom3D ( unsigned int  plane,
double  phi,
double  theta 
) const

Definition at line 523 of file GeometryUtilities.cxx.

524  {
525  TVector3 dummyvector(cos(theta*TMath::Pi()/180.)*sin(phi*TMath::Pi()/180.) ,sin(theta*TMath::Pi()/180.) , cos(theta*TMath::Pi()/180.)*cos(phi*TMath::Pi()/180.));
526 
527  return Get2DangleFrom3D(plane,dummyvector);
528 
529  }
double Get2DangleFrom3D(unsigned int plane, double phi, double theta) const
double util::GeometryUtilities::Get2DangleFrom3D ( unsigned int  plane,
TVector3  dir_vector 
) const

Definition at line 535 of file GeometryUtilities.cxx.

References geo::GeometryCore::DetHalfHeight(), geo::GeometryCore::DetHalfWidth(), geo::GeometryCore::DetLength(), evd::details::end(), geom, Get2Dangle(), geo::GeometryCore::Plane(), geo::PlaneGeo::View(), and geo::GeometryCore::WireAngleToVertical().

536  {
537  double alpha= 0.5*TMath::Pi()-geom->WireAngleToVertical(geom->Plane(plane).View());
538  // create dummy xyz point in middle of detector and another one in unit length.
539  // calculate correspoding points in wire-time space and use the differnces between those to return 2D a
540  // angle
541 
542 
543  TVector3 start(geom->DetHalfWidth(),0.,geom->DetLength()/2.);
544  TVector3 end=start+dir_vector;
545 
546 
547  //the wire coordinate is already in cm. The time needs to be converted.
548  util::PxPoint startp(plane,(geom->DetHalfHeight()*sin(fabs(alpha))+start[2]*cos(alpha)-start[1]*sin(alpha)),start[0]);
549 
550  util::PxPoint endp(plane,(geom->DetHalfHeight()*sin(fabs(alpha))+end[2]*cos(alpha)-end[1]*sin(alpha)),end[0]);
551 
552  double angle=Get2Dangle(&endp,&startp);
553 
554 
555  return angle;
556 
557  }
PlaneGeo const & Plane(unsigned int const p, unsigned int const tpc=0, unsigned int const cstat=0) const
Returns the specified wire.
geo::Length_t DetHalfWidth(geo::TPCID const &tpcid) const
Returns the half width of the active volume of the specified TPC.
Double_t Get2Dangle(Double_t deltawire, Double_t deltatime) const
View_t View() const
Which coordinate does this plane measure.
Definition: PlaneGeo.h:171
geo::Length_t DetHalfHeight(geo::TPCID const &tpcid) const
Returns the half height of the active volume of the specified TPC.
geo::Length_t DetLength(geo::TPCID const &tpcid) const
Returns the length of the active volume of the specified TPC.
const geo::GeometryCore * geom
std::vector< evd::details::RawDigitInfo_t >::const_iterator end(RawDigitCacheDataClass const &cache)
double WireAngleToVertical(geo::View_t view, geo::TPCID const &tpcid) const
Returns the angle of the wires in the specified view from vertical.
Double_t util::GeometryUtilities::Get2DDistance ( Double_t  wire1,
Double_t  time1,
Double_t  wire2,
Double_t  time2 
) const
double util::GeometryUtilities::Get2DDistance ( const util::PxPoint point1,
const util::PxPoint point2 
) const

Definition at line 578 of file GeometryUtilities.cxx.

References util::PxPoint::t, and util::PxPoint::w.

580  {
581  return TMath::Sqrt(sum_sqr(point1->w - point2->w, point1->t - point2->t));
582  }
double t
Definition: PxUtils.h:11
double w
Definition: PxUtils.h:10
Double_t util::GeometryUtilities::Get2DPitchDistance ( Double_t  angle,
Double_t  inwire,
Double_t  wire 
) const

Definition at line 589 of file GeometryUtilities.cxx.

References fWiretoCm.

592  {
593  Double_t radangle = TMath::Pi()*angle/180;
594  if(std::cos(radangle)==0)
595  return 9999;
596  return std::abs((wire-inwire)/std::cos(radangle))*fWiretoCm;
597  }
Double_t util::GeometryUtilities::Get2DPitchDistanceWSlope ( Double_t  slope,
Double_t  inwire,
Double_t  wire 
) const

Definition at line 601 of file GeometryUtilities.cxx.

References fWiretoCm.

604  {
605 
606  return std::abs(wire-inwire)*TMath::Sqrt(1+slope*slope)*fWiretoCm;
607 
608  }
PxPoint util::GeometryUtilities::Get2DPointProjection ( Double_t *  xyz,
Int_t  plane 
) const
Todo:
: this should use the cryostat and tpc as well in the NearestWire method

Definition at line 912 of file GeometryUtilities.cxx.

References detp, fDriftVelocity, fTimeTick, geom, geo::PlaneGeo::LocalToWorld(), geo::GeometryCore::NearestWire(), geo::origin(), util::PxPoint::plane, geo::GeometryCore::Plane(), util::PxPoint::t, detinfo::DetectorProperties::TriggerOffset(), and util::PxPoint::w.

Referenced by GetProjectedPoint().

912  {
913 
914  PxPoint pN(0,0,0);
915  const double origin[3] = {0.};
916  Double_t pos[3];
917  //geom->PlaneOriginVtx(plane,pos);
918  geom->Plane(plane).LocalToWorld(origin, pos);
919  Double_t drifttick=(xyz[0]/fDriftVelocity)*(1./fTimeTick);
920 
921  pos[1]=xyz[1];
922  pos[2]=xyz[2];
923 
925 
926  pN.w = geom->NearestWire(pos, plane);
927  pN.t=drifttick-(pos[0]/fDriftVelocity)*(1./fTimeTick)+detp->TriggerOffset();
928  pN.plane=plane;
929 
930  return pN;
931 
932  }
PlaneGeo const & Plane(unsigned int const p, unsigned int const tpc=0, unsigned int const cstat=0) const
Returns the specified wire.
virtual int TriggerOffset() const =0
const detinfo::DetectorProperties * detp
geo::WireID::WireID_t NearestWire(geo::Point_t const &point, geo::PlaneID const &planeid) const
Returns the index of wire closest to position in the specified TPC.
const geo::GeometryCore * geom
void LocalToWorld(const double *plane, double *world) const
Transform point from local plane frame to world frame.
Definition: PlaneGeo.h:1124
constexpr Point origin()
Returns a origin position with a point of the specified type.
Definition: geo_vectors.h:230
PxPoint util::GeometryUtilities::Get2DPointProjectionCM ( std::vector< double >  xyz,
int  plane 
) const
Todo:
: this should use the cryostat and tpc as well in the NearestWire method

Definition at line 941 of file GeometryUtilities.cxx.

References fWiretoCm, geom, geo::GeometryCore::NearestWire(), util::PxPoint::plane, util::PxPoint::t, and util::PxPoint::w.

Referenced by Get2DPointProjectionCM().

941  {
942 
943  PxPoint pN(0,0,0);
944 
945  Double_t pos[3]{0., xyz[1], xyz[2]};
946 
948 
949  pN.w = geom->NearestWire(pos, plane)*fWiretoCm;
950  pN.t=xyz[0];
951  pN.plane=plane;
952 
953  return pN;
954 
955  }
geo::WireID::WireID_t NearestWire(geo::Point_t const &point, geo::PlaneID const &planeid) const
Returns the index of wire closest to position in the specified TPC.
const geo::GeometryCore * geom
PxPoint util::GeometryUtilities::Get2DPointProjectionCM ( double *  xyz,
int  plane 
) const
Todo:
: this should use the cryostat and tpc as well in the NearestWire method

Definition at line 958 of file GeometryUtilities.cxx.

References fWiretoCm, geom, geo::GeometryCore::NearestWire(), util::PxPoint::plane, util::PxPoint::t, and util::PxPoint::w.

958  {
959 
960  PxPoint pN(0,0,0);
961 
962  Double_t pos[3]{0., xyz[1], xyz[2]};
963 
965 
966  pN.w = geom->NearestWire(pos, plane)*fWiretoCm;
967  pN.t=xyz[0];
968  pN.plane=plane;
969 
970  return pN;
971 
972  }
geo::WireID::WireID_t NearestWire(geo::Point_t const &point, geo::PlaneID const &planeid) const
Returns the index of wire closest to position in the specified TPC.
const geo::GeometryCore * geom
PxPoint util::GeometryUtilities::Get2DPointProjectionCM ( TLorentzVector *  xyz,
int  plane 
) const

Definition at line 976 of file GeometryUtilities.cxx.

References Get2DPointProjectionCM().

976  {
977  double xyznew[3]={(*xyz)[0],(*xyz)[1],(*xyz)[2]};
978 
979  return Get2DPointProjectionCM(xyznew,plane);
980  }
PxPoint Get2DPointProjectionCM(std::vector< double > xyz, int plane) const
Double_t util::GeometryUtilities::Get2Dslope ( Double_t  deltawire,
Double_t  deltatime 
) const

Definition at line 452 of file GeometryUtilities.cxx.

References fWireTimetoCmCm, and Get2Dangle().

Referenced by Get2Dslope().

454  {
455 
456  //return omega;
457 
458  return tan(Get2Dangle(dwire,dtime))/fWireTimetoCmCm;
459 
460  }
Double_t Get2Dangle(Double_t deltawire, Double_t deltatime) const
Double_t util::GeometryUtilities::Get2Dslope ( Double_t  wireend,
Double_t  wirestart,
Double_t  timeend,
Double_t  timestart 
) const

Definition at line 426 of file GeometryUtilities.cxx.

References fTimetoCm, fWiretoCm, and Get2Dslope().

430  {
431 
432  return GeometryUtilities::Get2Dslope((wireend-wirestart)*fWiretoCm,(timeend-timestart)*fTimetoCm);
433 
434  }
Double_t Get2Dslope(Double_t deltawire, Double_t deltatime) const
double util::GeometryUtilities::Get2Dslope ( const util::PxPoint endpoint,
const util::PxPoint startpoint 
) const

Definition at line 440 of file GeometryUtilities.cxx.

References Get2Dslope(), util::PxPoint::t, and util::PxPoint::w.

442  {
443  return Get2Dslope(endpoint->w - startpoint->w,endpoint->t - startpoint->t);
444 
445  }
double t
Definition: PxUtils.h:11
double w
Definition: PxUtils.h:10
Double_t Get2Dslope(Double_t deltawire, Double_t deltatime) const
Int_t util::GeometryUtilities::Get3DaxisN ( Int_t  iplane0,
Int_t  iplane1,
Double_t  omega0,
Double_t  omega1,
Double_t &  phi,
Double_t &  theta 
) const

Definition at line 81 of file GeometryUtilities.cxx.

References util::kINVALID_DOUBLE, and vertangle.

Referenced by cmtool::CFAlgo3DAngle::Float(), showerreco::ShowerRecoAlg::RecoOneShower(), and evd::TWQProjectionView::SaveSelection().

87  {
88 
89  //Double_t l(0),m(0),n(0);
90  //Double_t phin(0);//,phis(0),thetan(0);
91 
92  // y, z, x coordinates
93  Double_t ln(0),mn(0),nn(0);
94  Double_t phis(0),thetan(0);
95 
96  // Pretend collection and induction planes.
97  // "Collection" is the plane with the vertical angle equal to zero.
98  // If both are non-zero, collection is the one with the negative angle.
99  UInt_t Cplane=0,Iplane=1;
100 
101  // angleC and angleI are the respective angles to vertical in C/I
102  // planes and slopeC, slopeI are the tangents of the track.
103  Double_t angleC,angleI,slopeC,slopeI,omegaC,omegaI;
104  omegaC = kINVALID_DOUBLE;
105  omegaI = kINVALID_DOUBLE;
106 
107  // Don't know how to reconstruct these yet, so exit with error.
108  // In
109  if(omega0==0 || omega1==0){
110  phi=0;
111  theta=-999;
112  return -1;
113  }
114 
116 
117  //check if backwards going track
118  //Double_t backwards=0;
119  Double_t alt_backwards=0;
120 
122  /*
123  if(fabs(omega0)>(TMath::Pi()/2.0) && fabs(omega1)>(TMath::Pi()/2.0) ) {
124  backwards=1;
125  }
126  */
127 
128  if(fabs(omega0)>(TMath::Pi()/2.0) || fabs(omega1)>(TMath::Pi()/2.0) ) {
129  alt_backwards=1;
130  }
131 
132 
133 
134  if(vertangle[iplane0] == 0){
135  // first plane is at 0 degrees
136  Cplane=iplane0;
137  Iplane=iplane1;
138  omegaC=omega0;
139  omegaI=omega1;
140  }
141  else if(vertangle[iplane1] == 0){
142  // second plane is at 0 degrees
143  Cplane = iplane1;
144  Iplane = iplane0;
145  omegaC=omega1;
146  omegaI=omega0;
147  }
148  else if(vertangle[iplane0] != 0 && vertangle[iplane1] != 0){
149  //both planes are at non zero degree - find the one with deg<0
150  if(vertangle[iplane1] < vertangle[iplane0]){
151  Cplane = iplane1;
152  Iplane = iplane0;
153  omegaC=omega1;
154  omegaI=omega0;
155  }
156  else if(vertangle[iplane1] > vertangle[iplane0]){
157  Cplane = iplane0;
158  Iplane = iplane1;
159  omegaC=omega0;
160  omegaI=omega1;
161  }
162  else{
163  //throw error - same plane.
164  return -1;
165  }
166 
167  }
168 
169  slopeC=tan(omegaC);
170  slopeI=tan(omegaI);
171  angleC=vertangle[Cplane];
172  angleI=vertangle[Iplane];
173 
174 
175  // l = 1;
176  // m = (1/(2*sin(angleI)))*((cos(angleI)/(slopeC*cos(angleC)))-(1/slopeI)
177  // +nfact*( cos(angleI)/slopeC-1/slopeI ) );
178  // n = (1/(2*cos(angleC)))*((1/slopeC)+(1/slopeI) +nfact*((1/slopeC)-(1/slopeI)));
179 
180 
181  //0 -1 factor depending on if one of the planes is vertical.
182  bool nfact = !(vertangle[Cplane]);
183 
184  //ln represents y, omega is 2d angle -- in first 2 quadrants y is positive.
185  if(omegaC < TMath::Pi() && omegaC > 0 )
186  ln=1;
187  else
188  ln=-1;
189 
190  //calculate x and z using y ( ln )
191  mn = (ln/(2*sin(angleI)))*((cos(angleI)/(slopeC*cos(angleC)))-(1/slopeI)
192  +nfact*( cos(angleI)/(cos(angleC)*slopeC)-1/slopeI ) );
193 
194  nn = (ln/(2*cos(angleC)))*((1/slopeC)+(1/slopeI) +nfact*((1/slopeC)-(1/slopeI)));
195 
196  // std::cout << " slopes, C:"<< slopeC << " " << (omegaC) << " I:" << slopeI << " " << omegaI <<std::endl;
197  // std::cout << "omegaC, angleC " << omegaC << " " << angleC << "cond: " << omegaC-angleC << " ln: " << ln << std::endl;
198  // std::cout << " inverse slopes: " << (cos(angleI)/(slopeC*cos(angleC))) << " " << 1/slopeC << " 2: "<< 1/slopeI << std::endl;
199 
200  // float Phi;
201  // float alt_Phi;
202 
203 
204  // Direction angles
205  if(fabs(omegaC)>0.01) // catch numeric error values
206  {
207  //phi=atan(ln/nn);
208  phis=asin(ln/TMath::Sqrt(ln*ln+nn*nn));
209 
210  if(fabs(slopeC+slopeI) < 0.001)
211  phis=0;
212  else if( fabs(omegaI)>0.01 && (omegaI/fabs(omegaI) == -omegaC/fabs(omegaC) )
213  && ( fabs(omegaC) < 1*TMath::Pi()/180 || fabs(omegaC) > 179*TMath::Pi()/180 ) ) // angles have
214  phis = (fabs(omegaC) > TMath::Pi()/2) ? TMath::Pi() : 0; //angles are
215 
216 
217  if(nn<0 && phis>0 && !(!alt_backwards && fabs(phis)<TMath::Pi()/4 ) ) // do not go back if track looks forward and phi is forward
218  phis=(TMath::Pi())-phis;
219  else if(nn<0 && phis<0 && !(!alt_backwards && fabs(phis)<TMath::Pi()/4 ) )
220  phis=(-TMath::Pi())-phis;
221 
222 
223  phi=phis*180/TMath::Pi();
224 
225  // solve the ambiguities due to tangent periodicity
226 // Phi = phi > 0. ? (TMath::Pi()/2)-phi : fabs(phi)-(TMath::Pi()/2) ;
227 // alt_Phi = phi > 0. ? (TMath::Pi()/2)-phi : fabs(phi)-(TMath::Pi()/2) ;
228 //
229 // if(backwards==1){
230 // if(Phi<0){ Phi=Phi+TMath::Pi();}
231 // else if(Phi>0){Phi=Phi-TMath::Pi();}
232 // }
233 //
234 // bool alt_condition=( ( fabs(omegaC)>0.75*TMath::Pi() && fabs(omegaI)>0.166*TMath::Pi() )|| ( fabs(omegaI)>0.75*TMath::Pi() && fabs(omegaC)>0.166*TMath::Pi() ) );
235 //
236 //
237 // if((alt_backwards==1 && alt_condition) || backwards==1 ){
238 // if(alt_Phi<0){alt_Phi=alt_Phi+TMath::Pi();}
239 // else if(alt_Phi>0){alt_Phi=alt_Phi-TMath::Pi();}
240 // }
241 
242  }
243  //If plane2 (collection), phi = 2d angle (omegaC in this case)
244  else
245  {
246  phis = omegaC;
247  phi = omegaC;
248  }
249 
250  thetan = -asin ( mn / (sqrt(pow(ln,2)+pow(mn,2)+pow(nn,2)) ) ) ;
251  theta=thetan*180/TMath::Pi();
252 
253 // theta = acos( mn / (sqrt(pow(ln,2)+pow(mn,2)+pow(nn,2)) ) ) ;
254 // Double_t thetah = acos( mn / (sqrt(pow(l,2)+pow(mn,2)+pow(nn,2)) ) ) ;
255 // float Theta;
256 // float alt_Theta = 0.;
257 
258 // std::cout << " thetan " << mn << " " << (sqrt(pow(ln,2)+pow(mn,2)+pow(nn,2)) ) << " " << mn / (sqrt(pow(ln,2)+pow(mn,2)+pow(nn,2)) ) << std::endl;
259 // if(Phi < 0)Theta = (TMath::Pi()/2)-theta;
260 // if(Phi > 0)Theta = theta-(TMath::Pi()/2);
261 // if(alt_Phi < 0)alt_Theta = (TMath::Pi()/2)-theta;
262 // if(alt_Phi > 0)alt_Theta = theta-(TMath::Pi()/2);
263 
264  /*
265  std::cout << "++++++++ GeomUtil old " << Phi*180/TMath::Pi() << " " << Theta*180/TMath::Pi() << std::endl;
266  std::cout << "++++++++ GeomUtil_angles ALT: Phi: " << alt_Phi*180/TMath::Pi() << " Theta: " << alt_Theta*180/TMath::Pi() << std::endl;
267  std::cout << "++++++++ GeomUtil_new_angles Sine: Phi: " << phis*180/TMath::Pi() << " Theta: " << thetan*180/TMath::Pi() << std::endl;
268  */
269 
270  return 0;
271 
272 }
std::vector< Double_t > vertangle
const double kINVALID_DOUBLE
Double_t util::GeometryUtilities::Get3DSpecialCaseTheta ( Int_t  iplane0,
Int_t  iplane1,
Double_t  dw0,
Double_t  dw1 
) const

Definition at line 278 of file GeometryUtilities.cxx.

References vertangle.

282  {
283 
284  Double_t splane,lplane; // plane in which the track is shorter and longer.
285  Double_t sdw,ldw;
286 
287  if(dw0==0 && dw1==0)
288  return -1;
289 
290  if(dw0 >= dw1 ) {
291  lplane=iplane0;
292  splane=iplane1;
293  ldw=dw0;
294  sdw=dw1;
295  }
296  else {
297  lplane=iplane1;
298  splane=iplane0;
299  ldw=dw1;
300  sdw=dw0;
301  }
302 
303  Double_t top=(std::cos(vertangle[splane])-std::cos(vertangle[lplane])*sdw/ldw);
304  Double_t bottom = tan(vertangle[lplane]*std::cos(vertangle[splane]) );
305  bottom -= tan(vertangle[splane]*std::cos(vertangle[lplane]) )*sdw/ldw;
306 
307  Double_t tantheta=top/bottom;
308 
309  return atan(tantheta)*vertangle[lplane]/std::abs(vertangle[lplane])*180./TMath::Pi();
310  }
std::vector< Double_t > vertangle
void util::GeometryUtilities::GetDirectionCosines ( Double_t  phi,
Double_t  theta,
Double_t *  dirs 
) const

Definition at line 1040 of file GeometryUtilities.cxx.

Referenced by PitchInView(), and showerreco::ShowerRecoAlg::RecoOneShower().

1043  {
1044  theta*=(TMath::Pi()/180);
1045  phi*=(TMath::Pi()/180); // working on copies, it's ok.
1046  dirs[0]=TMath::Cos(theta)*TMath::Sin(phi);
1047  dirs[1]=TMath::Sin(theta);
1048  dirs[2]=TMath::Cos(theta)*TMath::Cos(phi);
1049 
1050  }
static const GeometryUtilities* util::GeometryUtilities::GetME ( )
inlinestatic

Definition at line 42 of file GeometryUtilities.h.

References _me, GeometryUtilities(), and ~GeometryUtilities().

Referenced by cluster::ClusterParamsAlg::Initialize(), and showerreco::ShowerRecoAlg::ShowerRecoAlg().

42  {
43  if(!_me) _me = new GeometryUtilities;
44  return _me;
45  }
static GeometryUtilities * _me
GeometryUtilities()
Default constructor = private for singleton.
Int_t util::GeometryUtilities::GetPointOnLine ( Double_t  slope,
Double_t  intercept,
Double_t  wire1,
Double_t  time1,
Double_t &  wireout,
Double_t &  timeout 
) const

Definition at line 617 of file GeometryUtilities.cxx.

Referenced by cluster::ClusterParamsAlg::GetFinalSlope(), GetPointOnLine(), cluster::ClusterParamsAlg::GetProfileInfo(), shwf::ShowerReco::LongTransEnergy(), showerreco::ShowerRecoAlg::RecoOneShower(), and SelectLocalHitlistIndex().

623  {
624  Double_t invslope=0;
625 
626  if(slope)
627  {
628  invslope=-1./slope;
629  }
630 
631  Double_t ort_intercept=time1-invslope*(Double_t)wire1;
632 
633  if((slope-invslope)!=0)
634  wireout=(ort_intercept - intercept)/(slope-invslope);
635  else
636  wireout=wire1;
637  timeout=slope*wireout+intercept;
638 
639  return 0;
640  }
Int_t util::GeometryUtilities::GetPointOnLine ( Double_t  slope,
Double_t  wirestart,
Double_t  timestart,
Double_t  wire1,
Double_t  time1,
Double_t &  wireout,
Double_t &  timeout 
) const

Definition at line 693 of file GeometryUtilities.cxx.

References GetPointOnLine().

700  {
701  Double_t intercept=timestart-slope*(Double_t)wirestart;
702 
703  return GetPointOnLine(slope,intercept,wire1,time1,wireout,timeout);
704  }
Int_t GetPointOnLine(Double_t slope, Double_t intercept, Double_t wire1, Double_t time1, Double_t &wireout, Double_t &timeout) const
int util::GeometryUtilities::GetPointOnLine ( Double_t  slope,
const util::PxPoint startpoint,
const util::PxPoint point1,
util::PxPoint pointout 
) const

Definition at line 646 of file GeometryUtilities.cxx.

References GetPointOnLine(), util::PxPoint::t, and util::PxPoint::w.

650  {
651 
652  double intercept=startpoint->t - slope * startpoint->w;
653 
654 
655  return GetPointOnLine(slope,intercept,point1,pointout);
656 
657  }
double t
Definition: PxUtils.h:11
double w
Definition: PxUtils.h:10
Int_t GetPointOnLine(Double_t slope, Double_t intercept, Double_t wire1, Double_t time1, Double_t &wireout, Double_t &timeout) const
int util::GeometryUtilities::GetPointOnLine ( double  slope,
double  intercept,
const util::PxPoint point1,
util::PxPoint pointout 
) const

Definition at line 664 of file GeometryUtilities.cxx.

References util::PxPoint::t, and util::PxPoint::w.

668  {
669  double invslope=0;
670 
671  if(slope)
672  {
673 // invslope=-1./slope*fWireTimetoCmCm*fWireTimetoCmCm;
674  invslope=-1./slope;
675  }
676 
677  double ort_intercept=point1->t - invslope * point1->w;
678 
679  if((slope-invslope)!=0)
680  pointout.w = (ort_intercept - intercept)/(slope-invslope);
681  else
682  pointout.w = point1->w;
683 
684  pointout.t = slope * pointout.w + intercept;
685 
686  return 0;
687  }
double t
Definition: PxUtils.h:11
double w
Definition: PxUtils.h:10
Int_t util::GeometryUtilities::GetPointOnLineWSlopes ( Double_t  slope,
Double_t  intercept,
Double_t  ort_intercept,
Double_t &  wireout,
Double_t &  timeout 
) const

Definition at line 710 of file GeometryUtilities.cxx.

References fTimetoCm, fWireTimetoCmCm, and fWiretoCm.

Referenced by cluster::ClusterParamsAlg::GetProfileInfo().

715  {
716  Double_t invslope=0;
717 
718  if(slope)
719  {
720  invslope=-1./slope;
721  }
722 
724 
725  wireout=(ort_intercept - intercept)/(slope-invslope);
726  timeout=slope*wireout+intercept;
727 
728 
729  wireout/=fWiretoCm;
730  timeout/=fTimetoCm;
731 
732  return 0;
733  }
Int_t util::GeometryUtilities::GetPointOnLineWSlopes ( double  slope,
double  intercept,
double  ort_intercept,
util::PxPoint pointonline 
) const

Definition at line 740 of file GeometryUtilities.cxx.

References util::PxPoint::t, and util::PxPoint::w.

744  {
745  Double_t invslope=0;
746 
747  if(slope)
748  invslope=-1./slope;
749 
750 
751  // invslope *= fWireTimetoCmCm * fWireTimetoCmCm;
752 
753  pointonline.w = (ort_intercept - intercept)/(slope-invslope);
754  pointonline.t = slope * pointonline.w + intercept;
755  return 0;
756  }
double t
Definition: PxUtils.h:11
double w
Definition: PxUtils.h:10
Int_t util::GeometryUtilities::GetProjectedPoint ( const PxPoint p0,
const PxPoint p1,
PxPoint pN 
) const

Definition at line 797 of file GeometryUtilities.cxx.

References geo::GeometryCore::ChannelsIntersect(), detp, fNPlanes, fTimetoCm, geom, Get2DPointProjection(), geo::PlaneGeo::LocalToWorld(), geo::origin(), util::PxPoint::plane, geo::GeometryCore::Plane(), geo::GeometryCore::PlaneWireToChannel(), util::PxPoint::t, detinfo::DetectorProperties::TriggerOffset(), util::PxPoint::w, x, y, and z.

Referenced by evd::TWQProjectionView::SaveSelection(), and evd::TWQProjectionView::SetSeeds().

800  {
801 
802  //determine third plane number
803  for(UInt_t i = 0; i < fNPlanes; ++i){
804  if(i == p0->plane || i == p1->plane)
805  continue;
806  pN.plane = i;
807  }
808 
809  // Assuming there is no problem ( and we found the best pair that comes close in time )
810  // we try to get the Y and Z coordinates for the start of the shower.
811  UInt_t chan1 = geom->PlaneWireToChannel(p0->plane,p0->w);
812  UInt_t chan2 = geom->PlaneWireToChannel(p1->plane,p1->w);
813  const double origin[3] = {0.};
814  Double_t pos[3]={0.};
815  //geom->PlaneOriginVtx(p0->plane, pos);
816  geom->Plane(p0->plane).LocalToWorld(origin, pos);
817  Double_t x=(p0->t - detp->TriggerOffset())*fTimetoCm+pos[0];
818 
819  Double_t y,z;
820  if(! geom->ChannelsIntersect(chan1,chan2,y,z) )
821  return -1;
822 
823  pos[0]=x;
824  pos[1]=y;
825  pos[2]=z;
826 
827  pN=Get2DPointProjection(pos, pN.plane);
828 
829  return 0;
830  }
Float_t x
Definition: compare.C:6
PlaneGeo const & Plane(unsigned int const p, unsigned int const tpc=0, unsigned int const cstat=0) const
Returns the specified wire.
virtual int TriggerOffset() const =0
Float_t y
Definition: compare.C:6
Double_t z
Definition: plot.C:279
bool ChannelsIntersect(raw::ChannelID_t c1, raw::ChannelID_t c2, double &y, double &z) const
Returns an intersection point of two channels.
const detinfo::DetectorProperties * detp
raw::ChannelID_t PlaneWireToChannel(WireID const &wireid) const
Returns the ID of the TPC channel connected to the specified wire.
const geo::GeometryCore * geom
PxPoint Get2DPointProjection(Double_t *xyz, Int_t plane) const
void LocalToWorld(const double *plane, double *world) const
Transform point from local plane frame to world frame.
Definition: PlaneGeo.h:1124
constexpr Point origin()
Returns a origin position with a point of the specified type.
Definition: geo_vectors.h:230
Double_t util::GeometryUtilities::GetTimeTicks ( Double_t  x,
Int_t  plane 
) const

Definition at line 984 of file GeometryUtilities.cxx.

References detp, fDriftVelocity, fTimeTick, geom, geo::PlaneGeo::LocalToWorld(), geo::origin(), geo::GeometryCore::Plane(), and detinfo::DetectorProperties::TriggerOffset().

984  {
985 
986 
987  const double origin[3] = {0.};
988  Double_t pos[3];
989  //geom->PlaneOriginVtx(plane,pos);
990  geom->Plane(plane).LocalToWorld(origin, pos);
991  Double_t drifttick=(x/fDriftVelocity)*(1./fTimeTick);
992 
993  return drifttick-(pos[0]/fDriftVelocity)*(1./fTimeTick)+detp->TriggerOffset();
994 
995 
996  }
Float_t x
Definition: compare.C:6
PlaneGeo const & Plane(unsigned int const p, unsigned int const tpc=0, unsigned int const cstat=0) const
Returns the specified wire.
virtual int TriggerOffset() const =0
const detinfo::DetectorProperties * detp
const geo::GeometryCore * geom
void LocalToWorld(const double *plane, double *world) const
Transform point from local plane frame to world frame.
Definition: PlaneGeo.h:1124
constexpr Point origin()
Returns a origin position with a point of the specified type.
Definition: geo_vectors.h:230
Int_t util::GeometryUtilities::GetXYZ ( const PxPoint p0,
const PxPoint p1,
Double_t *  xyz 
) const

Definition at line 888 of file GeometryUtilities.cxx.

References detp, fTimetoCm, geom, GetYZ(), geo::PlaneGeo::LocalToWorld(), geo::origin(), util::PxPoint::plane, geo::GeometryCore::Plane(), util::PxPoint::t, detinfo::DetectorProperties::TriggerOffset(), and x.

891  {
892  const double origin[3] = {0.};
893  Double_t pos[3]={0.};
894  //geom->PlaneOriginVtx(p0->plane, pos);
895  geom->Plane(p0->plane).LocalToWorld(origin, pos);
896  Double_t x=(p0->t) - detp->TriggerOffset()*fTimetoCm+pos[0];
897  double yz[2];
898 
899  GetYZ(p0,p1,yz);
900 
901 
902  xyz[0]=x;
903  xyz[1]=yz[0];
904  xyz[2]=yz[1];
905 
906  return 0;
907  }
Float_t x
Definition: compare.C:6
PlaneGeo const & Plane(unsigned int const p, unsigned int const tpc=0, unsigned int const cstat=0) const
Returns the specified wire.
virtual int TriggerOffset() const =0
const detinfo::DetectorProperties * detp
Int_t GetYZ(const PxPoint *p0, const PxPoint *p1, Double_t *yz) const
const geo::GeometryCore * geom
void LocalToWorld(const double *plane, double *world) const
Transform point from local plane frame to world frame.
Definition: PlaneGeo.h:1124
constexpr Point origin()
Returns a origin position with a point of the specified type.
Definition: geo_vectors.h:230
Int_t util::GeometryUtilities::GetYZ ( const PxPoint p0,
const PxPoint p1,
Double_t *  yz 
) const

Definition at line 834 of file GeometryUtilities.cxx.

References geo::GeometryCore::ChannelsIntersect(), fWiretoCm, geom, geo::GeometryCore::Nwires(), util::PxPoint::plane, geo::GeometryCore::PlaneWireToChannel(), util::PxPoint::w, w, y, and z.

Referenced by GetXYZ(), and evd::TWQProjectionView::SetSeeds().

837  {
838  Double_t y,z;
839 
840  // Force to the closest wires if not in the range
841  int z0 = p0->w / fWiretoCm;
842  int z1 = p1-> w/ fWiretoCm;
843  if(z0 < 0) {
844  std::cout << "\033[93mWarning\033[00m \033[95m<<GeometryUtilities::GetYZ>>\033[00m" << std::endl
845  << " 2D wire position " << p0->w << " [cm] corresponds to negative wire number." << std::endl
846  << " Forcing it to wire=0..." << std::endl
847  << "\033[93mWarning ends...\033[00m"<<std::endl;
848  z0 = 0;
849  }
850  else if(z0 >= (int)(geom->Nwires(p0->plane))){
851  std::cout << "\033[93mWarning\033[00m \033[95m<<GeometryUtilities::GetYZ>>\033[00m" << std::endl
852  << " 2D wire position " << p0->w << " [cm] exceeds max wire number " << (geom->Nwires(p0->plane)-1) <<std::endl
853  << " Forcing it to the max wire number..." << std::endl
854  << "\033[93mWarning ends...\033[00m"<<std::endl;
855  z0 = geom->Nwires(p0->plane) - 1;
856  }
857  if(z1 < 0) {
858  std::cout << "\033[93mWarning\033[00m \033[95m<<GeometryUtilities::GetYZ>>\033[00m" << std::endl
859  << " 2D wire position " << p1->w << " [cm] corresponds to negative wire number." << std::endl
860  << " Forcing it to wire=0..." << std::endl
861  << "\033[93mWarning ends...\033[00m"<<std::endl;
862  z1 = 0;
863  }
864  if(z1 >= (int)(geom->Nwires(p1->plane))){
865  std::cout << "\033[93mWarning\033[00m \033[95m<<GeometryUtilities::GetYZ>>\033[00m" << std::endl
866  << " 2D wire position " << p1->w << " [cm] exceeds max wire number " << (geom->Nwires(p0->plane)-1) <<std::endl
867  << " Forcing it to the max wire number..." << std::endl
868  << "\033[93mWarning ends...\033[00m"<<std::endl;
869  z1 = geom->Nwires(p1->plane) - 1;
870  }
871 
872  UInt_t chan1 = geom->PlaneWireToChannel(p0->plane, z0);
873  UInt_t chan2 = geom->PlaneWireToChannel(p1->plane, z1);
874 
875  if(! geom->ChannelsIntersect(chan1,chan2,y,z) )
876  return -1;
877 
878 
879  yz[0]=y;
880  yz[1]=z;
881 
882  return 0;
883  }
Float_t y
Definition: compare.C:6
Double_t z
Definition: plot.C:279
bool ChannelsIntersect(raw::ChannelID_t c1, raw::ChannelID_t c2, double &y, double &z) const
Returns an intersection point of two channels.
unsigned int Nwires(unsigned int p, unsigned int tpc=0, unsigned int cstat=0) const
Returns the total number of wires in the specified plane.
raw::ChannelID_t PlaneWireToChannel(WireID const &wireid) const
Returns the ID of the TPC channel connected to the specified wire.
const geo::GeometryCore * geom
Float_t w
Definition: plot.C:23
UInt_t util::GeometryUtilities::Nplanes ( ) const
inline

Definition at line 275 of file GeometryUtilities.h.

References fNPlanes.

Referenced by showerreco::ShowerRecoAlg::RecoOneShower().

275 { return fNPlanes; }
Double_t util::GeometryUtilities::PitchInView ( UInt_t  plane,
Double_t  phi,
Double_t  theta 
) const
Todo:
switch to using new Geometry::WireAngleToVertical(geo::View_t)
Todo:
and Geometry::WirePitch(geo::View_t) methods

Definition at line 1003 of file GeometryUtilities.cxx.

References e, geom, GetDirectionCosines(), geo::GeometryCore::Plane(), geo::PlaneGeo::View(), geo::GeometryCore::WireAngleToVertical(), and geo::GeometryCore::WirePitch().

Referenced by shwf::ShowerReco::LongTransEnergy(), and showerreco::ShowerRecoAlg::RecoOneShower().

1006  {
1007  Double_t dirs[3] = {0.};
1008  GetDirectionCosines(phi,theta,dirs);
1009 
1012  Double_t wirePitch = 0.;
1013  Double_t angleToVert = 0.;
1014 
1015  wirePitch = geom->WirePitch(plane);
1016  angleToVert = geom->WireAngleToVertical(geom->Plane(plane).View()) - 0.5*TMath::Pi();
1017 
1018  //(sin(angleToVert),std::cos(angleToVert)) is the direction perpendicular to wire
1019  //fDir.front() is the direction of the track at the beginning of its trajectory
1020  Double_t cosgamma = TMath::Abs(TMath::Sin(angleToVert)*dirs[1] +
1021  TMath::Cos(angleToVert)*dirs[2]);
1022 
1023 // std::cout << " ---- cosgamma: " << angleToVert*180/TMath::Pi() << " d's: " << dirs[1]
1024 // << " " << dirs[2] << " ph,th " << phi << " " << theta << std::endl;
1025 
1026  // std::cout << TMath::Sin(angleToVert)*dirs[1] << " " << TMath::Cos(angleToVert)*dirs[2] << " CGAMM: " << cosgamma << std::endl;
1027  if(cosgamma < 1.e-5)
1028  //throw UtilException("cosgamma is basically 0, that can't be right");
1029  {std::cout << " returning 100" << std::endl;
1030  return 100;
1031 
1032  }
1033 
1034  // std::cout << " returning " << wirePitch/cosgamma << std::endl;
1035  return wirePitch/cosgamma;
1036  }
PlaneGeo const & Plane(unsigned int const p, unsigned int const tpc=0, unsigned int const cstat=0) const
Returns the specified wire.
geo::Length_t WirePitch(geo::PlaneID const &planeid) const
Returns the distance between two consecutive wires.
View_t View() const
Which coordinate does this plane measure.
Definition: PlaneGeo.h:171
const geo::GeometryCore * geom
void GetDirectionCosines(Double_t phi, Double_t theta, Double_t *dirs) const
Float_t e
Definition: plot.C:34
double WireAngleToVertical(geo::View_t view, geo::TPCID const &tpcid) const
Returns the angle of the wires in the specified view from vertical.
std::vector< size_t > util::GeometryUtilities::PolyOverlap ( std::vector< const util::PxHit * >  ordered_hits,
std::vector< size_t >  candidate_polygon 
)

Definition at line 1321 of file GeometryUtilities.cxx.

References Clockwise(), tmp, and w.

Referenced by SelectPolygonHitList().

1322  {
1323 
1324  //loop over edges
1325  for ( unsigned int i=0; i<(candidate_polygon.size()-1); i++){
1326  double Ax = ordered_hits.at(candidate_polygon.at(i))->w;
1327  double Ay = ordered_hits.at(candidate_polygon.at(i))->t;
1328  double Bx = ordered_hits.at(candidate_polygon.at(i+1))->w;
1329  double By = ordered_hits.at(candidate_polygon.at(i+1))->t;
1330  //loop over edges that have not been checked yet...
1331  //only ones furhter down in polygon
1332  for ( unsigned int j=i+2; j<(candidate_polygon.size()-1); j++){
1333  //avoid consecutive segments:
1334  if ( candidate_polygon.at(i) == candidate_polygon.at(j+1) )
1335  continue;
1336  else{
1337  double Cx = ordered_hits.at(candidate_polygon.at(j))->w;
1338  double Cy = ordered_hits.at(candidate_polygon.at(j))->t;
1339  double Dx = ordered_hits.at(candidate_polygon.at(j+1))->w;
1340  double Dy = ordered_hits.at(candidate_polygon.at(j+1))->t;
1341 
1342  if ( (Clockwise(Ax,Ay,Cx,Cy,Dx,Dy) != Clockwise(Bx,By,Cx,Cy,Dx,Dy))
1343  and (Clockwise(Ax,Ay,Bx,By,Cx,Cy) != Clockwise(Ax,Ay,Bx,By,Dx,Dy)) ){
1344  size_t tmp = candidate_polygon.at(i+1);
1345  candidate_polygon.at(i+1) = candidate_polygon.at(j);
1346  candidate_polygon.at(j) = tmp;
1347  //check that last element is still first (to close circle...)
1348  candidate_polygon.at(candidate_polygon.size()-1) = candidate_polygon.at(0);
1349  //swapped polygon...now do recursion to make sure
1350  return PolyOverlap( ordered_hits, candidate_polygon);
1351  }//if crossing
1352  }
1353  }//second loop
1354  }//first loop
1355  //std::cout << std::endl;
1356  return candidate_polygon;
1357  }
bool Clockwise(double Ax, double Ay, double Bx, double By, double Cx, double Cy)
Float_t tmp
Definition: plot.C:37
std::vector< size_t > PolyOverlap(std::vector< const util::PxHit * > ordered_hits, std::vector< size_t > candidate_polygon)
Float_t w
Definition: plot.C:23
void util::GeometryUtilities::Reconfigure ( )

Definition at line 44 of file GeometryUtilities.cxx.

References detp, detinfo::DetectorProperties::DriftVelocity(), detinfo::DetectorProperties::Efield(), fDriftVelocity, fNPlanes, fTimeTick, fTimetoCm, fWirePitch, fWireTimetoCmCm, fWiretoCm, geom, geo::GeometryCore::Nplanes(), geo::GeometryCore::Plane(), detinfo::DetectorProperties::SamplingRate(), detinfo::DetectorProperties::Temperature(), geo::WireGeo::ThetaZ(), vertangle, geo::PlaneGeo::Wire(), and geo::GeometryCore::WirePitch().

Referenced by GeometryUtilities().

45  {
46  /*
47  geom = (util::Geometry*)(util::Geometry::GetME());
48  detp = (util::DetectorProperties*)(util::DetectorProperties::GetME());
49  */
50 
51  fNPlanes = geom->Nplanes();
52  vertangle.resize(fNPlanes);
53  for(UInt_t ip=0;ip<fNPlanes;ip++)
54  vertangle[ip]=geom->Plane(ip).Wire(0).ThetaZ(false)-TMath::Pi()/2.; // wire angle
55  //vertangle[ip]=geom->WireAngleToVertical(geom->PlaneToView(ip)) - TMath::Pi()/2; // wire angle
56 
58  fTimeTick=detp->SamplingRate()/1000.;
60 
64  }
PlaneGeo const & Plane(unsigned int const p, unsigned int const tpc=0, unsigned int const cstat=0) const
Returns the specified wire.
WireGeo const & Wire(unsigned int iwire) const
Definition: PlaneGeo.cxx:506
virtual double SamplingRate() const =0
Returns the period of the TPC readout electronics clock.
double ThetaZ() const
Returns angle of wire with respect to z axis in the Y-Z plane in radians.
Definition: WireGeo.h:192
geo::Length_t WirePitch(geo::PlaneID const &planeid) const
Returns the distance between two consecutive wires.
const detinfo::DetectorProperties * detp
unsigned int Nplanes(unsigned int tpc=0, unsigned int cstat=0) const
Returns the total number of wire planes in the specified TPC.
virtual double Temperature() const =0
std::vector< Double_t > vertangle
const geo::GeometryCore * geom
virtual double DriftVelocity(double efield=0., double temperature=0.) const =0
virtual double Efield(unsigned int planegap=0) const =0
Returns the nominal electric field in the specified volume.
void util::GeometryUtilities::SelectLocalHitlist ( const std::vector< util::PxHit > &  hitlist,
std::vector< const util::PxHit * > &  hitlistlocal,
util::PxPoint startHit,
Double_t &  linearlimit,
Double_t &  ortlimit,
Double_t &  lineslopetest 
)

Definition at line 1053 of file GeometryUtilities.cxx.

Referenced by cluster::ClusterParamsAlg::RefineStartPoints().

1059  {
1060  util::PxHit testHit;
1061  SelectLocalHitlist(hitlist, hitlistlocal, startHit, linearlimit, ortlimit, lineslopetest, testHit);
1062 
1063  }
void SelectLocalHitlist(const std::vector< util::PxHit > &hitlist, std::vector< const util::PxHit * > &hitlistlocal, util::PxPoint &startHit, Double_t &linearlimit, Double_t &ortlimit, Double_t &lineslopetest)
void util::GeometryUtilities::SelectLocalHitlist ( const std::vector< util::PxHit > &  hitlist,
std::vector< const util::PxHit * > &  hitlistlocal,
util::PxPoint startHit,
Double_t &  linearlimit,
Double_t &  ortlimit,
Double_t &  lineslopetest,
util::PxHit averageHit 
)

Definition at line 1070 of file GeometryUtilities.cxx.

References util::PxPoint::plane, SelectLocalHitlistIndex(), util::PxPoint::t, util::PxPoint::w, and w.

1077  {
1078 
1079  hitlistlocal.clear();
1080  std::vector< unsigned int > hitlistlocal_index;
1081 
1082  hitlistlocal_index.clear();
1083 
1084  SelectLocalHitlistIndex(hitlist,hitlistlocal_index,startHit,linearlimit,ortlimit,lineslopetest);
1085 
1086  double timesum = 0;
1087  double wiresum = 0;
1088  for(size_t i=0; i<hitlistlocal_index.size(); ++i) {
1089 
1090  hitlistlocal.push_back((const util::PxHit*)(&(hitlist.at(hitlistlocal_index.at(i)))));
1091  timesum += hitlist.at(hitlistlocal_index.at(i)).t;
1092  wiresum += hitlist.at(hitlistlocal_index.at(i)).w;
1093 
1094 
1095 
1096  }
1097 
1098  averageHit.plane = startHit.plane;
1099  if(hitlistlocal.size())
1100  {
1101  averageHit.w = wiresum/(double)hitlistlocal.size();
1102  averageHit.t = timesum/((double) hitlistlocal.size());
1103  }
1104  }
double t
Definition: PxUtils.h:11
double w
Definition: PxUtils.h:10
void SelectLocalHitlistIndex(const std::vector< util::PxHit > &hitlist, std::vector< unsigned int > &hitlistlocal_index, util::PxPoint &startHit, Double_t &linearlimit, Double_t &ortlimit, Double_t &lineslopetest)
Float_t w
Definition: plot.C:23
unsigned int plane
Definition: PxUtils.h:12
void util::GeometryUtilities::SelectLocalHitlistIndex ( const std::vector< util::PxHit > &  hitlist,
std::vector< unsigned int > &  hitlistlocal_index,
util::PxPoint startHit,
Double_t &  linearlimit,
Double_t &  ortlimit,
Double_t &  lineslopetest 
)

Definition at line 1107 of file GeometryUtilities.cxx.

References Get2DDistance(), GetPointOnLine(), util::PxPoint::t, and util::PxPoint::w.

Referenced by evd::HitSelector::SaveHits(), and SelectLocalHitlist().

1113  {
1114 
1115  hitlistlocal_index.clear();
1116  double locintercept=startHit.t - startHit.w * lineslopetest;
1117 
1118 
1119  for(size_t i=0; i<hitlist.size(); ++i) {
1120 
1121  util::PxPoint hitonline;
1122 
1123  GetPointOnLine( lineslopetest, locintercept, (const util::PxHit*)(&hitlist.at(i)), hitonline );
1124 
1125 
1126  //calculate linear distance from start point and orthogonal distance from axis
1127  Double_t lindist=Get2DDistance((const util::PxPoint*)(&hitonline),(const util::PxPoint*)(&startHit));
1128  Double_t ortdist=Get2DDistance((const util::PxPoint*)(&hitlist.at(i)),(const util::PxPoint*)(&hitonline));
1129 
1130 
1131  if(lindist<linearlimit && ortdist<ortlimit){
1132  hitlistlocal_index.push_back(i);
1133  }
1134 
1135 
1136  }
1137 
1138 
1139  }
Double_t Get2DDistance(Double_t wire1, Double_t time1, Double_t wire2, Double_t time2) const
double t
Definition: PxUtils.h:11
double w
Definition: PxUtils.h:10
Int_t GetPointOnLine(Double_t slope, Double_t intercept, Double_t wire1, Double_t time1, Double_t &wireout, Double_t &timeout) const
void util::GeometryUtilities::SelectPolygonHitList ( const std::vector< util::PxHit > &  hitlist,
std::vector< const util::PxHit * > &  hitlistlocal 
)

Definition at line 1150 of file GeometryUtilities.cxx.

References detp, fTimetoCm, fWiretoCm, geom, detinfo::DetectorProperties::NumberTimeSamples(), geo::GeometryCore::Nwires(), and PolyOverlap().

Referenced by cluster::ClusterParamsAlg::FillPolygon().

1152  {
1153  if(!(hitlist.size())) {
1154  throw UtilException("Provided empty hit list!");
1155  return;
1156  }
1157 
1158  hitlistlocal.clear();
1159  unsigned char plane = (*hitlist.begin()).plane;
1160 
1161  // Define subset of hits to define polygon
1162  std::map<double,const util::PxHit*> hitmap;
1163  double qtotal=0;
1164  for(auto const &h : hitlist){
1165 
1166  hitmap.insert(std::pair<double,const util::PxHit*>(h.charge,&h));
1167  qtotal += h.charge;
1168 
1169  }
1170  double qintegral=0;
1171  std::vector<const util::PxHit*> ordered_hits;
1172  ordered_hits.reserve(hitlist.size());
1173  for(auto hiter = hitmap.rbegin();
1174  qintegral < qtotal*0.95 && hiter != hitmap.rend();
1175  ++hiter) {
1176 
1177  qintegral += (*hiter).first;
1178  ordered_hits.push_back((*hiter).second);
1179 
1180  }
1181 
1182  // Define container to hold found polygon corner PxHit index & distance
1183  std::vector<size_t> hit_index(8,0);
1184  std::vector<double> hit_distance(8,1e9);
1185 
1186  // Loop over hits and find corner points in the plane view
1187  // Also fill corner edge points
1188  std::vector<util::PxPoint> edges(4,PxPoint(plane,0,0));
1189  double wire_max = geom->Nwires(plane) * fWiretoCm;
1190  double time_max = detp->NumberTimeSamples() * fTimetoCm;
1191 
1192  for(size_t index = 0; index<ordered_hits.size(); ++index) {
1193 
1194  if(ordered_hits.at(index)->t < 0 ||
1195  ordered_hits.at(index)->w < 0 ||
1196  ordered_hits.at(index)->t > time_max ||
1197  ordered_hits.at(index)->w > wire_max ) {
1198 
1199  throw UtilException(Form("Invalid wire/time (%g,%g) ... range is (0=>%g,0=>%g)",
1200  ordered_hits.at(index)->w,
1201  ordered_hits.at(index)->t,
1202  wire_max,
1203  time_max)
1204  );
1205  return;
1206  }
1207 
1208  double dist = 0;
1209 
1210  // Comparison w/ (Wire,0)
1211  dist = ordered_hits.at(index)->t;
1212  if(dist < hit_distance.at(1)) {
1213  hit_distance.at(1) = dist;
1214  hit_index.at(1) = index;
1215  edges.at(0).t = ordered_hits.at(index)->t;
1216  edges.at(1).t = ordered_hits.at(index)->t;
1217  }
1218 
1219  // Comparison w/ (WireMax,Time)
1220  dist = wire_max - ordered_hits.at(index)->w;
1221  if(dist < hit_distance.at(3)) {
1222  hit_distance.at(3) = dist;
1223  hit_index.at(3) = index;
1224  edges.at(1).w = ordered_hits.at(index)->w;
1225  edges.at(2).w = ordered_hits.at(index)->w;
1226  }
1227 
1228  // Comparison w/ (Wire,TimeMax)
1229  dist = time_max - ordered_hits.at(index)->t;
1230  if(dist < hit_distance.at(5)) {
1231  hit_distance.at(5) = dist;
1232  hit_index.at(5) = index;
1233  edges.at(2).t = ordered_hits.at(index)->t;
1234  edges.at(3).t = ordered_hits.at(index)->t;
1235  }
1236 
1237  // Comparison w/ (0,Time)
1238  dist = ordered_hits.at(index)->w;
1239  if(dist < hit_distance.at(7)) {
1240  hit_distance.at(7) = dist;
1241  hit_index.at(7) = index;
1242  edges.at(0).w = ordered_hits.at(index)->w;
1243  edges.at(3).w = ordered_hits.at(index)->w;
1244  }
1245  }
1246  /*
1247  std::cout
1248  << Form("Corner points: (%g,%g) (%g,%g) (%g,%g) (%g,%g)",
1249  edges.at(0).w, edges.at(0).t,
1250  edges.at(1).w, edges.at(1).t,
1251  edges.at(2).w, edges.at(2).t,
1252  edges.at(3).w, edges.at(3).t)
1253  <<std::endl;
1254  */
1255  for(size_t index = 0; index<ordered_hits.size(); ++index) {
1256 
1257  double dist = 0;
1258  // Comparison w/ (0,0)
1259  dist = pow((ordered_hits.at(index)->t - edges.at(0).t),2) + pow((ordered_hits.at(index)->w - edges.at(0).w),2);
1260  if(dist < hit_distance.at(0)) {
1261  hit_distance.at(0) = dist;
1262  hit_index.at(0) = index;
1263  }
1264 
1265  // Comparison w/ (WireMax,0)
1266  dist = pow((ordered_hits.at(index)->t - edges.at(1).t),2) + pow((ordered_hits.at(index)->w - edges.at(1).w),2);
1267  if(dist < hit_distance.at(2)) {
1268  hit_distance.at(2) = dist;
1269  hit_index.at(2) = index;
1270  }
1271 
1272  // Comparison w/ (WireMax,TimeMax)
1273  dist = pow((ordered_hits.at(index)->t - edges.at(2).t),2) + pow((ordered_hits.at(index)->w - edges.at(2).w),2);
1274  if(dist < hit_distance.at(4)) {
1275  hit_distance.at(4) = dist;
1276  hit_index.at(4) = index;
1277  }
1278 
1279  // Comparison w/ (0,TimeMax)
1280  dist = pow((ordered_hits.at(index)->t - edges.at(3).t),2) + pow((ordered_hits.at(index)->w - edges.at(3).w),2);
1281  if(dist < hit_distance.at(6)) {
1282  hit_distance.at(6) = dist;
1283  hit_index.at(6) = index;
1284  }
1285 
1286  }
1287 
1288  // Loop over the resulting hit indexes and append unique hits to define the polygon to the return hit list
1289  std::set<size_t> unique_index;
1290  std::vector<size_t> candidate_polygon;
1291  candidate_polygon.reserve(9);
1292  // std::cout << "Original polygon: " << std::endl;
1293  for(auto &index : hit_index) {
1294 
1295  if(unique_index.find(index) == unique_index.end()) {
1296  // hitlistlocal.push_back((const util::PxHit*)(ordered_hits.at(index)));
1297  //std::cout << "(" << ordered_hits.at(index)->w << ", " << ordered_hits.at(index)->t << ")" << std::endl;
1298  unique_index.insert(index);
1299  candidate_polygon.push_back(index);
1300  }
1301  }
1302  for (auto &index: hit_index){
1303  candidate_polygon.push_back(index);
1304  break;
1305  }
1306 
1307  if(unique_index.size()>8) throw UtilException("Size of the polygon > 8!");
1308 
1309  //Untangle Polygon
1310  candidate_polygon = PolyOverlap( ordered_hits, candidate_polygon);
1311 
1312  hitlistlocal.clear();
1313  for( unsigned int i=0; i<(candidate_polygon.size()-1); i++){
1314  hitlistlocal.push_back((const util::PxHit*)(ordered_hits.at(candidate_polygon.at(i))));
1315  }
1316  //check that polygon does not have more than 8 sides
1317  if(unique_index.size()>8) throw UtilException("Size of the polygon > 8!");
1318  }
unsigned int Nwires(unsigned int p, unsigned int tpc=0, unsigned int cstat=0) const
Returns the total number of wires in the specified plane.
const detinfo::DetectorProperties * detp
virtual unsigned int NumberTimeSamples() const =0
const geo::GeometryCore * geom
std::vector< size_t > PolyOverlap(std::vector< const util::PxHit * > ordered_hits, std::vector< size_t > candidate_polygon)
Double_t util::GeometryUtilities::WireTimeToCmCm ( ) const
inline

Definition at line 274 of file GeometryUtilities.h.

References fWireTimetoCmCm.

274 {return fWireTimetoCmCm;}

Member Data Documentation

util::GeometryUtilities * util::GeometryUtilities::_me = 0
staticprivate

Definition at line 55 of file GeometryUtilities.h.

Referenced by GetME().

Double_t util::GeometryUtilities::fDriftVelocity
private

Definition at line 294 of file GeometryUtilities.h.

Referenced by Get2DPointProjection(), GetTimeTicks(), and Reconfigure().

UInt_t util::GeometryUtilities::fNPlanes
private

Definition at line 295 of file GeometryUtilities.h.

Referenced by GetProjectedPoint(), Nplanes(), and Reconfigure().

Double_t util::GeometryUtilities::fTimeTick
private

Definition at line 293 of file GeometryUtilities.h.

Referenced by Get2DPointProjection(), GetTimeTicks(), and Reconfigure().

Double_t util::GeometryUtilities::fTimetoCm
private
Double_t util::GeometryUtilities::fWirePitch
private

Definition at line 292 of file GeometryUtilities.h.

Referenced by Reconfigure().

Double_t util::GeometryUtilities::fWireTimetoCmCm
private
std::vector< Double_t > util::GeometryUtilities::vertangle
private

Definition at line 291 of file GeometryUtilities.h.

Referenced by Get3DaxisN(), Get3DSpecialCaseTheta(), and Reconfigure().


The documentation for this class was generated from the following files: