Jpp
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Public Attributes | Friends | List of all members
JFIT::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 624 of file JEvtToolkit.hh.

Constructor & Destructor Documentation

JFIT::JAtmosphericMuon::JAtmosphericMuon ( )
inline

Default constructor.

Definition at line 629 of file JEvtToolkit.hh.

629  :
630  dot1(0.0),
631  dot2(0.0)
632  {}
JFIT::JAtmosphericMuon::JAtmosphericMuon ( const double  theta1,
const double  theta2 
)
inline

Constructor.

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

Definition at line 641 of file JEvtToolkit.hh.

642  :
643  dot1(cos(theta1 * JTOOLS::PI/180.0)),
644  dot2(cos(theta2 * JTOOLS::PI/180.0))
645  {}
static const double PI
Constants.
Definition: JConstants.hh:20

Member Function Documentation

double JFIT::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 655 of file JEvtToolkit.hh.

657  {
658  double Qup = 0.0;
659  double Qdown = 0.0;
660 
661  for (JEvt::const_iterator i = __begin; i != __end; ++i) {
662 
663  if (i->getDZ() >= dot1) {
664 
665  if (i->getQ() > Qup) {
666  Qup = i->getQ();
667  }
668 
669  } else if (i->getDZ() <= dot2) {
670 
671  if (i->getQ() > Qdown) {
672  Qdown = i->getQ();
673  }
674  }
675  }
676 
677  return Qup - Qdown;
678  }

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

689  {
690  double theta1, theta2;
691 
692  in >> theta1 >> theta2;
693 
694  object.dot1 = cos(theta1 * JTOOLS::PI/180.0);
695  object.dot2 = cos(theta2 * JTOOLS::PI/180.0);
696 
697  return in;
698  }
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 708 of file JEvtToolkit.hh.

709  {
710  out << acos(object.dot1) * 180.0 / JTOOLS::PI << ' '
711  << acos(object.dot2) * 180.0 / JTOOLS::PI;
712 
713  return out;
714  }
static const double PI
Constants.
Definition: JConstants.hh:20

Member Data Documentation

double JFIT::JAtmosphericMuon::dot1

Definition at line 717 of file JEvtToolkit.hh.

double JFIT::JAtmosphericMuon::dot2

Definition at line 718 of file JEvtToolkit.hh.


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