Jpp test-rotations-old
the software that should make you happy
Loading...
Searching...
No Matches
JRECONSTRUCTION Namespace Reference

Model fits to data. More...

Classes

struct  event_type
 Auxiliary data structure to store data and fit in memory. More...
 
struct  JARCAMuonReconstruction
 ARCA muon reconstruction. More...
 
class  JAtmosphericMuon
 Auxiliary class to evaluate atmospheric muon hypothesis. More...
 
struct  JEditor
 Auxiliary class for editing time offset. More...
 
class  JEnergyCorrection
 Auxiliary class for correction of energy determined by JEnergy.cc. More...
 
struct  JEventSelector
 Event selector. More...
 
class  JHitW0
 Auxiliary class for a hit with background rate value. More...
 
struct  JModuleL0
 Auxiliary class for handling module response. More...
 
class  JMultiThreadedReconstruction
 Thread pool for event-by-event reconstruction. More...
 
class  JMuonEnergy
 Auxiliary class to to determine muon energy. More...
 
struct  JMuonEnergyParameters_t
 Data structure for fit parameters. More...
 
struct  JMuonFeatures
 Wrapper class to add features after the final fit of muon trajectory. 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...
 
class  JMuonStart
 Auxiliary class to determine start and end position of muon trajectory. More...
 
struct  JMuonStartParameters_t
 Data structure for fit parameters. More...
 
struct  JORCAMuonReconstruction
 ORCA muon reconstruction. More...
 
struct  JORCAReconstruction
 ORCA reconstruction. More...
 
struct  JORCAShowerReconstruction
 ORCA shower reconstruction. More...
 
struct  JPerth
 Thread pool for fits to data. More...
 
struct  JPerth_t
 Auxiliary data structure for chi2 function object. More...
 
class  JPointing
 Auxiliary class to compare fit results with respect to a reference direction (e.g. true muon). More...
 
class  JPosition
 Auxiliary class to compare fit results with respect to a reference position (e.g. true muon). More...
 
struct  JQualitySorter
 General purpose sorter of fit results. More...
 
struct  JRange_t
 Type definition of range. More...
 
class  JShowerBjorkenY
 class to handle the direction fit of the shower reconstruction, mainly dedicated for ORCA More...
 
struct  JShowerBjorkenYParameters_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  JShowerEnergy
 
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
 
typedef std::vector< JHitW0buffer_type
 hits
 
typedef std::map< int, buffer_typemap_type
 identifier -> hits
 
typedef std::vector< event_typedata_type
 
typedef JLANG::JSTDObjectReader< const event_typeinput_type
 
typedef JFIT::JRegressorStorage< JFIT::JLine3Z, JFIT::JGandalfJRegressorStorage_t
 
typedef JFIT::JRegressor< JFIT::JLine3Z, JFIT::JGandalfJRegressor_t
 

Enumerations

enum  JFitStatus_t {
  ERROR = -100 , INSUFFICIENT_NUMBER_OF_HITS , INSUFFICIENT_NUMBER_OF_DOMS , UNDEFINED = -1 ,
  SINGLE_STAGE = 0 , INCOMPLETE_CHAIN = +1 , COMPLETE_CHAIN = +100
}
 

Functions

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

Variables

const char *const h2_t = "h2"
 Name of histogram with results from JMuonCompass.cc.
 

Detailed Description

Model fits to data.

Author
mdejong
mdejong, azegarelli, scelli
eleguirriec, mdejong
mdejong, gmaggi
gmaggi
mdejong, gmaggi, azegarelli
adomi
adomi, vcarretero
adomi, gmaggi, vcarretero
adomi, gmaggi

Typedef Documentation

◆ JFit

Definition at line 481 of file JReconstruction/JEvt.hh.

◆ JEvt

Definition at line 482 of file JReconstruction/JEvt.hh.

◆ JEvent

Definition at line 404 of file JHistory.hh.

◆ JHistory

Definition at line 405 of file JHistory.hh.

◆ buffer_type

hits

Definition at line 70 of file JPerth.cc.

◆ map_type

identifier -> hits

Definition at line 71 of file JPerth.cc.

◆ data_type

Definition at line 81 of file JPerth.cc.

◆ input_type

Definition at line 82 of file JPerth.cc.

◆ JRegressorStorage_t

◆ JRegressor_t

Enumeration Type Documentation

◆ JFitStatus_t

