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

A class for holding the cross-section of a single Pythia process (identified by the Pythia process code) More...

#include <xsec.hpp>

Inheritance diagram for Gambit::ColliderBit::process_xsec_container:
Collaboration diagram for Gambit::ColliderBit::process_xsec_container:

Public Member Functions

 process_xsec_container ()
 Definitions of process_xsec_container members. More...
 
virtual ~process_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 process_xsec_container &)
 
void sum_xsecs (double, double)
 Sum cross-sections and add errors in quadrature. More...
 
void sum_xsecs (const process_xsec_container &)
 
int process_code () const
 Return the process code. More...
 
void set_process_code (int)
 Set the process code. More...
 
const std::vector< int > & processes_sharing_xsec () const
 Return the list of process codes 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_process_sharing_xsec (int)
 Add a process code to the list of processes sharing this cross-section. More...
 
const std::vector< PID_pair > & related_pid_pairs () const
 Return the list of PID pairs related to this cross-section. More...
 
void register_related_pid_pair (PID_pair)
 Add a PID pair 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

int _process_code
 
std::vector< int_processes_sharing_xsec
 
std::vector< PID_pair_related_pid_pairs
 

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 cross-section of a single Pythia process (identified by the Pythia process code)

Definition at line 148 of file xsec.hpp.

Constructor & Destructor Documentation

◆ process_xsec_container()

Gambit::ColliderBit::process_xsec_container::process_xsec_container ( )

Definitions of process_xsec_container members.

Constructor

Definition at line 288 of file xsec.cpp.

288  :
290  _process_code(-1),
291  _processes_sharing_xsec(std::vector<int>()),
292  _related_pid_pairs(std::vector<PID_pair>())
293  { }
std::vector< PID_pair > _related_pid_pairs
Definition: xsec.hpp:189
xsec_container()
Definitions of xsec members.
Definition: xsec.cpp:39
std::vector< int > _processes_sharing_xsec
Definition: xsec.hpp:188

◆ ~process_xsec_container()

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

Definition at line 153 of file xsec.hpp.

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

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

Member Function Documentation

◆ average_xsec() [1/2]

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

Average cross-sections and combine errors.

Definition at line 305 of file xsec.cpp.

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

Referenced by average_xsec().

306  {
307  // Run base class function
308  xsec_container::average_xsec(other_xsec, other_xsecerr);
309  }
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::process_xsec_container::average_xsec ( const process_xsec_container other)

Definition at line 310 of file xsec.cpp.

References _process_code, average_xsec(), process_code(), Gambit::ColliderBit::xsec_container::xsec(), and Gambit::ColliderBit::xsec_container::xsec_err().

311  {
312  // Check that the process code of this instance is set
313  assert(_process_code > 0);
314  // Check that we are working with the same process code
315  assert(other.process_code() == _process_code);
316  // @todo Should we also check the content of the vectors
317  // _processes_sharing_xsec and _related_pid_pairs?
318  process_xsec_container::average_xsec(other.xsec(), other.xsec_err());
319  }
void average_xsec(double, double)
Average cross-sections and combine errors.
Definition: xsec.cpp:305
Here is the call graph for this function:

◆ process_code()

int Gambit::ColliderBit::process_xsec_container::process_code ( ) const

Return the process code.

Definition at line 340 of file xsec.cpp.

References _process_code.

Referenced by average_xsec(), and sum_xsecs().

Here is the caller graph for this function:

◆ processes_sharing_xsec()

const std::vector< int > & Gambit::ColliderBit::process_xsec_container::processes_sharing_xsec ( ) const

Return the list of process codes 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 350 of file xsec.cpp.

References _processes_sharing_xsec.

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

351  { return _processes_sharing_xsec; }
std::vector< int > _processes_sharing_xsec
Definition: xsec.hpp:188
Here is the caller graph for this function:

◆ register_process_sharing_xsec()

void Gambit::ColliderBit::process_xsec_container::register_process_sharing_xsec ( int  process_code_in)

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

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

Definition at line 354 of file xsec.cpp.

References _processes_sharing_xsec.

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

