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 "KVUnownedList.h"
34 #include "KVNucleus.h"
35 #include "KVGeoDetectorNode.h"
36 #include "KVUniqueNameList.h"
37 #include "KVDetectorSignal.h"
179 static Int_t fDetCounter;
184 kIsAnalysed =
BIT(14),
185 kActiveSet =
BIT(15),
186 kUnidentifiedParticle =
BIT(16),
187 kIdentifiedParticle =
BIT(17),
212 TVector3 GetRandomPointOnSurface()
const override
216 TVector3 GetSurfaceCentre()
const override
220 TVector3 GetVolumeCentre()
const override
224 TVector3 GetNormalIntoShape()
const override
228 Double_t GetSurfaceArea(
int npoints = 100000)
const override
238 template<
typename AbsorberStack>
241 auto z = nuc->
GetZ();
242 auto a = nuc->
GetA();
244 if (!transmission) solution =
kEmin;
246 if (transmission && ERES > 0.) {
248 EINC = stack->GetIncidentEnergyFromERes(z,
a, ERES);
253 EINC = stack->GetIncidentEnergy(z,
a,
e, solution);
258 ERES = stack->GetERes(z,
a, EINC);
261 return (EINC - ERES);
295 virtual Bool_t use_signal_for_raw_data_tree(
const TString&)
const
314 fActiveLayer = actif;
348 double fTotThickness = 0;
349 TIter next(&fAbsorbers);
352 return fTotThickness;
380 if (ELoss > 0)
return ELoss;
382 if (ELoss < 0) ELoss = 0;
403 -1.,
Bool_t transmission = kTRUE);
409 const Char_t* type)
const;
428 fParticles.
Add(part);
437 auto p = fParticles.
Remove(part);
492 if (!all)
return kTRUE;
499 return all && count_raw;
514 return (s ? s->GetValue(params) : 0);
525 if (s) s->SetValue(val);
541 return (s ? s->GetInverseValue(
value,
input, params) : 0);
562 fUnidentP = (fUnidentP > 0) * fUnidentP;
568 fIdentP = (fIdentP > 0) * fIdentP;
573 return TestBit(kUnidentifiedParticle);
577 return TestBit(kIdentifiedParticle);
587 return GetSurfaceCentre();
679 return (fPresent && fDetecting);
833 if(fDetSignalsForRawTree.
IsEmpty())
835 for(
auto s : fDetSignals)
838 if(use_signal_for_raw_data_tree(sig->GetName()))
839 fDetSignalsForRawTree.
Add(sig);
842 return fDetSignalsForRawTree;
#define ClassDefOverride(name, id)
winID h TVirtualViewer3D TVirtualGLPainter p
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.
Detector signal waveform.
Base class for output signal data produced by a detector.
virtual Bool_t IsFired() const
virtual Bool_t IsRaw() const
void SetDetector(const KVDetector *d)
Base class for detector geometry description, interface to energy-loss calculations.
Double_t GetCosineMaximumMisalignmentAngle() const override
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 void SetSimMode(Bool_t on=kTRUE)
const Char_t * GetMaterialName() const
KVMaterial * GetActiveLayer() const override
Int_t GetNumberOfAbsorberLayers() const
void IncrementUnidentifiedParticles(Int_t n=1)
auto RemoveHit(KVNucleus *part)
virtual void AddEnergyLossInSubDetector(int, double)
void SetMaterial(const Char_t *type) override
virtual KVDrawable< TGraph > DrawPunchThroughEnergyVsZ(Int_t massform=KVNucleus::kBetaMass)
void SetTemperature(Double_t T) override
KVGeoStrucElement * GetParentStructure(const Char_t *type, const Char_t *name="") const
KVGroup * GetGroup() const
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 IsCalibrated(const KVNameValueList ¶ms={}) const
Bool_t ReplaceCalibrator(const Char_t *type, KVCalibrator *cal, const KVNameValueList &opts="")
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
const KVSeqCollection & GetListOfDetectorSignalsForRawTree() const
void AddAbsorber(KVMaterial *)
KVDetectorSignalTrace * AddDetectorSignalTrace()
virtual Double_t GetEResAfterDetector() const
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
void Print(Option_t *option="") const override
virtual KVDrawable< TGraph > DrawPunchThroughEsurAVsZ(Int_t massform=KVNucleus::kBetaMass)
virtual Int_t GetIndex() const
virtual Int_t FindZmin(Double_t ELOSS=-1., Char_t mass_formula=-1)
Double_t GetSinTheta() const override
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
Double_t GetMaximumMisalignmentAngle() const override
TVector3 GetActiveLayerSurfaceCentre() const
TVector3 GetNormalToDetector() 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 *)
Double_t GetEnergyLoss() const 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)
Double_t GetSolidAngle() const override
Bool_t BelongsToUnidentifiedParticle() const
void DetectParticle(KVNucleus *, TVector3 *norm=0) override
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.
const KVList * GetListOfAbsorbers() const
Bool_t IsGasDetector() const
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
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
KVGeoDetectorNode * GetNode()
Double_t GetDeltaEFromERes(Int_t Z, Int_t A, Double_t Eres) override
Bool_t BelongsToIdentifiedParticle() const
void SetEntranceWindowMatrix(const TGeoHMatrix *)
Set ROOT geometry global matrix transformation to coordinate frame of entrance window.
TGeoBBox * GetActiveLayerShape() const
virtual void Reset(Option_t *opt="")
TVector3 GetActiveLayerVolumeCentre() const
const TVector3 GetCentreOfEntranceWindow() const
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
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.
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)
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
Bool_t AddCalibrator(KVCalibrator *cal, const KVNameValueList &opts="")
Double_t GetCosTheta() const override
void SetPresent(Bool_t yes=kTRUE)
Double_t GetTheta() const override
Simple wrapper for objects which can be drawn (graphs, histograms)
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 TGeoHMatrix * GetMatrix() const
virtual TVector3 GetSurfaceCentre() const
virtual TVector3 GetVolumeCentre() const
virtual Double_t GetPhi() const
virtual Double_t GetDistance(void) const
virtual Double_t GetSurfaceArea(int npoints=100000) const
virtual Double_t GetSinTheta() const
virtual TVector3 GetNormalIntoShape() const
virtual void SetMatrix(const TGeoHMatrix *)
Set the global transformation matrix for this volume.
virtual Double_t GetCosineMaximumMisalignmentAngle() const
virtual TGeoBBox * GetShape() const
virtual Double_t GetCosTheta() const
virtual Double_t GetMaximumMisalignmentAngle() const
virtual Bool_t ROOTGeo() 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 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
Extended TList class which does not own its objects by default.
virtual Int_t GetEntries() const
virtual Bool_t IsEmpty() const
const char * GetName() const override
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const