32#ifndef __MINIBALLEVTS_HH
37#ifndef __MINIBALLGEOMETRY_HH
43# define AME_FILE "./data/mass_1.mas20"
46# define SRIM_DIR "./srim/"
56 "n",
"H",
"He",
"Li",
"Be",
"B",
"C",
"N",
"O",
"F",
"Ne",
"Na",
"Mg",
57 "Al",
"Si",
"P",
"S",
"Cl",
"Ar",
"K",
"Ca",
"Sc",
"Ti",
"V",
"Cr",
58 "Mn",
"Fe",
"Co",
"Ni",
"Cu",
"Zn",
"Ga",
"Ge",
"As",
"Se",
"Br",
"Kr",
59 "Rb",
"Sr",
"Y",
"Zr",
"Nb",
"Mo",
"Tc",
"Ru",
"Rh",
"Pd",
"Ag",
"Cd",
60 "In",
"Sn",
"Sb",
"Te",
"I",
"Xe",
"Cs",
"Ba",
"La",
"Ce",
"Pr",
"Nd",
61 "Pm",
"Sm",
"Eu",
"Gd",
"Tb",
"Dy",
"Ho",
"Er",
"Tm",
"Yb",
"Lu",
"Hf",
62 "Ta",
"W",
"Re",
"Os",
"Ir",
"Pt",
"Au",
"Hg",
"Tl",
"Pb",
"Bi",
"Po",
63 "At",
"Rn",
"Fr",
"Ra",
"Ac",
"Th",
"Pa",
"U",
"Np",
"Pu",
"Am",
"Cm",
64 "Bk",
"Cf",
"Es",
"Fm",
"Md",
"No",
"Lr",
"Rf",
"Db",
"Sg",
"Bh",
"Hs",
65 "Mt",
"Ds",
"Rg",
"Cn",
"Nh",
"Fl",
"Ms",
"Lv",
"Ts",
"Og",
"Uue",
"Ubn"
106 return 1.0 / TMath::Sqrt( 1.0 - TMath::Power(
GetBeta(), 2.0 ) );
109 return 1.0 / TMath::Sqrt( 1.0 - TMath::Power(
GetBetaCoM(), 2.0 ) );
118 TVector3 vec( 1, 0, 0 );
127 return TMath::Sqrt(TMath::Power(E, 2.0) - TMath::Power(m, 2.0));
131 inline void SetA(
int myA ){
A = myA; };
132 inline void SetZ(
int myZ ){
Z = myZ; };
136 inline void SetEx(
double myEx ){
Ex = myEx; };
173 std::shared_ptr<TCutG>
ReadCutFile( std::string cut_filename, std::string cut_name );
177 fInputFile = filename;
203 return set->GetNumberOfCDPStrips() *
set->GetNumberOfCDDetectors();
206 std::vector<double> cd_angles;
207 for(
unsigned char i = 0; i <
set->GetNumberOfCDDetectors(); i++ )
208 for(
unsigned char j = 0; j <=
set->GetNumberOfCDPStrips(); j++ )
209 cd_angles.push_back(
GetCDVector(i,0,(
float)j-0.5,(
float)0).Theta() * TMath::RadToDeg() );
210 std::sort( cd_angles.begin(), cd_angles.end() );
213 TVector3
GetCDVector(
unsigned char det,
unsigned char sec,
float pid,
float nid );
214 inline TVector3
GetCDVector(
unsigned char det,
unsigned char sec,
unsigned char pid,
unsigned char nid ){
215 return GetCDVector( det, sec, (
float)pid, (
float)nid );
217 TVector3
GetParticleVector(
unsigned char det,
unsigned char sec,
unsigned char pid,
unsigned char nid );
218 inline double GetParticleTheta(
unsigned char det,
unsigned char sec,
unsigned char pid,
unsigned char nid ){
221 inline double GetParticlePhi(
unsigned char det,
unsigned char sec,
unsigned char pid,
unsigned char nid ){
224 inline double GetParticleX(
unsigned char det,
unsigned char sec,
unsigned char pid,
unsigned char nid ){
227 inline double GetParticleY(
unsigned char det,
unsigned char sec,
unsigned char pid,
unsigned char nid ){
230 inline double GetParticleZ(
unsigned char det,
unsigned char sec,
unsigned char pid,
unsigned char nid ){
234 return GetCDVector( p->GetDetector(), p->GetSector(), p->GetStripP(), p->GetStripN() );
237 return GetParticleVector( p->GetDetector(), p->GetSector(), p->GetStripP(), p->GetStripN() );
240 return GetParticleTheta( p->GetDetector(), p->GetSector(), p->GetStripP(), p->GetStripN() );
243 return GetParticlePhi( p->GetDetector(), p->GetSector(), p->GetStripP(), p->GetStripN() );
246 return GetParticleX( p->GetDetector(), p->GetSector(), p->GetStripP(), p->GetStripN() );
249 return GetParticleY( p->GetDetector(), p->GetSector(), p->GetStripP(), p->GetStripN() );
252 return GetParticleZ( p->GetDetector(), p->GetSector(), p->GetStripP(), p->GetStripN() );
256 inline void SetupCluster(
unsigned char clu,
double user_theta,
double user_phi,
double user_alpha,
double user_r,
double user_z) {
257 mb_geo[clu].SetupCluster(user_theta, user_phi, user_alpha, user_r, user_z);
260 return mb_geo[clu].GetCluTheta();
263 return mb_geo[clu].GetCluPhi();
266 return mb_geo[clu].GetCluAlpha();
269 return mb_geo[clu].GetCluR();
271 inline double GetGammaTheta(
unsigned char clu,
unsigned char cry,
unsigned char seg ){
272 return mb_geo[clu].GetSegTheta( cry, seg );
274 inline double GetGammaPhi(
unsigned char clu,
unsigned char cry,
unsigned char seg ){
275 return mb_geo[clu].GetSegPhi( cry, seg );
277 inline double GetGammaX(
unsigned char clu,
unsigned char cry,
unsigned char seg ){
278 return mb_geo[clu].GetSegX( cry, seg );
280 inline double GetGammaY(
unsigned char clu,
unsigned char cry,
unsigned char seg ){
281 return mb_geo[clu].GetSegY( cry, seg );
283 inline double GetGammaZ(
unsigned char clu,
unsigned char cry,
unsigned char seg ){
284 return mb_geo[clu].GetSegZ( cry, seg );
287 return GetGammaTheta( g->GetCluster(), g->GetCrystal(), g->GetSegment() );
290 return GetGammaPhi( g->GetCluster(), g->GetCrystal(), g->GetSegment() );
292 inline double GetGammaX( std::shared_ptr<GammaRayEvt> g ){
293 return GetGammaX( g->GetCluster(), g->GetCrystal(), g->GetSegment() );
295 inline double GetGammaY( std::shared_ptr<GammaRayEvt> g ){
296 return GetGammaY( g->GetCluster(), g->GetCrystal(), g->GetSegment() );
298 inline double GetGammaZ( std::shared_ptr<GammaRayEvt> g ){
299 return GetGammaZ( g->GetCluster(), g->GetCrystal(), g->GetSegment() );
305 TVector3
GetSpedeVector(
unsigned char seg,
bool random =
false );
322 void IdentifyEjectile( std::shared_ptr<ParticleEvt> p,
bool kinflag =
false );
323 void IdentifyRecoil( std::shared_ptr<ParticleEvt> p,
bool kinflag =
false );
328 void TransferProduct( std::shared_ptr<ParticleEvt> p,
bool kinflag =
false );
344 etot = TMath::Sqrt( etot );
357 return 1.0 / TMath::Sqrt( 1.0 - TMath::Power(
GetBetaCoM(), 2.0 ) );
371 double DopplerShift(
double gen,
double pbeta,
double costheta );
372 double DopplerCorrection(
double gen,
double gth,
double gph,
double pbeta,
double ptheta,
double pphi );
374 double DopplerCorrection( std::shared_ptr<GammaRayEvt> g,
double pbeta,
double ptheta,
double pphi );
377 double CosTheta( std::shared_ptr<GammaRayEvt> g,
bool ejectile );
378 double CosTheta( std::shared_ptr<SpedeEvt> s,
bool ejectile );
492 double GetEnergyLoss(
double Ei,
double dist, std::unique_ptr<TGraph> &g );
493 bool ReadStoppingPowers( std::string isotope1, std::string isotope2, std::unique_ptr<TGraph> &g );
564 std::
string fInputFile;
const double p_mass
mass of the proton in keV/c^2
const std::vector< std::string > gElName
const double n_mass
mass of the neutron in keV/c^2
const double e_mass
mass of the electron in keV/c^2
const double u_mass
atomic mass unit in keV/c^2
Functions to convert Miniball angles read from the frame.
int A
mass number, A of the particle, obviously
void SetBindingEnergy(double myBE)
double ThetaCoM
theta in the centre-of-mass system in radians
double GetBindingEnergy()
void SetTheta(double mytheta)
void SetPhi(double myphi)
void SetThetaCoM(double mytheta)
double bindingE
binding energy per nucleon in keV/c^2
double Ex
excitation energy of the nucleus
void SetEnergy(double myElab)
double ECoM
energy in the Center-of-Mass system
int Z
The Z of the particle, obviously.
double Elab
energy in the laboratory system
void SetEnergyCoM(double myECoM)
double Phi
phi in the laboratory system in radians
double Theta
theta in the laboratory system in radians
double GetParticleZ(std::shared_ptr< ParticleEvt > p)
std::vector< double > cd_dist
distance from target to CD detector in mm
TVector3 GetCDVector(unsigned char det, unsigned char sec, float pid, float nid)
std::vector< double > mb_r
double GetElectronTheta(unsigned char seg)
double GetParticleX(unsigned char det, unsigned char sec, unsigned char pid, unsigned char nid)
double GetGammaGammaRandomTime(unsigned char i)
double GetParticleTheta(std::shared_ptr< ParticleEvt > p)
double GetEBISTimeRatio()
TVector3 GetElectronVector(unsigned char seg)
double GetParticleParticlePromptTime(unsigned char i)
bool EventsGammaSegmentEnergy()
double GetGammaPhi(unsigned char clu, unsigned char cry, unsigned char seg)
double GetParticleElectronTimeRatio()
double EBIS_On
beam on max time in ns
std::string transfercutname
double spede_offset
phi rotation of the SPEDE detector
double GetMiniballAlpha(unsigned char clu)
double GetParticleElectronPromptTime(unsigned char i)
double y_offset
vertical offset of the target/beam position, with respect to the CD and Miniball in mm
double GetGammaGammaPromptTime(unsigned char i)
MiniballParticle Ejectile
bool IsEjectileDetected()
double GetSpedeDistance()
TVector3 GetParticleVector(std::shared_ptr< ParticleEvt > p)
double GetElectronTheta(SpedeEvt *s)
std::vector< double > mb_alpha
void IdentifyRecoil(std::shared_ptr< ParticleEvt > p, bool kinflag=false)
std::vector< std::unique_ptr< TGraph > > gStopping
double GetParticleGammaRandomTime(unsigned char i)
double x_offset
horizontal offset of the target/beam position, with respect to the CD and Miniball in mm
std::string GetTransferX()
int pe_prompt[2]
particle-electron prompt
bool HistWithoutAddback()
std::shared_ptr< TCutG > GetTransferCut()
std::shared_ptr< TCutG > recoil_cut
double GetGammaY(std::shared_ptr< GammaRayEvt > g)
MiniballParticle * GetTarget()
std::vector< double > mb_theta
std::string ejectilecutfile
TVector3 GetSpedeVector(unsigned char seg, bool random=false)
int pp_prompt[2]
particle-particle prompt
double events_gamma_seg_ediff
double GetParticleElectronFillRatio()
bool EventsGammaDemandSegment()
double GetGammaX(std::shared_ptr< GammaRayEvt > g)
std::shared_ptr< TCutG > GetEjectileCut()
std::string degrader_material
can be an isotope name, or some string that matches the material used and corresponding SRIM file
double GetElectronPhi(SpedeEvt *s)
ClassDef(MiniballReaction, 3) private std::shared_ptr< MiniballSettings > set
int gg_random[2]
gamma-gamma random
double EBIS_Off
beam off max time in ns
std::string transfercutfile
double GetGammaPhi(std::shared_ptr< GammaRayEvt > g)
void SetFile(std::string filename)
double GetGammaElectronFillRatio()
MiniballParticle * GetRecoil()
unsigned int HistParticleBins()
double GetParticleGammaTimeRatio()
std::shared_ptr< TCutG > GetRecoilCut()
TVector3 GetCDVector(std::shared_ptr< ParticleEvt > p)
std::shared_ptr< TCutG > ejectile_cut
double GetParticleGammaPromptTime(unsigned char i)
double DopplerCorrection(double gen, double gth, double gph, double pbeta, double ptheta, double pphi)
double GetGammaElectronRandomTime(unsigned char i)
unsigned int events_gamma_max_seg_mult
const std::string InputFile()
double GetGammaY(unsigned char clu, unsigned char cry, unsigned char seg)
double z_offset
lateral offset of the target/beam position, with respect to the only Miniball in mm (cd_dist is indep...
double GetElectronPhi(unsigned char seg)
void PrintReaction(std::ostream &stream, std::string opt)
int gg_prompt[2]
gamma-gamma prompt
double Eb
laboratory beam energy in keV/u
double GetGammaTheta(unsigned char clu, unsigned char cry, unsigned char seg)
bool events_gamma_seg_energy
std::string ejectilecutname
double GetMiniballTheta(unsigned char clu)
double GetParticleX(std::shared_ptr< ParticleEvt > p)
void SetParticleTime(unsigned long long t)
double GetParticleParticleFillRatio()
void AddBindingEnergy(short Ai, short Zi, TString ame_be_str)
unsigned int particle_bins
int ge_prompt[2]
gamma-electron prompt
MiniballReaction(std::string filename, std::shared_ptr< MiniballSettings > myset)
double GetParticleElectronRandomTime(unsigned char i)
double GetGammaTheta(std::shared_ptr< GammaRayEvt > g)
std::vector< double > mb_phi
double GetParticleZ(unsigned char det, unsigned char sec, unsigned char pid, unsigned char nid)
std::string transfercut_x
std::string recoilcutname
std::vector< MiniballGeometry > mb_geo
double GetParticleTheta(unsigned char det, unsigned char sec, unsigned char pid, unsigned char nid)
double EBIS_ratio
ratio of ebis on/off as measured
double ee_ratio
fill ratios
double GetParticleParticleRandomTime(unsigned char i)
double t1_time[2]
event time - T1 cut window
double target_thickness
target thickness in units of mg/cm^2
std::shared_ptr< TCutG > transfer_cut
std::string transfercut_y
bool events_particle_gamma
unsigned char GetLaserMode()
int pe_random[2]
particle-electron random
TVector3 GetParticleVector(unsigned char det, unsigned char sec, unsigned char pid, unsigned char nid)
double GetGammaElectronTimeRatio()
double GetElectronElectronFillRatio()
double degrader_thickness
target thickness in units of mg/cm^2. Negative if degrader not present. SHM, RAB 12 June 2025
double GetSpedePhiOffset()
std::vector< double > GetParticleThetas()
std::vector< double > cd_offset
phi rotation of the CD in degrees
double CosTheta(std::shared_ptr< GammaRayEvt > g, bool ejectile)
MiniballParticle * GetBeam()
unsigned int electron_bins
unsigned int GetNumberOfParticleThetas()
double GetParticlePhi(std::shared_ptr< ParticleEvt > p)
double GetGammaZ(unsigned char clu, unsigned char cry, unsigned char seg)
bool ReadStoppingPowers(std::string isotope1, std::string isotope2, std::unique_ptr< TGraph > &g)
double GetGammaElectronPromptTime(unsigned char i)
MiniballParticle * GetEjectile()
double GetMiniballR(unsigned char clu)
double GetParticleY(unsigned char det, unsigned char sec, unsigned char pid, unsigned char nid)
double GetMiniballPhi(unsigned char clu)
int pg_prompt[2]
particle-gamma prompt
void TransferProduct(std::shared_ptr< ParticleEvt > p, bool kinflag=false)
unsigned long long particle_time
double GetGammaGammaTimeRatio()
int ee_random[2]
electron-electron random
double pp_ratio
fill ratios
int ge_random[2]
gamma-electron random
double GetCDDeadLayer(unsigned char det)
double spede_dist
distance from target to SPEDE detector
unsigned int HistElectronBins()
bool events_particle_cdpad_coinc
TVector3 GetCDVector(unsigned char det, unsigned char sec, unsigned char pid, unsigned char nid)
unsigned int HistGammaBins()
void SetupCluster(unsigned char clu, double user_theta, double user_phi, double user_alpha, double user_r, double user_z)
bool EventsParticleGammaOnly()
void IdentifyEjectile(std::shared_ptr< ParticleEvt > p, bool kinflag=false)
double GetGammaX(unsigned char clu, unsigned char cry, unsigned char seg)
bool EventsCdPadCoincidence()
double GetCDDistance(unsigned char det)
unsigned int EventsGammaMaxSegmentMultiplicity()
double GetElectronElectronTimeRatio()
unsigned char GetDopplerMode()
double GetParticlePhi(unsigned char det, unsigned char sec, unsigned char pid, unsigned char nid)
unsigned char doppler_mode
double GetGammaGammaFillRatio()
std::shared_ptr< TCutG > ReadCutFile(std::string cut_filename, std::string cut_name)
bool events_gamma_demand_seg
double GetEnergyLoss(double Ei, double dist, std::unique_ptr< TGraph > &g)
double GetParticleParticleTimeRatio()
std::vector< double > dead_layer
dead layer thickness in mm
std::map< std::string, double > ame_be
List of biniding energies from AME2021.
std::string recoilcutfile
bool HistByMultiplicity()
int pp_random[2]
particle-particle random
double EventsGammaCoreSegmentEnergyDifference()
bool t1_cut
enable/disable T1 cuts on data
double GetParticleGammaFillRatio()
double GetCDPhiOffset(unsigned char det)
double GetGammaZ(std::shared_ptr< GammaRayEvt > g)
int ee_prompt[2]
electron-electron prompt
int pg_random[2]
particle-gamma random
double GetParticleY(std::shared_ptr< ParticleEvt > p)
double DopplerShift(double gen, double pbeta, double costheta)
double GetEBISFillRatio()
bool events_particle_cdpad_veto
unsigned long long GetParticleTime()
bool IsTransferDetected()
double GetElectronElectronPromptTime(unsigned char i)
std::string GetTransferY()
double GetElectronElectronRandomTime(unsigned char i)
unsigned char GetSegment()
std::shared_ptr< MiniballSettings > myset