15 #include <utl/TabulatedFunction.h>
17 #include <utl/UTMPoint.h>
18 #include <utl/ReferenceEllipsoid.h>
19 #include <utl/Vector.h>
20 #include <utl/AxialVector.h>
21 #include <utl/TimeStamp.h>
23 #include <utl/MathConstants.h>
24 #include <utl/PhysicalConstants.h>
25 #include <utl/AugerUnits.h>
26 #include <utl/CoordinateSystem.h>
27 #include <utl/AugerCoordinateSystem.h>
29 #include <utl/Trace.h>
31 #include <evt/Event.h>
32 #include <evt/ShowerRecData.h>
33 #include <evt/ShowerFRecData.h>
34 #include <evt/ShowerSimData.h>
35 #include <evt/GaisserHillas4Parameter.h>
36 #include <evt/DefaultShowerGeometryProducer.h>
38 #include <fevt/FEvent.h>
40 #include <fevt/EyeHeader.h>
41 #include <fevt/Telescope.h>
42 #include <fevt/EyeRecData.h>
43 #include <fevt/TelescopeRecData.h>
44 #include <fevt/TelescopeSimData.h>
45 #include <fevt/PixelRecData.h>
46 #include <fevt/Pixel.h>
47 #include <fevt/FdConstants.h>
49 #include <det/Detector.h>
50 #include <atm/Atmosphere.h>
52 #include <fdet/FDetector.h>
54 #include <fdet/Pixel.h>
55 #include <fdet/Channel.h>
56 #include <fdet/Camera.h>
57 #include <fdet/Telescope.h>
59 #include <utl/AugerException.h>
60 #include <utl/Vector.h>
67 using namespace FdLightCollectionEfficiencyKG;
92 cout <<
" --[FdLightCollectionEfficiency]--> Preparing Mock SimEvent..." << endl;
105 const double zenith = axis.
GetTheta(cs);
106 const double azimuth = axis.
GetPhi(cs);
135 double depth = 0.2*
g/
cm2;
136 const double xMax = ghParam.
GetXMax();
141 double thisdEdX = ghParam.
Eval(depth);
142 if (age < 1. && thisdEdX < 2.*
MeV/
g*
cm2)
147 if (age > 2. || depth > 3000.*
g/cm2)
168 ostringstream output;
169 string oindent =
" ";
171 output <<
" --[FdLightCollectionEfficiency]--> Preparing Mock FEvent...\n";
173 const fdet::FDetector& detFD = det::Detector::GetInstance().GetFDetector();
181 if (eyeDaqStatus == 0) {
183 output << oindent <<
"Skipping eye " << eyeId <<
" (not in DAQ)\n";
188 output << oindent <<
"Creating eye " << eyeId <<
" (Telescopes in DAQ:";
193 bool hasTelescope =
false;
197 iTel != end; ++iTel) {
199 const unsigned int telId = iTel->
GetId();
201 const int telDaqStatus = iTel->GetDAQStatus();
202 if (telDaqStatus == 0)
208 output <<
" " << telId;
224 cout << output.str() << endl;
241 const Vector eyeToCore = corePosition-eyePos;
242 const double distCoreEye = eyeToCore.
GetMag();
243 const double beta =
Angle(-axis, eyeToCore);
Telescope & GetTelescope(const unsigned int telescopeId, const ComponentSelector::Status status=ComponentSelector::eHasData)
Retrieve Telescope by Id, throw exception if not existent.
double GetEnergyCutoff(const ProfileType type=eElectron) const
Get the energy cutoff for which the profile of charged particles was calculated.
double GetShapeParameter(const gh::EShapeParameter par) const
access to all variants of shape parameters (see GaisserHillasTypes.h)
unsigned int GetId() const
SimMockEvent(const double xBinning)
double Angle(const double theta1, const double phi1, const double theta2, const double phi2)
double GetPhi(const CoordinateSystemPtr &coordinateSystem) const
azimuth (phi) angle in spherical and cylindrical coordinates
fevt::EyeHeader & GetHeader()
Header for this Eye Event.
unsigned int GetTimeOffset() const
Time offset of this Telescope compared to fevt::Header::GetTime [ns].
Fluorescence Detector Eye Event.
const evt::VGaisserHillasParameter & GetGHParameters() const
Get the Gaisser-Hillas parameters of the shower.
double GetTheta(const CoordinateSystemPtr &coordinateSystem) const
zenith (theta) angle in spherical coordinates
double fXBinning
The depth binning for the profile that's calculated from the GH fit.
Class to hold collection (x,y) points and provide interpolation between them.
void SetTimeOffset(const unsigned int toffset)
void SetEnergyCutoff(const double energy, const ProfileType type=eElectron)
Set the enegy cutoff for which the profile of charged particles was calculated.
bool HasSimShower() const
void SetGroundParticleCoordinateSystemAzimuth(const double azimuth)
Set the azimuth angle of the shower. Angle in x-y plane wrt. to the x axis (0 is from east)...
void MakeEye(const unsigned int eyeId, const ComponentSelector::Status status=ComponentSelector::eHasData)
void MakeGHParameters(const evt::VGaisserHillasParameter &ghPar)
Make the Gaisser-Hillas parameters of the shower.
const Eye & GetEye(const unsigned int eyeId) const
Find eye by numerical Id.
Detector description interface for Eye-related data.
void PushBack(const double x, const double y)
void MakeTelescope(const unsigned int telescopeId, const ComponentSelector::Status status=ComponentSelector::eHasData)
Make Telescope telescopeId.
void MakedEdX(const utl::TabulatedFunction &dEdX)
Make the energy deposit of the shower.
Detector description interface for FDetector-related data.
A TimeStamp holds GPS second and nanosecond for some event.
Interface class to access Shower Simulated parameters.
boost::shared_ptr< const CoordinateTransformer > CoordinateSystemPtr
Shared pointer for coordinate systems.
double GetXFirst() const
Get depth of first interaction.
void MakeLongitudinalProfile(const utl::TabulatedFunction &lp, const ProfileType type=eCharged)
Make the longitudinal charge profile of the shower.
void FillSimEvent(const evt::ShowerFRecData &recData)
Reference ellipsoids for UTM transformations.
const utl::Vector & GetDirection() const
Get the direction of the shower axis. This is the true direction of shower movement.
TelescopeIterator TelescopesBegin() const
Beginning of the collection of telescopes.
const utl::Point & GetPosition() const
Get the position of the shower core.
bool PrepareEvent(const unsigned int eyeId, const evt::ShowerFRecData &recData, const evt::Event &event, const fevt::Eye &eye)
ShowerSimData & GetSimShower()
virtual double Eval(const double depth) const =0
evt::Event fEvent
Container for the actual event.
const CoordinateSystemPtr GetECEF() const
Get the ECEF.
void SetLongitudinalProfilesFromGH(evt::ShowerSimData &simShower)
Eye & GetEye(const unsigned int eyeId, const ComponentSelector::Status status=ComponentSelector::eHasData)
return Eye by id
void SetXFirst(const double xFirst)
Set depth of first interaction.
boost::filter_iterator< TelIsCommissioned, InternalConstTelescopeIterator > TelescopeIterator
An iterator over telescopes.
fevt::FEvent & GetFEvent()
bool HasEye(const unsigned int eyeId, const ComponentSelector::Status status=ComponentSelector::eHasData) const
constexpr double kSpeedOfLight
A TimeInterval is used to represent time elapsed between two events.
void SetGroundParticleCoordinateSystemZenith(const double zenith)
Set the zenith angle of the shower. Room angle between z-axis and direction from where the shower is ...
double ShowerAge(const double slantDepth, const double showerMax)
General definition of shower age.
void MakeGeometry(const utl::Point &pointOnShowerAxis)
initialize the shower geometry. Pos is a point on the shower axis, but not necessarily the core ...
bool HasTelescope(const unsigned int telescopeId, const ComponentSelector::Status status=ComponentSelector::eHasData) const
Check if the telescope is in the event.
double EnergyDeposit(const double age, const double enCut)
Parametrization for the average energy deposit per particle.
Interface class for access to the Gaisser-Hillas parameters.
int GetDAQStatus() const
0 == not in DAQ
void MakeSimShower(const evt::VShowerGeometryProducer &p)
Interface class to access to Fluorescence reconstruction of a Shower.
void MakeTimeStamp(const utl::TimeStamp &ts)
Make the TimeStamp of the shower.
TelescopeIterator TelescopesEnd() const
End of the collection of telescopes.
Fluorescence Detector Telescope Event.
Gaisser Hillas with 4 parameters.
int fVerbosity
global verbosity flag
constexpr double microsecond
const utl::Point & GetCorePosition() const
Shower core as reconstructed by the FD or FD eye.
double GetEnergyCutoff() const
retrieve energy cutoff for which the profile of charged particles was calculated. ...
utl::Point GetPosition() const
Eye position.
fevt::EyeRecData & GetRecData()
Reconstructed data for this eye.
const utl::Vector & GetAxis() const
Shower Axis as reconstructed by the FD or FD eye.