PandaRoot
PndSmpCand Class Reference

Simple particle candidate to perform simple combinatorics and particle counting for event filtering. More...

#include <PndSmpCand.h>

Public Member Functions

 PndSmpCand ()
 Default constructor. More...
 
 PndSmpCand (TLorentzVector lv, Float_t chrg, Int_t pdg=0, Int_t uid=-1)
 Constructor from Lorentz vector reference. More...
 
 PndSmpCand (TLorentzVector *lv, Float_t chrg, Int_t pdg=0, Int_t uid=-1)
 Constructor from pointer to Lorentz vector . More...
 
 PndSmpCand (Int_t pdg, PndSmpCand &c0, PndSmpCand &c1)
 Constructor from 2 daughters. Calls CombCand. More...
 
 PndSmpCand (Int_t pdg, PndSmpCand &c0, PndSmpCand &c1, PndSmpCand &c2)
 Constructor from 3 daughters. Calls CombCand. More...
 
 PndSmpCand (Int_t pdg, PndSmpCand &c0, PndSmpCand &c1, PndSmpCand &c2, PndSmpCand &c3)
 Constructor from 4 daughters. Calls CombCand. More...
 
 PndSmpCand (Int_t pdg, PndSmpCand &c0, PndSmpCand &c1, PndSmpCand &c2, PndSmpCand &c3, PndSmpCand &c4)
 Constructor from 5 daughters. Calls CombCand. More...
 
 PndSmpCand (Int_t pdg, PndSmpCand *c0, PndSmpCand *c1, PndSmpCand *c2=nullptr, PndSmpCand *c3=nullptr, PndSmpCand *c4=nullptr)
 Constructor from up to 5 daughter pointers. Calls CombCand. More...
 
void SetP4 (TLorentzVector p4)
 Sets LorentzVector. More...
 
