Jpp
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Typedefs | Functions
JRECONSTRUCTION Namespace Reference

Classes

struct  JQualitySorter
 General purpose sorter of fit results. More...
 
struct  JHitL0Comparator
 Auxiliary class for permutations of L0 hits. More...
 
struct  JHitL1Comparator
 Auxiliary class for permutations of L1 hits. More...
 
class  JPointing
 Auxiliary class to compare fit results with respect to a reference direction (e.g. More...
 
class  JPosition
 Auxiliary class to compare fit results with respect to a reference position (e.g. More...
 
class  JShowerEnergy
 
class  JAtmosphericMuon
 Auxiliary class to evaluate atmospheric muon hypothesis. More...
 
struct  JMuonEnergyParameters_t
 Data structure for fit parameters. More...
 
struct  JMuonGandalf
 Wrapper class to make final fit of muon trajectory. More...
 
struct  JMuonGandalfParameters_t
 Data structure for fit parameters. More...
 
struct  JMuonParameters
 Muon reconstruction parameters. More...
 
struct  JMuonPrefit
 Wrapper class to make pre-fit of muon trajectory. More...
 
struct  JMuonPrefitParameters_t
 Data structure for fit parameters. More...
 
struct  JMuonSimplex
 Wrapper class to make intermediate fit of muon trajectory. More...
 
struct  JMuonSimplexParameters_t
 Data structure for fit parameters. More...
 
struct  JMuonStartParameters_t
 Data structure for fit parameters. More...
 
class  JShowerDirectionPrefit
 class to handle the direction fit of the shower reconstruction, mainly dedicated for ORCA More...
 
struct  JShowerDirectionPrefitParameters_t
 Data structure for fit parameters. More...
 
class  JShowerEnergyPrefit
 class to handle the third step of the shower reconstruction, mainly dedicated for ORCA More...
 
struct  JShowerEnergyPrefitParameters_t
 Data structure for fit parameters. More...
 
class  JShowerFit
 class to handle the direction fit of the shower reconstruction, mainly dedicated for ORCA More...
 
struct  JShowerFitParameters_t
 Data structure for fit parameters. More...
 
struct  JShowerParameters
 Shower reconstruction parameters. More...
 
class  JShowerPointSimplex
 class to handle the second position fit of the shower reconstruction, mainly dedicated for ORCA More...
 
struct  JShowerPointSimplexParameters_t
 
class  JShowerPositionFit
 class to handle the second position fit of the shower reconstruction, mainly dedicated for ORCA More...
 
struct  JShowerPositionFitParameters_t
 
class  JShowerPrefit
 class to handle first step of the shower reconstruction in ORCA: it reconstructs the shower vertex, intended as the shower brightest point, as the barycenter of the hits More...
 
struct  JShowerPrefitParameters_t
 Data structure for fit parameters. More...
 
struct  JStart
 Auxiliary class for start or end point evaluation. More...
 

Typedefs

typedef JFIT::JFit JFit
 
typedef JFIT::JEvt JEvt
 
typedef JFIT::JEvent JEvent
 
typedef JFIT::JHistory JHistory
 

Functions

JPosition3D getPosition (const JFit &fit)
 Get position. More...
 
JDirection3D getDirection (const JFit &fit)
 Get direction. More...
 
JAxis3D getAxis (const JFit &fit)
 Get axis. More...
 
JTrack3E getTrack (const JFit &fit)
 Get track. More...
 
JFit getFit (const JHistory &history, const JTrack3D &track, const double Q, const int NDF, const double energy=0.0, const int status=0)
 Get fit. More...
 
JFit getFit (const JHistory &history, const JLine1Z &track, const JAngle3D &angle, const double Q, const int NDF, const double energy=0.0, const int status=0)
 Get fit. More...
 
double getDot (const JFit &first, const JFit &second)
 Get dot product. More...
 
double getDot (const JFit &fit, const JDirection3D &dir)
 Get dot product. More...
 
double getQuality (const double chi2, const int N, const int NDF)
 Get quality of fit. More...
 
double getQuality (const double chi2, const int NDF)
 Get quality of fit. More...
 
double getQuality (const double chi2)
 Get quality of fit. More...
 
bool qualitySorter (const JFit &first, const JFit &second)
 Comparison of fit results. More...
 
bool has_history (const JFit &fit, const int type)
 Test whether given fit has specified history. More...
 
bool has_history (const JFit &fit, const JRange< int > &range)
 Test whether given fit has specified history. More...
 
bool has_muon_prefit (const JFit &fit)
 Test whether given fit has muon prefit in history. More...
 
bool has_muon_simplex (const JFit &fit)
 Test whether given fit has muon simplex in history. More...
 
bool has_muon_gandalf (const JFit &fit)
 Test whether given fit has muon gandalf in history. More...
 
bool has_muon_energy (const JFit &fit)
 Test whether given fit has muon energy in history. More...
 
bool has_muon_start (const JFit &fit)
 Test whether given fit has muon start in history. More...
 
bool has_muon_fit (const JFit &fit)
 Test whether given fit has muon fit in history. More...
 
bool has_shower_prefit (const JFit &fit)
 Test whether given fit has shower prefit in history. More...
 
bool has_shower_positionfit (const JFit &fit)
 Test whether given fit has shower position fit in history. More...
 
bool has_shower_completefit (const JFit &fit)
 Test whether given fit has shower complete fit in history. More...
 
bool has_shower_fit (const JFit &fit)
 Test whether given fit has shower fit in history. More...
 
template<class JTrackSelector_t >
bool has_reconstructed_track (const JEvt &evt, JTrackSelector_t selector)
 Test whether given event has a track according selection. More...
 
bool has_reconstructed_muon (const JEvt &evt)
 Test whether given event has a track with muon reconstruction. More...
 
bool has_reconstructed_shower (const JEvt &evt)
 Test whether given event has a track with shower reconstruction. More...
 
template<class JTrackSelector_t , class JQualitySorter_t >
const JFitget_best_reconstructed_track (const JEvt &evt, JTrackSelector_t selector, JQualitySorter_t comparator)
 Get best reconstructed track. More...
 
const JFitget_best_reconstructed_muon (const JEvt &evt)
 Get best reconstructed muon. More...
 
const JFitget_best_reconstructed_shower (const JEvt &evt)
 Get best reconstructed shower. More...
 

Detailed Description

Author
mdejong
mdejong, gmaggi
gmaggi
adomi
adomi, gmaggi

Typedef Documentation

Definition at line 386 of file JEvt.hh.

Definition at line 387 of file JEvt.hh.

Definition at line 282 of file JHistory.hh.

Definition at line 283 of file JHistory.hh.

Function Documentation

JPosition3D JRECONSTRUCTION::getPosition ( const JFit fit)
inline

Get position.

Parameters
fitfit
Returns
position

Definition at line 73 of file JEvtToolkit.hh.

74  {
75  return JPosition3D(fit.getX(), fit.getY(), fit.getZ());
76  }
double getX() const
Get X-position.
Definition: JEvt.hh:145
double getY() const
Get Y-position.
Definition: JEvt.hh:146
double getZ() const
Get Z-position.
Definition: JEvt.hh:147
Data structure for position in three dimensions.
Definition: JPosition3D.hh:35
JDirection3D JRECONSTRUCTION::getDirection ( const JFit fit)
inline

Get direction.

Parameters
fitfit
Returns
direction

Definition at line 85 of file JEvtToolkit.hh.

86  {
87  return JDirection3D(fit.getDX(), fit.getDY(), fit.getDZ());
88  }
Data structure for direction in three dimensions.
Definition: JDirection3D.hh:32
double getDZ() const
Get Z-slope.
Definition: JEvt.hh:150
double getDY() const
Get Y-slope.
Definition: JEvt.hh:149
double getDX() const
Get X-slope.
Definition: JEvt.hh:148
JAxis3D JRECONSTRUCTION::getAxis ( const JFit fit)
inline

Get axis.

Parameters
fitfit
Returns
axis

Definition at line 97 of file JEvtToolkit.hh.

98  {
99  return JAxis3D(getPosition(fit), getDirection(fit));
100  }
Axis object.
Definition: JAxis3D.hh:38
JDirection3D getDirection(const Vec &v)
Get direction.
JPosition3D getPosition(const Vec &v)
Get position.
JTrack3E JRECONSTRUCTION::getTrack ( const JFit fit)
inline

Get track.

Parameters
fitfit
Returns
track

Definition at line 109 of file JEvtToolkit.hh.

110  {
111  return JTrack3E(JTrack3D(getAxis(fit), fit.getT()), fit.getE());
112  }
3D track with energy.
Definition: JTrack3E.hh:29
double getT() const
Get time.
Definition: JEvt.hh:151
JAxis3D getAxis(const Trk &track)
Get axis.
double getE() const
Get energy.
Definition: JEvt.hh:154
JFit JRECONSTRUCTION::getFit ( const JHistory history,
const JTrack3D track,
const double  Q,
const int  NDF,
const double  energy = 0.0,
const int  status = 0 
)
inline

Get fit.

Parameters
historyhistory
tracktrack
Qquality
NDFnumber of degrees of freedom
energyEnergy, which would be set as 0, if the fit does not reconstruct energy
statusstatus of the fit as defined in enum JFitStatus.hh
Returns
fit

Definition at line 126 of file JEvtToolkit.hh.

132  {
133  return JFit(history,
134  track.getX(), track.getY(), track.getZ(),
135  track.getDX(), track.getDY(), track.getDZ(),
136  track.getT(),
137  Q, NDF,
138  energy, status);
139  }
double getDY() const
Get y direction.
Definition: JVersor3D.hh:103
double getDX() const
Get x direction.
Definition: JVersor3D.hh:92
double getY() const
Get y position.
Definition: JVector3D.hh:103
double getT(const JVector3D &pos) const
Get arrival time of Cherenkov light at given position.
Definition: JTrack3D.hh:126
then for APP in event gandalf start energy
Definition: JMuonMCEvt.sh:42
JFIT::JFit JFit
Definition: JEvt.hh:386
double getX() const
Get x position.
Definition: JVector3D.hh:93
double getZ() const
Get z position.
Definition: JVector3D.hh:114
double getDZ() const
Get z direction.
Definition: JVersor3D.hh:114
JFit JRECONSTRUCTION::getFit ( const JHistory history,
const JLine1Z track,
const JAngle3D angle,
const double  Q,
const int  NDF,
const double  energy = 0.0,
const int  status = 0 
)
inline

Get fit.

Parameters
historyhistory
tracktrack
angleangle
Qquality
NDFnumber of degrees of freedom
energyEnergy, which would be set as 0, if the fit does not reconstruct energy
statusstatus of the fit as defined in JFitStatus.hh
Returns
fit

Definition at line 154 of file JEvtToolkit.hh.

161  {
162  return JFit(history,
163  track.getX(), track.getY(), track.getZ(),
164  angle.getDX(), angle.getDY(), angle.getDZ(),
165  track.getT(),
166  Q, NDF,
167  energy, status);
168  }
double getZ(const JPosition3D &pos) const
Get point of emission of Cherenkov light along muon path.
Definition: JLine1Z.hh:134
double getY() const
Get y position.
Definition: JVector3D.hh:103
then for APP in event gandalf start energy
Definition: JMuonMCEvt.sh:42
double getT(const JVector3D &pos) const
Get arrival time of Cherenkov light at given position.
Definition: JLine1Z.hh:114
JFIT::JFit JFit
Definition: JEvt.hh:386
double getX() const
Get x position.
Definition: JVector3D.hh:93
double getDX() const
Get x direction.
Definition: JAngle3D.hh:106
double getDZ() const
Get z direction.
Definition: JAngle3D.hh:128
double getDY() const
Get y direction.
Definition: JAngle3D.hh:117
double JRECONSTRUCTION::getDot ( const JFit first,
const JFit second 
)
inline

Get dot product.

Parameters
firstfirst fit
secondsecond fit
Returns
dot product

Definition at line 178 of file JEvtToolkit.hh.

179  {
180  return JMATH::getDot(getDirection(first), getDirection(second));
181  }
double getDot(const JFirst_t &first, const JSecond_t &second)
Get dot product of objects.
JDirection3D getDirection(const Vec &v)
Get direction.
double JRECONSTRUCTION::getDot ( const JFit fit,
const JDirection3D dir 
)
inline

Get dot product.

Parameters
fitfit
dirdirection
Returns
dot product

Definition at line 191 of file JEvtToolkit.hh.

192  {
193  return JMATH::getDot(getDirection(fit), dir);
194  }
double getDot(const JFirst_t &first, const JSecond_t &second)
Get dot product of objects.
JDirection3D getDirection(const Vec &v)
Get direction.
double JRECONSTRUCTION::getQuality ( const double  chi2,
const int  N,
const int  NDF 
)
inline

Get quality of fit.


The larger the quality, the better the fit.

Parameters
chi2chi2
Nnumber of hits
NDFnumber of degrees of freedom
Returns
quality

Definition at line 206 of file JEvtToolkit.hh.

207  {
208  return N - 0.25 * chi2 / NDF;
209  }
then usage $script[input file[working directory[option]]] nWhere option can be N
Definition: JMuonPostfit.sh:37
double JRECONSTRUCTION::getQuality ( const double  chi2,
const int  NDF 
)
inline

Get quality of fit.


The larger the quality, the better the fit.

Parameters
chi2chi2
NDFnumber of degrees of freedom
Returns
quality

Definition at line 220 of file JEvtToolkit.hh.

221  {
222  return NDF - 0.25 * chi2 / NDF;
223  }
double JRECONSTRUCTION::getQuality ( const double  chi2)
inline

Get quality of fit.


The larger the quality, the better the fit.

Parameters
chi2chi2
Returns
quality

Definition at line 233 of file JEvtToolkit.hh.

234  {
235  return -chi2;
236  }
bool JRECONSTRUCTION::qualitySorter ( const JFit first,
const JFit second 
)
inline

Comparison of fit results.

Parameters
firstfirst fit
secondsecond fit
Returns
true if first fit has better quality than second; else false

Definition at line 246 of file JEvtToolkit.hh.

247  {
248  if (first.getHistory().size() == second.getHistory().size())
249  return first.getQ() > second.getQ();
250  else
251  return first.getHistory().size() > second.getHistory().size();
252  }
double getQ() const
Get quality.
Definition: JEvt.hh:152
const JHistory & getHistory() const
Get history.
Definition: JHistory.hh:228
bool JRECONSTRUCTION::has_history ( const JFit fit,
const int  type 
)
inline

Test whether given fit has specified history.

Parameters
fitfit
typeapplication type
Returns
true if type in history; else false

Definition at line 285 of file JEvtToolkit.hh.

286  {
287  return std::find_if(fit.getHistory().begin(),
288  fit.getHistory().end(),
289  JLANG::make_predicate(&JEvent::type, type)) != fit.getHistory().end();
290  }
JPredicate< JResult_t T::*, JComparison::eq > make_predicate(JResult_t T::*member, const JResult_t value)
Helper method to create predicate for data member.
Definition: JPredicate.hh:128
int type
Definition: JProperties.cc:16
const JHistory & getHistory() const
Get history.
Definition: JHistory.hh:228
bool JRECONSTRUCTION::has_history ( const JFit fit,
const JRange< int > &  range 
)
inline

Test whether given fit has specified history.

Parameters
fitfit
rangeapplication type range
Returns
true if type in history; else false

Definition at line 300 of file JEvtToolkit.hh.

301  {
302  return std::find_if(fit.getHistory().begin(),
303  fit.getHistory().end(),
304  JLANG::make_find_if(&JEvent::type, range)) != fit.getHistory().end();
305  }
int type
Definition: JProperties.cc:16
JFind_if< JResult_t T::*, JPredicate_t > make_find_if(JResult_t T::*member, const JPredicate_t &predicate)
Helper method to create find_if for data member.
Definition: JFind_if.hh:119
const JHistory & getHistory() const
Get history.
Definition: JHistory.hh:228
bool JRECONSTRUCTION::has_muon_prefit ( const JFit fit)
inline

Test whether given fit has muon prefit in history.

Parameters
fitfit
Returns
true if muon prefit in history; else false

Definition at line 314 of file JEvtToolkit.hh.

315  {
316  return has_history(fit, JMUONPREFIT);
317  }
bool has_history(const JFit &fit, const int type)
Test whether given fit has specified history.
Definition: JEvtToolkit.hh:285
static const int JMUONPREFIT
bool JRECONSTRUCTION::has_muon_simplex ( const JFit fit)
inline

Test whether given fit has muon simplex in history.

Parameters
fitfit
Returns
true if muon simplex in history; else false

Definition at line 326 of file JEvtToolkit.hh.

327  {
328  return has_history(fit, JMUONSIMPLEX);
329  }
bool has_history(const JFit &fit, const int type)
Test whether given fit has specified history.
Definition: JEvtToolkit.hh:285
static const int JMUONSIMPLEX
bool JRECONSTRUCTION::has_muon_gandalf ( const JFit fit)
inline

Test whether given fit has muon gandalf in history.

Parameters
fitfit
Returns
true if muon gandalf in history; else false

Definition at line 338 of file JEvtToolkit.hh.

339  {
340  return has_history(fit, JMUONGANDALF);
341  }
bool has_history(const JFit &fit, const int type)
Test whether given fit has specified history.
Definition: JEvtToolkit.hh:285
static const int JMUONGANDALF
bool JRECONSTRUCTION::has_muon_energy ( const JFit fit)
inline

Test whether given fit has muon energy in history.

Parameters
fitfit
Returns
true if muon energy in history; else false

Definition at line 350 of file JEvtToolkit.hh.

351  {
352  return has_history(fit, JMUONENERGY);
353  }
bool has_history(const JFit &fit, const int type)
Test whether given fit has specified history.
Definition: JEvtToolkit.hh:285
static const int JMUONENERGY
bool JRECONSTRUCTION::has_muon_start ( const JFit fit)
inline

Test whether given fit has muon start in history.

Parameters
fitfit
Returns
true if muon start in history; else false

Definition at line 362 of file JEvtToolkit.hh.

363  {
364  return has_history(fit, JMUONSTART);
365  }
static const int JMUONSTART
bool has_history(const JFit &fit, const int type)
Test whether given fit has specified history.
Definition: JEvtToolkit.hh:285
bool JRECONSTRUCTION::has_muon_fit ( const JFit fit)
inline

Test whether given fit has muon fit in history.

Parameters
fitfit
Returns
true if muon fit in history; else false

Definition at line 374 of file JEvtToolkit.hh.

375  {
377  }
bool has_history(const JFit &fit, const int type)
Test whether given fit has specified history.
Definition: JEvtToolkit.hh:285
static const int JMUONBEGIN
begin range of reconstruction stages
static const int JMUONEND
end range of reconstruction stages
bool JRECONSTRUCTION::has_shower_prefit ( const JFit fit)
inline

Test whether given fit has shower prefit in history.

Parameters
fitfit
Returns
true if shower prefit in history; else false

Definition at line 386 of file JEvtToolkit.hh.

387  {
388  return has_history(fit, JSHOWERPREFIT);
389  }
bool has_history(const JFit &fit, const int type)
Test whether given fit has specified history.
Definition: JEvtToolkit.hh:285
static const int JSHOWERPREFIT
bool JRECONSTRUCTION::has_shower_positionfit ( const JFit fit)
inline

Test whether given fit has shower position fit in history.

Parameters
fitfit
Returns
true if shower position fit in history; else false

Definition at line 398 of file JEvtToolkit.hh.

399  {
400  return has_history(fit, JSHOWERPOSITIONFIT);
401  }
bool has_history(const JFit &fit, const int type)
Test whether given fit has specified history.
Definition: JEvtToolkit.hh:285
static const int JSHOWERPOSITIONFIT
bool JRECONSTRUCTION::has_shower_completefit ( const JFit fit)
inline

Test whether given fit has shower complete fit in history.

Parameters
fitfit
Returns
true if shower complete fit in history; else false

Definition at line 410 of file JEvtToolkit.hh.

411  {
412  return has_history(fit, JSHOWERCOMPLETEFIT);
413  }
bool has_history(const JFit &fit, const int type)
Test whether given fit has specified history.
Definition: JEvtToolkit.hh:285
static const int JSHOWERCOMPLETEFIT
bool JRECONSTRUCTION::has_shower_fit ( const JFit fit)
inline

Test whether given fit has shower fit in history.

Parameters
fitfit
Returns
true if shower fit in history; else false

Definition at line 422 of file JEvtToolkit.hh.

423  {
425  }
static const int JSHOWEREND
end range of reconstruction stages
bool has_history(const JFit &fit, const int type)
Test whether given fit has specified history.
Definition: JEvtToolkit.hh:285
static const int JSHOWERBEGIN
begin range of reconstruction stages
template<class JTrackSelector_t >
bool JRECONSTRUCTION::has_reconstructed_track ( const JEvt evt,
JTrackSelector_t  selector 
)
inline

Test whether given event has a track according selection.


The track selector corresponds to the function operator bool selector(const Trk&);.

Parameters
evtevent
selectortrack selector
Returns
true if at least one corresponding track; else false

Definition at line 437 of file JEvtToolkit.hh.

438  {
439  return std::find_if(evt.begin(), evt.end(), selector) != evt.end();
440  }
bool JRECONSTRUCTION::has_reconstructed_muon ( const JEvt evt)
inline

Test whether given event has a track with muon reconstruction.

Parameters
evtevent
Returns
true if at least one reconstructed muon; else false

Definition at line 449 of file JEvtToolkit.hh.

450  {
452  }
bool has_muon_fit(const JFit &fit)
Test whether given fit has muon fit in history.
Definition: JEvtToolkit.hh:374
bool has_reconstructed_track(const JEvt &evt, JTrackSelector_t selector)
Test whether given event has a track according selection.
Definition: JEvtToolkit.hh:437
bool JRECONSTRUCTION::has_reconstructed_shower ( const JEvt evt)
inline

Test whether given event has a track with shower reconstruction.

Parameters
evtevent
Returns
true if at least one reconstructed shower; else false

Definition at line 461 of file JEvtToolkit.hh.

462  {
464  }
bool has_shower_fit(const Trk &track)
Test whether given track has default shower fit in history.
bool has_reconstructed_track(const JEvt &evt, JTrackSelector_t selector)
Test whether given event has a track according selection.
Definition: JEvtToolkit.hh:437
template<class JTrackSelector_t , class JQualitySorter_t >
const JFit& JRECONSTRUCTION::get_best_reconstructed_track ( const JEvt evt,
JTrackSelector_t  selector,
JQualitySorter_t  comparator 
)
inline

Get best reconstructed track.


The track selector corresponds to the function operator bool selector(const Trk&); and the track comparator to bool comprator(const Trk&, const Trk&);.

Parameters
evtevent
selectortrack selector
comparatortrack comparator
Returns
track

Definition at line 478 of file JEvtToolkit.hh.

481  {
482  JEvt::const_iterator p = std::find_if(evt.begin(), evt.begin(), selector);
483 
484  for (JEvt::const_iterator i = p; i != evt.end(); ++i) {
485  if (selector(*i) && comparator(*i, *p)) {
486  p = i;
487  }
488  }
489 
490  if (p != evt.end())
491  return *p;
492  else
493  THROW(JIndexOutOfRange, "This event has no fit with given selector.");
494  }
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
Definition: JException.hh:670
Exception for accessing an index in a collection that is outside of its range.
Definition: JException.hh:90
const JFit& JRECONSTRUCTION::get_best_reconstructed_muon ( const JEvt evt)
inline

Get best reconstructed muon.

Parameters
evtevent
Returns
track

Definition at line 503 of file JEvtToolkit.hh.

504  {
506  }
bool has_muon_fit(const JFit &fit)
Test whether given fit has muon fit in history.
Definition: JEvtToolkit.hh:374
const JFit & get_best_reconstructed_track(const JEvt &evt, JTrackSelector_t selector, JQualitySorter_t comparator)
Get best reconstructed track.
Definition: JEvtToolkit.hh:478
bool qualitySorter(const JRECONSTRUCTION::JFit &first, const JRECONSTRUCTION::JFit &second)
Comparison of fit results.
const JFit& JRECONSTRUCTION::get_best_reconstructed_shower ( const JEvt evt)
inline

Get best reconstructed shower.

Parameters
evtevent
Returns
track

Definition at line 515 of file JEvtToolkit.hh.

516  {
518  }
bool has_shower_fit(const Trk &track)
Test whether given track has default shower fit in history.
const JFit & get_best_reconstructed_track(const JEvt &evt, JTrackSelector_t selector, JQualitySorter_t comparator)
Get best reconstructed track.
Definition: JEvtToolkit.hh:478
bool qualitySorter(const JRECONSTRUCTION::JFit &first, const JRECONSTRUCTION::JFit &second)
Comparison of fit results.