Enumerator
ERROR 
INSUFFICIENT_NUMBER_OF_HITS 
INSUFFICIENT_NUMBER_OF_DOMS 
UNDEFINED 
SINGLE_STAGE 
INCOMPLETE_CHAIN 
COMPLETE_CHAIN 

Definition at line 16 of file JFitStatus.hh.

16 {
17
18 ERROR = -100,
21 UNDEFINED = -1,
22 SINGLE_STAGE = 0,
24 COMPLETE_CHAIN = +100
25 };
#define ERROR(A)
Definition JMessage.hh:66
@ INSUFFICIENT_NUMBER_OF_HITS
Definition JFitStatus.hh:19
@ INSUFFICIENT_NUMBER_OF_DOMS
Definition JFitStatus.hh:20

Function Documentation

◆ getPosition()

JPosition3D JRECONSTRUCTION::getPosition ( const JFit & fit)
inline

Get position.

Parameters
fitfit
Returns
position

Definition at line 71 of file JReconstruction/JEvtToolkit.hh.

72 {
73 return JPosition3D(fit.getX(), fit.getY(), fit.getZ());
74 }
double getZ() const
Get Z-position.
double getY() const
Get Y-position.
double getX() const
Get X-position.
Data structure for position in three dimensions.

◆ getDirection()

JDirection3D JRECONSTRUCTION::getDirection ( const JFit & fit)
inline

Get direction.

Parameters
fitfit
Returns
direction

Definition at line 83 of file JReconstruction/JEvtToolkit.hh.

84 {
85 return JDirection3D(fit.getDX(), fit.getDY(), fit.getDZ());
86 }
double getDZ() const
Get Z-slope.
double getDY() const
Get Y-slope.
double getDX() const
Get X-slope.
Data structure for direction in three dimensions.

◆ getAxis()

JAxis3D JRECONSTRUCTION::getAxis ( const JFit & fit)
inline

Get axis.

Parameters
fitfit
Returns
axis

Definition at line 95 of file JReconstruction/JEvtToolkit.hh.

96 {
97 return JAxis3D(getPosition(fit), getDirection(fit));
98 }
Axis object.
Definition JAxis3D.hh:41

◆ getTrack()

JTrack3E JRECONSTRUCTION::getTrack ( const JFit & fit)
inline

Get track.

Parameters
fitfit
Returns
track

Definition at line 107 of file JReconstruction/JEvtToolkit.hh.

108 {
109 return JTrack3E(JTrack3D(getAxis(fit), fit.getT()), fit.getE());
110 }
double getE() const
Get energy.
double getT() const
Get time.
3D track with energy.
Definition JTrack3E.hh:32

◆ getFit() [1/2]

JFit JRECONSTRUCTION::getFit ( const JHistory & history,
const JTrack3D & track,
const double Q,
const int NDF,
const double energy = 0.0,
const int status = SINGLE_STAGE )
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 124 of file JReconstruction/JEvtToolkit.hh.

130 {
131 return JFit(history,
132 track.getX(), track.getY(), track.getZ(),
133 track.getDX(), track.getDY(), track.getDZ(),
134 track.getT(),
135 Q, NDF,
136 energy, status);
137 }
Data structure for track fit results with history and optional associated values.
double getT(const JVector3D &pos) const
Get arrival time of Cherenkov light at given position.
Definition JTrack3D.hh:126
double getY() const
Get y position.
Definition JVector3D.hh:104
double getZ() const
Get z position.
Definition JVector3D.hh:115
double getX() const
Get x position.
Definition JVector3D.hh:94
double getDY() const
Get y direction.
Definition JVersor3D.hh:106
double getDX() const
Get x direction.
Definition JVersor3D.hh:95
double getDZ() const
Get z direction.
Definition JVersor3D.hh:117

◆ getFit() [2/2]

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 = SINGLE_STAGE )
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 152 of file JReconstruction/JEvtToolkit.hh.

159 {
160 return JFit(history,
161 track.getX(), track.getY(), track.getZ(),
162 angle.getDX(), angle.getDY(), angle.getDZ(),
163 track.getT(),
164 Q, NDF,
165 energy, status);
166 }
double getT(const JVector3D &pos) const
Get arrival time of Cherenkov light at given position.
Definition JLine1Z.hh:114
double getZ(const JPosition3D &pos) const
Get point of emission of Cherenkov light along muon path.
Definition JLine1Z.hh:134
double getDY() const
Get y direction.
Definition JAngle3D.hh:119
double getDZ() const
Get z direction.
Definition JAngle3D.hh:130
double getDX() const
Get x direction.
Definition JAngle3D.hh:108

