10#include "KVElasticCountRates.h"
11#include "KVMultiDetArray.h"
13#include "KVDetector.h"
14#include "KVTelescope.h"
37 fAngularRange(theta_min, theta_max, phi_min, phi_max),
38 fBeamDirection{beam_dir}
57 Warning(
"KVElasticCountRates",
"gMultiDetArray does not refer to a valid multidetector array");
58 printf(
"Define it before using this class, and put it in simulation mode : gMultiDetArray->SetSimMode(kTRUE)");
128 "<KVElasticCountRates::SetTargetScatteringLayer> : No target set. Set run first."
175 "<KVElasticCountRates::CalculateScattering> : Set projectile properties first"
181 "<KVElasticCountRates::CalculateScattering> : Set projectile energy first"
187 "<KVElasticCountRates::CalculateScattering> : No target set. Set run first."
205 fTheta =
new TH1F(
"hTheta",
"Theta (deg.)", 500, 0., 0.);
206 fGlobalMap =
new TH2F(
"hGlobalMap",
"X-section in x(vert)-y(hori) plane",
243 for (
int i = 0; i <
N; i++) {
320 for (
int i = 0; i < ndets; i++) {
333 histo =
new TH1F(detname +
"_dW",
Form(
"Solid angle of %s", detname.
Data()),
fBinE, 0, 0);
339 histo2 =
new TH2F(detname +
"_map",
Form(
"Map of %s", detname.
Data()), 100, 0, 0, 100, 0, 0);
371 printf(
"%s \t: N=%8.2f/sec. \t <E>=%7.1f MeV \t Tot.Xsec=%9.3E barn \t fluence=%9.3E/sec./cm**2 \t dissip.=%9.3E MeV/sec./cm**2\n",
401 return a.theta <
b.theta;
417 std::vector<count_rate> count_rates;
419 while ((
h = (
TH1F*)it())) {
421 if (!
name.EndsWith(
"_dW") && !
name.EndsWith(
"_map")) {
432 count_rates.push_back(
438 std::sort(count_rates.begin(), count_rates.end(), compare_count_rates);
440 for (std::vector<count_rate>::iterator it = count_rates.begin(); it != count_rates.end(); ++it) {
454 nl.
SetName(
"Generated by KVElasticCountRates::PutResultsInList method");
460 nl.
SetValue(
"Intensity(pps)", beam_intensity);
462 std::vector<count_rate> count_rates;
464 while ((
h = (
TH1F*)it())) {
466 if (!
name.EndsWith(
"_dW") && !
name.EndsWith(
"_map")) {
477 count_rates.push_back(
483 std::sort(count_rates.begin(), count_rates.end(), compare_count_rates);
485 for (std::vector<count_rate>::iterator it = count_rates.begin(); it != count_rates.end(); ++it) {
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t b
char * Form(const char *fmt,...)
Relativistic binary kinematics calculator.
void SetTarget(const KVNucleus &)
Set target for reaction.
void SetEDiss(Double_t ex)
void SetProjectile(const KVNucleus &)
Set projectile for reaction.
Double_t GetXSecRuthLab(Double_t ThetaLab_Proj, Int_t OfNucleus=3) const
void SetOutgoing(const KVNucleus &proj_out)
Double_t GetELab(Double_t ThetaCM, Int_t OfNucleus) const
void CalculateKinematics()
Extension of TDatime to handle various useful date formats.
Base class for detector geometry description.
virtual void Clear(Option_t *opt="")
virtual Double_t GetEntranceWindowSurfaceArea()
Return surface area of first layer of detector in cm2.
Calculate elastic scattering count rates in multidetector arrays.
Int_t fIntLayer
index of interaction layer in multilayer target
void PrintResults(Double_t beam_intensity=1.e+07)
Print mean energy deposit & counting rate for given beam intensity in particles per second.
Double_t fEnergy
energy of projectile
KVNameValueList PutResultsInList(Double_t beam_intensity=1.e+07)
Print mean energy deposit & counting rate for given beam intensity in particles per second.
void FillHistograms(KVNameValueList *)
KVNucleus fProj
scattered nucleus
TH2F * fGlobalMap
global map of cross-section vs. theta vs. phi
void SetProjectile(const Char_t *nuc, Double_t e_sur_a)
Set projectile and beam energy [MeV/nucleon] & direction.
Int_t fBinE
Number of bins of the Energy histogram.
void SetEbinning(Int_t nbins=500)
KVHashList fHistos
histograms for all hit detectors
KV2Body * fKinematics
kinematics calculation
void CalculateScattering(Int_t N=10000)
Double_t fVolume
volume factor for MC integration
void SetRun(Int_t run)
Set detector parameters, target, etc. for run.
TH1F * fDepth
depth of scattering point in target
std::map< std::string, KVElasticCountRate > fRates
Bool_t fMultiLayer
kTRUE for multilayer target
void SetTargetScatteringLayer(const Char_t *name)
virtual ~KVElasticCountRates()
Destructor.
Double_t fExx
excited state of target nucleus
KVPosition fAngularRange
angular range in which to scatter
TH1F * fTheta
angle of scattered particle
TVector3 fBeamDirection
beam direction vector
KVTarget * fTarget
target for current run
Double_t fAtomicDensity
number of atoms per barn (10^-24 cm2) in target
KVDetector * GetDetector(const Char_t *name) const
Return detector in this structure with given name.
Description of physical materials used to construct detectors & targets; interface to range tables.
virtual KVNameValueList * DetectParticle(KVNucleus *part)
virtual void SetParameters(UInt_t n, Bool_t physics_parameters_only=kFALSE)
void SetFilterType(Int_t t)
virtual void InitializeIDTelescopes()
virtual void SetROOTGeometry(Bool_t on=kTRUE)
virtual void SetSimMode(Bool_t on=kTRUE)
Handles lists of named parameters with different types, a list of KVNamedParameter objects.
Double_t GetDoubleValue(const Char_t *name) const
void SetValue(const Char_t *name, value_type value)
virtual void Clear(Option_t *opt="")
const Char_t * GetNameAt(Int_t idx) const
Int_t GetNpar() const
return the number of stored parameters
const Char_t * GetStringValue(const Char_t *name) const
Bool_t HasParameter(const Char_t *name) const
Description of properties and kinematics of atomic nuclei.
void SetZandA(Int_t z, Int_t a)
Set atomic number and mass number.
void SetTheta(Double_t theta)
void SetPhi(Double_t phi)
void SetMomentum(const TVector3 *v)
KVNameValueList * GetParameters() const
void SetEnergy(Double_t e)
virtual void GetRandomAngles(Double_t &th, Double_t &ph, Option_t *t="isotropic")
Double_t GetThetaMax() const
virtual TObject * FindObject(const char *name) const
virtual void Add(TObject *obj)
virtual void Delete(Option_t *option="")
Extension of ROOT TString class which allows backwards compatibility with ROOT v3....
void SetIncoming(Bool_t r=kTRUE)
virtual void DetectParticle(KVNucleus *, TVector3 *norm=0)
Int_t NumberOfLayers() const
TVector3 & GetInteractionPoint(KVParticle *part=0)
void SetRandomized(Bool_t r=kTRUE)
KVMaterial * GetLayer(TVector3 &depth)
Double_t GetTotalEffectiveThickness(KVParticle *part=0)
void SetInteractionLayer(Int_t ilayer, TVector3 &dir)
void SetOutgoing(Bool_t r=kTRUE)
Double_t GetAtomsPerCM2() const
virtual UInt_t GetUnits() const;
Int_t GetLayerIndex(TVector3 &depth)
const char * AsSQLString() const
virtual Double_t GetMean(Int_t axis=1) const
virtual Int_t Fill(const char *name, Double_t w)
virtual Double_t Integral(Int_t binx1, Int_t binx2, Option_t *option="") const
virtual Int_t Fill(const char *namex, const char *namey, Double_t w)
Double_t Angle(const TVector3 &v) const
virtual void SetTitle(const char *title="")
const char * GetName() const override
virtual void SetName(const char *name)
const char * Data() const
RVec< PromoteType< T > > cos(const RVec< T > &v)
RVec< PromoteType< T > > sin(const RVec< T > &v)
constexpr Double_t DegToRad()
Double_t Max(Double_t a, Double_t b)
constexpr Double_t RadToDeg()
Utility class used by KVElasticCountRates to store results.
Utility class used by KVElasticCountRates.
count_rate(TString n, double c, double e, double t, double p, double f, double d, double i)
void PutInList(KVNameValueList &nl)