Jpp
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Public Attributes | Friends | List of all members
JRECONSTRUCTION::JAtmosphericMuon Class Reference

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

#include <JEvtToolkit.hh>

Public Member Functions

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

Public Attributes

double dot1
 
double dot2
 

Friends

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

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 772 of file JEvtToolkit.hh.

Constructor & Destructor Documentation

JRECONSTRUCTION::JAtmosphericMuon::JAtmosphericMuon ( )
inline

Default constructor.

Definition at line 777 of file JEvtToolkit.hh.

777  :
778  dot1(0.0),
779  dot2(0.0)
780  {}
JRECONSTRUCTION::JAtmosphericMuon::JAtmosphericMuon ( const double  theta1,
const double  theta2 
)
inline

Constructor.

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

Definition at line 789 of file JEvtToolkit.hh.

790  :
791  dot1(cos(theta1 * JTOOLS::PI/180.0)),
792  dot2(cos(theta2 * JTOOLS::PI/180.0))
793  {}
static const double PI
Constants.
Definition: JConstants.hh:20

Member Function Documentation

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 803 of file JEvtToolkit.hh.

805  {
806  double Qup = 0.0;
807  double Qdown = 0.0;
808 
809  for (JEvt::const_iterator i = __begin; i != __end; ++i) {
810 
811  if (i->getDZ() >= dot1) {
812 
813  if (i->getQ() > Qup) {
814  Qup = i->getQ();
815  }
816 
817  } else if (i->getDZ() <= dot2) {
818 
819  if (i->getQ() > Qdown) {
820  Qdown = i->getQ();
821  }
822  }
823  }
824 
825  return Qup - Qdown;
826  }

Friends And Related Function Documentation

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 836 of file JEvtToolkit.hh.

837  {
838  double theta1, theta2;
839 
840  in >> theta1 >> theta2;
841 
842  object.dot1 = cos(theta1 * JTOOLS::PI/180.0);
843  object.dot2 = cos(theta2 * JTOOLS::PI/180.0);
844 
845  return in;
846  }
esac print_variable DETECTOR INPUT_FILE OUTPUT_FILE CDF for TYPE in
Definition: JSirene.sh:45
static const double PI
Constants.
Definition: JConstants.hh:20
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 856 of file JEvtToolkit.hh.

857  {
858  out << acos(object.dot1) * 180.0 / JTOOLS::PI << ' '
859  << acos(object.dot2) * 180.0 / JTOOLS::PI;
860 
861  return out;
862  }
static const double PI
Constants.
Definition: JConstants.hh:20

Member Data Documentation

double JRECONSTRUCTION::JAtmosphericMuon::dot1

Definition at line 865 of file JEvtToolkit.hh.

double JRECONSTRUCTION::JAtmosphericMuon::dot2

Definition at line 866 of file JEvtToolkit.hh.


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