36 fAngularRange(theta_min, theta_max, phi_min, phi_max),
37 fBeamDirection(0, 0, 1)
56 Warning(
"KVElasticCountRates",
"gMultiDetArray does not refer to a valid multidetector array");
57 printf(
"Define it before using this class, and put it in simulation mode : gMultiDetArray->SetSimMode(kTRUE)");
67 KVElasticCountRates::~KVElasticCountRates()
92 fTarget->SetRandomized();
94 fMultiLayer = (fTarget->NumberOfLayers() > 1);
106 fEnergy = fProj.GetE();
126 "<KVElasticCountRates::SetTargetScatteringLayer> : No target set. Set run first."
130 fIntLayer = fTarget->GetLayerIndex(name);
132 fTarget->SetInteractionLayer(fIntLayer, fBeamDirection);
171 if (!fProj.IsDefined()) {
173 "<KVElasticCountRates::CalculateScattering> : Set projectile properties first"
179 "<KVElasticCountRates::CalculateScattering> : Set projectile energy first"
185 "<KVElasticCountRates::CalculateScattering> : No target set. Set run first."
202 new TH1F(
"hDepth",
"Depth (mg/cm2)", 500, 0., fTarget->GetTotalEffectiveThickness());
203 fTheta =
new TH1F(
"hTheta",
"Theta (deg.)", 500, 0., 0.);
210 fProj.SetEnergy(fEnergy);
217 fTarget->SetInteractionLayer(fIntLayer, fBeamDirection);
220 fTarget->GetInteractionPoint(&fProj);
226 TVector3 IP = fTarget->GetInteractionPoint();
230 fKinematics->SetTarget(t);
236 fKinematics->SetEDiss(fExx);
240 for (
int i = 0; i <
N; i++) {
242 fTarget->SetIncoming();
243 fTarget->DetectParticle(&fProj);
244 fKinematics->SetProjectile(fProj);
245 fKinematics->SetOutgoing(fProj);
246 fKinematics->CalculateKinematics();
248 fAngularRange.GetRandomAngles(theta, phi,
"random");
249 xsec =
TMath::Abs(fKinematics->GetXSecRuthLab(theta));
255 fKinematics->GetELab(3, theta, 3, e1, e2);
257 fProj.SetTheta(theta);
259 fTheta->Fill(theta, xsec);
261 fTarget->SetOutgoing();
262 fTarget->DetectParticle(&fProj);
266 fDepth->Fill(IP.
z());
267 FillHistograms(detectors);
268 fProj.GetParameters()->Clear();
269 fProj.SetEnergy(fEnergy);
273 fTarget->SetInteractionLayer(fIntLayer, fBeamDirection);
276 fTarget->GetInteractionPoint(&fProj);
280 targ_mat = fTarget->GetLayer(fTarget->GetInteractionPoint());
283 fKinematics->SetTarget(t);
286 IP = fTarget->GetInteractionPoint();
313 for (
int i = 0; i < ndets; i++) {
319 histo =
new TH1F(detname,
Form(
"Eloss in %s", detname.
Data()), fBinE, 0, 0);
326 histo =
new TH1F(detname +
"_dW",
Form(
"Solid angle of %s", detname.
Data()), fBinE, 0, 0);
332 histo2 =
new TH2F(detname +
"_map",
Form(
"Map of %s", detname.
Data()), 100, 0, 0, 100, 0, 0);
335 histo2->
Fill(theta, phi, xsec);
360 : detector(
n), counts(
c),
energy(
e), theta(t), phi(p), fluence(
f), dissipation(
d), intXsec(i) {}
363 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",
364 detector.
Data(), counts,
energy, intXsec, fluence, dissipation);
393 return a.theta <
b.theta;
409 std::vector<count_rate> count_rates;
411 while ((
h = (
TH1F*)it())) {
416 double intXsec =
h->
Integral() * fVolume / fNtirages;
418 double rate = fAtomicDensity * beam_intensity * intXsec;
424 count_rates.push_back(
432 for (std::vector<count_rate>::iterator it = count_rates.begin(); it != count_rates.end(); ++it) {
446 nl.
SetName(
"Generated by KVElasticCountRates::PutResultsInList method");
452 nl.
SetValue(
"Intensity(pps)", beam_intensity);
454 std::vector<count_rate> count_rates;
456 while ((
h = (
TH1F*)it())) {
461 double intXsec =
h->
Integral() * fVolume / fNtirages;
463 double rate = fAtomicDensity * beam_intensity * intXsec;
469 count_rates.push_back(
477 for (std::vector<count_rate>::iterator it = count_rates.begin(); it != count_rates.end(); ++it) {
bool compare_count_rates(count_rate a, count_rate b)
KVMultiDetArray * gMultiDetArray
ClassImp(KVPartitionList) void KVPartitionList
Initialisation.
char * Form(const char *fmt,...)
Relativistic binary kinematics calculator.
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.
void PrintResults(Double_t beam_intensity=1.e+07)
Print mean energy deposit & counting rate for given beam intensity in particles per second.
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 *)
void SetProjectile(const Char_t *nuc, Double_t e_sur_a)
Set projectile and beam energy [MeV/nucleon].
void SetEbinning(Int_t nbins=500)
void CalculateScattering(Int_t N=10000)
void SetRun(Int_t run)
Set detector parameters, target, etc. for run.
void SetTargetScatteringLayer(const Char_t *name)
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)
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.
Extension of ROOT TString class which allows backwards compatibility with ROOT v3....
Double_t GetAtomsPerCM2() const
virtual UInt_t GetUnits() const;
const char * AsSQLString() const
virtual Double_t GetMean(Int_t axis=1) const
virtual TObject * FindObject(const char *name) 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)
virtual const char * GetName() const
virtual void SetTitle(const char *title="")
virtual void SetName(const char *name)
Bool_t EndsWith(const char *pat, ECaseCompare cmp=kExact) const
const char * Data() const
constexpr Double_t DegToRad()
Double_t Max(Double_t a, Double_t b)
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)