23 #ifndef KVD_RECPRC_CNXN
24 #define KVD_RECPRC_CNXN 1
26 #ifndef KVD_NORECPRC_CNXN
27 #define KVD_NORECPRC_CNXN 0
30 #include "KVMaterial.h"
31 #include "KVPosition.h"
33 #include "KVNucleus.h"
34 #include "KVGeoDetectorNode.h"
35 #include "KVUniqueNameList.h"
36 #include "KVDetectorSignal.h"
227 template<
typename AbsorberStack>
230 auto z = nuc->
GetZ();
231 auto a = nuc->
GetA();
233 if (!transmission) solution =
kEmin;
235 if (transmission && ERES > 0.) {
237 EINC = stack->GetIncidentEnergyFromERes(z,
a, ERES);
242 EINC = stack->GetIncidentEnergy(z,
a,
e, solution);
247 ERES = stack->GetERes(z,
a, EINC);
250 return (EINC - ERES);
338 double fTotThickness = 0;
342 return fTotThickness;
370 if (ELoss > 0)
return ELoss;
372 if (ELoss < 0) ELoss = 0;
393 -1.,
Bool_t transmission = kTRUE);
399 const Char_t* type)
const;
493 if (!all)
return kTRUE;
500 return all && count_raw;
515 return (s ? s->GetValue(params) : 0);
526 if (s) s->SetValue(val);
542 return (s ? s->GetInverseValue(
value,
input, params) : 0);
#define ClassDefOverride(name, id)
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void input
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
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void on
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void value
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 Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t type
Base class for all detector calibrations.
Base class for output signal data produced by a detector.
virtual Bool_t IsFired() const
const Char_t * GetType() const override
virtual Bool_t IsRaw() const
void SetDetector(const KVDetector *d)
Base class for detector geometry description, interface to energy-loss calculations.
void SetDetectorSignalValue(const KVString &type, Double_t val) const
void SetNameOfArray(const TString &n)
KVMaterial * GetAbsorber(const Char_t *name) const
Double_t GetInverseDetectorSignalValue(const KVString &output, Double_t value, const KVString &input, const KVNameValueList ¶ms="") const
static KVDetector * MakeDetector(const Char_t *name, Float_t thick)
TGeoHMatrix * GetActiveLayerMatrix() const
void SetThickness(Double_t thick) override
void IncrementIdentifiedParticles(Int_t n=1)
virtual Bool_t IsSimMode() const
virtual Bool_t IsOK() const
virtual Bool_t use_signal_for_raw_data_tree(const TString &) const
KVPosition fEWPosition
position of entrance window i.e. first volume in detector geometry
virtual void SetSimMode(Bool_t on=kTRUE)
Double_t GetMisalignmentAngle() const override
const Char_t * GetMaterialName() const
KVMaterial * GetActiveLayer() const override
KVUniqueNameList fParentStrucList
list of geometry structures which directly contain this detector
Int_t GetNumberOfAbsorberLayers() const
void IncrementUnidentifiedParticles(Int_t n=1)
Double_t GetSurfaceArea(int npoints=100000) const override
virtual void AddEnergyLossInSubDetector(int, double)
void SetMaterial(const Char_t *type) override
Double_t ELossActive(Double_t *x, Double_t *par)
void SetTemperature(Double_t T) override
KVList * fCalibrators
list of associated calibrator objects
KVGeoStrucElement * GetParentStructure(const Char_t *type, const Char_t *name="") const
KVGroup * GetGroup() const
void AddDetectorSignal(KVDetectorSignal *ds)
Double_t GetRange(Int_t Z, Int_t A, Double_t Einc) override
Double_t GetIncidentEnergyFromERes(Int_t Z, Int_t A, Double_t Eres) override
Bool_t fDetecting
=kTRUE if detector is "detecting", =kFALSE if not
Bool_t ReplaceCalibrator(const Char_t *type, KVCalibrator *cal, const KVNameValueList &opts="")
KVList * GetHits() const
Return the list of particles hitting this detector in an event.
virtual Double_t GetTotalDeltaE(Int_t Z, Int_t A, Double_t Einc)
virtual Double_t GetEnergy() const
Int_t GetNHits() const
Return the number of particles hitting this detector in an event.
virtual TF1 * GetEResFunction(Int_t Z, Int_t A)
KVList * GetListOfCalibrators() const
void RemoveHit(KVNucleus *part)
virtual TGraph * DrawPunchThroughEsurAVsZ(Int_t massform=KVNucleus::kBetaMass)
const KVSeqCollection & GetListOfDetectorSignalsForRawTree() const
void AddAbsorber(KVMaterial *)
virtual Double_t GetEResAfterDetector() const
TVector3 GetSurfaceCentre() const override
Double_t GetIncidentEnergy(Int_t Z, Int_t A, Double_t delta_e=-1.0, enum SolType type=kEmax) override
Double_t GetPunchThroughEnergy(Int_t Z, Int_t A) override
Bool_t IsMultiLayer() const
void AddParentStructure(KVGeoStrucElement *elem)
Bool_t IsSingleLayer() const
Double_t GetDeltaE(Int_t Z, Int_t A, Double_t Einc, Double_t=0.) override
Double_t fEResforEinc
used by GetIncidentEnergy & GetCorrectedEnergy
void Print(Option_t *option="") const override
TVector3 GetSurfaceNormal() const override
TVector3 GetVolumeCentre() const override
virtual Int_t GetIndex() const
virtual Int_t FindZmin(Double_t ELOSS=-1., Char_t mass_formula=-1)
Double_t GetSinTheta() const override
TF1 * fELossF
parametric function dE in active layer vs. incident energy
Double_t GetLinearRange(Int_t Z, Int_t A, Double_t Einc) override
const KVPosition & GetEntranceWindow() const
Bool_t HasDetectorSignal(const KVString &type) const
KVMaterial * GetAbsorber(Int_t i) const
Returns pointer to the i-th absorber in the detector (i=0 first absorber, i=1 second,...
void SetEnergyLoss(Double_t e) const override
void remove_signal_for_calibrator(KVCalibrator *K)
TF1 * fEResF
parametric function Eres residual energy after all layers of detector
KVDetectorSignal * AddDetectorSignal(const KVString &type)
TVector3 GetActiveLayerSurfaceCentre() const
Bool_t HasSameStructureAs(const KVDetector *) const
virtual Bool_t Fired(Option_t *opt="any") const
Double_t GetPhi() const override
virtual KVDetectorSignal * GetDetectorSignal(const KVString &type) const
virtual void ReadDefinitionFromFile(const Char_t *)
Bool_t IsCalibrated() const
Double_t GetEnergyLoss() const override
void SetShape(TGeoBBox *s) override
void Copy(TObject &obj) const override
void SetDetecting(Bool_t yes=kTRUE)
virtual TF1 * GetELossFunction(Int_t Z, Int_t A)
void SetActiveLayer(KVMaterial *actif)
TGeoHMatrix * GetMatrix() const override
Double_t GetSolidAngle() const override
Bool_t BelongsToUnidentifiedParticle() const
void DetectParticle(KVNucleus *, TVector3 *norm=0) override
Double_t RangeDet(Double_t *x, Double_t *par)
const Char_t * GetNameOfArray() const
Double_t GetParticleEIncFromERes(KVNucleus *, TVector3 *norm=0) override
virtual void RemoveCalibrators()
virtual Double_t GetEntranceWindowSurfaceArea()
Return surface area of first layer of detector in cm2.
TGeoBBox * GetShape() const override
virtual TGraph * DrawPunchThroughEnergyVsZ(Int_t massform=KVNucleus::kBetaMass)
const KVList * GetListOfAbsorbers() const
KVUniqueNameList fDetSignals
list of signals associated with detector
Bool_t IsGasDetector() const
Double_t get_corrected_energy(AbsorberStack *stack, KVNucleus *nuc, Double_t e, Bool_t transmission)
Int_t fUnidentP
temporary counters, determine state of identified/unidentified particle flags
TF1 * fRangeF
parametric function range of particles in detector
Bool_t AddDetectorSignalExpression(const KVString &type, const KVString &_expr)
Double_t GetDetectorSignalValue(const KVString &type, const KVNameValueList ¶ms="") const
virtual void SetEnergy(Double_t e) const
virtual void SetEResAfterDetector(Double_t e)
virtual Double_t GetCalibratedEnergy() const
KVGeoDetectorNode fNode
positioning information relative to other detectors
void SetActiveLayerMatrix(const TGeoHMatrix *)
Set ROOT geometry global matrix transformation to coordinate frame of active layer volume.
Double_t GetERes(Int_t Z, Int_t A, Double_t Einc, Double_t=0.) override
virtual Bool_t IsDetecting() const
virtual Bool_t IsSegmented() const
void SetActiveLayer(Int_t i)
Double_t GetMaxDeltaE(Int_t Z, Int_t A) override
TVector3 GetRandomDirection(Option_t *t="isotropic") override
void RemoveParentStructure(KVGeoStrucElement *elem)
virtual Double_t GetSmallestEmaxValid(Int_t Z, Int_t A) const
const KVSeqCollection & GetListOfDetectorSignals() const
KVUniqueNameList fDetSignalsForRawTree
list of signals used for raw data TTree
KVList * fParticles
list of particles hitting detector in an event
KVGeoDetectorNode * GetNode()
TVector3 GetRandomPointOnSurface() const override
Bool_t fSimMode
=kTRUE when using to simulate detector response, =kFALSE when analysing data
Double_t GetDeltaEFromERes(Int_t Z, Int_t A, Double_t Eres) override
TString fNameOfArray
name of multidetector array this detector is part of
Bool_t BelongsToIdentifiedParticle() const
void SetMatrix(const TGeoHMatrix *m) override
void SetEntranceWindowMatrix(const TGeoHMatrix *)
Set ROOT geometry global matrix transformation to coordinate frame of entrance window.
Double_t EResDet(Double_t *x, Double_t *par)
TGeoBBox * GetActiveLayerShape() const
virtual void Reset(Option_t *opt="")
TVector3 GetActiveLayerVolumeCentre() const
const TVector3 GetCentreOfEntranceWindow() const
KVMaterial * fActiveLayer
The active absorber in the detector.
void AddHit(KVNucleus *part)
void RemoveAllAbsorbers()
Double_t GetEIncOfMaxDeltaE(Int_t Z, Int_t A) override
Double_t GetTotalThicknessInCM() const
KVCalibrator * GetCalibrator(const Char_t *name, const Char_t *type) const
Int_t fIdentP
temporary counters, determine state of identified/unidentified particle flags
void SetPressure(Double_t P) override
Double_t GetELostByParticle(KVNucleus *, TVector3 *norm=0) override
virtual Bool_t IsPresent() const
void SetEntranceWindowShape(TGeoBBox *)
Set ROOT geometry shape of entrance window.
Bool_t fPresent
=kTRUE if detector is present, =kFALSE if it has been removed
void GetRandomAngles(Double_t &th, Double_t &ph, Option_t *t="isotropic") override
void SetActiveLayerShape(TGeoBBox *)
Set ROOT geometry shape of active layer volume.
TVector3 GetDirection() override
void SetAnalysed(Bool_t b=kTRUE)
TString fFName
dynamically generated full name of detector
Bool_t fSingleLayer
=kTRUE if detector has a single absorber layer
virtual TF1 * GetRangeFunction(Int_t Z, Int_t A)
Double_t GetDistance() const override
virtual Double_t GetCorrectedEnergy(KVNucleus *, Double_t e=-1., Bool_t transmission=kTRUE)
void init()
default initialisations
void Clear(Option_t *opt="") override
KVList fAbsorbers
list of absorbers making up the detector
Bool_t AddCalibrator(KVCalibrator *cal, const KVNameValueList &opts="")
Double_t GetCosTheta() const override
void SetPresent(Bool_t yes=kTRUE)
Double_t GetTheta() const override
Information on relative positions of detectors & particle trajectories.
Base class describing elements of array geometry.
Group of detectors which can be treated independently of all others in array.
Extended TList class which owns its objects by default.
Description of physical materials used to construct detectors & targets; interface to range tables.
virtual void SetEnergyLoss(Double_t e) const
virtual Double_t GetThickness() const
virtual Double_t GetEnergyLoss() const
Handles lists of named parameters with different types, a list of KVNamedParameter objects.
Description of properties and kinematics of atomic nuclei.
Int_t GetZ() const
Return the number of proton / atomic number.
Base class used for handling geometry in a multidetector array.
virtual void GetRandomAngles(Double_t &th, Double_t &ph, Option_t *t="isotropic")
virtual TVector3 GetRandomDirection(Option_t *t="isotropic")
virtual void SetShape(TGeoBBox *)
virtual Double_t GetSolidAngle(void) const
virtual Double_t GetTheta() const
virtual Bool_t ROOTGeo() const
Returns kTRUE if ROOT geometry is used, kFALSE if not.
virtual TVector3 GetSurfaceCentre() const
virtual TGeoHMatrix * GetMatrix() const
virtual Double_t GetPhi() const
virtual Double_t GetDistance(void) const
virtual TVector3 GetVolumeCentre() const
virtual Double_t GetSurfaceArea(int npoints=100000) const
virtual Double_t GetSinTheta() const
virtual TVector3 GetSurfaceNormal() const
virtual Double_t GetMisalignmentAngle() const
virtual void SetMatrix(const TGeoHMatrix *)
virtual TGeoBBox * GetShape() const
virtual Double_t GetCosTheta() const
virtual TVector3 GetDirection()
virtual TVector3 GetRandomPointOnSurface() const
KaliVeda extensions to ROOT collection classes.
T * get_object(const TString &name) const
TObject * Remove(TObject *obj) override
Remove object from list.
void Add(TObject *obj) override
TObject * FindObject(const char *name) const override
void Clear(Option_t *option="") override
virtual void SetCleanup(Bool_t enable=kTRUE)
virtual TObject * FindObjectByType(const Char_t *) const
virtual TObject * FindObjectWithNameAndType(const Char_t *name, const Char_t *type) const
Extension of ROOT TString class which allows backwards compatibility with ROOT v3....
Optimised list in which named objects can only be placed once.
void Add(TObject *obj) override
virtual Int_t GetEntries() const
const char * GetName() const override
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const