1 #ifndef _sdet_Station_h_
2 #define _sdet_Station_h_
5 #include <sdet/Scintillator.h>
6 #include <sdet/PMTConstants.h>
7 #include <sdet/SDetectorConstants.h>
8 #include <det/VManager.h>
9 #include <det/Detector.h>
10 #include <utl/AugerException.h>
11 #include <utl/CoordinateSystemPtr.h>
12 #include <utl/ReferenceEllipsoid.h>
13 #include <utl/Validated.h>
14 #include <utl/Point.h>
15 #include <utl/Vector.h>
16 #include <utl/TimeStamp.h>
17 #include <utl/TimeRange.h>
18 #include <utl/TabulatedFunction.h>
19 #include <utl/ShadowPtr.h>
20 #include <utl/IteratorRange.h>
22 #include <boost/iterator/indirect_iterator.hpp>
23 #include <boost/iterator/transform_iterator.hpp>
84 const short int normalBins = 100;
88 static std::vector<T> muonPeakBinningUb;
92 if (calibrationVersion < 262) {
93 static std::vector<T> muonPeakBinningUubOld;
99 static std::vector<T> muonPeakBinningUubWcd;
102 static std::vector<T> muonPeakBinningUubSsd;
113 const std::vector<T>&
117 const short int normalBins = 400;
118 const short int stridedBins = 200;
121 static std::vector<T> muonChargeBinningUb;
125 if (calibrationVersion < 262) {
126 static std::vector<T> muonChargeBinningUubOld;
132 static std::vector<T> muonChargeBinningUubWcd;
135 static std::vector<T> muonChargeBinningUubSsd;
146 const std::vector<T>&
147 GetBaselineHistogramBinning()
151 if (baseHisto.empty()) {
152 baseHisto.resize(20 + 1);
153 std::iota(baseHisto.begin(), baseHisto.end(), T(0));
158 const std::vector<double>&
162 const std::string&
GetName()
const;
195 typedef boost::indirect_iterator<InternalPMTIterator, const PMT&>
PMTIterator;
206 typedef boost::transform_iterator<InternalPartnerStationFunctor,
207 std::vector<
int>::const_iterator,
300 const std::vector<double>&
GetAxes()
const;
359 const std::string& property,
360 const std::string& component,
361 const std::string& errorMsg,
const bool throwOnFailure =
true)
364 const auto& manager = det::Detector::GetInstance().GetSManagerRegister();
365 const auto status = manager.GetData(requestedData, property, component,
fStationIndexMap);
375 const std::vector<T>&
377 const short int normalBins,
const short int step,
378 const short int stridedBins,
const short int stride)
380 if (histox.empty()) {
381 histox.reserve(normalBins + stridedBins + 1);
382 for (
short i = 0; i < normalBins; ++i)
383 histox.push_back(step*i);
385 histox.push_back(step*(normalBins + stride*i));
390 static void InitializeShape(std::vector<double>& histox,
const int nBins,
const double dt);
415 typedef std::bitset<SDetectorConstants::kGridIndexSize>
InGridType;
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's in the crown. If the argument is 0, it returns the station id...
InternalPMTVector fPMTVector
static const unsigned int kWaterCherenkovSmallPMTId
double GetTimingUncertainty() const
void NotFoundAndThrow(const std::string &msg) const
int GetAssociatedCounterId() const
the identifier of the associated muon Counter.
class to hold data at PMT level
Detector description interface for Station-related data.
utl::Validated< double > fFADCBinSize
const std::vector< int > & GetPartnerIds() const
returns vector of partner station ids
int GetGroupId() const
returns unique identifier of a group of stations or zero (if single)
Time interval defined by two TimeStamps.
Detector description interface for PMT-related data.
bool IsInsideStation(const utl::Point &pos) const
void UpdateElectronics(const bool isuub) const
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
const utl::TabulatedFunction & GetLinerSpecularLobe() const
Tyvek liner specular lobe constant as a function of photon energy.
void RemoveScintillator() const
const TimeStamp & GetStopTime() const
bool IsInGrid(const SDetectorConstants::GridIndex index=SDetectorConstants::eStandard) const
Tells whether the station is in the regular triangular grid.
utl::ShadowPtr< utl::TabulatedFunction > fLinerSpecularLobe
const PMT & GetPMT(const int id) const
Get specified PMT by id.
utl::Validated< double > fHeight
det::VManager::IndexMap fStationIndexMap
static void InitializeShape(std::vector< double > &histox, const int nBins, const double dt)
utl::Validated< double > fTimingUncertainty
bool IsHit(const utl::Point &from, const utl::Vector &direction) const
const utl::TabulatedFunction & GetWaterAbsorptionLength() const
Water absorption length as a function of photon energy.
const utl::TimeStamp & GetUUBCommissionTime() const
const std::vector< T > & const
utl::Validated< double > fThickness
A TimeStamp holds GPS second and nanosecond for some event.
const std::string & GetName() const
Station name.
utl::Point GetPosition() const
Tank position.
const utl::TimeStamp & GetDecommissionTime() const
Station decommission time.
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
bool IsHit(const utl::Point &from, const utl::Vector &direction, utl::Point &where) const
const utl::TabulatedFunction & GetLinerReflectivity() const
Tyvek liner reflectivity as a function of photon energy.
const std::vector< int > & SetPartnerIds() const
static std::vector< T > emptyVector
InternalCrownCollection fCrowns
static const unsigned int kScintillatorPMTId
PMTIterator PMTsEnd() const
End of the collection of pointers to PMTs.
unsigned int GetSaturationValue() const
utl::Validated< InGridType > fInGrid
std::vector< int > StationIdCollection
const std::vector< double > & GetAxes() const
utl::CoordinateSystemPtr fReferenceSystem
const Station & operator()(const int stationId) const
const std::vector< double > & GetMuonShapeHistogramBinning(const int calibrationVersion) const
PartnerIterator PartnersEnd() const
End of the collection of Partners in multiplet.
utl::ReferenceEllipsoid::EllipsoidID fEllipsoid
const TimeStamp & GetStartTime() const
utl::CoordinateSystemPtr GetLocalCoordinateSystem() const
Get the Auger reference system centered on the tank.
double GetRadius() const
Radius of the tank (water only)
const Scintillator & GetScintillator() const
double GetHeight() const
Height of the tank (water only)
#define OFFLINE_MAKE_CONST_ITERATOR_RANGE(_ConstIterator_, _NamePrefix_)
static const unsigned int kLastWaterCherenkovLargePMTId
bool ExistsAssociatedCounter() const
if this Station has an associated muon Counter.
boost::transform_iterator< InternalPartnerStationFunctor, std::vector< int >::const_iterator, const Station & > PartnerIterator
PartnerIterator returns a pointer to a station.
utl::Validated< std::vector< double > > fAxes
bool IsInAcquisition() const
Station in data acquisition.
Base class for inconsistency/illogicality exceptions.
InternalPMTVector::const_iterator InternalPMTIterator
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.
std::vector< const PMT * > InternalPMTVector
PMTIterator PMTsBegin() const
Beginning of the collection of pointers to PMTs.
const PMT & GetScintillatorPMT() const
std::bitset< SDetectorConstants::kGridIndexSize > InGridType
utl::Validated< unsigned int > fSaturationValue
double GetFADCBinSize() const
PartnerIterator PartnersBegin() const
Beginning of the collection of Partners in multiplet.
utl::Validated< std::string > fName
static unsigned int GetFirstPMTId()
Id of first pmt in station.
const utl::TimeStamp & GetCommissionTime() const
Station commission time.
void MakeScintillator() const
boost::indirect_iterator< InternalPMTIterator, const PMT & > PMTIterator
PMTIterator returns a pointer to a PMT.
double GetThickness() const
Thickness of the tank walls.
static const std::vector< T > & InitializeIfNeeded(std::vector< T > &histox, const short int normalBins, const short int step, const short int stridedBins, const short int stride)
std::map< std::string, std::string > IndexMap
utl::Validated< int > fIsInAcquisition
const utl::TabulatedFunction & GetWaterRefractionIndex() const
Water refraction index as a function of photon energy.
bool IsDense() const
Tells whether the station belongs to set of hypothetical "dense" stations.
bool HasScintillator() const
Detector description interface for SDetector-related data.
const PMT & GetSmallPMT() const
unsigned int GetFADCTraceLength() const
utl::ShadowPtr< Scintillator > fScintillator
utl::Validated< unsigned int > fFADCTraceLength
EllipsoidID
ID's of known reference ellipsoid's.
double GetLinerSigmaAlpha() const
Tyvek liner sigma_alpha roughness parameter.
void MakeSmallPMT() const
unsigned int GetLastPMTId() const
Id of last PMT in station.
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
int GetNumberOfPartners() const
Number of partners the station has.
const utl::TabulatedFunction & GetElectronicsImpulseResponse() const
utl::ShadowPtr< utl::TabulatedFunction > fLinerReflectivity
Status
Specifies success or (eventually) various possible failure modes.
utl::Validated< double > fLinerSigmaAlpha
std::map< int, StationIdCollection > InternalCrownCollection
void RemoveSmallPMT() const
Station operator=(const Station &)
utl::Validated< utl::Point > fPosition
const short int stridedBins