Jpp 19.3.0-rc.5
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. 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
 Auxiliary class to compare fit results with respect to a reference energy. 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...
 
struct  JWeight
 Auxiliary data structure to get weight of given fit. 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

JRECONSTRUCTION::JWeight getWeight
 
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 151 of file JReconstruction/JEvtToolkit.hh.

152 {
153 return JPosition3D(fit.getX(), fit.getY(), fit.getZ());
154 }
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 163 of file JReconstruction/JEvtToolkit.hh.

164 {
165 return JDirection3D(fit.getDX(), fit.getDY(), fit.getDZ());
166 }
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 175 of file JReconstruction/JEvtToolkit.hh.

176 {
177 return JAxis3D(getPosition(fit), getDirection(fit));
178 }
Axis object.
Definition JAxis3D.hh:41

◆ getTrack()

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

Get track.

Parameters
fitfit
Returns
track

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

188 {
189 return JTrack3E(JTrack3D(getAxis(fit), fit.getT()), fit.getE());
190 }
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 204 of file JReconstruction/JEvtToolkit.hh.

210 {
211 return JFit(history,
212 track.getX(), track.getY(), track.getZ(),
213 track.getDX(), track.getDY(), track.getDZ(),
214 track.getT(),
215 Q, NDF,
216 energy, status);
217 }
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 232 of file JReconstruction/JEvtToolkit.hh.

239 {
240 return JFit(history,
241 track.getX(), track.getY(), track.getZ(),
242 angle.getDX(), angle.getDY(), angle.getDZ(),
243 track.getT(),
244 Q, NDF,
245 energy, status);
246 }
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 256 of file JReconstruction/JEvtToolkit.hh.

257 {
258 return JMATH::getDot(getDirection(first), getDirection(second));
259 }
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 269 of file JReconstruction/JEvtToolkit.hh.

270 {
271 return JMATH::getDot(getDirection(fit), dir);
272 }

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

283 {
284 return JMATH::getAngle(getDirection(first), getDirection(second));
285 }
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 295 of file JReconstruction/JEvtToolkit.hh.

296 {
297 return JMATH::getAngle(getDirection(fit), dir);
298 }

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

311 {
312 return N - 0.25 * chi2 / NDF;
313 }

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

325 {
326 return NDF - 0.25 * chi2 / NDF;
327 }

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

338 {
339 return -chi2;
340 }

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

351 {
352 if (first.getHistory().size() == second.getHistory().size())
353 return first.getQ() > second.getQ();
354 else
355 return first.getHistory().size() > second.getHistory().size();
356 }
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 389 of file JReconstruction/JEvtToolkit.hh.

390 {
391 return std::find_if(fit.getHistory().begin(),
392 fit.getHistory().end(),
393 JLANG::make_predicate(&JEvent::type, type)) != fit.getHistory().end();
394 }
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 404 of file JReconstruction/JEvtToolkit.hh.

405 {
406 return std::find_if(fit.getHistory().begin(),
407 fit.getHistory().end(),
408 JLANG::make_find_if(&JEvent::type, range)) != fit.getHistory().end();
409 }
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 418 of file JReconstruction/JEvtToolkit.hh.

419 {
420 return has_history(fit, JMUONPREFIT);
421 }
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 430 of file JReconstruction/JEvtToolkit.hh.

431 {
432 return has_history(fit, JMUONSIMPLEX);
433 }
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 442 of file JReconstruction/JEvtToolkit.hh.

443 {
444 return has_history(fit, JMUONGANDALF);
445 }
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 454 of file JReconstruction/JEvtToolkit.hh.

455 {
456 return has_history(fit, JMUONENERGY);
457 }
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 466 of file JReconstruction/JEvtToolkit.hh.

467 {
468 return has_history(fit, JMUONSTART);
469 }
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 478 of file JReconstruction/JEvtToolkit.hh.

479 {
481 }
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 490 of file JReconstruction/JEvtToolkit.hh.

491 {
492 return has_history(fit, JSHOWERPREFIT);
493 }
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 502 of file JReconstruction/JEvtToolkit.hh.

503 {
504 return has_history(fit, JSHOWERPOSITIONFIT);
505 }
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 514 of file JReconstruction/JEvtToolkit.hh.

515 {
516 return has_history(fit, JSHOWERCOMPLETEFIT);
517 }
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 526 of file JReconstruction/JEvtToolkit.hh.

527 {
529 }
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 JFit&);.

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

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

542 {
543 return std::find_if(evt.begin(), evt.end(), selector) != evt.end();
544 }

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

554 {
555 return has_reconstructed_track(evt, has_muon_fit);
556 }
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 565 of file JReconstruction/JEvtToolkit.hh.

566 {
568 }
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 comparator(const Trk&, const Trk&);.

Parameters
evtevent
selectortrack selector
comparatortrack comparator
Returns
track

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

585 {
586 JEvt::const_iterator p = std::find_if(evt.begin(), evt.end(), selector);
587
588 for (JEvt::const_iterator i = p; i != evt.end(); ++i) {
589 if (selector(*i) && comparator(*i, *p)) {
590 p = i;
591 }
592 }
593
594 if (p != evt.end())
595 return *p;
596 else
597 THROW(JIndexOutOfRange, "This event has no fit with given selector.");
598 }
#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 607 of file JReconstruction/JEvtToolkit.hh.

608 {
609 return get_best_reconstructed_track(evt, has_muon_fit, qualitySorter);
610 }
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 619 of file JReconstruction/JEvtToolkit.hh.

620 {
621 return get_best_reconstructed_track(evt, has_shower_fit, qualitySorter);
622 }

◆ 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

◆ getWeight

JRECONSTRUCTION::JWeight JRECONSTRUCTION::getWeight
static

◆ 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.