Belle II Software  release-08-01-10
CRY Class Referencefinal

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

#include <CRY.h>

Collaboration diagram for CRY:

Public Member Functions

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

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.

◆ 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.

◆ 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.

◆ 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.

◆ 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.

◆ 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.

◆ 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.

◆ 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.

◆ 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.

◆ 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.

◆ 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.

◆ 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.

◆ 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.


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