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

#include <LBNESurveyor.hh>

Public Member Functions

 LBNESurveyor (LBNESurveyor const &)
 
LBNESurveyoroperator= (LBNESurveyor const &)
 
void AddPoint (const std::string &aName)
 
void AddPoint (const std::string &aName, const G4ThreeVector tolerance)
 
std::vector< LBNESurveyedPt >::const_iterator begin () const
 
std::vector< LBNESurveyedPt >::const_iterator end () const
 
size_t size () const
 
void SetIt ()
 
std::vector< LBNESurveyedPt >::const_iterator GetPoint (const std::string &aName) const
 
bool IsVolumeMisaligned (const std::string &vName) const
 
void setPointPosition (const std::string &aName, const G4ThreeVector &position)
 
void setPointTolerance (const std::string &aName, const G4ThreeVector &tolerance)
 
void setPointPositionWithinTolerance (const std::string &aName)
 

Static Public Member Functions

static LBNESurveyorInstance ()
 

Private Member Functions

 LBNESurveyor ()
 
void SetThings ()
 

Private Attributes

std::vector< LBNESurveyedPtfData
 
LBNEAllSurveyorMessengerfAllMessenger
 

Static Private Attributes

static LBNESurveyorfInstance = 0
 

Detailed Description

Definition at line 107 of file LBNESurveyor.hh.

Constructor & Destructor Documentation

LBNESurveyor::LBNESurveyor ( )
private

Definition at line 189 of file LBNESurveyor.cc.

190 {
191 
192 // std::cerr << " LBNESurveyor::LBNESurveyor, start ... " << std::endl;
194  SetThings();
195 }
LBNEAllSurveyorMessenger * fAllMessenger
void SetThings()
LBNESurveyor::LBNESurveyor ( LBNESurveyor const &  )

Member Function Documentation

void LBNESurveyor::AddPoint ( const std::string aName)
inline

Definition at line 121 of file LBNESurveyor.hh.

121  {
122  fData.push_back(LBNESurveyedPt(aName));
123  }
std::vector< LBNESurveyedPt > fData
void LBNESurveyor::AddPoint ( const std::string aName,
const G4ThreeVector  tolerance 
)
inline

Definition at line 124 of file LBNESurveyor.hh.

124  {
125  fData.push_back(LBNESurveyedPt(aName, tolerance));
126  }
double const tolerance
std::vector< LBNESurveyedPt > fData
std::vector<LBNESurveyedPt>::const_iterator LBNESurveyor::begin ( ) const
inline

Definition at line 127 of file LBNESurveyor.hh.

127 { return fData.begin();}
std::vector< LBNESurveyedPt > fData
std::vector<LBNESurveyedPt>::const_iterator LBNESurveyor::end ( ) const
inline

Definition at line 128 of file LBNESurveyor.hh.

128 { return fData.end();}
std::vector< LBNESurveyedPt > fData
std::vector<LBNESurveyedPt>::const_iterator LBNESurveyor::GetPoint ( const std::string aName) const
inline

Definition at line 132 of file LBNESurveyor.hh.

132  {
133  for(std::vector<LBNESurveyedPt>::const_iterator it=fData.begin(); it!=fData.end(); ++it) {
134  if (aName == it->GetName()) return it;
135  }
136  return fData.end();
137  }
intermediate_table::const_iterator const_iterator
std::vector< LBNESurveyedPt > fData
LBNESurveyor * LBNESurveyor::Instance ( )
static

Definition at line 184 of file LBNESurveyor.cc.

184  {
185  if (fInstance == 0) fInstance = new LBNESurveyor();
186  return fInstance;
187 }
static LBNESurveyor * fInstance
bool LBNESurveyor::IsVolumeMisaligned ( const std::string vName) const
inline

Definition at line 138 of file LBNESurveyor.hh.

138  {
139  for(std::vector<LBNESurveyedPt>::const_iterator it=fData.begin(); it!=fData.end(); ++it) {
140  if (it->GetName().find(vName) != std::string::npos) {
141  G4ThreeVector pp = it->GetPosition();
142  if (std::abs(pp[0]) > 1.0e-6*CLHEP::mm) return true;
143  if (std::abs(pp[1]) > 1.0e-6*CLHEP::mm) return true;
144  }
145  }
146  return false;
147  }
intermediate_table::const_iterator const_iterator
T abs(T value)
std::vector< LBNESurveyedPt > fData
LBNESurveyor& LBNESurveyor::operator= ( LBNESurveyor const &  )
void LBNESurveyor::SetIt ( )

Definition at line 196 of file LBNESurveyor.cc.

