JHUGen MELA  JHUGen v7.5.6, MELA v2.4.2
Matrix element calculations as used in JHUGen.
MELAThreeBodyDecayCandidate.cc
Go to the documentation of this file.
2 #include "TUtilHelpers.hh"
3 
4 
6  MELAParticle* partnerParticle_,
7  MELAParticle* Wferm_,
8  MELAParticle* Wfermbar_
9  ) : MELAParticle(),
10  partnerParticle(partnerParticle_),
11  Wferm(Wferm_),
12  Wfermbar(Wfermbar_)
13 {
14  if (partnerParticle!=0){
15  p4 = p4 + partnerParticle->p4;
17  }
18  double Wcharge=0;
19  if (Wferm!=0){
20  p4 = p4 + Wferm->p4;
21  Wcharge += Wferm->charge();
23  }
24  if (Wfermbar!=0){
25  p4 = p4 + Wfermbar->p4;
26  Wcharge += Wfermbar->charge();
28  }
29  if (
31  ||
32  (Wcharge>0)
33  ) id = 6;
34  else if (
36  ||
37  (Wcharge<0)
38  ) id = -6;
39  else id=0;
40 }
42  MELAThreeBodyDecayCandidate tmp(particle_);
43  swap(tmp);
44  return *this;
45 }
46 
48  MELAParticle::swap(particle_);
49  std::swap(partnerParticle, particle_.partnerParticle);
50  std::swap(Wferm, particle_.Wferm);
51  std::swap(Wfermbar, particle_.Wfermbar);
52 }
53 
57 
59  if (Wferm && Wfermbar) return (Wferm->p4+Wfermbar->p4).M();
60  else return -1;
61 }
62 
63 bool MELAThreeBodyDecayCandidate::checkCandidateExists(MELAThreeBodyDecayCandidate const* myParticle, std::vector<MELAThreeBodyDecayCandidate*> const& particleArray){
64  return TUtilHelpers::checkElementExists<MELAThreeBodyDecayCandidate const*, MELAThreeBodyDecayCandidate*>(myParticle, particleArray);
65 }
66 
68  for (auto& dau:getDaughters()){
69  if (!dau->passSelection){
70  passSelection=false;
71  break;
72  }
73  }
74 }
75 
MELAThreeBodyDecayCandidate::getWmass
double getWmass() const
Definition: MELAThreeBodyDecayCandidate.cc:58
MELAParticle::swap
void swap(MELAParticle &particle_)
Definition: MELAParticle.cc:52
MELAParticle::getDaughters
std::vector< MELAParticle * > & getDaughters()
Definition: MELAParticle.h:59
MELAThreeBodyDecayCandidate::checkCandidateExists
static bool checkCandidateExists(MELAThreeBodyDecayCandidate const *myParticle, std::vector< MELAThreeBodyDecayCandidate * > const &particleArray)
Definition: MELAThreeBodyDecayCandidate.cc:63
MELAThreeBodyDecayCandidate::setWAntifermion
void setWAntifermion(MELAParticle *myParticle)
Definition: MELAThreeBodyDecayCandidate.cc:56
MELAThreeBodyDecayCandidate::operator=
MELAThreeBodyDecayCandidate & operator=(const MELAThreeBodyDecayCandidate &particle_)
Definition: MELAThreeBodyDecayCandidate.cc:41
MELAThreeBodyDecayCandidate::swap
void swap(MELAThreeBodyDecayCandidate &particle_)
Definition: MELAThreeBodyDecayCandidate.cc:47
MELAThreeBodyDecayCandidate::setWFermion
void setWFermion(MELAParticle *myParticle)
Definition: MELAThreeBodyDecayCandidate.cc:55
PDGHelpers::isDownTypeQuark
bool isDownTypeQuark(const int id)
Definition: PDGHelpers.cc:45
MELAParticle::p4
TLorentzVector p4
Definition: MELAParticle.h:18
MELAThreeBodyDecayCandidate::partnerParticle
MELAParticle * partnerParticle
Definition: MELAThreeBodyDecayCandidate.h:36
MELAParticle::charge
double charge() const
Definition: MELAParticle.cc:90
MELAThreeBodyDecayCandidate::setPartnerParticle
void setPartnerParticle(MELAParticle *myParticle)
Definition: MELAThreeBodyDecayCandidate.cc:54
MELAThreeBodyDecayCandidate.h
MELAThreeBodyDecayCandidate::Wfermbar
MELAParticle * Wfermbar
Definition: MELAThreeBodyDecayCandidate.h:38
MELAParticle
Definition: MELAParticle.h:13
MELAThreeBodyDecayCandidate::Wferm
MELAParticle * Wferm
Definition: MELAThreeBodyDecayCandidate.h:37
MELAParticle::passSelection
bool passSelection
Definition: MELAParticle.h:19
TUtilHelpers.hh
MELAThreeBodyDecayCandidate
Definition: MELAThreeBodyDecayCandidate.h:7
MELAThreeBodyDecayCandidate::MELAThreeBodyDecayCandidate
MELAThreeBodyDecayCandidate()
Definition: MELAThreeBodyDecayCandidate.h:9
MELAParticle::id
int id
Definition: MELAParticle.h:17
MELAThreeBodyDecayCandidate::testPreSelectedDaughters
void testPreSelectedDaughters()
Definition: MELAThreeBodyDecayCandidate.cc:67
MELAParticle::addDaughter
void addDaughter(MELAParticle *myParticle)
Definition: MELAParticle.cc:63