10 #define ExternalUse // Used within Offline
13 #include <tls/Atmosphere.h>
14 #include <tls/UnivParam.h>
15 #include <tls/UnivParamTime.h>
17 #include <ToyShower.h>
21 #include <tls/UnivCalibConstants.h>
76 const double unit[
npar]={ 20.e2, 20.e2, 0.03, 0.20, 30., 100., 2.e-3, 2.e-3 , 0.01 };
77 const double low[
npar]= { -1500.e2, -1500.e2, 17.0, 0.05, 400. , -500., -sin(25.*M_PI/180.), -sin(25.*M_PI/180.) , -0.5 };
78 const double high[
npar]={ 1500.e2, 1500.e2, 22.5, 3.5 , 1200. , 500., sin(25.*M_PI/180.), sin(25.*M_PI/180.) , 0.5 };
79 const std::string
ParName[
npar]={
"xgcore_relative",
"ygcore_relative",
"logE",
"Nmu" ,
"Xmax",
"T0",
"l",
"m",
"OffsetM_Mu" };
249 bool InitRec(
bool IsData,
int RecType,
int CalibOpt,
int RecDetector ,
int RecSys ,
int RecMixture );
255 bool InitEvent(ToyShowerNS::ToyShower *fevt);
261 float DistPoints(
float x1,
float y1,
float x2,
float y2);
268 bool PlaneFit(
bool CurvCorr,
bool AltitudeCorr,
bool RecSeed,
int itype );
269 bool PlaneFit(std::vector<double> fX,std::vector<double>fY,std::vector<double>fT,std::vector<double>fW);
274 bool RWRecinfo(FILE *fp,
bool RWStations,
bool readFlag);
276 void GetResiduals( std::vector<double> &mean, std::vector<double> &rms, std::vector<double> &rec,
int optY, std::vector<double> &fx,
int optX,
bool OnlyNotSaturated );
277 void GetResiduals( std::vector<double> &mean, std::vector<double> &rms, std::vector<double> &rec,
int optY, std::vector<double> &fx,
int optX );
279 bool ScanRange(
int iparX,
int iparY, std::vector<double> par, std::vector<int>
parStatus,
double *rangeX,
double *rangeY,
double *d,
280 double RotAngle,
double errDef,
double InitStep,
double &edm);
281 bool ScanRange(
int iparX,
int iparY, std::vector<double> par, std::vector<int>
parStatus,
double *rangeX,
double *rangeY,
double *d,
282 double RotAngle,
double errDef,
double &edm);
283 void ScanLikelihood(
int iparX,
int iparY,
int N, std::vector<std::pair<double,double> > &parXY, std::vector<double> &lnP,
284 std::pair<double,double> &parXY_min,
double &lnP_min);
289 void SetT0FromHot(
bool UseT0_relative,
double T0_relative );
303 int InitFCNParameters(std::vector<double> &par, std::vector<double> &epar , std::vector<int> &status ,std::vector<bool> &hasLimits);
305 void Unrotate(
double l_p,
double m_p,
double &theta,
double &azi);
306 int GetErrors(std::vector<double> par, std::vector<double> &epar, std::vector<int>
parStatus );
307 double GetLikelihood(std::vector<double> par, std::vector<int> status);
353 #endif // __UnivRecNS_h_
bool SetFitStage(int FitStage)
UnivParamTimeNS::UnivParamTime * ftime[nDetectorType]
float NormalizeAngle(const float angle)
bool ScanRange(int iparX, int iparY, std::vector< double > par, std::vector< int > parStatus, double *rangeX, double *rangeY, double *d, double RotAngle, double errDef, double InitStep, double &edm)
bool IsSaturated[nDetectorType]
UnivCalibConstantsNS::UnivCalibConstants * fcalib
double GetLikelihood(std::vector< double > par, std::vector< int > status)
void InitRecStation(RecStation *station)
const double ParameterizationRMSLimit
RecStation_t * GetRecStation(int idet)
double GetSignalLikelihood()
void Unrotate(double l_p, double m_p, double &theta, double &azi)
const double vemTimeCut[nQ]
UnivParamNS::UnivParam * fsignal[nDetectorType]
void GetResiduals(std::vector< double > &mean, std::vector< double > &rms, std::vector< double > &rec, int optY, std::vector< double > &fx, int optX, bool OnlyNotSaturated)
int InitFCNParameters(std::vector< double > &par, std::vector< double > &epar, std::vector< int > &status, std::vector< bool > &hasLimits)
void PrintRecInfo(bool PrintResiduals)
bool GetRecEstimate(int itype)
void Chi2(int &, double *const , double &value, double *const par, const int)
const double AreaOverPeak_Run[nAoP]
const double rStartCut[2]
void SetXmaxRange(double Xmax0, double Xmax1)
bool UseGausPDF_quantiles[nQ]
AtmosphereNS::Atmosphere * fatm
void SetAllSPCoordinates()
const double rSignalCut[2]
void GetRecSeed(int itype)
unsigned int GetnRecStations()
float DistPoints(float x1, float y1, float x2, float y2)
const double SaturationLevelMD
const double SmearingAngle
bool RWRecinfo(FILE *fp, bool RWStations, bool readFlag)
void SetSPCoordinates(int idet)
const int nTimeStationsMin
void ScanLikelihood(int iparX, int iparY, int N, std::vector< std::pair< double, double > > &parXY, std::vector< double > &lnP, std::pair< double, double > &parXY_min, double &lnP_min)
double GetTimeLikelihood()
void SaveFCNParameters(std::vector< double > par, std::vector< int > status)
const double SaturationLevelVEM_WCD[2]
bool Check_DX_DL(RecStation *)
struct UnivRecNS::RecStation RecStation_t
struct UnivRecNS::RecInfo RecInfo_t
bool InitRec_InternalFramework(bool RecInfill, int RecDataSet, int year, std::string &FileName, bool RecSDEUpgrade, int RecAoP)
struct UnivRecNS::MCInfo MCInfo_t
std::vector< RecStation_t > fstation
void SetT0FromHot(bool UseT0_relative, double T0_relative)
const double StartAccuracyAMIGA
const double StartAccuracy[2]
int GetErrors(std::vector< double > par, std::vector< double > &epar, std::vector< int > parStatus)
AugerRecInfo_t * GetAugerRecInfo()
struct UnivRecNS::AugerRecInfo AugerRecInfo_t
void GetChi2(double *Chi2, int *nChi2)
void GetMeanRMS_AoP(double &mean, double &rms)
const double edm_tolerance
const bool UseStartTimeOnlyWhenSaturated
bool gDetectorTypeMask[nDetectorType]
const double rQuantileCut[2]
void GetXmaxRange(double &Xmax0, double &Xmax1)
const int nSignalStationsMin
const std::string ParName[npar]
const double vemSignalCut
bool InitRec(bool IsData, int RecType, int CalibOpt, int RecDetector, int RecSys, int RecMixture)
static std::vector< int > parStatus
bool RejectTimeOutliers()
bool PlaneFit(bool CurvCorr, bool AltitudeCorr, bool RecSeed, int itype)
const double InterGPSAccuracy[2]
void WriteTextFile(FILE *fp)
const double SaturationLevelVEM_Scin[2]
bool CheckEnergyCut(bool PrintOut)