Belle II Software development
CRY Class Referencefinal

C++ Interface for the generator CRY. More...

#include <CRY.h>

Public Member Functions

 CRY ()=default
 Constructor.
 
 ~CRY ()=default
 Destructor.
 
void init ()
 Initializes the generator.
 
void generateEvent (MCParticleGraph &mcGraph)
 Generates one single event.
 
void setCosmicDataDir (const std::string &cosmicdatadir)
 Sets the directory that holds cosmic data.
 
void setAcceptance (const std::vector< double > &size)
 Sets the size of the acceptance volume.
 
void setTimeOffset (double timeoffset)
 Sets the time offset.
 
void setKineticEnergyThreshold (double kineticenergythreshold)
 Sets the kinetic energy threshold, particles below that value will be ignored.
 
void setDate (const std::string &date)
 Sets the date used for generation (the cosmic-ray distribution is adjusted to account for the eleven year, sunspot cycle).
 
void setMaxTrials (int maxtrials)
 Sets the maximum number of trials.
 
void setBoxLength (double length)
 Set the size of the square nxn plane where CRY generates cosmics.
 
void setReturnGammas (bool gammas)
 Set whether or not CRY should return gammas.
 
void setReturnKaons (bool kaons)
 Set whether or not CRY should return kaons.
 
void setReturnPions (bool pions)
 Set whether or not CRY should return pions.
 
void setReturnProtons (bool protons)
 Set whether or not CRY should return protons.
 
void setReturnNeutrons (bool neutrons)
 Set whether or not CRY should return neutrons.
 
void setReturnElectrons (bool electrons)
 Set whether or not CRY should return electrons.
 
void setReturnMuons (bool muons)
 Set whether or not CRY should return muons.
 
void term ()
 Terminates the generator.
 

Protected Attributes

std::string m_cosmicDataDir
 directory that holds cosmic data files.
 
int m_subboxLength {100}
 length of the square n-n plane in Cry in meters
 
std::vector< double > m_acceptSize
 Shape parameters for the acceptance shape.
 
double m_timeOffset {0}
 time offset in nanoseconds.
 
double m_kineticEnergyThreshold {0}
 kinetic energy threshold.
 
std::string m_date {"1-1-2019"}
 date used for generation (month-day-year).
 
int m_maxTrials {0}
 number of trials per event.
 
int m_totalTrials {0}
 total number of thrown events.
 
bool m_returnGammas {true}
 Whether or not CRY should return gammas.
 
bool m_returnKaons {true}
 Whether or not CRY should return kaons.
 
bool m_returnPions {true}
 Whether or not CRY should return pions.
 
bool m_returnProtons {true}
 Whether or not CRY should return protons.
 
bool m_returnNeutrons {true}
 Whether or not CRY should return neutrons.
 
bool m_returnElectrons {true}
 Whether or not CRY should return electrons.
 
bool m_returnMuons {true}
 Whether or not CRY should return muons.
 
std::unique_ptr< CRYSetup > m_crySetup
 The CRY generator setup.
 
std::unique_ptr< CRYGenerator > m_cryGenerator
 The CRY generator.
 
std::unique_ptr< vecgeom::VUnplacedVolume > m_world
 world box shape
 
std::unique_ptr< vecgeom::VUnplacedVolume > m_acceptance
 acceptance shape
 

Detailed Description

C++ Interface for the generator CRY.

Definition at line 28 of file CRY.h.

Constructor & Destructor Documentation

◆ CRY()

CRY ( )
default

Constructor.

Sets the default settings.

Member Function Documentation

◆ setAcceptance()

void setAcceptance ( const std::vector< double > &  size)
inline

Sets the size of the acceptance volume.

Parameters
sizeeither one, two or three values corresponding to the radius of a sphere, radius and half length of a cylinder or width, height and length of a box

Definition at line 59 of file CRY.h.

59{ m_acceptSize = size; }
std::vector< double > m_acceptSize
Shape parameters for the acceptance shape.
Definition: CRY.h:143

