gambit is hosted by Hepforge, IPPP Durham
GAMBIT  v1.5.0-2191-ga4742ac
a Global And Modular Bsm Inference Tool
Gambit::ColliderBit::PID_pair_xsec_container Class Reference

A class for holding the production cross-section for final state identified by the pair of PID codes. More...

#include <xsec.hpp>

Inheritance diagram for Gambit::ColliderBit::PID_pair_xsec_container:
Collaboration diagram for Gambit::ColliderBit::PID_pair_xsec_container:

Public Member Functions

 PID_pair_xsec_container ()
 Definitions of PID_pair_xsec_container members. More...
 
virtual ~PID_pair_xsec_container ()
 
void reset ()
 Reset this instance for reuse. More...
 
void average_xsec (double, double)
 Average cross-sections and combine errors. More...
 
void average_xsec (const PID_pair_xsec_container &)
 
void sum_xsecs (double, double)
 Sum cross-sections and add errors in quadrature. More...
 
void sum_xsecs (const PID_pair_xsec_container &)
 
const PID_pairpid_pair () const
 Return the PID pair. More...
 
void set_pid_pair (const PID_pair &)
 Set the PID pair. More...
 
const std::vector< PID_pair > & pid_pairs_sharing_xsec () const
 Return the list of PID pairs that share this cross-section (This is due to the many-to-many mapping between Pythia process codes and the PID pairs we use as basis for external cross-section calculations) More...
 
void register_pid_pair_sharing_xsec (PID_pair)
 Add a PID pair to the list of PID pairs sharing this cross-section. More...
 
const std::vector< int > & related_processes () const
 Return the list of process codes related to this cross-section. More...
 
void register_related_process (int)
 Add a process code to the list of processes related to this cross-section. More...
 
- Public Member Functions inherited from Gambit::ColliderBit::xsec_container
 xsec_container ()
 Definitions of xsec members. More...
 
virtual ~xsec_container ()
 
void reset ()
 Reset this instance for reuse. More...
 
double operator() () const
 Return the full cross-section (in fb). More...
 
double xsec () const
 
double xsec_err () const
 Return the cross-section error (in fb). More...
 
double xsec_relerr () const
 Return the cross-section relative error. More...
 
void set_xsec (double, double)
 Set the cross-section and its error (in fb). More...
 
void average_xsec (double, double)
 Average cross-sections and combine errors. More...
 
void average_xsec (const xsec_container &)
 
void sum_xsecs (double, double)
 Sum cross-sections and add errors in quadrature. More...
 
void sum_xsecs (const xsec_container &)
 
std::map< std::string, doubleget_content_as_map () const
 Get content as map <string,double> map (for easy printing). More...
 
void set_info_string (std::string)
 Set the info string. More...
 
std::string info_string () const
 Get the info string. More...
 
void set_trust_level (int)
 Set the trust level. More...
 
int trust_level () const
 Get the trust level. More...
 

Private Attributes

PID_pair _pid_pair
 
std::vector< PID_pair_pid_pairs_sharing_xsec
 
std::vector< int_related_processes
 

Additional Inherited Members

- Static Public Attributes inherited from Gambit::ColliderBit::xsec_container
static const std::string unit = "fb"
 String Let's make it clear that we work with fb as unit. More...
 
- Protected Attributes inherited from Gambit::ColliderBit::xsec_container
double _xsec
 
double _xsecerr
 
std::string _info_string
 
int _trust_level
 

Detailed Description

A class for holding the production cross-section for final state identified by the pair of PID codes.

Definition at line 195 of file xsec.hpp.

Constructor & Destructor Documentation

◆ PID_pair_xsec_container()

Gambit::ColliderBit::PID_pair_xsec_container::PID_pair_xsec_container ( )

Definitions of PID_pair_xsec_container members.

Constructor

Definition at line 382 of file xsec.cpp.

382  :
384  _pid_pair(PID_pair()),
385  _pid_pairs_sharing_xsec(std::vector<PID_pair>()),
386  _related_processes(std::vector<int>())
387  { }
std::vector< PID_pair > _pid_pairs_sharing_xsec
Definition: xsec.hpp:235
xsec_container()
Definitions of xsec members.
Definition: xsec.cpp:39

◆ ~PID_pair_xsec_container()

virtual Gambit::ColliderBit::PID_pair_xsec_container::~PID_pair_xsec_container ( )
inlinevirtual

