38 fIntLayer = fNDets = 0;
41 fAlignedDetectors = 0;
49 Warning(
"KVElasticScatter",
"gMultiDetArray does not refer to a valid multidetector array");
50 printf(
"Define it before using this class, and put it in simulation mode : gMultiDetArray->SetSimMode(kTRUE)");
60 KVElasticScatter::~KVElasticScatter()
89 fMultiLayer = (fTarget->NumberOfLayers() > 1);
102 fProj.SetZandA(Z, A);
139 TIter n(fAlignedDetectors);
143 if (fDetInd->HasParameter(
d->GetType())) {
147 newname.
Form(
"%s_%d",
d->GetType(), j++);
148 while (fDetInd->HasParameter(newname.
Data()))
149 newname.
Form(
"%s_%d",
d->GetType(), j++);
150 fDetInd->SetValue(newname.
Data(), i);
153 fDetInd->SetValue(
d->GetType(), i);
178 "<KVElasticScatter::SetTargetScatteringLayer> : No target set. Set run first."
182 fIntLayer = fTarget->GetLayerIndex(name);
184 fTarget->SetInteractionLayer(fIntLayer, fBeamDirection);
212 if (!fProj.IsDefined()) {
214 "<KVElasticScatter::CalculateScattering> : Set projectile properties first"
220 "<KVElasticScatter::CalculateScattering> : Set projectile energy first"
226 "<KVElasticScatter::CalculateScattering> : Set detector first" <<
232 "<KVElasticScatter::CalculateScattering> : No target set. Set run first."
249 new TH1F(
"hDepth",
"Depth (mg/cm2)", 500, 0.,
250 fTarget->GetTotalEffectiveThickness());
251 fTheta =
new TH1F(
"hTheta",
"Theta (deg.)", 500, 0., 0.);
257 fHistos =
new TObjArray(fAlignedDetectors->GetSize());
264 TIter n(fAlignedDetectors);
268 TH1F(
Form(
"hEloss_%s",
d->GetName()),
"Eloss (MeV)", fBinE, 0., 0.));
276 fProj.SetEnergy(fEnergy);
283 fTarget->SetInteractionLayer(fIntLayer, fBeamDirection);
286 fTarget->GetInteractionPoint(&fProj);
292 TVector3 IP = fTarget->GetInteractionPoint();
297 fKinematics->SetTarget(t);
303 fKinematics->SetEDiss(fExx);
308 for (
int i = 0; i <
N; i++) {
310 fTarget->SetIncoming();
311 fTarget->DetectParticle(&fProj);
312 fKinematics->SetProjectile(fProj);
313 fKinematics->SetOutgoing(fProj);
314 fKinematics->CalculateKinematics();
319 fDetector->GetRandomAngles(th, ph);
326 fKinematics->GetELab(3, th, 3, e1, e2);
330 xsec =
TMath::Abs(fKinematics->GetXSecRuthLab(fProj.GetTheta()));
331 fTheta->Fill(fProj.GetTheta(), xsec);
333 fTarget->SetOutgoing();
334 fTarget->DetectParticle(&fProj);
336 fAlignedDetectors->R__FOR_EACH(
KVDetector, DetectParticle)(&fProj);
338 fDepth->Fill(IP.
z());
342 ((
TH1F*)(*fHistos)[j++])->Fill(
d->GetEnergy(), xsec);
346 fProj.SetEnergy(fEnergy);
348 fProj.GetParameters()->Clear();
351 fTarget->SetInteractionLayer(fIntLayer, fBeamDirection);
354 fTarget->GetInteractionPoint(&fProj);
358 targ_mat = fTarget->GetLayer(fTarget->GetInteractionPoint());
361 fKinematics->SetTarget(t);
364 IP = fTarget->GetInteractionPoint();
385 return (fDetInd->HasParameter(
type) ? GetEnergy(fDetInd->GetIntValue(
type)) : 0);
403 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.
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 & targets; interface to range tables.
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)