37 fIntLayer = fNDets = 0;
40 fAlignedDetectors = 0;
48 Warning(
"KVElasticScatter",
"gMultiDetArray does not refer to a valid multidetector array");
49 printf(
"Define it before using this class, and put it in simulation mode : gMultiDetArray->SetSimMode(kTRUE)");
59 KVElasticScatter::~KVElasticScatter()
88 fMultiLayer = (fTarget->NumberOfLayers() > 1);
101 fProj.SetZandA(Z, A);
138 TIter n(fAlignedDetectors);
142 if (fDetInd->HasParameter(
d->GetType())) {
146 newname.
Form(
"%s_%d",
d->GetType(), j++);
147 while (fDetInd->HasParameter(newname.
Data()))
148 newname.
Form(
"%s_%d",
d->GetType(), j++);
149 fDetInd->SetValue(newname.
Data(), i);
152 fDetInd->SetValue(
d->GetType(), i);
177 "<KVElasticScatter::SetTargetScatteringLayer> : No target set. Set run first."
181 fIntLayer = fTarget->GetLayerIndex(name);
183 fTarget->SetInteractionLayer(fIntLayer, fBeamDirection);
211 if (!fProj.IsDefined()) {
213 "<KVElasticScatter::CalculateScattering> : Set projectile properties first"
219 "<KVElasticScatter::CalculateScattering> : Set projectile energy first"
225 "<KVElasticScatter::CalculateScattering> : Set detector first" <<
231 "<KVElasticScatter::CalculateScattering> : No target set. Set run first."
248 new TH1F(
"hDepth",
"Depth (mg/cm2)", 500, 0.,
249 fTarget->GetTotalEffectiveThickness());
250 fTheta =
new TH1F(
"hTheta",
"Theta (deg.)", 500, 0., 0.);
256 fHistos =
new TObjArray(fAlignedDetectors->GetSize());
263 TIter n(fAlignedDetectors);
267 TH1F(
Form(
"hEloss_%s",
d->GetName()),
"Eloss (MeV)", fBinE, 0., 0.));
275 fProj.SetEnergy(fEnergy);
282 fTarget->SetInteractionLayer(fIntLayer, fBeamDirection);
285 fTarget->GetInteractionPoint(&fProj);
291 TVector3 IP = fTarget->GetInteractionPoint();
296 fKinematics->SetTarget(t);
302 fKinematics->SetEDiss(fExx);
307 for (
int i = 0; i <
N; i++) {
309 fTarget->SetIncoming();
310 fTarget->DetectParticle(&fProj);
311 fKinematics->SetProjectile(fProj);
312 fKinematics->SetOutgoing(fProj);
313 fKinematics->CalculateKinematics();
318 fDetector->GetRandomAngles(th, ph);
325 fKinematics->GetELab(3, th, 3, e1, e2);
329 xsec =
TMath::Abs(fKinematics->GetXSecRuthLab(fProj.GetTheta()));
330 fTheta->Fill(fProj.GetTheta(), xsec);
332 fTarget->SetOutgoing();
333 fTarget->DetectParticle(&fProj);
335 fAlignedDetectors->R__FOR_EACH(
KVDetector, DetectParticle)(&fProj);
337 fDepth->Fill(IP.
z());
341 ((
TH1F*)(*fHistos)[j++])->Fill(
d->GetEnergy(), xsec);
345 fProj.SetEnergy(fEnergy);
347 fProj.GetParameters()->Clear();
350 fTarget->SetInteractionLayer(fIntLayer, fBeamDirection);
353 fTarget->GetInteractionPoint(&fProj);
357 targ_mat = fTarget->GetLayer(fTarget->GetInteractionPoint());
360 fKinematics->SetTarget(t);
363 IP = fTarget->GetInteractionPoint();
384 return (fDetInd->HasParameter(
type) ? GetEnergy(fDetInd->GetIntValue(
type)) : 0);
402 return (
TH1F*)(*fHistos)[index];
KVMultiDetArray * gMultiDetArray
ClassImp(KVPartitionList) void KVPartitionList
Initialisation.
char * Form(const char *fmt,...)
Relativistic binary kinematics calculator.
Base class for detector geometry description, interface to energy-loss calculations.
KVGeoStrucElement * GetParentStructure(const Char_t *type, const Char_t *name="") const
Calculate elastic scattering spectra in multidetector arrays.
void SetDetector(const Char_t *det)
Set name of detector which will detect particle.
TH1F * GetEnergy()
Return pointer to energy loss histogram for chosen detector (in MeV)
void CalculateScattering(Int_t N)
void SetEbinning(Int_t nbins=500)
void SetProjectile(Int_t Z, Int_t A)
Set projectile Z and A.
void SetRun(Int_t run)
Set detector parameters, target, etc. for run.
void SetTargetScatteringLayer(const Char_t *name)
void SetEnergy(Double_t E)
Set energy of projectile in MeV.
KVDetector * GetDetector(const Char_t *name) const
Return detector in this structure with given name.
Description of physical materials used to construct detectors; interface to range tables.
Double_t GetZ() const
Returns atomic number of material.
Double_t GetMass() const
Returns atomic mass of material. Will be isotopic mass if set.
virtual void SetParameters(UInt_t n, Bool_t physics_parameters_only=kFALSE)
virtual void SetSimMode(Bool_t on=kTRUE)
Handles lists of named parameters with different types, a list of KVNamedParameter objects.
virtual void Clear(Option_t *opt="")
Description of properties and kinematics of atomic nuclei.
void SetZ(Int_t z, Char_t mt=-1)
void SetZandA(Int_t z, Int_t a)
Set atomic number and mass number.
void SetRandomized(Bool_t r=kTRUE)
Associates two detectors placed one behind the other.
const char * Data() const
void Form(const char *fmt,...)
void Add(RHist< DIMENSIONS, PRECISION, STAT_TO... > &to, const RHist< DIMENSIONS, PRECISION, STAT_FROM... > &from)
Double_t Max(Double_t a, Double_t b)