9 namespace MdLDFFinderAG {
18 siteCS = det::Detector::GetInstance().GetSiteCoordinateSystem();
26 double nLogLikelihood = 0;
33 return nLogLikelihood;
43 double nLogLikelihood = 0;
44 std::ostringstream os;
47 os <<
"Nmu = " << par[0] << endl;
51 const double xcore = par[2];
52 const double ycore = par[3];
55 const mdet::MDetector& mDetector = det::Detector::GetInstance().GetMDetector();
61 const unsigned int counterId = co->
GetId();
67 if (!im->IsCandidate())
70 const unsigned int moduleId = im->
GetId();
73 const double moduleArea = im->GetRecData().GetActiveArea();
80 const double muonDensity = (*fLDFunction)(coreDistance, &par[0]);
82 const double predictedMuons = muonDensity * moduleArea *
cosTheta;
85 bool isSaturated = im->GetRecData().SaturationFlag();
101 double nLogLikelihood1;
104 const double measuredMuons = im->GetRecData().GetNumberOfEstimatedMuons();
105 nLogLikelihood1 = predictedMuons - measuredMuons * std::log(predictedMuons);
109 const unsigned int windowsOn = im->GetRecData().GetNumberOfChannelsOn();
113 nLogLikelihood += nLogLikelihood1;
124 return nLogLikelihood;
double LogarithmOfNormalComplementCDF(const double x)
const Module & GetModule(const int mId) const
Retrieve by id a constant module.
unsigned int fSilentLimit
CounterList fCandidateCounters
Counter level event data.
double DistanceInShowerPlane(const utl::Vector v) const
utl::Point GetPosition() const
Detector associated to muon detector hierarchy.
Likelihood(const VLDFFunctor *const ldfFnc, const bool useSil, const unsigned int silLim, const bool useSat, const size_t satLim)
Creates a functor.
utl::CoordinateSystemPtr siteCS
const VLDFFunctor * fLDFunction
double operator()(const std::vector< double > &par) const
Perform the actual count.
ModuleConstIterator ModulesBegin() const
Common interface for functors performing the muon LDF fitting.
double CalculateSilentLikelihood(const std::vector< double > &par) const
Likelihood of silent counters.
Root detector of the muon detector hierarchy.
int GetId() const
The id of the counter.
ModuleConstIterator ModulesEnd() const
int GetId() const
The id of this component.
const Counter & GetCounter(int id) const
Retrieve Counter by id.
double CalculateCandidateLikelihood(const std::vector< double > &par) const