Jpp 20.0.0-195-g190c9e876
the software that should make you happy
Loading...
Searching...
No Matches
JRECONSTRUCTION::JAtmosphericMuon Class Reference

Auxiliary class to evaluate atmospheric muon hypothesis. More...

#include <JEvtToolkit.hh>

Public Member Functions

 JAtmosphericMuon ()
 Default constructor.
 
 JAtmosphericMuon (const double theta1, const double theta2)
 Constructor.
 
double operator() (JEvt::const_iterator __begin, JEvt::const_iterator __end) const
 Test is event is atmospheric muon.
 

Public Attributes

double dot1
 
double dot2
 

Friends

std::istream & operator>> (std::istream &in, JAtmosphericMuon &object)
 Read atmospheric muon analyser from input.
 
std::ostream & operator<< (std::ostream &out, const JAtmosphericMuon &object)
 Write atmospheric muon analyser to output.
 

Detailed Description

Auxiliary class to evaluate atmospheric muon hypothesis.

The hypothesis is tested by means of the difference in quality between the best upward and best downward track.

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

Constructor & Destructor Documentation

◆ JAtmosphericMuon() [1/2]

JRECONSTRUCTION::JAtmosphericMuon::JAtmosphericMuon ( )
inline

Default constructor.

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

◆ JAtmosphericMuon() [2/2]

JRECONSTRUCTION::JAtmosphericMuon::JAtmosphericMuon ( const double theta1,
const double theta2 )
inline

Constructor.

Parameters
theta1upper hemisphere angle [deg]
theta2lower hemisphere angle [deg]

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

1017 :
1018 dot1(cos(theta1 * JMATH::PI/180.0)),
1019 dot2(cos(theta2 * JMATH::PI/180.0))
1020 {}
static const double PI
Mathematical constants.

Member Function Documentation

◆ operator()()

double JRECONSTRUCTION::JAtmosphericMuon::operator() ( JEvt::const_iterator __begin,
JEvt::const_iterator __end ) const
inline

Test is event is atmospheric muon.

Parameters
__beginbegin of data
__endend of data
Returns
negative if preferably down / positive if preferably up

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

1032 {
1033 double Qup = 0.0;
1034 double Qdown = 0.0;
1035
1036 for (JEvt::const_iterator i = __begin; i != __end; ++i) {
1037
1038 if (i->getDZ() >= dot1) {
1039
1040 if (i->getQ() > Qup) {
1041 Qup = i->getQ();
1042 }
1043
1044 } else if (i->getDZ() <= dot2) {
1045
1046 if (i->getQ() > Qdown) {
1047 Qdown = i->getQ();
1048 }
1049 }
1050 }
1051
1052 return Qup - Qdown;
1053 }

Friends And Related Symbol Documentation

◆ operator>>

std::istream & operator>> ( std::istream & in,
JAtmosphericMuon & object )
friend

Read atmospheric muon analyser from input.

Parameters
ininput stream
objectatmospheric muon analyser
Returns
input stream

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

1064 {
1065 double theta1, theta2;
1066
1067 in >> theta1 >> theta2;
1068
1069 object.dot1 = cos(theta1 * JMATH::PI/180.0);
1070 object.dot2 = cos(theta2 * JMATH::PI/180.0);
1071
1072 return in;
1073 }

◆ operator<<

std::ostream & operator<< ( std::ostream & out,
const JAtmosphericMuon & object )
friend

Write atmospheric muon analyser to output.

Parameters
outoutput stream
objectatmospheric muon analyser
Returns
output stream

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

1084 {
1085 out << acos(object.dot1) * 180.0 / JMATH::PI << ' '
1086 << acos(object.dot2) * 180.0 / JMATH::PI;
1087
1088 return out;
1089 }

Member Data Documentation

◆ dot1

double JRECONSTRUCTION::JAtmosphericMuon::dot1

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

◆ dot2

double JRECONSTRUCTION::JAtmosphericMuon::dot2

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


The documentation for this class was generated from the following file: