1 #include <sevt/Station.h>
2 #include <sevt/SEvent.h>
3 #include <sevt/Scintillator.h>
5 #include <sevt/StationTriggerData.h>
6 #include <sevt/StationSimData.h>
7 #include <sevt/StationRecData.h>
8 #include <sevt/StationCalibData.h>
9 #include <sevt/StationGPSData.h>
10 #include <sevt/StationConstants.h>
11 #include <sevt/ScintillatorSimData.h>
12 #include <det/Detector.h>
13 #include <sdet/SDetector.h>
14 #include <sdet/Station.h>
15 #include <sdet/PMTConstants.h>
16 #include <sdet/Scintillator.h>
17 #include <utl/Particle.h>
18 #include <utl/ErrorLogger.h>
19 #include <utl/AugerException.h>
32 Station::Station(
const int id) :
37 const auto& dStation = Detector::GetInstance().GetSDetector().GetStation(
id);
39 for (
const auto& pmt : dStation.PMTsRange())
40 fPMTs.push_back(
new PMT(pmt.GetId(), id, pmt.GetType()));
42 if (dStation.HasScintillator())
45 if (dStation.HasSmallPMT())
68 for (
const auto p : station.
fPMTs)
69 fPMTs.push_back(
new PMT(*
p));
95 if (
p->GetId() == pmtId)
105 std::ostringstream err;
106 err <<
"PMT with id " << pmtId <<
"already exists!";
110 fPMTs.push_back(
new PMT(pmtId, stationId, type));
118 for (
const auto p :
fPMTs)
119 if (
p->GetId() == pmtId)
121 std::ostringstream err;
122 err <<
"Invalid PMT id " << pmtId;
134 std::ostringstream err;
135 err <<
"The station appears to contain more than one scintillator PMT"
136 "which is neither expected nor allowed.";
141 for (
const auto p :
fPMTs)
144 std::ostringstream err;
145 err <<
"Scintillator PMT does not exist.";
157 std::ostringstream err;
158 err <<
"The station appears to contain more than one small PMT"
159 "which is neither expected nor allowed.";
164 for (
const auto p :
fPMTs)
167 std::ostringstream err;
168 err <<
"Small PMT does not exist.";
182 for (
const auto p :
fPMTs)
183 if (
p->GetType() == type)
193 ERROR(
"SimData already exists - Not Replacing");
203 ERROR(
"Rec Data already exists - Not Replacing");
213 ERROR(
"Trigger Data already exists - Not Replacing");
223 ERROR(
"Calib Data already exists - Not Replacing");
233 ERROR(
"GPS Data already exists - Not Replacing");
256 std::ostringstream err;
257 err <<
"Attempting to set station as rejected with status of "
258 <<
"not rejected (fRejectionStatus = " << reason <<
").";
279 const auto& dStation = Detector::GetInstance().GetSDetector().GetStation(*
this);
280 fTrace.
AddTrace(dStation.GetFADCTraceLength(), dStation.GetFADCBinSize(), source);
288 return Detector::GetInstance().GetSDetector().GetStation(*this).IsUUB();
314 const auto& dStation = Detector::GetInstance().GetSDetector().GetStation(
fId);
utl::ShadowPtr< StationRecData > fRecData
Class to access station level reconstructed data.
bool HasPMT(const unsigned int pmtId) const
Check if a particular PMT object exists.
utl::ShadowPtr< SmallPMTData > fSmallPMTData
Station Level Simulated Data
void AddTrace(const int size, const double binSize, const int label)
class to hold data at PMT level
utl::TimeStamp fTraceStartTime
void MakeSimData()
Make station simulated data object.
Describes a particle for Simulation.
utl::ShadowPtr< StationSimData > fSimData
Base class for exceptions arising because configuration data are not valid.
void SetCandidate()
Set candidate station flag.
SignalSegmentCollection fSignals
Base class for exceptions trying to access non-existing components.
void MakeTriggerData()
Make trigger data object.
StationConstants::ReconstructionStatus fReconstructionStatus
utl::ShadowPtr< StationGPSData > fGPSData
class to hold data at Station level
bool HasSimData() const
Check whether station simulated data exists.
void SetRejected(const int reason)
Set rejected station flag.
class to hold data for station SPMT
void MakeVEMTrace(const StationConstants::SignalComponent source=StationConstants::eTotal)
Make a VEM trace object.
std::vector< PMT * > fPMTs
void AddParticle(const utl::Particle &particle)
Station & operator=(const Station &station)
Base class for inconsistency/illogicality exceptions.
void MakeRecData()
Make station reconstructed data object.
class to hold data for station Scintillator
PMT & GetPMT(const unsigned int pmtId)
Retrive a PMT by Id.
PMT & GetScintillatorPMT()
Station Trigger Data description
unsigned int GetNPMTs(const sdet::PMTConstants::PMTType type=sdet::PMTConstants::eAnyType) const
Number of pmts.
struct particle_info particle[80]
utl::ShadowPtr< Scintillator > fScintillator
bool fSaturation[sdet::PMTConstants::eNumberOfGains]
const Point & GetPosition() const
Position of the particle.
void MakePMT(const unsigned int pmtId, const int stationId, const sdet::PMTConstants::PMTType type=sdet::PMTConstants::eWaterCherenkovLarge)
void MakeGPSData()
Make GPS data object.
#define ERROR(message)
Macro for logging error messages.
const Vector & GetDirection() const
Unit vector giving particle direction.
void MakeCalibData()
Make calibration data object.
utl::ShadowPtr< StationCalibData > fCalibData
utl::ShadowPtr< StationTriggerData > fTriggerData
void SetSilent()
Set silent station flag.