Definition at line 200 of file xsec.hpp.

References Gambit::ColliderBit::xsec_container::average_xsec(), Gambit::ColliderBit::xsec_container::reset(), and Gambit::ColliderBit::xsec_container::sum_xsecs().

200 { }
Here is the call graph for this function:

Member Function Documentation

◆ average_xsec() [1/2]

void Gambit::ColliderBit::PID_pair_xsec_container::average_xsec ( double  other_xsec,
double  other_xsecerr 
)

Average cross-sections and combine errors.

Definition at line 399 of file xsec.cpp.

References Gambit::ColliderBit::xsec_container::average_xsec().

Referenced by average_xsec().

400  {
401  // Run base class function
402  xsec_container::average_xsec(other_xsec, other_xsecerr);
403  }
void average_xsec(double, double)
Average cross-sections and combine errors.
Definition: xsec.cpp:69
Here is the call graph for this function:
Here is the caller graph for this function:

◆ average_xsec() [2/2]

void Gambit::ColliderBit::PID_pair_xsec_container::average_xsec ( const PID_pair_xsec_container other)

Definition at line 404 of file xsec.cpp.

References _pid_pair, average_xsec(), Gambit::PID_pair::pid1(), Gambit::PID_pair::pid2(), pid_pair(), Gambit::ColliderBit::xsec_container::xsec(), and Gambit::ColliderBit::xsec_container::xsec_err().

405  {
406  // Check that the PID pair of this instance is set
407  assert((_pid_pair.pid1() != 0) && (_pid_pair.pid2() != 0));
408  // Check that we are working with the same PID pair
409  assert(other.pid_pair() == _pid_pair);
410  // @todo Should we also check the content of the vectors
411  // _pid_pairs_sharing_xsec and _related_processes?
412  PID_pair_xsec_container::average_xsec(other.xsec(), other.xsec_err());
413  }
void average_xsec(double, double)
Average cross-sections and combine errors.
Definition: xsec.cpp:399
int pid1() const
Definition: PID_pair.hpp:84
int pid2() const
Definition: PID_pair.hpp:89
Here is the call graph for this function:

◆ pid_pair()

const PID_pair & Gambit::ColliderBit::PID_pair_xsec_container::pid_pair ( ) const

Return the PID pair.

Definition at line 433 of file xsec.cpp.

References _pid_pair.

Referenced by average_xsec(), and sum_xsecs().

Here is the caller graph for this function:

◆ pid_pairs_sharing_xsec()

const std::vector< PID_pair > & Gambit::ColliderBit::PID_pair_xsec_container::pid_pairs_sharing_xsec ( ) const

Return the list of PID pairs that share this cross-section (This is due to the many-to-many mapping between Pythia process codes and the PID pairs we use as basis for external cross-section calculations)

Definition at line 443 of file xsec.cpp.

References _pid_pairs_sharing_xsec.

444  { return _pid_pairs_sharing_xsec; }
std::vector< PID_pair > _pid_pairs_sharing_xsec
Definition: xsec.hpp:235

◆ register_pid_pair_sharing_xsec()

void Gambit::ColliderBit::PID_pair_xsec_container::register_pid_pair_sharing_xsec ( PID_pair  pid_pair_in)

Add a PID pair to the list of PID pairs sharing this cross-section.

Definition at line 447 of file xsec.cpp.

References _pid_pairs_sharing_xsec.

448  {
449  if(std::find(_pid_pairs_sharing_xsec.begin(), _pid_pairs_sharing_xsec.end(), pid_pair_in) == _pid_pairs_sharing_xsec.end())
450  {
451  _pid_pairs_sharing_xsec.push_back(pid_pair_in);
452  }
453  }
std::vector< PID_pair > _pid_pairs_sharing_xsec
Definition: xsec.hpp:235

◆ register_related_process()

void Gambit::ColliderBit::PID_pair_xsec_container::register_related_process ( int  process_code_in)

Add a process code to the list of processes related to this cross-section.

Definition at line 460 of file xsec.cpp.

References _related_processes.

461  {
462  if(std::find(_related_processes.begin(), _related_processes.end(), process_code_in) == _related_processes.end())
463  {
464  _related_processes.push_back(process_code_in);
465  }
466  }

◆ related_processes()

