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;
84 const unsigned int chOn = im->GetRecData().GetTotalNumberOfChannelsOn();
86 const unsigned int segmentation = im->GetRecData().GetSegmentation();
105 double nLogLikelihood1;
109 const double ratio = double(chOn) / double(segmentation);
111 const double pcc = im->GetRecData().GetCornerClippingProbability();
113 nLogLikelihood1 = predictedMuons*(1+pcc)*(1. - ratio) - chOn * std::log(1 - std::exp(-predictedMuons*(1+pcc) / segmentation));
115 nLogLikelihood += nLogLikelihood1;
126 return nLogLikelihood;
Likelihood3(const VLDFFunctor *const ldfFnc, const bool useSil, const unsigned int silLim, const bool useSat)
Creates a functor.
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.
utl::CoordinateSystemPtr siteCS
const VLDFFunctor * fLDFunction
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
double operator()(const std::vector< double > &par) const
Perform the actual count.
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