Public Member Functions | Private Member Functions | Private Attributes | List of all members
LBNESurveyedPt Class Reference

#include <LBNESurveyor.hh>

Public Member Functions

 LBNESurveyedPt ()
 
 LBNESurveyedPt (const std::string &aName)
 
 LBNESurveyedPt (const std::string &aName, const G4ThreeVector &tolerance)
 
const std::stringGetName () const
 
void SetTolerance (const G4ThreeVector &tolerance)
 
void SetPosition (const G4ThreeVector &pos)
 
const G4ThreeVector & GetTolerance () const
 
const G4ThreeVector & GetPosition () const
 
void SetPositionByTolerance (bool t)
 
bool IsPositionSetByTolerance () const
 

Private Member Functions

void defineMessenger ()
 

Private Attributes

std::string fName
 
bool fPositionSetByTolerance
 
G4ThreeVector fTolerance
 
G4ThreeVector fPosition
 

Detailed Description

Definition at line 74 of file LBNESurveyor.hh.

Constructor & Destructor Documentation

LBNESurveyedPt::LBNESurveyedPt ( )

Definition at line 118 of file LBNESurveyor.cc.

118  :
119 fName(""),
121 fTolerance(1.0e-6, 1.0e-6, 1.0e-6),
122 fPosition(0., 0., 0.) // messenger undefined if point is not named.
123 {}
std::string fName
Definition: LBNESurveyor.hh:81
G4ThreeVector fPosition
Definition: LBNESurveyor.hh:86
G4ThreeVector fTolerance
Definition: LBNESurveyor.hh:83
bool fPositionSetByTolerance
Definition: LBNESurveyor.hh:82
LBNESurveyedPt::LBNESurveyedPt ( const std::string aName)

Definition at line 125 of file LBNESurveyor.cc.

125  :
126 fName(aName),
128 fTolerance(1.0e-6, 1.0e-6, 1.0e-6),
129 fPosition(0., 0., 0.)
130 {
131  defineMessenger();
132 }
std::string fName
Definition: LBNESurveyor.hh:81
G4ThreeVector fPosition
Definition: LBNESurveyor.hh:86
G4ThreeVector fTolerance
Definition: LBNESurveyor.hh:83
bool fPositionSetByTolerance
Definition: LBNESurveyor.hh:82
void defineMessenger()
LBNESurveyedPt::LBNESurveyedPt ( const std::string aName,
const G4ThreeVector &  tolerance 
)

Definition at line 134 of file LBNESurveyor.cc.

134  :
135 fName(aName),
138 fPosition(0., 0., 0.)
139 {
140  defineMessenger();
141 }
double const tolerance
std::string fName
Definition: LBNESurveyor.hh:81
G4ThreeVector fPosition
Definition: LBNESurveyor.hh:86
G4ThreeVector fTolerance
Definition: LBNESurveyor.hh:83
bool fPositionSetByTolerance
Definition: LBNESurveyor.hh:82
void defineMessenger()

Member Function Documentation

void LBNESurveyedPt::defineMessenger ( )
private

Definition at line 143 of file LBNESurveyor.cc.

143  {
144 
145  /*
146  // This does not work: the G4UIcommand does not appropriate copy constructors.
147  // or assignment operator...
148  std::string descr("Surveyed Position of the ");
149  std::string fullName("/LBNE/Surveyor/");
150  fullName += fName;
151  descr += fName;
152  if (fName.find("Horn1") != std::string::npos) {
153  if (fName.find("UpstreamLeftBall") != std::string::npos)
154  descr += std::string(" Surveyed Position of the upstream, left side alignment Ball for Horn1 ") ;
155  if (fName.find("UpstreamRightBall") != std::string::npos)
156  descr += std::string(" Surveyed Position of the upstream, side side alignment Ball for Horn1 ") ;
157  if (fName.find("DowstreamAnchor") != std::string::npos)
158  descr += std::string(" Surveyed Position downstream fixed point for Horn1 ") ;
159  }
160  if (fName.find("TargetCanister") != std::string::npos) {
161  descr += std::string(", ");
162  if (fName.find("Upstream") != std::string::npos) descr += " Upstream, ";
163  else if (fName.find("ownstream") != std::string::npos) descr += " Downstream, ";
164  if (fName.find("Left") != std::string::npos) descr += " left side ";
165  else if (fName.find("Right") != std::string::npos) descr += " right side ";
166  descr += std::string("alignment pin for the target canister ") ;
167  }
168 
169  fMessenger = LBNESurveyorMessenger(this, fullName, descr);
170  */
171 }
const std::string& LBNESurveyedPt::GetName ( ) const
inline

Definition at line 90 of file LBNESurveyor.hh.

90 {return fName;}
std::string fName
Definition: LBNESurveyor.hh:81
const G4ThreeVector& LBNESurveyedPt::GetPosition ( ) const
inline

Definition at line 94 of file LBNESurveyor.hh.

94 { return fPosition; }
G4ThreeVector fPosition
Definition: LBNESurveyor.hh:86
const G4ThreeVector& LBNESurveyedPt::GetTolerance ( ) const
inline

Definition at line 93 of file LBNESurveyor.hh.

93 { return fTolerance; }
G4ThreeVector fTolerance
Definition: LBNESurveyor.hh:83
bool LBNESurveyedPt::IsPositionSetByTolerance ( ) const
inline

Definition at line 96 of file LBNESurveyor.hh.

96 { return fPositionSetByTolerance;}
bool fPositionSetByTolerance
Definition: LBNESurveyor.hh:82
void LBNESurveyedPt::SetPosition ( const G4ThreeVector &  pos)
inline

Definition at line 92 of file LBNESurveyor.hh.

92 { fPosition = pos;}
G4ThreeVector fPosition
Definition: LBNESurveyor.hh:86
void LBNESurveyedPt::SetPositionByTolerance ( bool  t)

Definition at line 174 of file LBNESurveyor.cc.

174  {
176  if (!t) return;
177  //
178  // Set the position. Assume a flat distribution within tolerance.. for now...
179  //
180  for (size_t k=0; k!=3; ++k) fPosition[k] = 2.0*fTolerance[k]*(G4RandFlat::shoot() -0.5);
181 }
G4ThreeVector fPosition
Definition: LBNESurveyor.hh:86
G4ThreeVector fTolerance
Definition: LBNESurveyor.hh:83
bool fPositionSetByTolerance
Definition: LBNESurveyor.hh:82
void LBNESurveyedPt::SetTolerance ( const G4ThreeVector &  tolerance)
inline

Definition at line 91 of file LBNESurveyor.hh.

91 { fTolerance = tolerance; }
double const tolerance
G4ThreeVector fTolerance
Definition: LBNESurveyor.hh:83

Member Data Documentation

std::string LBNESurveyedPt::fName
private

Definition at line 81 of file LBNESurveyor.hh.

G4ThreeVector LBNESurveyedPt::fPosition
private

Definition at line 86 of file LBNESurveyor.hh.

bool LBNESurveyedPt::fPositionSetByTolerance
private

Definition at line 82 of file LBNESurveyor.hh.

G4ThreeVector LBNESurveyedPt::fTolerance
private

Definition at line 83 of file LBNESurveyor.hh.


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