Jpp  18.3.0
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Private Member Functions | List of all members
JSIRENE::JFoxWolframMoments Struct Reference

Class for computing Fox-Wolfram moments. More...

#include <JEventShapeVariables.hh>

Inheritance diagram for JSIRENE::JFoxWolframMoments:
std::vector< double >

Public Types

typedef std::vector< double >
::reference 
reference
 

Public Member Functions

 JFoxWolframMoments ()
 Default constructor. More...
 
 JFoxWolframMoments (const std::vector< Trk >::const_iterator __begin, const std::vector< Trk >::const_iterator __end, const JCylinder3D &can=getMaximumContainmentVolume(), const int N=4)
 Constructor. More...
 
 JFoxWolframMoments (const Evt &event, const JCylinder3D &can=getMaximumContainmentVolume(), const int N=4)
 Constructor. More...
 

Private Member Functions

double getContribution (const Vec &p0, const Vec &p1, const size_t n)
 Get contribution to Fox-Wolfram moment from two momenta. More...
 

Detailed Description

Class for computing Fox-Wolfram moments.


The Fox-Wolfram moments are calculated as defined in section 15.2.3 of arXiv:hep-ph/0603175v2.

Definition at line 137 of file JEventShapeVariables.hh.

Member Typedef Documentation

Definition at line 140 of file JEventShapeVariables.hh.

Constructor & Destructor Documentation

JSIRENE::JFoxWolframMoments::JFoxWolframMoments ( )
inline

Default constructor.

Definition at line 145 of file JEventShapeVariables.hh.

145  :
147  {}
JSIRENE::JFoxWolframMoments::JFoxWolframMoments ( const std::vector< Trk >::const_iterator  __begin,
const std::vector< Trk >::const_iterator  __end,
const JCylinder3D can = getMaximumContainmentVolume(),
const int  N = 4 
)
inline

Constructor.

Parameters
__beginbeginning of track data
__endend of track data
candetector can
Nmaximum order

Definition at line 158 of file JEventShapeVariables.hh.

161  :
163  {
164  using namespace std;
165  using namespace JPP;
166 
167  const double Evis = getVisibleEnergy(__begin, __end, can);
168 
169  if (Evis > 0.0) {
170 
171  for (vector<Trk>::const_iterator i = __begin; i != __end; ++i) {
172 
173  if (is_finalstate(*i)) {
174 
175  const Vec p0 = getKineticEnergy(*i) * i->dir;
176 
177  for (vector<Trk>::const_iterator j = __begin; j != __end; ++j) {
178 
179  if (is_finalstate(*j)) {
180 
181  const Vec p1 = getKineticEnergy(*j) * j->dir;
182 
183  for (int k = 0; k < (int) this->size(); ++k) {
184  (*this)[k] += getContribution(p0, p1, k) / Evis / Evis;
185  }
186  }
187  }
188  }
189  }
190  }
191  }
then fatal No hydrophone data file $HYDROPHONE_TXT fi sort gr k
TPaveText * p1
double getContribution(const Vec &p0, const Vec &p1, const size_t n)
Get contribution to Fox-Wolfram moment from two momenta.
bool is_finalstate(const Trk &track)
Test whether given track corresponds to a final state particle.
The Vec class is a straightforward 3-d vector, which also works in pyroot.
Definition: Vec.hh:12
double getKineticEnergy(const double E, const double m)
Get kinetic energy of particle with given mass.
double getVisibleEnergy(const Trk &track, const JCylinder3D &can=getMaximumContainmentVolume())
Get the visible energy of a track.
then usage $script< input file >[option[primary[working directory]]] nWhere option can be N
Definition: JMuonPostfit.sh:40
int j
Definition: JPolint.hh:792
JSIRENE::JFoxWolframMoments::JFoxWolframMoments ( const Evt event,
const JCylinder3D can = getMaximumContainmentVolume(),
const int  N = 4 
)
inline

Constructor.

Parameters
eventevent
cancan
Nmaximum order

Definition at line 201 of file JEventShapeVariables.hh.

203  :
204  JFoxWolframMoments(event.mc_trks.begin(),
205  event.mc_trks.end(),
206  can,
207  N)
208  {}
JFoxWolframMoments()
Default constructor.
then usage $script< input file >[option[primary[working directory]]] nWhere option can be N
Definition: JMuonPostfit.sh:40
std::vector< Trk > mc_trks
MC: list of MC truth tracks.
Definition: Evt.hh:49

Member Function Documentation

double JSIRENE::JFoxWolframMoments::getContribution ( const Vec p0,
const Vec p1,
const size_t  n 
)
inlineprivate

Get contribution to Fox-Wolfram moment from two momenta.

Parameters
p0first momentum vector
p1second momentum vector
nLegendre polynomial index
Returns
Fox-Wolfram moment contribution

Definition at line 220 of file JEventShapeVariables.hh.

223  {
224  using namespace JPP;
225 
226  return p0.len() * p1.len() * legendre(n, p0.dot(p1) / p0.len() / p1.len());
227  }
double len() const
Get length.
Definition: Vec.hh:145
const int n
Definition: JPolint.hh:786
double dot(const Vec &v) const
Get dot product.
Definition: Vec.hh:36
double legendre(const size_t n, const double x)
Legendre polynome.

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