1 #ifndef _RdGeoCeLDFFitter_RdGeoCeLDFFitter_h_
2 #define _RdGeoCeLDFFitter_RdGeoCeLDFFitter_h_
4 #include <fwk/VModule.h>
6 #include <utl/CoordinateSystemPtr.h>
8 #include <revt/REvent.h>
9 #include <evt/ShowerRRecData.h>
11 #include <rdet/RDetector.h>
31 namespace RdGeoCeLDFFitter {
35 TRandom3*
rnd =
nullptr;
36 Double_t
RT[2][2] = { { 0 } };
41 CorRand(
const Double_t mu[2],
const Double_t sig[2],
const Double_t rho,
unsigned int seed)
45 rnd =
new TRandom3(seed);
48 RT[0][1] = rho * sig[1];
49 RT[1][1] = sig[1] *
sqrt(1 - rho * rho);
52 "exp( -0.5 / (1.-[4]**2) * ( ((x-[0])/[1])**2 + ((y-[2])/[3])**2 - 2.*[4]*((x-[0])/[1])*((y-[2])/[3])) ) / ( 2.*TMath::Pi()*[1]*[3]*sqrt(1.-[4]**2) )",
53 mu[0] - 10 * sig[0], mu[0] + 10 * sig[0], mu[1] - 10 * sig[1], mu[1] + 10 * sig[1]
55 gausFkt->SetParameters(mu[0], sig[0], mu[1], sig[1], rho);
61 const Double_t normRnd[2] = {
rnd->Gaus(0, 1),
rnd->Gaus(0, 1) };
62 const Double_t corRnd[2] = {
63 myMu[0] +
RT[0][0] * normRnd[0],
64 myMu[1] +
RT[0][1] * normRnd[0] +
RT[1][1] * normRnd[1]
fwk::VModule::ResultFlag Finish() override
Finish: invoked at end of the run (NOT end of the event)
int fMinNuberOfStationsForCoreFit
bool fUserSubThresholdStations
REGISTER_MODULE("RdGeoCeLDFFitter", RdGeoCeLDFFitter)
ResultFlag
Flag returned by module methods to the RunController.
CorRand(const Double_t mu[2], const Double_t sig[2], const Double_t rho, unsigned int seed)
fwk::VModule::ResultFlag Run(evt::Event &event) override
Run: invoked once per event.
fwk::VModule::ResultFlag Init() override
Initialize: invoked at beginning of run (NOT beginning of event)
void GetRnd(double *const a, double *const b)