SDetector/Station.cc
Go to the documentation of this file.
1 #include <sdet/Station.h>
2 #include <sdet/SDetector.h>
3 #include <mdet/MDetector.h>
4 #include <utl/GeometryUtilities.h>
5 #include <utl/UTMPoint.h>
6 #include <utl/Test.h>
7 #include <utl/UTCDateTime.h>
8 #include <sevt/PMT.h>
9 
10 #include <boost/lexical_cast.hpp>
11 #include <boost/dynamic_bitset.hpp>
12 
13 #include <iostream>
14 #include <sstream>
15 #include <bitset>
16 
17 using namespace det;
18 using namespace std;
19 using namespace utl;
20 
21 
22 namespace sdet {
23 
24  const Station&
25  Station::InternalPartnerStationFunctor::operator()(const int stationId)
26  const
27  {
28  return Detector::GetInstance().GetSDetector().GetStation(stationId);
29  }
30 
31 
32  Station::Station(const int id) :
33  fId(id)
34  {
35  /* Adding station id and hardware version to station index map which is
36  * passed to the managers with each GetStationData request (or when
37  * Handle is used). */
38  fStationIndexMap["stationId"] = boost::lexical_cast<string>(id);
39  fStationIndexMap["isUUB"] = boost::lexical_cast<string>(fIsUUB);
40 
41  // Constructing PMTs
42  for (unsigned int i = kFirstWaterCherenkovLargePMTId;
44  const auto pmt = new PMT(i, id, IsUUB(), PMTConstants::eWaterCherenkovLarge);
45  fPMTVector.push_back(pmt);
46  }
47  }
48 
49 
51  {
52  for (const auto p : fPMTVector)
53  delete p;
54  }
55 
56 
57  bool
59  const
60  {
61  return Detector::GetInstance().GetMDetector().ExistsAssociatedCounter(GetId());
62  }
63 
64 
65  int
67  const
68  {
69  return Detector::GetInstance().GetMDetector().GetAssociatedCounterId(GetId());
70  }
71 
72 
73  const PMT&
74  Station::GetPMT(const int id)
75  const
76  {
77  for (const auto& p : fPMTVector)
78  if (p->GetId() == id)
79  return *p;
80  ostringstream err;
81  err << "Invalid request for PMT with Id: " << id;
82  throw NonExistentComponentException(err.str());
83  }
84 
85 
86  const PMT&
88  const
89  {
90  return GetPMT(pmt.GetId());
91  }
92 
93 
94  const PMT&
96  const
97  {
98  // Check to ensure that there is only one PMT of the given type
100  std::ostringstream err;
101  err << "The station appears to contain more than one small PMT"
102  "which is neither expected nor allowed.";
103  ERROR(err);
104  throw utl::DoesNotComputeException(err.str());
105  }
106  // Find and return PMT of requested type
107  for (const auto p : fPMTVector)
109  return *p;
110  std::ostringstream err;
111  err << "Small PMT does not exist.";
112  ERROR(err);
113  throw utl::NonExistentComponentException(err.str());
114  }
115 
116 
117  const PMT&
119  const
120  {
121  // Check to ensure that there is only one PMT of the given type
123  std::ostringstream err;
124  err << "The station appears to contain more than one scintillator PMT"
125  "which is neither expected nor allowed.";
126  ERROR(err);
127  throw utl::DoesNotComputeException(err.str());
128  }
129  // Find and return PMT of requested type
130  for (const auto p : fPMTVector)
131  if (p->GetType() == sdet::PMTConstants::eScintillator)
132  return *p;
133  std::ostringstream err;
134  err << "Scintillator PMT does not exist.";
135  ERROR(err);
136  throw utl::NonExistentComponentException(err.str());
137  }
138 
139 
140  const string&
142  const
143  {
144  if (!fName.IsValid()) {
145  GetStationData(fName.Get(), "name", "stationList", "station name");
146  fName.SetValid();
147  }
148  return fName.Get();
149  }
150 
151 
152  unsigned int
154  const
155  {
156  if (!fFADCTraceLength.IsValid()) {
157  const det::ManagerRegister& m = det::Detector::GetInstance().GetSManagerRegister();
158  m.GetDataOrThrow(fFADCTraceLength.Get(), "electronics", "traceBins", fStationIndexMap);
160  }
161  return fFADCTraceLength.Get();
162  }
163 
164 
165  double
167  const
168  {
169  if (!fFADCBinSize.IsValid()) {
170  double frequency = 0;
171  GetStationData(frequency, "frequency", "electronics", "fadc electronics frequency");
172  fFADCBinSize = 1 / frequency;
173  }
174  return fFADCBinSize.Get();
175  }
176 
177 
178  double
180  const
181  {
182  if (!fTimingUncertainty.IsValid()) {
183  GetStationData(fTimingUncertainty.Get(), "timingUncertainty", "electronics", "timing uncertainty");
185  }
186  return fTimingUncertainty.Get();
187  }
188 
189 
190  unsigned int
192  const
193  {
194  if (!fSaturationValue.IsValid()) {
195  int bits = 0;
196  GetStationData(bits, "bits", "electronics", "fadc bits");
197  fSaturationValue = (1 << bits) - 1;
198  }
199  return fSaturationValue.Get();
200  }
201 
202 
203  int
205  const
206  {
207  if (!fLatchBin.IsValid()) {
208  GetStationData(fLatchBin.Get(), "latchBin", "electronics", "latch bin of trace");
210  }
211  return fLatchBin.Get();
212  }
213 
214 
215  const TabulatedFunction&
217  const
218  {
221  GetStationData(*fElectronicsImpulseResponse, "impulseResponse", "electronics", "electronics impulse response");
222  }
224  }
225 
226 
227  double
229  const
230  {
231  if (!fRadius.IsValid()) {
232  GetStationData(fRadius.Get(), "insideRadius", "tankCasing", "tank casing inside radius");
233  fRadius.SetValid();
234  }
235  return fRadius.Get();
236  }
237 
238 
239  double
241  const
242  {
243  if (!fHeight.IsValid()) {
244  GetStationData(fHeight.Get(), "insideHeight", "tankCasing", "tank casing inside height");
245  fHeight.SetValid();
246  }
247  return fHeight.Get();
248  }
249 
250 
251  double
253  const
254  {
255  if (!fThickness.IsValid()) {
256  GetStationData(fThickness.Get(), "casingThickness", "tankCasing", "tank casing wall thickness");
258  }
259  return fThickness.Get();
260  }
261 
262 
263  const TabulatedFunction&
265  const
266  {
267  if (!fWaterAbsLength) {
269  GetStationData(*fWaterAbsLength, "waterAbsorptionLength", "water", "water absorption length");
270  }
271  return *fWaterAbsLength;
272  }
273 
274 
275  const TabulatedFunction&
277  const
278  {
279  if (!fWaterRefractionIndex) {
281  GetStationData(*fWaterRefractionIndex, "waterRefractionIndex", "water", "water refraction index");
282  }
283  return *fWaterRefractionIndex;
284  }
285 
286 
287  const TabulatedFunction&
289  const
290  {
291  if (!fLinerReflectivity) {
293  GetStationData(*fLinerReflectivity, "reflectivity", "liner", "liner reflectivity");
294  }
295  return *fLinerReflectivity;
296  }
297 
298 
299  const TabulatedFunction&
301  const
302  {
303  if (!fLinerSpecularLobe) {
305  GetStationData(*fLinerSpecularLobe, "specularLobe", "liner", "liner specular lobe constant");
306  }
307  return *fLinerSpecularLobe;
308  }
309 
310 
311  const TabulatedFunction&
313  const
314  {
315  if (!fLinerSpecularSpike) {
317  GetStationData(*fLinerSpecularSpike, "specularSpike", "liner", "liner specular spike constant");
318  }
319  return *fLinerSpecularSpike;
320  }
321 
322 
323  double
325  const
326  {
327  if (!fLinerSigmaAlpha.IsValid()) {
328  double sa;
329  GetStationData(sa, "sigmaAlpha", "liner", "liner sigma_alpha");
330  fLinerSigmaAlpha = sa;
331  }
332  return fLinerSigmaAlpha.Get();
333  }
334 
335 
336  bool
338  const
339  {
340  if (!fIsInAcquisition.IsValid()) {
341  int is;
342  GetStationData(is, "station_in_acquisition", "is_in_acquisition", "station in acquisition flag");
344  }
345  return fIsInAcquisition.Get();
346  }
347 
348 
349  int
351  const
352  {
353  if (!fGroupId.IsValid()) {
354  GetStationData(fGroupId.Get(), "groupId", "stationList", "group id");
355  fGroupId.SetValid();
356  }
357  return fGroupId.Get();
358  }
359 
360 
361  const TimeRange&
363  const
364  {
365  if (!fCommissionTimeRange.IsValid()) {
366  string timeString;
367  GetStationData(timeString, "commission", "stationList", "commission time");
368  const auto start = boost::lexical_cast<UTCDateTime>(timeString).GetTimeStamp();
369  GetStationData(timeString, "decommission", "stationList", "commission time");
370  const auto stop = boost::lexical_cast<UTCDateTime>(timeString).GetTimeStamp();
371  fCommissionTimeRange = TimeRange(start, stop);
372  }
373  return fCommissionTimeRange.Get();
374  }
375 
376 
377  const TimeStamp&
379  const
380  {
381  if (!fUUBCommissionTime.IsValid()) {
382  string timeString;
383  GetStationData(timeString, "commissionUUB", "stationList", "uub commissioning time");
384  fUUBCommissionTime = boost::lexical_cast<UTCDateTime>(timeString).GetTimeStamp();
385  }
386  return fUUBCommissionTime.Get();
387  }
388 
389 
390  Point // <-- we don't want to return a const reference here due to the creep bug!
392  const
393  {
394  if (!fPosition.IsValid()) {
395 
396  double northing = 0;
397  GetStationData(northing, "northing", "stationList", "northing");
398  double easting = 0;
399  GetStationData(easting, "easting", "stationList", "easting");
400  double altitude = 0;
401  GetStationData(altitude, "altitude", "stationList", "altitude");
402 
403  string ellipsoid;
404  GetStationData(ellipsoid, "ellipsoid", "stationList", "ellipsoid for UTM conversion");
405  fEllipsoid = ReferenceEllipsoid::GetEllipsoidIDFromString(ellipsoid);
406  string band;
407  GetStationData(band, "band", "stationList", "band for UTM conversion");
408  int zone = 0;
409  GetStationData(zone, "zone", "stationList", "zone for UTM conversion");
410 
411  const UTMPoint utmPosition(northing, easting, altitude, zone, band[0], fEllipsoid);
412  const CoordinateSystemPtr cs = Detector::GetInstance().GetSiteCoordinateSystem();
413  fPosition = utmPosition.GetPoint(cs);
414 
415  }
416 
417  return fPosition.Get();
418  }
419 
420 
421  const vector<int>&
423  const
424  {
425  if (!fPartnerIds.IsValid()) {
426  fPartnerIds.Get().clear();
427  GetStationData(fPartnerIds.Get(), "stationGroup", "stationList", "get partners");
429  }
430  return fPartnerIds.Get();
431  }
432 
433 
434  int
436  const
437  {
438  return SetPartnerIds().size();
439  }
440 
441 
442  bool
444  const
445  {
446  if (!fInGrid.IsValid()) {
447  InGridType& inGrid = fInGrid.Get();
448  inGrid.reset();
449  vector<bool> data;
450  GetStationData(data, "inGrid", "stationList", "get is-in-grid");
451  for (size_t i = 0, nd = data.size(), ni = inGrid.size(); i < nd && i < ni; ++i)
452  inGrid[i] = data[i];
453  fInGrid.SetValid();
454  }
455 
456  const InGridType& inGrid = fInGrid.Get();
457  if (index == SDetectorConstants::eAny)
458  return inGrid.any();
459  else
460  return inGrid[index];
461  }
462 
463 
464  const vector<double>&
466  const
467  {
468  if (!fAxes.IsValid()) {
469  fAxes.Get().clear();
470  double axis = 0;
471  GetStationData(axis, "axis1", "stationList", "get axis1");
472  fAxes.Get().push_back(axis);
473  GetStationData(axis, "axis2", "stationList", "get axis2");
474  fAxes.Get().push_back(axis);
475  fAxes.SetValid();
476  }
477  return fAxes.Get();
478  }
479 
480 
482  Station::GetCrown(const int i)
483  const
484  {
485  const auto levelIt = fCrowns.find(i);
486 
487  if (levelIt != fCrowns.end())
488 
489  return levelIt->second;
490 
491  else {
492 
493  auto indexMap = fStationIndexMap;
494  indexMap["crown"] = boost::lexical_cast<string>(i);
495 
496  const auto& manager = Detector::GetInstance().GetSManagerRegister();
497 
499  const auto status = manager.GetData(crown, "crown", "stationList", indexMap);
500 
501  if (status == VManager::eNotFound) {
502  ostringstream err;
503  err << "Crown level " << i << " "
504  "for station " << fId << " "
505  "has not been found by any of the available managers.";
506  NotFoundAndThrow(err.str());
507  }
508 
509  const auto where = fCrowns.insert(make_pair(i, crown));
510  return where.first->second;
511 
512  }
513  }
514 
515 
516  void
517  Station::NotFoundAndThrow(const string& msg)
518  const
519  {
520  ostringstream err;
521  err << "Did not find requested component: '" << msg
522  << "' for station = " << fStationIndexMap["stationId"];
523  throw NonExistentComponentException(err.str());
524  }
525 
526 
528  Station::GetLocalCoordinateSystem()
529  const
530  {
531  if (!fReferenceSystem)
532  fReferenceSystem = fwk::LocalCoordinateSystem::Create(GetPosition());
533 
534  return fReferenceSystem;
535  }
536 
537 
538  void
540  const
541  {
542  // Clean all the variables that might change with time and delete whatever was allocated in the Get*'s
543 
544  fIsInAcquisition.SetValid(false);
545  fPartnerIds.SetValid(false);
546 
547  if (fDense) {
548  fPosition.SetValid(false);
549  fReferenceSystem = CoordinateSystemPtr(); // clear the CS ptr so positions can be Updated correctly
550  } else {
551  const auto& dTime = Detector::GetInstance().GetTime();
552  const bool isUUB = (GetUUBCommissionTime() < dTime);
553  if (isUUB != fIsUUB)
554  UpdateElectronics(isUUB);
555  }
556 
557  if (fScintillator)
558  fScintillator->Update();
559 
560  for (const auto p : fPMTVector)
561  p->Update();
562 
563  fCrowns.clear();
564  }
565 
566 
567  void
568  Station::UpdateElectronics(const bool isuub)
569  const
570  {
571  // Do nothing if electronics is already in requested state
572  if (fIsUUB == isuub)
573  return;
574 
575  // Clearing variables which are different between hardware versions
576  fFADCTraceLength.SetValid(false);
577  fFADCBinSize.SetValid(false);
578  fTimingUncertainty.SetValid(false);
579  fLatchBin.SetValid(false);
580  fSaturationValue.SetValid(false);
581  fElectronicsImpulseResponse = nullptr;
582 
583  /* Because fIsUUB is passed to PMTs during
584  construction and is necessary for PMTs to retrieve
585  data through the managers, all PMTs are deleted
586  and recreated here, with the new fIsUUB status
587  being passed as an argument of the PMT constructor.
588  This process could be replaced with a private
589  SetIsUUB member function of the PMT class
590  that is visible only to the station through
591  friendship. Then again, the electronics-related
592  properties of the PMT need to be updated at the same
593  time anyway. Most of the same reasoning applies for
594  fScintillator. */
595 
596  /* Store whether small PMT was present to know whether
597  to recreate it with new electronics properties below. */
598  const bool hadSmallPMT = HasSmallPMT();
599 
600  for (const auto p : fPMTVector)
601  delete p;
602  fPMTVector.clear();
603 
604  fIsUUB = isuub;
605  fStationIndexMap["isUUB"] = boost::lexical_cast<string>(fIsUUB);
606 
607  /* The 3 PMTs of type eWaterCherenkovLarge must always be re-created
608  if there is a change in electronics. See comment above for
609  reasoning. */
610  for (unsigned int i = kFirstWaterCherenkovLargePMTId;
611  i <= kLastWaterCherenkovLargePMTId; ++i) {
612  const auto pmt = new PMT(i, fId, fIsUUB, PMTConstants::eWaterCherenkovLarge);
613  fPMTVector.push_back(pmt);
614  }
615 
616  if (hadSmallPMT)
617  MakeSmallPMT();
618 
619  if (fScintillator) {
620  /* Must be set to 0 for re-creation with MakeScintillator() with correct
621  This could be avoided with implementation inside a Scintillator Update
622  method. */
623  fScintillator = nullptr;
624  MakeScintillator();
625  }
626  }
627 
628 
629  void
630  Station::MakeScintillator()
631  const
632  {
633  // Do nothing if scintillator already exists
634  if (fScintillator)
635  return;
636 
637  fScintillator = new Scintillator(fId, fIsUUB);
638  const auto pmt = new PMT(kScintillatorPMTId, fId, fIsUUB, sdet::PMTConstants::eScintillator);
639  fPMTVector.push_back(pmt);
640  }
641 
642 
643  void
644  Station::RemoveScintillator()
645  const
646  {
647  // Do nothing if scintillator doesn't exist
648  if (!fScintillator)
649  return;
650  fScintillator = nullptr;
651 
652  for (auto pmtIt = fPMTVector.begin(); pmtIt != fPMTVector.end(); ) {
653  const auto pmtPtr = *pmtIt;
654  if (pmtPtr->GetType() == sdet::PMTConstants::eScintillator) {
655  delete pmtPtr;
656  fPMTVector.erase(pmtIt);
657  continue;
658  }
659  ++pmtIt;
660  }
661  }
662 
663 
664  void
665  Station::MakeSmallPMT()
666  const
667  {
668  if (HasSmallPMT())
669  return;
670 
671  const auto pmt = new PMT(kWaterCherenkovSmallPMTId, fId, fIsUUB, sdet::PMTConstants::eWaterCherenkovSmall);
672  fPMTVector.push_back(pmt);
673  }
674 
675 
676  void
677  Station::RemoveSmallPMT()
678  const
679  {
680  // Do nothing if small PMT doesn't exist
681  if (!HasSmallPMT())
682  return;
683 
684  for (auto pmtIt = fPMTVector.begin(); pmtIt != fPMTVector.end(); ) {
685  const auto pmtPtr = *pmtIt;
686  if (pmtPtr->GetType() == sdet::PMTConstants::eScintillator) {
687  delete pmtPtr;
688  fPMTVector.erase(pmtIt);
689  continue;
690  }
691  ++pmtIt;
692  }
693  }
694 
695 
696  unsigned int
697  Station::GetNPMTs(const sdet::PMTConstants::PMTType type)
698  const
699  {
700  if (type == sdet::PMTConstants::eAnyType)
701  return fPMTVector.size();
702 
703  unsigned int n = 0;
704  for (const auto p : fPMTVector)
705  if (p->GetType() == type)
706  ++n;
707  return n;
708  }
709 
710 
711  void
712  Station::InitializeShape(vector<double>& histox, const int nBins, const double dt)
713  {
714  histox.clear();
715  histox.reserve(nBins + 1);
716  for (int i = 0; i <= nBins; ++i)
717  histox.push_back(i * dt);
718  }
719 
720 
721  const vector<double>&
722  Station::GetMuonShapeHistogramBinning(const int calibrationVersion)
723  const
724  {
725  if (IsUUB()) {
726  // different number of bins for UUBs
727  static vector<double> muShapeUUB;
728  if (muShapeUUB.empty())
729  InitializeShape(muShapeUUB, 70, fFADCBinSize.Get());
730  return muShapeUUB;
731  }
732 
733  // UB
734 
735  if (calibrationVersion == 13) {
736  // slightly different for LS calibration version 13
737  static vector<double> muShape13;
738  if (muShape13.empty())
739  InitializeShape(muShape13, 19, fFADCBinSize.Get());
740  return muShape13;
741  }
742 
743  static vector<double> muShape;
744  if (muShape.empty())
745  InitializeShape(muShape, 20, fFADCBinSize.Get());
746  return muShape;
747  }
748 
749 
750  bool
751  Station::HasSmallPMT()
752  const
753  {
754  for (const auto p : fPMTVector)
756  return true;
757  return false;
758  }
759 
760 
761  bool
762  Station::IsInsideStation(const utl::Point& pos)
763  const
764  {
765  const auto& cs = GetLocalCoordinateSystem();
766  const double stationRadius = GetRadius();
767  const double stationHeight = GetHeight();
768  return (pos.GetRho(cs) < stationRadius && pos.GetZ(cs) < stationHeight);
769  }
770 
771 
772  bool
773  Station::IsHit(const Point& particlePoint, const Vector& particleDirection, Point& where)
774  const
775  {
776  static const double farAway2 = Sqr(1000*kilometer);
777  const Line particleLine(particlePoint, particleDirection);
778 
779  double minDistance2 = farAway2;
780 
781  /* top and bottom planes correspond to top and bottom of water volume
782  (not top and bottom of tank including casing). */
783  const double radius2 = Sqr(GetRadius());
784  const auto& cs = GetLocalCoordinateSystem();
785  Plane bottomPlane(Point(0, 0, GetThickness(), cs), Vector(0,0,1, cs));
786  Plane topPlane(Point(0, 0, GetHeight() + GetThickness(), cs), Vector(0,0,1, cs));
787 
788  // try top
789  where = Intersection(topPlane, particleLine);
790  if ((where - topPlane.GetAnchor()).GetMag2() < radius2) {
791  const double dist2 = (particlePoint - where).GetMag2();
792  if (dist2 < minDistance2)
793  minDistance2 = dist2;
794  }
795 
796  // try bottom
797  where = Intersection(bottomPlane, particleLine);
798  if ((where - bottomPlane.GetAnchor()).GetMag2() < radius2) {
799  const double dist2 = (particlePoint - where).GetMag2();
800  if (dist2 < minDistance2)
801  minDistance2 = dist2;
802  }
803 
804  // try side
805  const double ax = particleDirection.GetX(cs);
806  const double ay = particleDirection.GetY(cs);
807  const double px = particlePoint.GetX(cs);
808  const double py = particlePoint.GetY(cs);
809  const double a = Sqr(ax) + Sqr(ay);
810  const double b = 2*(ax*px + ay*py);
811  const double c = Sqr(px) + Sqr(py) - radius2;
812  const double disc = Sqr(b) - 4*a*c;
813  if (disc < 0)
814  return false;
815  const double ta = 2*a;
816  const double s0 = -b/ta;
817  const double delta = fabs(sqrt(disc)/ta);
818  const double s = s0 - delta; // this is the solution with shorter distance
819 
820  if (s > 0) {
821  where = particleLine.Propagate(s);
822  if (Sqr(s) < minDistance2 &&
823  Distance(bottomPlane, where) >= 0 && Distance(topPlane, where) <= 0)
824  minDistance2 = Sqr(s);
825  }
826 
827  if (Test<Not<CloseTo>>(minDistance2, farAway2)) {
828  where = particleLine.Propagate(sqrt(minDistance2));
829  return true;
830  }
831 
832  return false;
833  }
834 
835 }
unsigned int GetNPMTs(const PMTConstants::PMTType type=PMTConstants::eAnyType) const
Number of pmts in station.
const utl::TimeRange & GetCommissionTimeRange() const
Station commission time range.
const StationIdCollection & GetCrown(const int level) const
Returns a list of station id&#39;s in the crown. If the argument is 0, it returns the station id...
InternalPMTVector fPMTVector
double GetTimingUncertainty() const
constexpr T Sqr(const T &x)
void NotFoundAndThrow(const std::string &msg) const
Point object.
Definition: Point.h:32
int GetAssociatedCounterId() const
the identifier of the associated muon Counter.
class to hold data at PMT level
Definition: SEvent/PMT.h:28
utl::Validated< double > fFADCBinSize
int GetGroupId() const
returns unique identifier of a group of stations or zero (if single)
Time interval defined by two TimeStamps.
Definition: TimeRange.h:23
bool IsUUB() const
Detector description interface for PMT-related data.
Definition: SDetector/PMT.h:26
Class to hold and convert a point in geodetic coordinates.
Definition: UTMPoint.h:40
utl::Validated< utl::TimeRange > fCommissionTimeRange
utl::Validated< int > fGroupId
Class to hold collection (x,y) points and provide interpolation between them.
utl::Validated< utl::TimeStamp > fUUBCommissionTime
Status GetDataOrThrow(T &returnData, const std::string &component, const std::string &property, const IndexMap &index=IndexMap()) const
bool is(const double a, const double b)
Definition: testlib.cc:113
const utl::TabulatedFunction & GetLinerSpecularLobe() const
Tyvek liner specular lobe constant as a function of photon energy.
const Point & GetAnchor() const
Definition: Plane.h:22
void Update(std::vector< double > &init, const std::vector< double > &res)
Definition: Util.h:100
bool IsInGrid(const SDetectorConstants::GridIndex index=SDetectorConstants::eStandard) const
Tells whether the station is in the regular triangular grid.
utl::ShadowPtr< utl::TabulatedFunction > fLinerSpecularLobe
int crown(double x1, double x2, double y1, double y2)
Definition: XbArray.cc:14
const PMT & GetPMT(const int id) const
Get specified PMT by id.
utl::Validated< double > fHeight
Base class for exceptions trying to access non-existing components.
det::VManager::IndexMap fStationIndexMap
utl::Validated< double > fTimingUncertainty
unsigned int GetId() const
Return Id of the PMT.
Definition: SEvent/PMT.h:32
const utl::TabulatedFunction & GetWaterAbsorptionLength() const
Water absorption length as a function of photon energy.
const utl::TimeStamp & GetUUBCommissionTime() const
utl::Validated< double > fThickness
A TimeStamp holds GPS second and nanosecond for some event.
Definition: TimeStamp.h:110
const std::string & GetName() const
Station name.
Line Intersection(const Plane &p1, const Plane &p2)
utl::Point GetPosition() const
Tank position.
Definition: Test.h:180
utl::ShadowPtr< utl::TabulatedFunction > fWaterAbsLength
static const unsigned int kFirstWaterCherenkovLargePMTId
utl::ShadowPtr< utl::TabulatedFunction > fWaterRefractionIndex
boost::shared_ptr< const CoordinateTransformer > CoordinateSystemPtr
Shared pointer for coordinate systems.
utl::ShadowPtr< utl::TabulatedFunction > fLinerSpecularSpike
utl::Validated< std::vector< int > > fPartnerIds
utl::Validated< int > fLatchBin
const utl::TabulatedFunction & GetLinerReflectivity() const
Tyvek liner reflectivity as a function of photon energy.
const std::vector< int > & SetPartnerIds() const
constexpr double s
Definition: AugerUnits.h:163
InternalCrownCollection fCrowns
Class describing a Plane object.
Definition: Plane.h:17
double GetX(const CoordinateSystemPtr &coordinateSystem) const
Definition: BasicVector.h:206
unsigned int GetSaturationValue() const
utl::Validated< InGridType > fInGrid
std::vector< int > StationIdCollection
const std::vector< double > & GetAxes() const
Point Propagate(const double s) const
Definition: Line.h:29
utl::ReferenceEllipsoid::EllipsoidID fEllipsoid
bool IsValid() const
Definition: Validated.h:64
int GetLatchBin() const
double GetRadius() const
Radius of the tank (water only)
double GetHeight() const
Height of the tank (water only)
static const unsigned int kLastWaterCherenkovLargePMTId
bool ExistsAssociatedCounter() const
if this Station has an associated muon Counter.
utl::Validated< std::vector< double > > fAxes
bool IsInAcquisition() const
Station in data acquisition.
Base class for inconsistency/illogicality exceptions.
utl::Validated< double > fRadius
utl::ShadowPtr< utl::TabulatedFunction > fElectronicsImpulseResponse
const utl::TabulatedFunction & GetLinerSpecularSpike() const
Tyvek liner specular spike constant as a function of photon energy.
double GetRho(const CoordinateSystemPtr &coordinateSystem) const
radius r in cylindrical coordinates (distance to z axis)
Definition: BasicVector.h:263
double GetY(const CoordinateSystemPtr &coordinateSystem) const
Definition: BasicVector.h:209
double Distance(const Point &p, const sdet::Station &s)
const PMT & GetScintillatorPMT() const
std::bitset< SDetectorConstants::kGridIndexSize > InGridType
utl::Validated< unsigned int > fSaturationValue
double GetFADCBinSize() const
utl::Validated< std::string > fName
double GetThickness() const
Thickness of the tank walls.
uint16_t * data
Definition: dump1090.h:228
utl::Validated< int > fIsInAcquisition
Register for detector description managers.
const utl::TabulatedFunction & GetWaterRefractionIndex() const
Water refraction index as a function of photon energy.
constexpr double kilometer
Definition: AugerUnits.h:93
Vector object.
Definition: Vector.h:30
void SetValid(const bool valid=true)
Definition: Validated.h:66
const PMT & GetSmallPMT() const
unsigned int GetFADCTraceLength() const
utl::Validated< unsigned int > fFADCTraceLength
double GetZ(const CoordinateSystemPtr &coordinateSystem) const
Definition: BasicVector.h:212
double GetLinerSigmaAlpha() const
Tyvek liner sigma_alpha roughness parameter.
static Policy::type Create(const utl::Point &theOrigin)
Create the standard local coordinate system for a Point.
int GetId() const
Station ID.
det::VManager::Status GetStationData(T &requestedData, const std::string &property, const std::string &component, const std::string &errorMsg, const bool throwOnFailure=true) const
Point GetPoint(const CoordinateSystemPtr &theCS=CoordinateSystemPtr()) const
Get a cartesian point from an UTMPoint.
Definition: UTMPoint.cc:45
#define ERROR(message)
Macro for logging error messages.
Definition: ErrorLogger.h:165
constexpr double m
Definition: AugerUnits.h:121
int GetNumberOfPartners() const
Number of partners the station has.
const utl::TabulatedFunction & GetElectronicsImpulseResponse() const
utl::ShadowPtr< utl::TabulatedFunction > fLinerReflectivity
Definition: Line.h:17
Definition: XbArray.h:7
utl::Validated< double > fLinerSigmaAlpha
utl::Validated< utl::Point > fPosition

, generated on Tue Sep 26 2023.