4 #include <cevt/Station.h>
6 #include <cevt/CEvent.h>
8 #include <cevt/StationSimData.h>
9 #include <cevt/StationRecData.h>
13 #include <det/Detector.h>
14 #include <sdet/Station.h>
16 #include <utl/Particle.h>
17 #include <utl/ErrorLogger.h>
18 #include <utl/AugerException.h>
30 const string Station::fgSourceNameLookup[
eLastSource + 1] = {
31 "Total (shower + bkgnd)",
39 "e+,e- from shower e+,e-",
40 "e+,e- from shower muon",
41 "e+,e- from shower photon",
42 "e+,e- from other source",
44 "photon from shower e+,e-",
45 "photon from shower muon",
46 "photon from shower photon",
47 "photon from other source",
53 "other neutrals (neutrino,pi0)",
54 "photon from muon decay in shower",
55 "electron from muon decay in shower",
57 "",
"",
"",
"",
"",
"",
"",
"",
"",
"",
58 "",
"",
"",
"",
"",
"",
"",
"",
"",
"",
59 "User-defined source 0",
60 "User-defined source 1",
61 "User-defined source 2",
62 "User-defined source 3",
63 "User-defined source 4",
64 "User-defined source 5",
65 "User-defined source 6",
66 "User-defined source 7",
67 "User-defined source 8",
68 "User-defined source 9"
75 return fgSourceNameLookup[sc];
78 #define PHOTON utl::Particle::ePhoton
79 #define ELECTRONS utl::Particle::eElectron: \
80 case utl::Particle::ePositron
81 #define MUONS utl::Particle::eMuon: \
82 case utl::Particle::eAntiMuon
83 #define HADRONS utl::Particle::eProton: \
84 case utl::Particle::eAntiProton: \
85 case utl::Particle::eNeutron: \
86 case utl::Particle::eAntiNeutron: \
87 case utl::Particle::ePiPlus: \
88 case utl::Particle::ePiMinus: \
89 case utl::Particle::eEta: \
90 case utl::Particle::eKaon0L: \
91 case utl::Particle::eKaon0S: \
92 case utl::Particle::eKaonPlus: \
93 case utl::Particle::eKaonMinus: \
94 case utl::Particle::eLambda: \
95 case utl::Particle::eAntiLambda: \
96 case utl::Particle::eLambdac
97 #define NEUTRALS utl::Particle::eNuElectron: \
98 case utl::Particle::eAntiNuElectron: \
99 case utl::Particle::eNuMuon: \
100 case utl::Particle::eAntiNuMuon: \
101 case utl::Particle::eNuTau: \
102 case utl::Particle::eAntiNuTau: \
103 case utl::Particle::ePiZero: \
104 case utl::Particle::eRhoZero
112 if (particle.
GetSource() == Particle::eShower)
114 else if (particle.
GetSource() == Particle::eShowerFromMuonDecay)
147 if (particle.
GetSource() == Particle::eShower)
149 else if (particle.
GetSource() == Particle::eShowerFromMuonDecay)
186 ERROR(
"Illegal Component in Station::GetSignalComponent; unknown particle !");
192 Station::Station(
const int id) :
203 fSimData(station.fSimData),
204 fRecData(station.fRecData),
208 fHitsStartTime(station.fHitsStartTime),
209 fHits(station.fHits),
210 fReconstructionStatus(station.fReconstructionStatus),
211 fRejectionStatus(station.fRejectionStatus)
214 padIt != station.
fPads.end(); ++padIt)
222 padIt !=
fPads.end(); ++padIt)
230 if (
this != &station) {
235 padIt !=
fPads.end(); ++padIt)
241 padIt != station.
PadsEnd(); ++padIt)
264 padIt !=
fPads.end(); ++padIt)
265 if ((*padIt)->GetId() == padId)
278 padIt !=
fPads.end(); ++padIt)
279 if ((*padIt)->GetId() == padId)
282 std::ostringstream err;
283 err <<
"Invalid Pad id " << padId;
294 padIt !=
fPads.end(); ++padIt)
295 if ((*padIt)->GetId() == padId)
298 std::ostringstream err;
299 err <<
"Invalid Pad id " << padId;
309 std::ostringstream err;
310 err <<
"Pad id " << padId <<
" already exists - Not replacing !";
323 ERROR(
"SimData already exists - Not Replacing");
334 ERROR(
"Rec Data already exists - Not Replacing");
377 fHits->AddTimeDistribution(1*
ns, source);
383 if (
fHits->HasLabel(source)) {
385 return static_cast<unsigned int>(TimeDistributionAlgorithm::Sum(hits,hits.
GetStart(),hits.
GetStop()));
static const SignalComponent eBackgroundPhoton
photons from background
int GetStart() const
First slot with data.
utl::ShadowPtr< StationSimData > fSimData
static const SignalComponent ePhotonFromOtherSource
Station Level Simulated Data
static const SignalComponent ePhotonFromShowerPhoton
Pad & GetPad(const unsigned int padId)
Retrive a Pad by Id.
Describes a particle for Simulation.
static const SignalComponent ePhotonFromShowerMuon
void MakeHits(const SignalComponent source=eTotal)
Make a time distribution. Source may be specified.
Station(const Station &station)
std::vector< Pad * >::const_iterator InternalConstPadIterator
static const SignalComponent eOtherNeutrals
other neutral particles
Histogram class for time distributions with suppressed empty bins.
Class to access station level reconstructed data.
static const SignalComponent eElectronFromOtherSource
static const SignalComponent eHadron
all hadrons from shower
Base class for exceptions trying to access non-existing components.
class to hold data at Pad level
std::string GetSignalComponentName(const SignalComponent comp)
static const SignalComponent eLastSource
utl::InitializedShadowPtr< utl::MultiTimeDistributionI > fHits
static const SignalComponent eElectronFromShowerPhoton
bool HasPad(const unsigned int padId) const
Check if a particular Pad object exists.
static const SignalComponent eShowerMuonDecayElectron
electrons from muon decay in shower
ReconstructionStatus fReconstructionStatus
Station & operator=(const Station &station)
int GetStop() const
Last slot with data (1 less than First slot if no data)
void MakeRecData()
Make station reconstructed data object.
static const SignalComponent eElectronFromShowerElectron
separate electron components
unsigned int GetTotalHits(const SignalComponent source=eTotal) const
Get the total number of counts, optionally specifying a component.
class to hold data at Station level
PadIterator PadsEnd()
end Pad iterator for read/write
std::vector< Pad * > fPads
static const SignalComponent ePhotonFromShowerElectron
secondary photons
static const SignalComponent eShowerMuonDecayPhoton
photons from muon decay in shower
Source GetSource() const
Source of the particle (eg. shower or background)
utl::TimeStamp fHitsStartTime
struct particle_info particle[80]
static const SignalComponent eMuon
mu+ and mu- (including signal from mu decay electrons) from shower
utl::ShadowPtr< StationRecData > fRecData
std::vector< Pad * >::iterator InternalPadIterator
void MakePad(const unsigned int padId)
Make a Pad by Id.
static const SignalComponent eElectronFromShowerMuon
PadIterator PadsBegin()
begin Pad iterator for read/write
#define ERROR(message)
Macro for logging error messages.
static const SignalComponent eBackgroundElectron
electrons from background
boost::indirect_iterator< InternalConstPadIterator, const Pad & > ConstPadIterator
Iterator over station for read.
void MakeSimData()
Make station simulated data object.