◆ setBoxLength()

void setBoxLength ( double  length)
inline

Set the size of the square nxn plane where CRY generates cosmics.

According to the CRY documentation good values are 1, 3, 10, 30, 100 and 300 meters but anything smaller than 300 m should work.

The value should be given in cm but will be rounded down to full meters

Parameters
lengthlength of the side in standard units (cm)

Definition at line 90 of file CRY.h.

90{ m_subboxLength = length / Unit::m; }
int m_subboxLength
length of the square n-n plane in Cry in meters
Definition: CRY.h:142
static const double m
[meters]
Definition: Unit.h:69

◆ setCosmicDataDir()

void setCosmicDataDir ( const std::string &  cosmicdatadir)
inline

Sets the directory that holds cosmic data.

Parameters
cosmicdatadirdirectory that holds the data.

Definition at line 52 of file CRY.h.

52{ m_cosmicDataDir = cosmicdatadir; }
std::string m_cosmicDataDir
directory that holds cosmic data files.
Definition: CRY.h:141

◆ setDate()

void setDate ( const std::string &  date)
inline

Sets the date used for generation (the cosmic-ray distribution is adjusted to account for the eleven year, sunspot cycle).

Parameters
datedate used for generation (month-day-year).

Definition at line 74 of file CRY.h.

74{ m_date = date; }
std::string m_date
date used for generation (month-day-year).
Definition: CRY.h:146

◆ setKineticEnergyThreshold()

void setKineticEnergyThreshold ( double  kineticenergythreshold)
inline

Sets the kinetic energy threshold, particles below that value will be ignored.

Parameters
kineticenergythresholdkinetic energy threshold.

Definition at line 69 of file CRY.h.

69{ m_kineticEnergyThreshold = kineticenergythreshold; }
double m_kineticEnergyThreshold
kinetic energy threshold.
Definition: CRY.h:145

◆ setMaxTrials()

void setMaxTrials ( int  maxtrials)
inline

Sets the maximum number of trials.

Parameters
maxtrialsmaximum number of trials.

Definition at line 79 of file CRY.h.

79{ m_maxTrials = maxtrials; }
int m_maxTrials
number of trials per event.
Definition: CRY.h:147

◆ setReturnElectrons()

void setReturnElectrons ( bool  electrons)
inline

Set whether or not CRY should return electrons.

Parameters
electronstrue if electrons should be returned, else false

Definition at line 126 of file CRY.h.

126{ m_returnElectrons = electrons; }
bool m_returnElectrons
Whether or not CRY should return electrons.
Definition: CRY.h:154

◆ setReturnGammas()

void setReturnGammas ( bool  gammas)
inline

Set whether or not CRY should return gammas.

Parameters
gammastrue if gammas should be returned, else false

Definition at line 96 of file CRY.h.

96{ m_returnGammas = gammas; }
bool m_returnGammas
Whether or not CRY should return gammas.
Definition: CRY.h:149

◆ setReturnKaons()

void setReturnKaons ( bool  kaons)
inline

Set whether or not CRY should return kaons.

Parameters
kaonstrue if kaons should be returned, else false

Definition at line 102 of file CRY.h.

102{ m_returnKaons = kaons; }
bool m_returnKaons
Whether or not CRY should return kaons.
Definition: CRY.h:150

◆ setReturnMuons()

void setReturnMuons ( bool  muons)
inline

Set whether or not CRY should return muons.

Parameters
muonstrue if muons should be returned, else false

Definition at line 132 of file CRY.h.

132{ m_returnMuons = muons; }
bool m_returnMuons
Whether or not CRY should return muons.
Definition: CRY.h:155

◆ setReturnNeutrons()

void setReturnNeutrons ( bool  neutrons)
inline

Set whether or not CRY should return neutrons.

Parameters
neutronstrue if neutrons should be returned, else false

Definition at line 120 of file CRY.h.

120{ m_returnNeutrons = neutrons; }
bool m_returnNeutrons
Whether or not CRY should return neutrons.
Definition: CRY.h:153

