ATTPCROOT
0.3.0-alpha
A ROOT-based framework for analyzing data from active target detectors
|
#include <AtMCFission.h>
Public Member Functions | |
AtMCFission (SimPtr sim, ClusterPtr cluster, PulsePtr pulse) | |
virtual | ~AtMCFission ()=default |
void | SetCN (Ion cn) |
void | SetChargeObjective (ObjectiveFuncCharge obj) |
void | SetAmp (float amp) |
void | SetZRange (int Zmin, int Zmax) |
![]() | |
AtMCFitter (SimPtr sim, ClusterPtr cluster, PulsePtr pulse) | |
virtual | ~AtMCFitter ()=default |
void | Init () |
void | SetPSA (PsaPtr psa) |
void | Exec (const AtPatternEvent &event) |
ParamPtr | GetParameter (const std::string &name) const |
void | FillResultArrays (TClonesArray &resultArray, TClonesArray &simEvent, TClonesArray &simRawEvent) |
void | SetNumIter (int iter) |
void | SetNumRounds (int rounds) |
Set number of times to run fNumIter iterations and then re-center and truncate the parameter space. More... | |
void | SetTimeEvent (bool val) |
void | SetNumEventsToSave (int num) |
void | SetNumThreads (int num) |
Static Public Member Functions | |
static double | ObjectiveChargeChi2 (const std::vector< double > &exp, const std::vector< double > &sim, const double *par) |
static double | ObjectiveChargeChi2Norm (const std::vector< double > &exp, const std::vector< double > &sim, const double *par) |
static double | ObjectiveChargeDiff2 (const std::vector< double > &exp, const std::vector< double > &sim, const double *par) |
Protected Types | |
using | XYZPoint = ROOT::Math::XYZPoint |
using | XYZVector = ROOT::Math::XYZVector |
using | XYZEVector = ROOT::Math::PxPyPzEVector |
using | ObjectiveFuncCharge = std::function< double(const std::vector< double > &exp, const std::vector< double > &sim, const double *par)> |
![]() | |
using | ParamPtr = std::shared_ptr< AtParameterDistribution > |
using | SimPtr = std::shared_ptr< AtSimpleSimulation > |
using | ClusterPtr = std::shared_ptr< AtClusterize > |
using | PulsePtr = std::shared_ptr< AtPulse > |
using | MapPtr = std::shared_ptr< AtMap > |
using | PsaPtr = std::shared_ptr< AtPSA > |
using | ObjPair = std::pair< int, double > |
Protected Member Functions | |
virtual void | CreateParamDistros () override |
Create the parameter distributions to use for the fit. More... | |
virtual void | SetParamDistributions (const AtPatternEvent &event) override |
Set parameter distributions (mean/spread) from the event. More... | |
virtual double | ObjectiveFunction (const AtBaseEvent &expEvent, int SimEventID, AtMCResult &definition) override |
This is the thing we are minimizing between events (SimEventID is index in TClonesArray) More... | |
virtual TClonesArray | SimulateEvent (AtMCResult &definition) override |
virtual AtMCResult | DefineEvent () override |
double | ObjectiveCharge (const AtFissionEvent &expEvent, int SimEventID, AtMCResult &def) |
double | ObjectiveCharge (const std::array< std::vector< double >, 2 > &exp, const std::array< std::vector< double >, 2 > &sim, AtMCResult &definition) |
double | ObjectivePositionPads (const AtFissionEvent &expEvent, int SimEventID) |
double | ObjectivePosition (const AtFissionEvent &expEvent, int SimEventID) |
double | ObjectiveChargePads (const AtFissionEvent &expEvent, int SimEventID, AtMCResult &def) |
XYZPoint | GetVertex (AtMCResult &) |
std::array< Ion, 2 > | GetFragmentSpecies (AtMCResult &, const Ion &CN) |
XYZVector | GetBeamDir (AtMCResult &, const std::array< XYZVector, 2 > &ffDir, double pTrans) |
XYZVector | GetBeamDirSample (AtMCResult &, const std::array< XYZVector, 2 > &ffDir) |
XYZVector | GetBeamDirSameV (AtMCResult &, const std::array< XYZVector, 2 > &ffDir) |
std::array< XYZVector, 2 > | GetMomDirLab (AtMCResult &) |
void | SetMomMagnitude (std::array< XYZVector, 2 > &mom, double pTrans) |
double | ObjectivePosition (double uE, double sE, double uO, double sO) |
double | ObjectivePosition4 (double uE, double sE, double uO, double sO) |
double | ObjectivePosition3 (double uE, double sE, double uO, double sO) |
double | ObjectivePosition2 (double uE, double sE, double uO, double sO) |
![]() | |
void | RunRound () |
void | RunIterRange (int startIter, int numIter, AtPulse *pulse) |
virtual void | RecenterParamDistributions () |
int | DigitizeEvent (const TClonesArray &points, int idx, AtPulse *pulse) |
Static Protected Member Functions | |
static double | violaEn (int A, int Z) |
Protected Attributes | |
Ion | fCN {85, 204} |
int | fZmin = 26 |
int | fZmax = 59 |
XYZVector | fNominalBeamDir {11.464, 3.754, 1000} |
ObjectiveFuncCharge | fObjCharge {ObjectiveChargeChi2} |
Objective function to minimize the difference between A*sim and exp charge curves. More... | |
float | fAmp = 1 |
bool | fFitAmp = true |
![]() | |
std::map< std::string, ParamPtr > | fParameters |
MapPtr | fMap |
SimPtr | fSim |
ClusterPtr | fClusterize |
PulsePtr | fPulse |
PsaPtr | fPSA {nullptr} |
int | fNumIter {1} |
int | fNumRounds {1} |
int | fNumEventsToSave {10} |
bool | fTimeEvent {false} |
int | fNumThreads {1} |
const AtPatternEvent * | fCurrentEvent {nullptr} |
std::vector< PulsePtr > | fThPulse |
const AtDigiPar * | fPar {nullptr} |
std::vector< AtRawEvent > | fRawEventArray |
std::vector< AtEvent > | fEventArray |
std::mutex | fResultMutex |
Store the iteration number sorted by lowest objective funtion. More... | |
std::set< AtMCResult, std::function< bool(AtMCResult, AtMCResult)> > | fResults |
Definition at line 26 of file AtMCFission.h.
|
protected |
Definition at line 31 of file AtMCFission.h.
|
protected |
Definition at line 30 of file AtMCFission.h.
|
protected |
Definition at line 28 of file AtMCFission.h.
|
protected |
Definition at line 29 of file AtMCFission.h.
|
inline |
Definition at line 50 of file AtMCFission.h.
|
virtualdefault |
|
overrideprotectedvirtual |
Create the parameter distributions to use for the fit.
Implements MCFitter::AtMCFitter.
Definition at line 56 of file AtMCFission.cxx.
|
overrideprotectedvirtual |
Sample parameter distributions and constrain the system to simulate an event. The parameters in AtMCResult will be used to then simulate an event. This function calls Sample() on all the parameter distributions and saves them.
Reimplemented from MCFitter::AtMCFitter.
Definition at line 533 of file AtMCFission.cxx.
|
protected |
Gets the beam direction using kinematics constraints given our assumtion on the kinetic energy of the fission fragments from viola systematics, the masses of the fission fragments, and the folding angle between the fission fragments.
Definition at line 454 of file AtMCFission.cxx.
|
protected |
Gets the beam direction assuming the velocity of the FFs are the same (i.e. it assumes the beam direction is half way between the two FF in tha lab frame.
Definition at line 439 of file AtMCFission.cxx.
|
protected |
Definition at line 496 of file AtMCFission.cxx.
|
protected |
Definition at line 428 of file AtMCFission.cxx.
|
protected |
Get the direction of the FF in the lab frame.
Definition at line 526 of file AtMCFission.cxx.
|
protected |
Definition at line 422 of file AtMCFission.cxx.
|
protected |
Definition at line 207 of file AtMCFission.cxx.
|
protected |
Definition at line 273 of file AtMCFission.cxx.
|
static |
Definition at line 224 of file AtMCFission.cxx.
|
static |
Definition at line 239 of file AtMCFission.cxx.
|
static |
Definition at line 256 of file AtMCFission.cxx.
|
protected |
Gets the max charge of a hit in the experimental event that is associated with a FF (Qmax) Fits the scaling parameter, A to minimize the following (which is the objective funtion)
Chi2 = 1/N \Sum (Q_exp - A*Q_sim)^2/(0.1*Qmax)^2 summing over all good pads in the experimental event.
Definition at line 129 of file AtMCFission.cxx.
|
overrideprotectedvirtual |
This is the thing we are minimizing between events (SimEventID is index in TClonesArray)
Implements MCFitter::AtMCFitter.
Definition at line 108 of file AtMCFission.cxx.
|
protected |
Definition at line 318 of file AtMCFission.cxx.
|
protected |
Returns \Integral_{-inf}^{inf} (G[uO,sO,x] - G[uE,sE,x])^2 dx Assuming the Gaussain functions have the same area.
The experimental is the expected, the observed is our simulated event
Definition at line 402 of file AtMCFission.cxx.
|
protected |
Returns \Integral_{-inf}^{inf} (G[uO,sO,x] - G[uE,sE,x])^2/G[uE,sE,x] dx Assuming the Gaussain functions are normalized (same area).
The experimental is the expected, the observed is our simulated event
Definition at line 376 of file AtMCFission.cxx.
|
protected |
Returns \Integral_{-inf}^{inf} (G[uO,sO,x] - G[uE,sE,x])^2/G[uE,sE,x] dx Assuming the Gaussain functions have the same height.
The experimental is the expected, the observed is our simulated event
Definition at line 415 of file AtMCFission.cxx.
|
protected |
Returns \Integral_{-inf}^{inf} (G[uO,sO,x] - G[uE,sE,x])^2 dx Assuming the Gaussain functions have the same height.
The experimental is the expected, the observed is our simulated event
Definition at line 389 of file AtMCFission.cxx.
|
protected |
Definition at line 189 of file AtMCFission.cxx.
void AtMCFission::SetAmp | ( | float | amp | ) |
Definition at line 50 of file AtMCFission.cxx.
|
inline |
Definition at line 53 of file AtMCFission.h.
|
inline |
Definition at line 52 of file AtMCFission.h.
|
protected |
Set the magnitude of the FF momenta in the lab' frame (assume the beam direction points in the Z direction). The transverse momentum (w.r.t. the beam axis) of the fission fragment in the lab frame is the same as in the CoM frame. We can calculate the magnitude of p for a FF by comparing the angle between the beam and FF.
Definition at line 562 of file AtMCFission.cxx.
|
overrideprotectedvirtual |
Set parameter distributions (mean/spread) from the event.
Implements MCFitter::AtMCFitter.
Definition at line 73 of file AtMCFission.cxx.
|
inline |
Definition at line 55 of file AtMCFission.h.
|
overrideprotectedvirtual |
Simulate an event using the parameters in the passed AtMCResult class and return an array of the AtMCPoints to then digitize.
Implements MCFitter::AtMCFitter.
Definition at line 572 of file AtMCFission.cxx.
|
inlinestaticprotected |
Definition at line 102 of file AtMCFission.h.
|
protected |
Definition at line 46 of file AtMCFission.h.
|
protected |
Definition at line 33 of file AtMCFission.h.
|
protected |
Definition at line 47 of file AtMCFission.h.
|
protected |
Average beam direction. We will sample the beam direction as deviations from this vector. Default value taken from Joe's plots in the overleaf on space charge
Definition at line 41 of file AtMCFission.h.
|
protected |
Objective function to minimize the difference between A*sim and exp charge curves.
Definition at line 44 of file AtMCFission.h.
|
protected |
Definition at line 37 of file AtMCFission.h.
|
protected |
Definition at line 36 of file AtMCFission.h.