const std::vector< int > & Gambit::ColliderBit::PID_pair_xsec_container::related_processes ( ) const

Return the list of process codes related to this cross-section.

Definition at line 456 of file xsec.cpp.

References _related_processes.

457  { return _related_processes; }

◆ reset()

void Gambit::ColliderBit::PID_pair_xsec_container::reset ( )

Reset this instance for reuse.

Public method to reset this instance for reuse, avoiding the need for "new" or "delete".

Definition at line 390 of file xsec.cpp.

References _pid_pair, _pid_pairs_sharing_xsec, _related_processes, and Gambit::ColliderBit::xsec_container::reset().

Referenced by Gambit::ColliderBit::silly_pid_xsec_constructor().

391  {
393  _pid_pair = PID_pair();
394  _pid_pairs_sharing_xsec.clear();
395  _related_processes.clear();
396  }
std::vector< PID_pair > _pid_pairs_sharing_xsec
Definition: xsec.hpp:235
void reset()
Reset this instance for reuse.
Definition: xsec.cpp:47
Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_pid_pair()

void Gambit::ColliderBit::PID_pair_xsec_container::set_pid_pair ( const PID_pair pid_pair_in)

Set the PID pair.

Definition at line 437 of file xsec.cpp.

References _pid_pair.

Referenced by Gambit::ColliderBit::convert_xsecs_to_fb(), Gambit::ColliderBit::getPIDPairCrossSectionsMap_prospino(), and Gambit::ColliderBit::silly_pid_xsec_constructor().

438  { _pid_pair = pid_pair_in; }
Here is the caller graph for this function:

◆ sum_xsecs() [1/2]

void Gambit::ColliderBit::PID_pair_xsec_container::sum_xsecs ( double  other_xsec,
double  other_xsecerr 
)

Sum cross-sections and add errors in quadrature.

Definition at line 416 of file xsec.cpp.

References Gambit::ColliderBit::xsec_container::sum_xsecs().

Referenced by sum_xsecs().

417  {
418  // Run base class function
419  xsec_container::sum_xsecs(other_xsec, other_xsecerr);
420  }
void sum_xsecs(double, double)
Sum cross-sections and add errors in quadrature.
Definition: xsec.cpp:93
Here is the call graph for this function:
Here is the caller graph for this function:

◆ sum_xsecs() [2/2]

void Gambit::ColliderBit::PID_pair_xsec_container::sum_xsecs ( const PID_pair_xsec_container other)

Definition at line 421 of file xsec.cpp.

References _pid_pair, Gambit::PID_pair::pid1(), Gambit::PID_pair::pid2(), pid_pair(), sum_xsecs(), Gambit::ColliderBit::xsec_container::xsec(), and Gambit::ColliderBit::xsec_container::xsec_err().

422  {
423  // Check that the PID pair of this instance is set
424  assert((_pid_pair.pid1() != 0) && (_pid_pair.pid2() != 0));
425  // Check that we are working with the same PID pair
426  assert(other.pid_pair() == _pid_pair);
427  // @todo Should we also check the content of the vectors
428  // _pid_pairs_sharing_xsec and _related_processes?
429  PID_pair_xsec_container::sum_xsecs(other.xsec(), other.xsec_err());
430  }
int pid1() const
Definition: PID_pair.hpp:84
int pid2() const
Definition: PID_pair.hpp:89
void sum_xsecs(double, double)
Sum cross-sections and add errors in quadrature.
Definition: xsec.cpp:416
Here is the call graph for this function:

Member Data Documentation

◆ _pid_pair

PID_pair Gambit::ColliderBit::PID_pair_xsec_container::_pid_pair
private

Definition at line 234 of file xsec.hpp.

Referenced by average_xsec(), pid_pair(), reset(), set_pid_pair(), and sum_xsecs().

◆ _pid_pairs_sharing_xsec

std::vector<PID_pair> Gambit::ColliderBit::PID_pair_xsec_container::_pid_pairs_sharing_xsec
private

Definition at line 235 of file xsec.hpp.

Referenced by pid_pairs_sharing_xsec(), register_pid_pair_sharing_xsec(), and reset().

◆ _related_processes

std::vector<int> Gambit::ColliderBit::PID_pair_xsec_container::_related_processes
private

Definition at line 236 of file xsec.hpp.

Referenced by register_related_process(), related_processes(), and reset().


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