◆ getDot() [1/2]

double JRECONSTRUCTION::getDot ( const JFit & first,
const JFit & second )
inline

Get dot product.

Parameters
firstfirst fit
secondsecond fit
Returns
dot product

Definition at line 176 of file JReconstruction/JEvtToolkit.hh.

177 {
178 return JMATH::getDot(getDirection(first), getDirection(second));
179 }
double getDot(const JFirst_t &first, const JSecond_t &second)
Get dot product of objects.

◆ getDot() [2/2]

double JRECONSTRUCTION::getDot ( const JFit & fit,
const JVersor3D & dir )
inline

Get dot product.

Parameters
fitfit
dirdirection
Returns
dot product

Definition at line 189 of file JReconstruction/JEvtToolkit.hh.

190 {
191 return JMATH::getDot(getDirection(fit), dir);
192 }

◆ getAngle() [1/2]

double JRECONSTRUCTION::getAngle ( const JFit & first,
const JFit & second )
inline

Get space angle.

Parameters
firstfirst fit
secondsecond fit
Returns
angle [deg]

Definition at line 202 of file JReconstruction/JEvtToolkit.hh.

203 {
204 return JMATH::getAngle(getDirection(first), getDirection(second));
205 }
double getAngle(const JFirst_t &first, const JSecond_t &second)
Get space angle between objects.

◆ getAngle() [2/2]

double JRECONSTRUCTION::getAngle ( const JFit & fit,
const JVersor3D & dir )
inline

Get space angle.

Parameters
fitfit
dirdirection
Returns
angle [deg]

Definition at line 215 of file JReconstruction/JEvtToolkit.hh.

216 {
217 return JMATH::getAngle(getDirection(fit), dir);
218 }

◆ getQuality() [1/3]

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 230 of file JReconstruction/JEvtToolkit.hh.

231 {
232 return N - 0.25 * chi2 / NDF;
233 }

◆ getQuality() [2/3]

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 244 of file JReconstruction/JEvtToolkit.hh.

245 {
246 return NDF - 0.25 * chi2 / NDF;
247 }

◆ getQuality() [3/3]

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 257 of file JReconstruction/JEvtToolkit.hh.

258 {
259 return -chi2;
260 }

◆ qualitySorter()

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 270 of file JReconstruction/JEvtToolkit.hh.

271 {
272 if (first.getHistory().size() == second.getHistory().size())
273 return first.getQ() > second.getQ();
274 else
275 return first.getHistory().size() > second.getHistory().size();
276 }
double getQ() const
Get quality.
const JHistory & getHistory() const
Get history.
Definition JHistory.hh:280

◆ has_history() [1/2]

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 309 of file JReconstruction/JEvtToolkit.hh.

310 {
311 return std::find_if(fit.getHistory().begin(),
312 fit.getHistory().end(),
313 JLANG::make_predicate(&JEvent::type, type)) != fit.getHistory().end();
314 }
JPredicate< JResult_t T::*, JComparison::eq > make_predicate(JResult_t T::*member, const JResult_t value)
Helper method to create predicate for data member.

◆ has_history() [2/2]

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 324 of file JReconstruction/JEvtToolkit.hh.

325 {
326 return std::find_if(fit.getHistory().begin(),
327 fit.getHistory().end(),
328 JLANG::make_find_if(&JEvent::type, range)) != fit.getHistory().end();
329 }
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

◆ has_muon_prefit()

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 338 of file JReconstruction/JEvtToolkit.hh.

339 {
340 return has_history(fit, JMUONPREFIT);
341 }
static const int JMUONPREFIT
Auxiliary class to test whether given track has specified history.

◆ has_muon_simplex()

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 350 of file JReconstruction/JEvtToolkit.hh.

351 {
352 return has_history(fit, JMUONSIMPLEX);
353 }
static const int JMUONSIMPLEX

◆ has_muon_gandalf()

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 362 of file JReconstruction/JEvtToolkit.hh.

363 {
364 return has_history(fit, JMUONGANDALF);
365 }
static const int JMUONGANDALF

◆ has_muon_energy()

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 374 of file JReconstruction/JEvtToolkit.hh.

375 {
376 return has_history(fit, JMUONENERGY);
377 }
static const int JMUONENERGY

◆ has_muon_start()

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 386 of file JReconstruction/JEvtToolkit.hh.

387 {
388 return has_history(fit, JMUONSTART);
389 }
static const int JMUONSTART

◆ has_muon_fit()

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 398 of file JReconstruction/JEvtToolkit.hh.

