Jpp test-rotations-old
the software that should make you happy
Loading...
Searching...
No Matches
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.
 
 JFoxWolframMoments (const std::vector< Trk >::const_iterator __begin, const std::vector< Trk >::const_iterator __end, const JCylinder3D &can=getMaximumContainmentVolume(), const int N=4)
 Constructor.
 
 JFoxWolframMoments (const Evt &event, const JCylinder3D &can=getMaximumContainmentVolume(), const int N=4)
 Constructor.
 

Private Member Functions

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

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 138 of file JEventShapeVariables.hh.

Member Typedef Documentation

◆ reference

Definition at line 141 of file JEventShapeVariables.hh.

Constructor & Destructor Documentation

◆ JFoxWolframMoments() [1/3]

JSIRENE::JFoxWolframMoments::JFoxWolframMoments ( )
inline

Default constructor.

Definition at line 146 of file JEventShapeVariables.hh.

146 :
148 {}

◆ JFoxWolframMoments() [2/3]

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 159 of file JEventShapeVariables.hh.

162 :
164 {
165 using namespace std;
166 using namespace JPP;
167
168 const double Evis = getVisibleEnergy(__begin, __end, can);
169
170 if (Evis > 0.0) {
171
172 for (vector<Trk>::const_iterator i = __begin; i != __end; ++i) {
173
174 if (is_finalstate(*i)) {
175
176 const Vec p0 = getKineticEnergy(*i) * i->dir;
177
178 for (vector<Trk>::const_iterator j = __begin; j != __end; ++j) {
179
180 if (is_finalstate(*j)) {
181
182 const Vec p1 = getKineticEnergy(*j) * j->dir;
183
184 for (int k = 0; k < (int) this->size(); ++k) {
185 (*this)[k] += getContribution(p0, p1, k) / Evis / Evis;
186 }
187 }
188 }
189 }
190 }
191 }
192 }
TPaveText * p1
bool is_finalstate(const Trk &track)
Test whether given track corresponds to a final state particle.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
double getVisibleEnergy(const Trk &, const JCylinder3D &)
Get the visible energy of a track.
int j
Definition JPolint.hh:801
The cylinder used for photon tracking.
Definition JHead.hh:575
double getContribution(const Vec &p0, const Vec &p1, const size_t n)
Get contribution to Fox-Wolfram moment from two momenta.
The Vec class is a straightforward 3-d vector, which also works in pyroot.
Definition Vec.hh:13

◆ JFoxWolframMoments() [3/3]

JSIRENE::JFoxWolframMoments::JFoxWolframMoments ( const Evt & event,
const JCylinder3D & can = getMaximumContainmentVolume(),
const int N = 4 )
inline

Constructor.

Parameters
eventevent
cancan
Nmaximum order

Definition at line 202 of file JEventShapeVariables.hh.

204 :
205 JFoxWolframMoments(event.mc_trks.begin(),
206 event.mc_trks.end(),
207 can,
208 N)
209 {}
std::vector< Trk > mc_trks
MC: list of MC truth tracks.
Definition Evt.hh:49
JFoxWolframMoments()
Default constructor.

Member Function Documentation

◆ getContribution()

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 221 of file JEventShapeVariables.hh.

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

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