355  {
356  if(std::find(_processes_sharing_xsec.begin(), _processes_sharing_xsec.end(), process_code_in) == _processes_sharing_xsec.end())
357  {
358  _processes_sharing_xsec.push_back(process_code_in);
359  }
360  }
std::vector< int > _processes_sharing_xsec
Definition: xsec.hpp:188
Here is the caller graph for this function:

◆ register_related_pid_pair()

void Gambit::ColliderBit::process_xsec_container::register_related_pid_pair ( PID_pair  pid_pair_in)

Add a PID pair to the list of processes related to this cross-section.

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

Definition at line 367 of file xsec.cpp.

References _related_pid_pairs.

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

368  {
369  if(std::find(_related_pid_pairs.begin(), _related_pid_pairs.end(), pid_pair_in) == _related_pid_pairs.end())
370  {
371  _related_pid_pairs.push_back(pid_pair_in);
372  }
373  }
std::vector< PID_pair > _related_pid_pairs
Definition: xsec.hpp:189
Here is the caller graph for this function:

◆ related_pid_pairs()

const std::vector< PID_pair > & Gambit::ColliderBit::process_xsec_container::related_pid_pairs ( ) const

Return the list of PID pairs related to this cross-section.

Definition at line 363 of file xsec.cpp.

References _related_pid_pairs.

364  { return _related_pid_pairs; }
std::vector< PID_pair > _related_pid_pairs
Definition: xsec.hpp:189

◆ reset()

void Gambit::ColliderBit::process_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 296 of file xsec.cpp.

References _process_code, _processes_sharing_xsec, _related_pid_pairs, and Gambit::ColliderBit::xsec_container::reset().

297  {
299  _process_code = -1;
300  _processes_sharing_xsec.clear();
301  _related_pid_pairs.clear();
302  }
std::vector< PID_pair > _related_pid_pairs
Definition: xsec.hpp:189
void reset()
Reset this instance for reuse.
Definition: xsec.cpp:47
std::vector< int > _processes_sharing_xsec
Definition: xsec.hpp:188
Here is the call graph for this function:

◆ set_process_code()

void Gambit::ColliderBit::process_xsec_container::set_process_code ( int  process_code_in)

Set the process code.

Definition at line 344 of file xsec.cpp.

References _process_code.

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

345  { _process_code = process_code_in; }
Here is the caller graph for this function:

◆ sum_xsecs() [1/2]

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

Sum cross-sections and add errors in quadrature.

Definition at line 322 of file xsec.cpp.

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

Referenced by Gambit::ColliderBit::getProcessCrossSectionsMap(), and sum_xsecs().

323  {
324  // Run base class function
325  xsec_container::sum_xsecs(other_xsec, other_xsecerr);
326  }
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::process_xsec_container::sum_xsecs ( const process_xsec_container other)

Definition at line 327 of file xsec.cpp.

References _process_code, process_code(), sum_xsecs(), Gambit::ColliderBit::xsec_container::xsec(), and Gambit::ColliderBit::xsec_container::xsec_err().

328  {
329  // Check that the process code of this instance is set
330  assert(_process_code > 0);
331  // Check that we are working with the same process code
332  assert(other.process_code() == _process_code);
333  // @todo Should we also check the content of the vectors
334  // _processes_sharing_xsec and _related_pid_pairs?
335  process_xsec_container::sum_xsecs(other.xsec(), other.xsec_err());
336  }
void sum_xsecs(double, double)
Sum cross-sections and add errors in quadrature.
Definition: xsec.cpp:322
Here is the call graph for this function:

Member Data Documentation

◆ _process_code

int Gambit::ColliderBit::process_xsec_container::_process_code
private

Definition at line 187 of file xsec.hpp.

Referenced by average_xsec(), process_code(), reset(), set_process_code(), and sum_xsecs().

◆ _processes_sharing_xsec

std::vector<int> Gambit::ColliderBit::process_xsec_container::_processes_sharing_xsec
private

Definition at line 188 of file xsec.hpp.

Referenced by processes_sharing_xsec(), register_process_sharing_xsec(), and reset().

◆ _related_pid_pairs

std::vector<PID_pair> Gambit::ColliderBit::process_xsec_container::_related_pid_pairs
private

Definition at line 189 of file xsec.hpp.

Referenced by register_related_pid_pair(), related_pid_pairs(), and reset().


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