399 {
401 }
Range of values.
Definition JRange.hh:42
static const int JMUONBEGIN
begin range of reconstruction stages
static const int JMUONEND
end range of reconstruction stages

◆ has_shower_prefit()

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 410 of file JReconstruction/JEvtToolkit.hh.

411 {
412 return has_history(fit, JSHOWERPREFIT);
413 }
static const int JSHOWERPREFIT

◆ has_shower_positionfit()

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 422 of file JReconstruction/JEvtToolkit.hh.

423 {
424 return has_history(fit, JSHOWERPOSITIONFIT);
425 }
static const int JSHOWERPOSITIONFIT

◆ has_shower_completefit()

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 434 of file JReconstruction/JEvtToolkit.hh.

435 {
436 return has_history(fit, JSHOWERCOMPLETEFIT);
437 }
static const int JSHOWERCOMPLETEFIT

◆ has_shower_fit()

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 446 of file JReconstruction/JEvtToolkit.hh.

447 {
449 }
static const int JSHOWEREND
end range of reconstruction stages
static const int JSHOWERBEGIN
begin range of reconstruction stages

◆ has_reconstructed_track()

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 461 of file JReconstruction/JEvtToolkit.hh.

462 {
463 return std::find_if(evt.begin(), evt.end(), selector) != evt.end();
464 }

◆ has_reconstructed_muon()

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 473 of file JReconstruction/JEvtToolkit.hh.

474 {
475 return has_reconstructed_track(evt, has_muon_fit);
476 }
bool has_reconstructed_track(const Evt &evt, JTrackSelector_t selector)
Test whether given event has a track according selection.

◆ has_reconstructed_shower()

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 485 of file JReconstruction/JEvtToolkit.hh.

486 {
488 }
bool has_shower_fit(const Trk &track)
Test whether given track has default shower fit in history.

◆ get_best_reconstructed_track()

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 502 of file JReconstruction/JEvtToolkit.hh.

505 {
506 JEvt::const_iterator p = std::find_if(evt.begin(), evt.end(), selector);
507
508 for (JEvt::const_iterator i = p; i != evt.end(); ++i) {
509 if (selector(*i) && comparator(*i, *p)) {
510 p = i;
511 }
512 }
513
514 if (p != evt.end())
515 return *p;
516 else
517 THROW(JIndexOutOfRange, "This event has no fit with given selector.");
518 }
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.

◆ get_best_reconstructed_muon()

const JFit & JRECONSTRUCTION::get_best_reconstructed_muon ( const JEvt & evt)
inline

Get best reconstructed muon.

Parameters
evtevent
Returns
track

Definition at line 527 of file JReconstruction/JEvtToolkit.hh.

528 {
529 return get_best_reconstructed_track(evt, has_muon_fit, qualitySorter);
530 }
const Trk & get_best_reconstructed_track(const Evt &evt, JTrackSelector_t selector, JQualitySorter_t comparator)
Get best reconstructed track.

◆ get_best_reconstructed_shower()

const JFit & JRECONSTRUCTION::get_best_reconstructed_shower ( const JEvt & evt)
inline

Get best reconstructed shower.

Parameters
evtevent
Returns
track

Definition at line 539 of file JReconstruction/JEvtToolkit.hh.

540 {
541 return get_best_reconstructed_track(evt, has_shower_fit, qualitySorter);
542 }

◆ filter()

bool JRECONSTRUCTION::filter ( const JDAQEvent & tev,
const JEvt & evt,
const Evt *const pE )

Event selection.

Parameters
tevDAQ event
evtinput event
pEpointer to Monte Carlo event
Returns
true if selected; else false

Definition at line 21 of file JReconstruction/event_selector.cc.

22 {
23 using namespace std;
24 using namespace JPP;
25 /*
26 if (!evt.empty() && evt[0].getQ() >= 100) {
27
28 if (pE != NULL) {
29
30 Trk muon;
31
32 for (const auto& t1 : pE->mc_trks) {
33 if (is_muon(t1)) {
34 if (t1.E > muon.E) {
35 muon = t1;
36 }
37 }
38 }
39
40 return (is_muon(muon) && getAngle(getDirection(event[0]), getDirection(muon)) > 5.0);
41 }
42 }
43 */
44 return true;
45 }
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).

Variable Documentation

◆ h2_t

const char* const JRECONSTRUCTION::h2_t = "h2"

Name of histogram with results from JMuonCompass.cc.

Definition at line 12 of file JMuonCompass.hh.