◆ setReturnPions()

void setReturnPions ( bool  pions)
inline

Set whether or not CRY should return pions.

Parameters
pionstrue if pions should be returned, else false

Definition at line 108 of file CRY.h.

108{ m_returnPions = pions; }
bool m_returnPions
Whether or not CRY should return pions.
Definition: CRY.h:151

◆ setReturnProtons()

void setReturnProtons ( bool  protons)
inline

Set whether or not CRY should return protons.

Parameters
protonstrue if protons should be returned, else false

Definition at line 114 of file CRY.h.

114{ m_returnProtons = protons; }
bool m_returnProtons
Whether or not CRY should return protons.
Definition: CRY.h:152

◆ setTimeOffset()

void setTimeOffset ( double  timeoffset)
inline

Sets the time offset.

Parameters
timeoffsettime offset for particles starting at the world box.

Definition at line 64 of file CRY.h.

64{ m_timeOffset = timeoffset; }
double m_timeOffset
time offset in nanoseconds.
Definition: CRY.h:144

Member Data Documentation

◆ m_acceptance

std::unique_ptr<vecgeom::VUnplacedVolume> m_acceptance
protected

acceptance shape

Definition at line 160 of file CRY.h.

◆ m_acceptSize

std::vector<double> m_acceptSize
protected

Shape parameters for the acceptance shape.

Definition at line 143 of file CRY.h.

◆ m_cosmicDataDir

std::string m_cosmicDataDir
protected

directory that holds cosmic data files.

Definition at line 141 of file CRY.h.

◆ m_cryGenerator

std::unique_ptr<CRYGenerator> m_cryGenerator
protected

The CRY generator.

Definition at line 158 of file CRY.h.

◆ m_crySetup

std::unique_ptr<CRYSetup> m_crySetup
protected

The CRY generator setup.

Definition at line 157 of file CRY.h.

◆ m_date

std::string m_date {"1-1-2019"}
protected

date used for generation (month-day-year).

Definition at line 146 of file CRY.h.

◆ m_kineticEnergyThreshold

double m_kineticEnergyThreshold {0}
protected

kinetic energy threshold.

Definition at line 145 of file CRY.h.

◆ m_maxTrials

int m_maxTrials {0}
protected

number of trials per event.

Definition at line 147 of file CRY.h.

◆ m_returnElectrons

bool m_returnElectrons {true}
protected

Whether or not CRY should return electrons.

Definition at line 154 of file CRY.h.

◆ m_returnGammas

bool m_returnGammas {true}
protected

Whether or not CRY should return gammas.

Definition at line 149 of file CRY.h.

◆ m_returnKaons

bool m_returnKaons {true}
protected

Whether or not CRY should return kaons.

Definition at line 150 of file CRY.h.

◆ m_returnMuons

bool m_returnMuons {true}
protected

Whether or not CRY should return muons.

Definition at line 155 of file CRY.h.

◆ m_returnNeutrons

bool m_returnNeutrons {true}
protected

Whether or not CRY should return neutrons.

Definition at line 153 of file CRY.h.

◆ m_returnPions

bool m_returnPions {true}
protected

Whether or not CRY should return pions.

Definition at line 151 of file CRY.h.

◆ m_returnProtons

bool m_returnProtons {true}
protected

Whether or not CRY should return protons.

Definition at line 152 of file CRY.h.

◆ m_subboxLength

int m_subboxLength {100}
protected

length of the square n-n plane in Cry in meters

Definition at line 142 of file CRY.h.

◆ m_timeOffset

double m_timeOffset {0}
protected

time offset in nanoseconds.

Definition at line 144 of file CRY.h.

◆ m_totalTrials

int m_totalTrials {0}
protected

total number of thrown events.

Definition at line 148 of file CRY.h.

◆ m_world

std::unique_ptr<vecgeom::VUnplacedVolume> m_world
protected

world box shape

Definition at line 159 of file CRY.h.


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