MINT2
src
Mojito
DecayTrees
AssociatedDecayTreeItem.cpp
Go to the documentation of this file.
1
// author: Jonas Rademacker (Jonas.Rademacker@bristol.ac.uk)
2
// status: Mon 9 Feb 2009 19:18:02 GMT
3
#include <vector>
4
5
#include "
Mint/AssociatedDecayTreeItem.h
"
6
#include "
Mint/DecayTreeItem.h
"
7
#include "
Mint/IDalitzEvent.h
"
8
9
AssociatedDecayTreeItem::AssociatedDecayTreeItem
(
int
i)
10
:
DecayTreeItem
(i)
11
{
12
_asi
.clear();
13
}
14
AssociatedDecayTreeItem::AssociatedDecayTreeItem
(
const
AssociatedDecayTreeItem
& other)
15
:
DecayTreeItem
(other)
16
, _asi(other._asi)
17
{}
18
AssociatedDecayTreeItem::AssociatedDecayTreeItem
(
const
DecayTreeItem
& other)
19
:
DecayTreeItem
(other)
20
{
21
_asi
.clear();
22
}
23
const
std::vector<int>&
AssociatedDecayTreeItem::asi
()
const
{
24
return
_asi
;
25
}
26
int
AssociatedDecayTreeItem::asi
(
int
i)
const
{
27
return
_asi
[i];
28
}
29
30
void
AssociatedDecayTreeItem::print
(std::ostream& out)
const
{
31
const
ParticleProperties
* pp =
props
();
32
if
(0 == pp){
33
out <<
_pdg_id
;
34
}
else
{
35
out << pp->
name
()
36
<<
"("
<< pp->
SVPAT
() <<
")"
;
37
}
38
if
(! this->
_asi
.empty()){
39
out <<
"["
;
40
for
(
unsigned
int
i=0; i<
_asi
.size(); i++){
41
out << this->
_asi
[i];
42
}
43
out <<
"]"
;
44
}
45
}
46
47
48
TLorentzVector
AssociatedDecayTreeItem::p
(
const
IDalitzEvent
* evt)
const
{
49
TLorentzVector pV;
50
if
(0 == evt)
return
pV;
51
for
(
unsigned
int
i=0; i <
asi
().size(); i++){
52
pV += evt->
p
(this->
asi
(i));
53
}
54
return
pV;
55
}
56
57
double
AssociatedDecayTreeItem::mReco2
(
const
IDalitzEvent
* evt)
const
{
58
if
(0 == evt)
return
0;
59
return
evt->
sij
(this->
asi
());
60
}
61
double
AssociatedDecayTreeItem::mReco
(
const
IDalitzEvent
* evt)
const
{
62
if
(0 == evt)
return
0;
63
double
m2
=
mReco2
(evt);
64
if
(
m2
>= 0.0)
return
sqrt(
m2
);
65
else
return
-sqrt(
m2
);
66
}
67
double
AssociatedDecayTreeItem::mRes
(
const
IDalitzEvent
* evt)
const
{
68
// will return actual mass for the "non-resonant particles"
69
if
(this->
isNonResonant
() && 0 != evt){
70
return
mReco
(evt);
71
}
else
{
72
return
this->
mass
();
73
}
74
}
75
//
AssociatedDecayTreeItem
Definition:
AssociatedDecayTreeItem.h:12
AssociatedDecayTreeItem::mReco2
double mReco2(const IDalitzEvent *evt) const
Definition:
AssociatedDecayTreeItem.cpp:57
ParticleProperties::SVPAT
std::string SVPAT() const
Definition:
ParticleProperties.h:87
IDalitzEvent
Definition:
IDalitzEvent.h:16
IDalitzEvent.h
IDalitzEvent::sij
virtual double sij(const MINT::PolymorphVector< int > &indices) const =0
DecayTreeItem
Definition:
DecayTreeItem.h:11
AssociatedDecayTreeItem.h
DecayTreeItem::mass
double mass() const
Definition:
DecayTreeItem.cpp:47
IDalitzEvent::p
virtual const TLorentzVector & p(unsigned int i) const =0
ParticleProperties
Definition:
ParticleProperties.h:13
m2
static const double m2
Definition:
CLHEPSystemOfUnits.h:87
AssociatedDecayTreeItem::_asi
std::vector< int > _asi
Definition:
AssociatedDecayTreeItem.h:14
AssociatedDecayTreeItem::mReco
double mReco(const IDalitzEvent *evt) const
Definition:
AssociatedDecayTreeItem.cpp:61
ParticleProperties::name
std::string name() const
Definition:
ParticleProperties.cpp:236
AssociatedDecayTreeItem::print
virtual void print(std::ostream &out=std::cout) const
Definition:
AssociatedDecayTreeItem.cpp:30
DecayTreeItem::isNonResonant
bool isNonResonant() const
Definition:
DecayTreeItem.cpp:54
AssociatedDecayTreeItem::asi
const std::vector< int > & asi() const
Definition:
AssociatedDecayTreeItem.cpp:23
DecayTreeItem::props
const ParticleProperties * props() const
Definition:
DecayTreeItem.cpp:23
DecayTreeItem::_pdg_id
int _pdg_id
Definition:
DecayTreeItem.h:41
AssociatedDecayTreeItem::AssociatedDecayTreeItem
AssociatedDecayTreeItem(int i=0)
Definition:
AssociatedDecayTreeItem.cpp:9
AssociatedDecayTreeItem::p
TLorentzVector p(const IDalitzEvent *evt) const
Definition:
AssociatedDecayTreeItem.cpp:48
DecayTreeItem.h
AssociatedDecayTreeItem::mRes
double mRes(const IDalitzEvent *evt=0) const
Definition:
AssociatedDecayTreeItem.cpp:67
Generated by
1.8.15