void SetM (Double_t m)
 Sets mass (used for different mass hypotheses in filter. More...
 
void SetCharge (Float_t ch)
 Sets charge. More...
 
Bool_t operator== (const PndSmpCand &c1) const
 Overload of == operator needed to compare std::vectors of candidates. More...
 
Bool_t operator!= (const PndSmpCand &c1) const
 Overload of == operator needed to compare std::vectors of candidates. More...
 
void CombCand (Int_t pdg, PndSmpCand *c0, PndSmpCand *c1, PndSmpCand *c2=nullptr, PndSmpCand *c3=nullptr, PndSmpCand *c4=nullptr)
 Combines this candidate from several daughters (adds P4 and charges). More...
 
TLorentzVector P4 ()
 
Float_t Charge ()
 
Int_t Pdg ()
 
Int_t NDau ()
 
ULong_t Marker ()
 
PndSmpCandDau (Int_t idx)
 
Bool_t Overlap (PndSmpCand *c)
 
Bool_t Overlap (PndSmpCand &c)
 
void Print ()
 

Detailed Description

Simple particle candidate to perform simple combinatorics and particle counting for event filtering.

Author
Klaus Goetzen <k [dot] goetzen (at) gsi [dot] de>

This class defines a simple particle candidate, which allows simple combinatoric with overlap check and provides access to its internal 4-vector.

Definition at line 23 of file PndSmpCand.h.

Constructor & Destructor Documentation

◆ PndSmpCand() [1/8]

PndSmpCand::PndSmpCand ( )
inline

Default constructor.

Definition at line 27 of file PndSmpCand.h.

27 {};

◆ PndSmpCand() [2/8]

PndSmpCand::PndSmpCand ( TLorentzVector  lv,
Float_t  chrg,
Int_t  pdg = 0,
Int_t  uid = -1 
)

Constructor from Lorentz vector reference.

◆ PndSmpCand() [3/8]

PndSmpCand::PndSmpCand ( TLorentzVector *  lv,
Float_t  chrg,
Int_t  pdg = 0,
Int_t  uid = -1 
)

Constructor from pointer to Lorentz vector .

◆ PndSmpCand() [4/8]

PndSmpCand::PndSmpCand ( Int_t  pdg,
PndSmpCand c0,
PndSmpCand c1 
)
inline

Constructor from 2 daughters. Calls CombCand.

Definition at line 36 of file PndSmpCand.h.

References CombCand().

36 { CombCand(pdg, &c0, &c1); }
void CombCand(Int_t pdg, PndSmpCand *c0, PndSmpCand *c1, PndSmpCand *c2=nullptr, PndSmpCand *c3=nullptr, PndSmpCand *c4=nullptr)
Combines this candidate from several daughters (adds P4 and charges).

◆ PndSmpCand() [5/8]

PndSmpCand::PndSmpCand ( Int_t  pdg,
PndSmpCand c0,
PndSmpCand c1,
PndSmpCand c2 
)
inline

Constructor from 3 daughters. Calls CombCand.

Definition at line 38 of file PndSmpCand.h.

References CombCand().

38 { CombCand(pdg, &c0, &c1, &c2); }
void CombCand(Int_t pdg, PndSmpCand *c0, PndSmpCand *c1, PndSmpCand *c2=nullptr, PndSmpCand *c3=nullptr, PndSmpCand *c4=nullptr)
Combines this candidate from several daughters (adds P4 and charges).

◆ PndSmpCand() [6/8]

PndSmpCand::PndSmpCand ( Int_t  pdg,
PndSmpCand c0,
PndSmpCand c1,
PndSmpCand c2,
PndSmpCand c3 
)
inline

Constructor from 4 daughters. Calls CombCand.

Definition at line 40 of file PndSmpCand.h.

References CombCand().

40 { CombCand(pdg, &c0, &c1, &c2, &c3); }
void CombCand(Int_t pdg, PndSmpCand *c0, PndSmpCand *c1, PndSmpCand *c2=nullptr, PndSmpCand *c3=nullptr, PndSmpCand *c4=nullptr)
Combines this candidate from several daughters (adds P4 and charges).

◆ PndSmpCand() [7/8]

PndSmpCand::PndSmpCand ( Int_t  pdg,
PndSmpCand c0,
PndSmpCand c1,
PndSmpCand c2,
PndSmpCand c3,
PndSmpCand c4 
)
inline

Constructor from 5 daughters. Calls CombCand.

Definition at line 42 of file PndSmpCand.h.

References CombCand().

42 { CombCand(pdg, &c0, &c1, &c2, &c3, &c4); }
void CombCand(Int_t pdg, PndSmpCand *c0, PndSmpCand *c1, PndSmpCand *c2=nullptr, PndSmpCand *c3=nullptr, PndSmpCand *c4=nullptr)
Combines this candidate from several daughters (adds P4 and charges).

◆ PndSmpCand() [8/8]

PndSmpCand::PndSmpCand ( Int_t  pdg,
PndSmpCand c0,
PndSmpCand c1,
PndSmpCand c2 = nullptr,
PndSmpCand c3 = nullptr,
PndSmpCand c4 = nullptr 
)
inline

Constructor from up to 5 daughter pointers. Calls CombCand.

Definition at line 45 of file PndSmpCand.h.

References CombCand().

45 { CombCand(pdg, c0, c1, c2, c3, c4); }
void CombCand(Int_t pdg, PndSmpCand *c0, PndSmpCand *c1, PndSmpCand *c2=nullptr, PndSmpCand *c3=nullptr, PndSmpCand *c4=nullptr)
Combines this candidate from several daughters (adds P4 and charges).

Member Function Documentation

◆ Charge()

Float_t PndSmpCand::Charge ( )
inline

Definition at line 65 of file PndSmpCand.h.

65 { return fCharge; }

◆ CombCand()

void PndSmpCand::CombCand ( Int_t  pdg,
PndSmpCand c0,
PndSmpCand c1,
PndSmpCand c2 = nullptr,
PndSmpCand c3 = nullptr,
PndSmpCand c4 = nullptr 
)

Combines this candidate from several daughters (adds P4 and charges).

Referenced by operator!=(), and PndSmpCand().

◆ Dau()

PndSmpCand* PndSmpCand::Dau ( Int_t  idx)
inline

Definition at line 69 of file PndSmpCand.h.

70  {
71  if (idx >= 0 && idx < fNDau)
72  return fDaughter[idx];
73  else
74  return nullptr;
75  }

◆ Marker()

ULong_t PndSmpCand::Marker ( )
inline

Definition at line 68 of file PndSmpCand.h.

68 { return fMarker; }

◆ NDau()

Int_t PndSmpCand::NDau ( )
inline

Definition at line 67 of file PndSmpCand.h.

67 { return fNDau; }

◆ operator!=()

Bool_t PndSmpCand::operator!= ( const PndSmpCand c1) const
inline

Overload of == operator needed to compare std::vectors of candidates.

Definition at line 59 of file PndSmpCand.h.

References CombCand().

59 { return !(*this == c1); }

◆ operator==()

Bool_t PndSmpCand::operator== ( const PndSmpCand c1) const
inline

Overload of == operator needed to compare std::vectors of candidates.

Definition at line 57 of file PndSmpCand.h.

57 { return (c1.fMarker == fMarker) && (c1.fPdgCode == fPdgCode); }

◆ Overlap() [1/2]

Bool_t PndSmpCand::Overlap ( PndSmpCand c)
inline

Definition at line 76 of file PndSmpCand.h.

76 { return fMarker & c->fMarker; }

◆ Overlap() [2/2]

Bool_t PndSmpCand::Overlap ( PndSmpCand c)
inline

Definition at line 77 of file PndSmpCand.h.

References Print().

77 { return fMarker & c.fMarker; }

◆ P4()

TLorentzVector PndSmpCand::P4 ( )
inline

Definition at line 64 of file PndSmpCand.h.

64 { return fLV; }

◆ Pdg()

Int_t PndSmpCand::Pdg ( )
inline

Definition at line 66 of file PndSmpCand.h.

66 { return fPdgCode; }

◆ Print()

void PndSmpCand::Print ( )

Referenced by Overlap().

◆ SetCharge()

void PndSmpCand::SetCharge ( Float_t  ch)
inline

Sets charge.

Definition at line 53 of file PndSmpCand.h.

53 { fCharge = ch; }

◆ SetM()

void PndSmpCand::SetM ( Double_t  m)
inline

Sets mass (used for different mass hypotheses in filter.

Definition at line 51 of file PndSmpCand.h.

References m.

51 { fLV.SetVectM(fLV.Vect(), m); }
__m128 m
Definition: P4_F32vec4.h:26

◆ SetP4()

void PndSmpCand::SetP4 ( TLorentzVector  p4)
inline

Sets LorentzVector.

Definition at line 49 of file PndSmpCand.h.

49 { fLV = p4; }

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