196  { // Randomize, perhaps.. Not commissioned..
197 /*
198  for(std::vector<LBNESurveyedPt>::iterator itPt=fData.begin(); itPt != fData.end(); ++itPt) {
199  if (itPt->IsPositionSetByTolerance()) itPt->SetPositionByTolerance(false);
200  }
201  SetThings(); // a place holder for now..
202  const double toleranceTarget= 0.1; // This parameter will most likely have a G4Messenger associated to it.
203 // TieTargetSegments(toleranceTarget);
204 */
205 }
void LBNESurveyor::setPointPosition ( const std::string aName,
const G4ThreeVector &  position 
)
inline

Definition at line 148 of file LBNESurveyor.hh.

148  {
149  for(std::vector<LBNESurveyedPt>::iterator it=fData.begin(); it!=fData.end(); ++it) {
150  if (aName == it->GetName()) it->SetPosition(position);
151  }
152  }
intermediate_table::iterator iterator
std::vector< LBNESurveyedPt > fData
void LBNESurveyor::setPointPositionWithinTolerance ( const std::string aName)
void LBNESurveyor::setPointTolerance ( const std::string aName,
const G4ThreeVector &  tolerance 
)
inline

Definition at line 153 of file LBNESurveyor.hh.

153  {
154  for(std::vector<LBNESurveyedPt>::iterator it=fData.begin(); it!=fData.end(); ++it) {
155  if (aName == it->GetName()) it->SetTolerance(tolerance);
156  }
157  }
intermediate_table::iterator iterator
double const tolerance
std::vector< LBNESurveyedPt > fData
void LBNESurveyor::SetThings ( )
private

Definition at line 206 of file LBNESurveyor.cc.

206  {
207 
208 //
209 // Setting real aligned placements by tolerance, i.e. assign random position of objects, was
210 // viewed as "strange and not really needed" by Jim Hylen and Tom Junk. So, leave on the back burner
211 // and install a few points for only for the target, and Horn1
212 //
213 
214  AddPoint(std::string("UpstreamLeftPinTargetCanister"));
215  AddPoint(std::string("UpstreamRightPinTargetCanister"));
216  AddPoint(std::string("DownstreamLeftPinTargetCanister"));
217  AddPoint(std::string("DownstreamRightPinTargetCanister"));
218 //
219  AddPoint(std::string("UpstreamLeftPinTargetHeTube"));
220  AddPoint(std::string("UpstreamRightPinTargetHeTube"));
221  AddPoint(std::string("DownstreamLeftPinTargetHeTube"));
222  AddPoint(std::string("DownstreamRightPinTargetHeTube"));
223 
224  AddPoint(std::string("UpstreamLeftBallHorn1"));
225  AddPoint(std::string("UpstreamRightBallHorn1"));
226  AddPoint(std::string("DownstreamLeftBallHorn1"));
227  AddPoint(std::string("DownstreamRightBallHorn1"));
228 
229  AddPoint(std::string("UpstreamLeftBallHorn2"));
230  AddPoint(std::string("UpstreamRightBallHorn2"));
231  AddPoint(std::string("DownstreamLeftBallHorn2"));
232  AddPoint(std::string("DownstreamRightBallHorn2"));
233 
234  AddPoint(std::string("UpstreamLeftBallHorn3"));
235  AddPoint(std::string("UpstreamRightBallHorn3"));
236  AddPoint(std::string("DownstreamLeftBallHorn3"));
237  AddPoint(std::string("DownstreamRightBallHorn3"));
238 
239  AddPoint(std::string("UpstreamLeftDecayPipe"));
240  AddPoint(std::string("UpstreamRightDecayPipe"));
241  AddPoint(std::string("DownstreamLeftDecayPipe"));
242  AddPoint(std::string("DownstreamRightDecayPipe"));
243 
245 
246 }
LBNEAllSurveyorMessenger * fAllMessenger
std::string string
Definition: nybbler.cc:12
void AddPoint(const std::string &aName)
size_t LBNESurveyor::size ( ) const
inline

Definition at line 129 of file LBNESurveyor.hh.

129 { return fData.size();}
std::vector< LBNESurveyedPt > fData

Member Data Documentation

LBNEAllSurveyorMessenger* LBNESurveyor::fAllMessenger
private

Definition at line 115 of file LBNESurveyor.hh.

std::vector<LBNESurveyedPt> LBNESurveyor::fData
private

Definition at line 113 of file LBNESurveyor.hh.

LBNESurveyor * LBNESurveyor::fInstance = 0
staticprivate

Definition at line 112 of file LBNESurveyor.hh.


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