KaliVeda  1.12/06
Heavy-Ion Analysis Toolkit
List of all members | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Types | Private Member Functions | Private Attributes | Static Private Attributes | List of all members

Base class for detector geometry description, interface to energy-loss calculations.

A detector is composed of one or more absorber layers (KVMaterial objects) in which the energy loss of charged particles can be calculated. One of these layers is set as "active" (by default it is the last added layer) which means that only the energy loss in this layer can actually be "read", e.g. an ionisation chamber is composed of an "active" gas layer sandwiched between two "inactive" windows :

KVDetector chio("Myl", 2.5*KVUnits::um); //first layer - 2.5 micron mylar window
KVMaterial *gas = new KVMaterial("C3F8", 5.*KVUnits::cm, 50.0*KVUnits::mbar);
chio.AddAbsorber(gas); //second layer - 5cm of C3F8 gas at 50mbar pressure and 19 deg. C
chio.SetActiveLayer(gas); //make gas layer "active"
KVMaterial *win = new KVMaterial("Myl",2.5*KVUnits::um); //exit window
chio.AddAbsorber(win);
Base class for detector geometry description, interface to energy-loss calculations.
Definition: KVDetector.h:121
Description of physical materials used to construct detectors; interface to range tables.
Definition: KVMaterial.h:41
KVMaterial()
default ctor
Definition: KVMaterial.cpp:70
const long double um
Definition: KVUnits.h:68
const long double cm
Definition: KVUnits.h:66
const long double mbar
Definition: KVUnits.h:81

A detector is created either with the constructor taking the material type as argument:

KVDetector det("Si");

or using SetMaterial:

det.SetMaterial("Si");
virtual void SetMaterial(const Char_t *type)
Definition: KVDetector.cpp:206

or it is created when a ROOT geometry is imported into a KVMultiDetArray object using KVGeoImport.

Calculate the energy loss of a charged particle in a detector

Two methods are available: one simply calculates the energy lost by the particle in the detector, but does not modify either the particle or the detector (GetELostByParticle); the other simulates the passage of the particle through the detector, the particle's energy is reduced by the amount lost in the detector's absorbers and the total energy lost in the detector is increased, e.g.:

KVNucleus alpha(2,4); //an alpha-particle
alpha.SetEnergy(100); //with 100MeV kinetic energy
det.DetectParticle(&alpha); //simulate passage of particle in the detector/target
det.GetEnergy(); //energy lost by particle in detector/target
alpha.GetEnergy(); //residual energy of particle
det.Clear(); //reset detector ready for a new detection
virtual Double_t GetEnergy() const
Definition: KVDetector.h:308
virtual void Clear(Option_t *opt="")
Definition: KVDetector.cpp:713
virtual void DetectParticle(KVNucleus *, TVector3 *norm=0)
Definition: KVDetector.cpp:232
Description of properties and kinematics of atomic nuclei.
Definition: KVNucleus.h:125

Important note on detector positions, angles, solid angle, distances etc.

For detector geometries based on the ROOT geometry package, the following methods refer to the surface of the first volume constituting the detector crossed from the target (referred to as the "entrance window"):

double Double_t
void GetRandomAngles(Double_t &th, Double_t &ph, Option_t *t="isotropic")
Definition: KVDetector.h:672
Double_t GetSinTheta() const
Definition: KVDetector.h:696
Double_t GetSolidAngle() const
Definition: KVDetector.h:660
Double_t GetTheta() const
Definition: KVDetector.h:690
Double_t GetPhi() const
Definition: KVDetector.h:708
TVector3 GetDirection()
Definition: KVDetector.h:678
Double_t GetDistance() const
Definition: KVDetector.h:684
const TVector3 GetCentreOfEntranceWindow() const
Definition: KVDetector.h:653
TVector3 GetRandomDirection(Option_t *t="isotropic")
Definition: KVDetector.h:666
Double_t GetCosTheta() const
Definition: KVDetector.h:702
Examples
ExampleRawAnalysis.cpp.

Definition at line 121 of file KVDetector.h.

Public Member Functions

 KVDetector ()
 default ctor More...
 
 KVDetector (const Char_t *type, const Float_t thick=0.0)
 Create a new detector of a given material and thickness in centimetres (default value = 0.0) More...
 
 KVDetector (const KVDetector &)
 copy ctor More...
 
virtual ~ KVDetector ()
 
void AddAbsorber (KVMaterial *)
 
void AddACQParam (KVACQParam *)
 Add given acquisition parameter to this detector. More...
 
Bool_t AddCalibrator (KVCalibrator *cal, const KVNameValueList &opts="")
 
void AddDetectorSignal (KVDetectorSignal *ds)
 
Bool_t AddDetectorSignalExpression (const TString &type, const KVString &_expr)
 
void AddHit (KVNucleus *part)
 
virtual void AddIDTelescope (TObject *idt)
 Add ID telescope to list of telescopes to which detector belongs. More...
 
void AddParentStructure (KVGeoStrucElement *elem)
 
virtual void AddToGeometry ()
 
Bool_t BelongsToIdentifiedParticle () const
 
Bool_t BelongsToUnidentifiedParticle () const
 
virtual void Clear (Option_t *opt="")
 
void ClearHits ()
 
virtual void Copy (TObject &obj) const
 
virtual void DeduceACQParameters (KVEvent *, KVNumberList &)
 
virtual void DetectParticle (KVNucleus *, TVector3 *norm=0)
 
virtual TGraphDrawPunchThroughEnergyVsZ (Int_t massform=KVNucleus::kBetaMass)
 
virtual TGraphDrawPunchThroughEsurAVsZ (Int_t massform=KVNucleus::kBetaMass)
 
virtual Int_t FindZmin (Double_t ELOSS=-1., Char_t mass_formula=-1)
 
virtual Bool_t Fired (Option_t *opt="any") const
 
virtual Bool_t FiredP (Option_t *opt="any") const
 
KVMaterialGetAbsorber (const Char_t *name) const
 
KVMaterialGetAbsorber (Int_t i) const
 Returns pointer to the i-th absorber in the detector (i=0 first absorber, i=1 second, etc.) More...
 
virtual Float_t GetACQData (const Char_t *) const
 
virtual KVACQParamGetACQParam (const Char_t *) const
 
KVListGetACQParamList () const
 
KVMaterialGetActiveLayer () const
 
TGeoHMatrixGetActiveLayerMatrix () const
 
TGeoBBoxGetActiveLayerShape () const
 
TVector3 GetActiveLayerSurfaceCentre () const
 
TVector3 GetActiveLayerVolumeCentre () const
 
virtual TListGetAlignedDetectors (UInt_t direction=1)
 
KVListGetAlignedIDTelescopes ()
 
virtual const Char_tGetArrayName ()
 
virtual Short_t GetCalcACQParam (KVACQParam *, Double_t) const
 
virtual Double_t GetCalibratedEnergy () const
 
KVCalibratorGetCalibrator (const Char_t *name, const Char_t *type) const
 
KVCalibratorGetCalibrator (const Char_t *type) const
 
const TVector3 GetCentreOfEntranceWindow () const
 
virtual Double_t GetCorrectedEnergy (KVNucleus *, Double_t e=-1., Bool_t transmission=kTRUE)
 
Double_t GetCosTheta () const
 
virtual Double_t GetDeltaE (Int_t Z, Int_t A, Double_t Einc)
 
virtual Double_t GetDeltaEFromERes (Int_t Z, Int_t A, Double_t Eres)
 
virtual Double_t GetDepthInTelescope () const
 
virtual KVDetectorSignalGetDetectorSignal (const TString &type) const
 
Double_t GetDetectorSignalValue (const TString &type, const KVNameValueList &params="") const
 
TVector3 GetDirection ()
 
Double_t GetDistance () const
 
virtual Double_t GetEIncOfMaxDeltaE (Int_t Z, Int_t A)
 
virtual TF1GetELossFunction (Int_t Z, Int_t A)
 
virtual Double_t GetELostByParticle (KVNucleus *, TVector3 *norm=0)
 
virtual Double_t GetEnergy () const
 
virtual Double_t GetEnergyLoss () const
 
const KVPositionGetEntranceWindow () const
 
virtual Double_t GetEntranceWindowSurfaceArea ()
 Return surface area of first layer of detector in cm2. More...
 
virtual Double_t GetERes (Int_t Z, Int_t A, Double_t Einc)
 
virtual Double_t GetEResAfterDetector () const
 
virtual TF1GetEResFunction (Int_t Z, Int_t A)
 
virtual const Char_tGetFiredACQParameterListFormatString () const
 
Binary8_t GetFiredBitmask () const
 
Double_t GetGain () const
 
virtual TGeoVolumeGetGeoVolume ()
 
KVGroupGetGroup () const
 
UInt_t GetGroupNumber ()
 
KVListGetHits () const
 Return the list of particles hitting this detector in an event. More...
 
KVListGetIDTelescopes ()
 
virtual Double_t GetIncidentEnergy (Int_t Z, Int_t A, Double_t delta_e=-1.0, enum SolType type=kEmax)
 
virtual Double_t GetIncidentEnergyFromERes (Int_t Z, Int_t A, Double_t Eres)
 
virtual Int_t GetIndex () const
 
Double_t GetInverseDetectorSignalValue (const TString &output, Double_t value, const TString &input, const KVNameValueList &params="") const
 
virtual Double_t GetLinearRange (Int_t Z, Int_t A, Double_t Einc)
 
KVListGetListOfAbsorbers () const
 
KVListGetListOfCalibrators () const
 
const KVSeqCollectionGetListOfDetectorSignals () const
 
const Char_tGetMaterialName () const
 
virtual Double_t GetMaxDeltaE (Int_t Z, Int_t A)
 
const Char_tGetNameOfArray () const
 
Int_t GetNHits () const
 Return the number of particles hitting this detector in an event. More...
 
KVGeoDetectorNodeGetNode ()
 
Int_t GetNumberOfAbsorberLayers () const
 
KVGeoStrucElementGetParentStructure (const Char_t *type, const Char_t *name="") const
 
virtual Double_t GetParticleEIncFromERes (KVNucleus *, TVector3 *norm=0)
 
virtual Float_t GetPedestal (const Char_t *) const
 Access pedestal value associated to parameter with given name. More...
 
Double_t GetPhi () const
 
virtual Double_t GetPunchThroughEnergy (Int_t Z, Int_t A)
 
void GetRandomAngles (Double_t &th, Double_t &ph, Option_t *t="isotropic")
 
TVector3 GetRandomDirection (Option_t *t="isotropic")
 
virtual Double_t GetRange (Int_t Z, Int_t A, Double_t Einc)
 
virtual TF1GetRangeFunction (Int_t Z, Int_t A)
 
UShort_t GetSegment () const
 
Double_t GetSinTheta () const
 
virtual Double_t GetSmallestEmaxValid (Int_t Z, Int_t A)
 
Double_t GetSolidAngle () const
 
TListGetTelescopesForIdentification ()
 
Double_t GetTheta () const
 
virtual Double_t GetTotalDeltaE (Int_t Z, Int_t A, Double_t Einc)
 
Double_t GetTotalThicknessInCM ()
 
virtual void GetVerticesInOwnFrame (TVector3 *, Double_t, Double_t)
 
Bool_t HasDetectorSignalValue (const TString &type) const
 
Bool_t HasSameStructureAs (const KVDetector *) const
 
void IncrementIdentifiedParticles (Int_t n=1)
 
void IncrementUnidentifiedParticles (Int_t n=1)
 
void init ()
 default initialisations More...
 
Bool_t IsAnalysed ()
 
Bool_t IsCalibrated () const
 
Bool_t IsCalibrated (const KVNameValueList &params) const
 
virtual Bool_t IsDetecting () const
 
virtual Bool_t IsOK () const
 
virtual Bool_t IsPresent () const
 
virtual Bool_t IsSimMode () const
 
Bool_t IsSingleLayer () const
 
virtual void Print (Option_t *option="") const
 
virtual void ReadDefinitionFromFile (const Char_t *)
 
virtual void RemoveCalibrators ()
 
void RemoveHit (KVNucleus *part)
 
void RemoveParentStructure (KVGeoStrucElement *elem)
 
Bool_t ReplaceCalibrator (const Char_t *type, KVCalibrator *cal, const KVNameValueList &opts="")
 
virtual void Reset (Option_t *opt="")
 
void ResetAlignedDetectors (UInt_t direction=1)
 
virtual void SetACQParams ()
 
void SetActiveLayer (KVMaterial *actif)
 
void SetActiveLayerMatrix (const TGeoHMatrix *)
 
void SetActiveLayerShape (TGeoBBox *)
 Set ROOT geometry shape of active layer volume. More...
 
void SetAnalysed (Bool_t b=kTRUE)
 
void SetDetecting (Bool_t yes=kTRUE)
 
void SetDetectorSignalValue (const TString &type, Double_t val) const
 
virtual void SetEnergy (Double_t e) const
 
virtual void SetEnergyLoss (Double_t e) const
 
void SetEntranceWindowMatrix (const TGeoHMatrix *)
 Set ROOT geometry global matrix transformation to coordinate frame of entrance window. More...
 
void SetEntranceWindowShape (TGeoBBox *)
 Set ROOT geometry shape of entrance window. More...
 
virtual void SetEResAfterDetector (Double_t e)
 
virtual void SetFiredBitmask (KVString &)
 
void SetGain (Double_t gain)
 
virtual void SetMaterial (const Char_t *type)
 
void SetNameOfArray (const TString &n)
 
virtual void SetPedestal (const Char_t *, Float_t)
 Set value of pedestal associated to parameter with given name. More...
 
void SetPresent (Bool_t yes=kTRUE)
 
virtual void SetSegment (UShort_t s)
 
virtual void SetSimMode (Bool_t on=kTRUE)
 
void SetThickness (Double_t thick)
 
- Public Member Functions inherited from KVMaterial
 KVMaterial ()
 default ctor More...
 
 KVMaterial (const Char_t *gas, const Double_t thick, const Double_t pressure, const Double_t temperature=19.0)
 
 KVMaterial (const Char_t *type, const Double_t thick=0.0)
 Create material with given type and linear thickness in cm. More...
 
 KVMaterial (const KVMaterial &)
 Copy ctor. More...
 
 KVMaterial (Double_t area_density, const Char_t *type)
 Create material with given area density in g/cm**2 and given type. More...
 
virtual ~ KVMaterial ()
 
virtual TGeoVolumeGetAbsGeoVolume () const
 
Double_t GetAreaDensity () const
 Return area density of material in g/cm**2. More...
 
Double_t GetDensity () const
 
Double_t GetEffectiveAreaDensity (TVector3 &norm, TVector3 &direction)
 
Double_t GetEffectiveThickness (TVector3 &norm, TVector3 &direction)
 
virtual Double_t GetEmaxValid (Int_t Z, Int_t A)
 
virtual Double_t GetEResFromDeltaE (Int_t Z, Int_t A, Double_t dE=-1.0, enum SolType type=kEmax)
 
virtual TGeoMediumGetGeoMedium (const Char_t *="")
 
Double_t GetMass () const
 Returns atomic mass of material. Will be isotopic mass if set. More...
 
virtual Double_t GetPressure () const
 
virtual Double_t GetTemperature () const
 
virtual Double_t GetThickness () const
 
Double_t GetZ () const
 Returns atomic number of material. More...
 
void init ()
 
Bool_t IsGas () const
 Returns kTRUE for gaseous materials/detectors. More...
 
Bool_t IsIsotopic () const
 
Bool_t IsNat () const
 
virtual void SetAbsGeoVolume (TGeoVolume *v)
 
void SetAreaDensity (Double_t dens)
 
void SetMass (Double_t a)
 
virtual void SetPressure (Double_t)
 
virtual void SetTemperature (Double_t)
 
- Public Member Functions inherited from KVBase
 KVBase ()
 Default constructor. More...
 
 KVBase (const Char_t *name, const Char_t *title="")
 Ctor for object with given name and type. More...
 
 KVBase (const KVBase &)
 copy ctor More...
 
virtual ~ KVBase ()
 
const Char_tGetLabel () const
 
UInt_t GetNumber () const
 
UInt_t GetNumberOfObjects () const
 
virtual TObjectGetObject () const
 
const Char_tGetType () const
 
Bool_t HasLabel () const
 
virtual Bool_t IsCalled (const Char_t *name) const
 
Bool_t IsLabelled (const Char_t *l) const
 
virtual Bool_t IsType (const Char_t *typ) const
 
virtual void List ()
 
KVBaseoperator= (const KVBase &)
 copy assignment operator More...
 
Double_t ProtectedGetX (const TF1 *func, Double_t val, int &status, Double_t xmin=0.0, Double_t xmax=0.0) const
 
void SetLabel (const Char_t *lab)
 
virtual void SetNumber (UInt_t num)
 
virtual void SetType (const Char_t *str)
 
- Public Member Functions inherited from TNamed
 TNamed ()
 
 TNamed (const char *name, const char *title)
 
 TNamed (const TNamed &named)
 
 TNamed (const TString &name, const TString &title)
 
virtual ~TNamed ()
 
virtual TObjectClone (const char *newname="") const
 
virtual Int_t Compare (const TObject *obj) const
 
virtual void FillBuffer (char *&buffer)
 
virtual const char * GetName () const
 
virtual const char * GetTitle () const
 
virtual ULong_t Hash () const
 
virtual Bool_t IsSortable () const
 
virtual void ls (Option_t *option="") const
 
TNamedoperator= (const TNamed &rhs)
 
virtual void SetName (const char *name)
 
virtual void SetNameTitle (const char *name, const char *title)
 
virtual void SetTitle (const char *title="")
 
virtual Int_t Sizeof () const
 
- Public Member Functions inherited from TObject
 TObject ()
 
 TObject (const TObject &object)
 
virtual ~TObject ()
 
void AbstractMethod (const char *method) const
 
virtual void AppendPad (Option_t *option="")
 
virtual void Browse (TBrowser *b)
 
ULong_t CheckedHash ()
 
virtual const char * ClassName () const
 
virtual void Delete (Option_t *option="")
 
virtual Int_t DistancetoPrimitive (Int_t px, Int_t py)
 
virtual void Draw (Option_t *option="")
 
virtual void DrawClass () const
 
virtual TObjectDrawClone (Option_t *option="") const
 
virtual void Dump () const
 
virtual void Error (const char *method, const char *msgfmt,...) const
 
virtual void Execute (const char *method, const char *params, Int_t *error=0)
 
virtual void Execute (TMethod *method, TObjArray *params, Int_t *error=0)
 
virtual void ExecuteEvent (Int_t event, Int_t px, Int_t py)
 
virtual void Fatal (const char *method, const char *msgfmt,...) const
 
virtual TObjectFindObject (const char *name) const
 
virtual TObjectFindObject (const TObject *obj) const
 
virtual Option_tGetDrawOption () const
 
virtual const char * GetIconName () const
 
virtual char * GetObjectInfo (Int_t px, Int_t py) const
 
virtual Option_tGetOption () const
 
virtual UInt_t GetUniqueID () const
 
virtual Bool_t HandleTimer (TTimer *timer)
 
Bool_t HasInconsistentHash () const
 
virtual void Info (const char *method, const char *msgfmt,...) const
 
virtual Bool_t InheritsFrom (const char *classname) const
 
virtual Bool_t InheritsFrom (const TClass *cl) const
 
virtual void Inspect () const
 
void InvertBit (UInt_t f)
 
virtual Bool_t IsEqual (const TObject *obj) const
 
virtual Bool_t IsFolder () const
 
R__ALWAYS_INLINE Bool_t IsOnHeap () const
 
R__ALWAYS_INLINE Bool_t IsZombie () const
 
void MayNotUse (const char *method) const
 
virtual Bool_t Notify ()
 
void Obsolete (const char *method, const char *asOfVers, const char *removedFromVers) const
 
void operator delete (void *ptr)
 
void operator delete[] (void *ptr)
 
voidoperator new (size_t sz)
 
voidoperator new (size_t sz, void *vp)
 
voidoperator new[] (size_t sz)
 
voidoperator new[] (size_t sz, void *vp)
 
TObjectoperator= (const TObject &rhs)
 
virtual void Paint (Option_t *option="")
 
virtual void Pop ()
 
virtual Int_t Read (const char *name)
 
virtual void RecursiveRemove (TObject *obj)
 
void ResetBit (UInt_t f)
 
virtual void SaveAs (const char *filename="", Option_t *option="") const
 
virtual void SavePrimitive (std::ostream &out, Option_t *option="")
 
void SetBit (UInt_t f)
 
void SetBit (UInt_t f, Bool_t set)
 
virtual void SetDrawOption (Option_t *option="")
 
virtual void SetUniqueID (UInt_t uid)
 
virtual void SysError (const char *method, const char *msgfmt,...) const
 
R__ALWAYS_INLINE Bool_t TestBit (UInt_t f) const
 
Int_t TestBits (UInt_t f) const
 
virtual void UseCurrentStyle ()
 
virtual void Warning (const char *method, const char *msgfmt,...) const
 
virtual Int_t Write (const char *name=0, Int_t option=0, Int_t bufsize=0)
 
virtual Int_t Write (const char *name=0, Int_t option=0, Int_t bufsize=0) const
 
- Public Member Functions inherited from KVPosition
 KVPosition ()
 
 KVPosition (Double_t thmin, Double_t thmax, Double_t phmin, Double_t phmax, Double_t dist=0.0)
 
virtual ~KVPosition ()
 
Double_t GetAzimuthalWidth (Double_t phmin=-1., Double_t phimax=-1.) const
 
void GetCornerCoordinates (TVector3 *, Double_t=0)
 
void GetCornerCoordinatesInOwnFrame (TVector3 *, Double_t=0)
 
Double_t GetPhiMax () const
 
Double_t GetPhiMin () const
 
TRotation GetRandomIsotropicRotation ()
 
Double_t GetThetaMax () const
 
Double_t GetThetaMin () const
 
void GetWidthsFromDimension (Double_t lin_dim)
 
void init ()
 default initialiser More...
 
Bool_t IsAlignedWith (KVPosition *pos)
 kTRUE if one of the two solid angle elements is completely contained within the other. More...
 
Bool_t IsAzimuthallyWiderThan (KVPosition *pos)
 
Bool_t IsInPhiRange (const Double_t phi)
 
Bool_t IsInPolarRange (const Double_t theta)
 kTRUE if given angle theta is within the polar range of this solid angle element More...
 
Bool_t IsOverlappingWith (KVPosition *pos)
 kTRUE if there is at least partial overlap between two solid angle elements More...
 
Bool_t IsSmallerThan (KVPosition *pos)
 kTRUE if "this" is entirely contained within "pos" More...
 
Bool_t ROOTGeo () const
 Returns kTRUE if ROOT geometry is used, kFALSE if not. More...
 
virtual void SetAzimuthalAngle (Double_t ph)
 
virtual void SetAzimuthalMinMax (Double_t min, Double_t max)
 Set min and max azimuthal angles and calculate (mean) phi. More...
 
virtual void SetAzimuthalWidth (Double_t aw)
 
void SetDistance (Double_t d)
 
void SetPhi (Double_t p)
 
void SetPhiMinMax (Double_t min, Double_t max)
 
virtual void SetPolarAngle (Double_t th)
 
virtual void SetPolarMinMax (Double_t min, Double_t max)
 Set min and max polar angles and calculate (mean) theta. More...
 
virtual void SetPolarWidth (Double_t pw)
 
void SetTheta (Double_t t)
 

Static Public Member Functions

static KVDetectorMakeDetector (const Char_t *name, Float_t thick)
 
- Static Public Member Functions inherited from KVMaterial
static KVIonRangeTableChangeRangeTable (const Char_t *name)
 
static KVIonRangeTableGetRangeTable ()
 
- Static Public Member Functions inherited from KVBase
static Bool_t AreEqual (Double_t x, Double_t y, Long64_t maxdif=1)
 Comparison between two 64-bit floating-point values. More...
 
static void BackupFileWithDate (const Char_t *path)
 
static void CombineFiles (const Char_t *file1, const Char_t *file2, const Char_t *newfilename, Bool_t keep=kTRUE)
 
static void Deprecated (const char *method, const char *advice)
 
static Bool_t FindClassSourceFiles (const Char_t *class_name, KVString &imp_file, KVString &dec_file, const Char_t *dir_name=".")
 
static Bool_t FindExecutable (TString &exec, const Char_t *path="$(PATH)")
 
static const Char_tFindFile (const Char_t *search, TString &wfil)
 
static const Char_tGetBINDIRFilePath (const Char_t *namefile="")
 
static const Char_tGetDATABASEFilePath ()
 
static const Char_tGetDATADIRFilePath (const Char_t *namefile="")
 
static Bool_t GetDataSetEnv (const Char_t *dataset, const Char_t *type, Bool_t defval)
 
static const Char_tGetDataSetEnv (const Char_t *dataset, const Char_t *type, const Char_t *defval)
 
static Double_t GetDataSetEnv (const Char_t *dataset, const Char_t *type, Double_t defval)
 
static const Char_tGetETCDIRFilePath (const Char_t *namefile="")
 
static const Char_tGetExampleFilePath (const Char_t *library, const Char_t *namefile)
 Return full path to example file for given library (="KVMultiDet", "BackTrack", etc.) More...
 
static const Char_tGetINCDIRFilePath (const Char_t *namefile="")
 
static const Char_tGetKVBuildDate ()
 Returns KaliVeda build date. More...
 
static const Char_tGetKVBuildDir ()
 Returns top-level directory used for build. More...
 
static const Char_tGetKVBuildTime ()
 Returns KaliVeda build date. More...
 
static const Char_tGetKVBuildType ()
 Returns KaliVeda build type (cmake build: Release, Debug, RelWithDebInfo, ...) More...
 
static const Char_tGetKVBuildUser ()
 Returns username of person who performed build. More...
 
static const Char_tGetKVSourceDir ()
 Returns top-level directory of source tree used for build. More...
 
static const Char_tGetKVVersion ()
 Returns KaliVeda version string. More...
 
static const Char_tGetLIBDIRFilePath (const Char_t *namefile="")
 
static const Char_tGetListOfPlugins (const Char_t *base)
 
static const Char_tGetListOfPluginURIs (const Char_t *base)
 
static const Char_tGetPluginURI (const Char_t *base, const Char_t *plugin)
 
static void GetTempFileName (TString &base)
 
static const Char_tGetTEMPLATEDIRFilePath (const Char_t *namefile="")
 
static const Char_tGetWORKDIRFilePath (const Char_t *namefile="")
 
static const Char_tgitBranch ()
 Returns git branch of sources. More...
 
static const Char_tgitCommit ()
 Returns last git commit of sources. More...
 
static void InitEnvironment ()
 
static bool is_gnuinstall ()
 
static Bool_t IsThisAPlugin (const TString &uri, TString &base)
 
static TPluginHandlerLoadPlugin (const Char_t *base, const Char_t *uri="0")
 
static Bool_t OpenContextMenu (const char *method, TObject *obj, const char *alt_method_name="")
 
static void OpenTempFile (TString &base, std::ofstream &fp)
 
static void PrintSplashScreen ()
 Prints welcome message and infos on version etc. More...
 
static Bool_t SearchAndOpenKVFile (const Char_t *name, std::ifstream &file, const Char_t *kvsubdir="", KVLockfile *locks=0)
 
static Bool_t SearchAndOpenKVFile (const Char_t *name, std::ofstream &file, const Char_t *kvsubdir="", KVLockfile *locks=0)
 
static Bool_t SearchKVFile (const Char_t *name, TString &fullpath, const Char_t *kvsubdir="")
 
static const Char_tWorkingDirectory ()
 
- Static Public Member Functions inherited from TObject
static Longptr_t GetDtorOnly ()
 
static Bool_t GetObjectStat ()
 
static void SetDtorOnly (void *obj)
 
static void SetObjectStat (Bool_t stat)
 

Protected Member Functions

Double_t ELossActive (Double_t *x, Double_t *par)
 
Double_t EResDet (Double_t *x, Double_t *par)
 
Double_t RangeDet (Double_t *x, Double_t *par)
 
void SetKVDetectorFiredACQParameterListFormatString ()
 
- Protected Member Functions inherited from TObject
virtual void DoError (int level, const char *location, const char *fmt, va_list va) const
 
void MakeZombie ()
 

Protected Attributes

KVListfAbsorbers
 list of absorbers making up the detector More...
 
KVListfACQParams
 list of raw data parameters read from coders More...
 
TListfAlignedDetectors [2]
 stores lists of aligned detectors in both directions More...
 
KVListfCalibrators
 list of associated calibrator objects More...
 
Int_t fCalWarning
 just a counter so that missing calibrator warning is given only once More...
 
Double_t fDepthInTelescope
 used to store depth of detector in parent telescope More...
 
Bool_t fDetecting
 =kTRUE if detector is "detecting", =kFALSE if not More...
 
TF1fELossF
 parametric function dE in active layer vs. incident energy More...
 
TF1fEResF
 parametric function Eres residual energy after all layers of detector More...
 
Double_t fEResforEinc
 used by GetIncidentEnergy & GetCorrectedEnergy More...
 
Binary8_t fFiredMask
 bitmask used by Fired to determine which parameters to take into account More...
 
TString fFName
 dynamically generated full name of detector More...
 
Double_t fGain
 gain of amplifier More...
 
KVListfParticles
 list of particles hitting detector in an event More...
 
Bool_t fPresent
 =kTRUE if detector is present, =kFALSE if it has been removed More...
 
TF1fRangeF
 parametric function range of particles in detector More...
 
UShort_t fSegment
 used in particle reconstruction More...
 
Bool_t fSimMode
 =kTRUE when using to simulate detector response, =kFALSE when analysing data More...
 
Bool_t fSingleLayer
 =kTRUE if detector has a single absorber layer More...
 
Double_t fTotThickness
 used to store value calculated by GetTotalThicknessInCM More...
 
- Protected Attributes inherited from KVMaterial
TGeoVolumefAbsorberVolume
 pointer to corresponding volume in ROOT geometry More...
 
- Protected Attributes inherited from KVBase
TString fLabel
 label for the object More...
 
- Protected Attributes inherited from TNamed
TString fName
 
TString fTitle
 
- Protected Attributes inherited from TObject
 kOnlyPrepStep
 

Private Types

enum  { kIsAnalysed = BIT(14) , kActiveSet = BIT(15) , kUnidentifiedParticle = BIT(16) , kIdentifiedParticle = BIT(17) }
 

Private Member Functions

TGeoHMatrixGetMatrix () const
 
Double_t GetMisalignmentAngle () const
 
TVector3 GetRandomPointOnSurface () const
 
TGeoBBoxGetShape () const
 
Double_t GetSurfaceArea (int npoints=100000) const
 
TVector3 GetSurfaceCentre () const
 
TVector3 GetSurfaceNormal () const
 
TVector3 GetVolumeCentre () const
 
void remove_signal_for_calibrator (KVCalibrator *K)
 
void SetMatrix (const TGeoHMatrix *m)
 
void SetShape (TGeoBBox *s)
 

Private Attributes

KVMaterialfActiveLayer
 The active absorber in the detector. More...
 
KVUniqueNameList fDetSignals
 list of signals associated with detector More...
 
KVPosition fEWPosition
 position of entrance window i.e. first volume in detector geometry More...
 
Int_t fIdentP
 temporary counters, determine state of identified/unidentified particle flags More...
 
KVListfIDTelAlign
 list of ID telescopes made of this detector and all aligned detectors placed in front of it More...
 
TListfIDTele4Ident
 list of ID telescopes used for particle ID More...
 
KVListfIDTelescopes
 list of ID telescopes to which detector belongs More...
 
TString fKVDetectorFiredACQParameterListFormatString
 
TString fNameOfArray
 name of multidetector array this detector is part of More...
 
KVGeoDetectorNode fNode
 positioning information relative to other detectors More...
 
KVUniqueNameList fParentStrucList
 list of geometry structures which directly contain this detector More...
 
Int_t fUnidentP
 temporary counters, determine state of identified/unidentified particle flags More...
 

Static Private Attributes

static Int_t fDetCounter = 0
 

Additional Inherited Members

- Public Types inherited from KVMaterial
enum  SolType { kEmax , kEmin }
 
- Public Types inherited from KVBase
enum  EKaliVedaBits { kIsKaliVedaObject = BIT(23) }
 
- Public Types inherited from TObject
enum  EDeprecatedStatusBits
 
enum  EStatusBits
 
- Public Attributes inherited from TObject
 kBitMask
 
 kCanDelete
 
 kCannotPick
 
 kHasUUID
 
 kInconsistent
 
 kInvalidObject
 
 kIsOnHeap
 
 kIsReferenced
 
 kMustCleanup
 
 kNoContextMenu
 
 kNotDeleted
 
 kObjInCanvas
 
 kOverwrite
 
 kSingleKey
 
 kWriteDelete
 
 kZombie
 
- Static Protected Attributes inherited from KVMaterial
static KVIonRangeTablefIonRangeTable = 0x0
 pointer to class used to calculate charged particle ranges & energy losses More...
 

#include <KVDetector.h>

Inheritance diagram for KVDetector:
Inheritance graph
[legend]

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
private
Enumerator
kIsAnalysed 
kActiveSet 
kUnidentifiedParticle 
kIdentifiedParticle 

Definition at line 134 of file KVDetector.h.

Constructor & Destructor Documentation

◆ KVDetector() [1/3]

KVDetector::KVDetector ( )

default ctor

Definition at line 104 of file KVDetector.cpp.

◆ KVDetector() [2/3]

KVDetector::KVDetector ( const Char_t type,
const Float_t  thick = 0.0 
)

Create a new detector of a given material and thickness in centimetres (default value = 0.0)

Definition at line 117 of file KVDetector.cpp.

◆ KVDetector() [3/3]

KVDetector::KVDetector ( const KVDetector obj)

copy ctor

Definition at line 134 of file KVDetector.cpp.

◆ ~ KVDetector()

virtual KVDetector::~ KVDetector ( )
virtual

Member Function Documentation

◆ AddAbsorber()

void KVDetector::AddAbsorber ( KVMaterial mat)

Add a layer of absorber material to the detector By default, the first layer added is set as the "Active" layer. Call SetActiveLayer to change this.

Definition at line 753 of file KVDetector.cpp.

◆ AddACQParam()

void KVDetector::AddACQParam ( KVACQParam par)

Add given acquisition parameter to this detector.

Definition at line 627 of file KVDetector.cpp.

◆ AddCalibrator()

Bool_t KVDetector::AddCalibrator ( KVCalibrator cal,
const KVNameValueList opts = "" 
)

Associate a calibration with this detector (the object will be deleted by the detector)

This will add a new signal to the list of the detector's signals

Also sets calibrator's name to [detname]_[caltype]

If the input signal required by the calibrator is not defined for the detector, this method returns kFALSE and the calibrator will be deleted.

The (optional) KVNameValueList argument can be used to pass any extra parameters/options. For example, if it contains a parameter ZRange:

ZRange=1-10

then the calibrator will be handled by a KVZDependentCalibratedSignal (handles several calibrators which provide the same output signal, each one is used for a specific range of atomic numbers)

Definition at line 510 of file KVDetector.cpp.

◆ AddDetectorSignal()

void KVDetector::AddDetectorSignal ( KVDetectorSignal ds)
inline

Add KVDetectorSignal object to list of detector's signals. Object ownership is taken over by the detector, i.e. will be deleted by the detector

Definition at line 736 of file KVDetector.h.

◆ AddDetectorSignalExpression()

Bool_t KVDetector::AddDetectorSignalExpression ( const TString type,
const KVString _expr 
)

Add a new KVDetectorSignalExpression to this detector:

'type' will be the name of the new signal.

'_expr' is a mathematical expression using any of the known signals of the detector.

If the expression is not valid, no signal will be created and method returns kFALSE.

Definition at line 2380 of file KVDetector.cpp.

◆ AddHit()

void KVDetector::AddHit ( KVNucleus part)
inline

Add to the list of particles hitting this detector in an event

Definition at line 374 of file KVDetector.h.

◆ AddIDTelescope()

void KVDetector::AddIDTelescope ( TObject idt)
virtual

Add ID telescope to list of telescopes to which detector belongs.

Definition at line 861 of file KVDetector.cpp.

◆ AddParentStructure()

void KVDetector::AddParentStructure ( KVGeoStrucElement elem)

Definition at line 2195 of file KVDetector.cpp.

◆ AddToGeometry()

void KVDetector::AddToGeometry ( )
virtual

Construct and position a TGeoVolume shape to represent this detector in the current geometry managed by gGeoManager.

Adding the detector to the geometry requires:

  • to construct a 'mother' volume (TGeoArb8) defined by the (theta-min/max, phi-min/max) and the total thickness of the detector (all layers)
  • to construct and position volumes (TGeoArb8) for each layer of the detector inside the 'mother' volume
  • to position 'mother' inside the top-level geometry

gGeoManager must point to current instance of geometry manager.

Definition at line 1442 of file KVDetector.cpp.

◆ BelongsToIdentifiedParticle()

Bool_t KVDetector::BelongsToIdentifiedParticle ( ) const
inline

Definition at line 502 of file KVDetector.h.

◆ BelongsToUnidentifiedParticle()

Bool_t KVDetector::BelongsToUnidentifiedParticle ( ) const
inline

Definition at line 498 of file KVDetector.h.

◆ Clear()

void KVDetector::Clear ( Option_t opt = "")
virtual

Set energy loss(es) etc. to zero If opt="N" we do not reset acquisition parameters/raw detector signals

Reimplemented from KVMaterial.

Reimplemented in KVFAZIADetector.

Definition at line 713 of file KVDetector.cpp.

◆ ClearHits()

void KVDetector::ClearHits ( )
inline

clear the list of particles hitting this detector in an event

Definition at line 399 of file KVDetector.h.

◆ Copy()

void KVDetector::Copy ( TObject obj) const
virtual

copy 'this' to 'obj' The structure of the detector is copied, with new cloned objects for each absorber layer. The active layer is set in the new detector.

Reimplemented from KVMaterial.

Reimplemented in KVFAZIADetector.

Definition at line 155 of file KVDetector.cpp.

◆ DeduceACQParameters()

virtual void KVDetector::DeduceACQParameters ( KVEvent ,
KVNumberList  
)
inlinevirtual

Reimplemented in KVSilicon, KVCsI, and KVChIo.

Definition at line 634 of file KVDetector.h.

◆ DetectParticle()

void KVDetector::DetectParticle ( KVNucleus kvp,
TVector3 norm = 0 
)
virtual

Calculate the energy loss of a charged particle traversing the detector, the particle is slowed down, it is added to the list of all particles hitting the detector. The apparent energy loss of the particle in the active layer of the detector is set. Do nothing if particle has zero (or -ve) energy.

If the optional argument 'norm' is given, it is supposed to be a vector normal to the detector, oriented from the origin towards the detector. In this case the effective thicknesses of the detector's absorbers 'seen' by the particle depending on its direction of motion is used for the calculation.

Reimplemented from KVMaterial.

Definition at line 232 of file KVDetector.cpp.

◆ DrawPunchThroughEnergyVsZ()

TGraph * KVDetector::DrawPunchThroughEnergyVsZ ( Int_t  massform = KVNucleus::kBetaMass)
virtual

Creates and fills a TGraph with the punch through energy in MeV vs. Z for the given detector, for Z=1-92. The mass of each nucleus is calculated according to the given mass formula (see KVNucleus).

Definition at line 2129 of file KVDetector.cpp.

◆ DrawPunchThroughEsurAVsZ()

TGraph * KVDetector::DrawPunchThroughEsurAVsZ ( Int_t  massform = KVNucleus::kBetaMass)
virtual

Creates and fills a TGraph with the punch through energy in MeV/nucleon vs. Z for the given detector, for Z=1-92. The mass of each nucleus is calculated according to the given mass formula (see KVNucleus).

Definition at line 2154 of file KVDetector.cpp.

◆ ELossActive()

Double_t KVDetector::ELossActive ( Double_t x,
Double_t par 
)
protected

Calculates energy loss (in MeV) in active layer of detector, taking into account preceding layers

Arguments are: x[0] is incident energy in MeV Parameters are: par[0] Z of ion par[1] A of ion

Definition at line 1119 of file KVDetector.cpp.

◆ EResDet()

Double_t KVDetector::EResDet ( Double_t x,
Double_t par 
)
protected

Calculates residual energy (in MeV) of particle after traversing all layers of detector. Returned value is -1000 if particle stops in one of the layers of the detector.

Arguments are: x[0] is incident energy in MeV Parameters are: par[0] Z of ion par[1] A of ion

Definition at line 1213 of file KVDetector.cpp.

◆ FindZmin()

Int_t KVDetector::FindZmin ( Double_t  ELOSS = -1.,
Char_t  mass_formula = -1 
)
virtual

For particles which stop in the first stage of an identification telescope, we can at least estimate a minimum Z value based on the energy lost in this detector.

This is based on the KVMaterial::GetMaxDeltaE method, giving the maximum energy loss in the active layer of the detector for a given nucleus (A,Z).

The "Zmin" is the Z of the particle which gives a maximum energy loss just greater than that measured in the detector. Particles with Z<Zmin could not lose as much energy and so are excluded.

If ELOSS is not given, we use the current value of GetEnergy() Use 'mass_formula' to change the formula used to calculate the A of the nucleus from its Z. Default is valley of stability value. (see KVNucleus::GetAFromZ).

If the value of ELOSS or GetEnergy() is <=0 we return Zmin=0

Definition at line 1045 of file KVDetector.cpp.

◆ Fired()

Bool_t KVDetector::Fired ( Option_t opt = "any") const
inlinevirtual

Returns kTRUE if detector was hit (fired) in an event

The actual meaning of hit/fired depends on the context and the option string opt.

If the detector is in "simulation mode", i.e. if SetSimMode(kTRUE) has been called, this method returns kTRUE if the calculated energy loss in the active layer is > 0.

In "experimental mode" (i.e. IsSimMode() returns kFALSE), depending on the option:

opt="any" (default): Returns true if ANY* of the working acquisition parameters associated with the detector were fired in an event opt="all" : Returns true if ALL* of the working acquisition parameters associated with the detector were fired in an event opt="Pany" : Returns true if ANY* of the working acquisition parameters associated with the detector were fired in an event and have a value greater than their pedestal value opt="Pall" : Returns true if ALL* of the working acquisition parameters associated with the detector were fired in an event and have a value greater than their pedestal value

*the actual parameters taken into account can be fine tuned using environment variables such as [classname].Fired.ACQParameterList.[type]: PG,GG,T where [classname]=KVDetector by default, or the name of some class derived from KVDetector which calls the method KVDetector::SetKVDetectorFiredACQParameterListFormatString() in its constructor. See KVDetector::SetFiredBitmask() for more details.

"all" considered parameters fired if ok == mask "any" considered parameters fired if ok != 0

Reimplemented in KVFAZIADetector.

Examples
ExampleRawAnalysis.cpp.

Definition at line 796 of file KVDetector.h.

◆ FiredP()

Bool_t KVDetector::FiredP ( Option_t opt = "any") const
inlinevirtual

opt="any" : Returns true if ANY* of the working acquisition parameters associated with the detector were fired in an event and have a value greater than their pedestal value opt="all" : Returns true if ALL* of the working acquisition parameters associated with the detector were fired in an event and have a value greater than their pedestal value

*the actual parameters taken into account can be fine tuned using environment variables such as [classname].Fired.ACQParameterList.[type]: PG,GG,T where [classname]=KVDetector by default, or the name of some class derived from KVDetector which calls the method KVDetector::SetKVDetectorFiredACQParameterListFormatString() in its constructor. See KVDetector::SetFiredBitmask() for more details.

"all" considered parameters fired if ok == mask "any" considered parameters fired if ok != 0

Definition at line 847 of file KVDetector.h.

◆ GetAbsorber() [1/2]

KVMaterial* KVDetector::GetAbsorber ( const Char_t name) const
inline

Return absorber with given name

Definition at line 255 of file KVDetector.h.

◆ GetAbsorber() [2/2]

KVMaterial * KVDetector::GetAbsorber ( Int_t  i) const

Returns pointer to the i-th absorber in the detector (i=0 first absorber, i=1 second, etc.)

Definition at line 769 of file KVDetector.cpp.

◆ GetACQData()

Float_t KVDetector::GetACQData ( const Char_t name) const
virtual

Access acquisition data value associated to parameter with given name. Returns value as a floating-point number which is the raw channel number read from the coder plus a random number in the range [-0.5,+0.5]. If the detector has no DAQ parameter of the given type, or if the raw channel number = 0, the value returned is -1.

Definition at line 666 of file KVDetector.cpp.

◆ GetACQParam()

KVACQParam * KVDetector::GetACQParam ( const Char_t name) const
virtual

Look for acquisition parameter with given name in list of parameters associated with this detector.

Reimplemented in KVINDRADetector.

Definition at line 646 of file KVDetector.cpp.

◆ GetACQParamList()

KVList* KVDetector::GetACQParamList ( ) const
inline

Definition at line 342 of file KVDetector.h.

◆ GetActiveLayer()

KVMaterial* KVDetector::GetActiveLayer ( ) const
inlinevirtual

Get pointer to the "active" layer in the detector, i.e. the one in which energy losses are measured

Reimplemented from KVMaterial.

Definition at line 249 of file KVDetector.h.

◆ GetActiveLayerMatrix()

TGeoHMatrix* KVDetector::GetActiveLayerMatrix ( ) const
inline

Return coordinate transformation matrix to active layer

Definition at line 529 of file KVDetector.h.

◆ GetActiveLayerShape()

TGeoBBox* KVDetector::GetActiveLayerShape ( ) const
inline

Return geometry of active layer

Definition at line 524 of file KVDetector.h.

◆ GetActiveLayerSurfaceCentre()

TVector3 KVDetector::GetActiveLayerSurfaceCentre ( ) const
inline

Return centre of entrance surface of active layer [this is NOT necessarily the same as the entrance window]

Definition at line 513 of file KVDetector.h.

◆ GetActiveLayerVolumeCentre()

TVector3 KVDetector::GetActiveLayerVolumeCentre ( ) const
inline

Return centre of the active layer volume

Definition at line 519 of file KVDetector.h.

◆ GetAlignedDetectors()

TList * KVDetector::GetAlignedDetectors ( UInt_t  direction = 1)
virtual

Returns list of detectors (including this one) which are in geometrical aligment with respect to the target position (assuming this detector is part of a multidetector array described by KVMultiDetArray).

By default the list is in the order starting from this detector and going towards the target (direction=KVGroup::kBackwards). Call with argument direction=KVGroup::kForwards to have the list of detectors in the order "seen" by a particle flying out from the target and arriving in this detector.

If this detector is not part of a KVMultiDetArray (i.e. we have no information on its geometrical relation to other detectors), we return 0x0.

The list pointers are stored in member variable fAlignedDetectors[] for rapid retrieval, the lists will be deleted with this detector.

See KVGroup::GetAlignedDetectors for more details.

Definition at line 2038 of file KVDetector.cpp.

◆ GetAlignedIDTelescopes()

KVList * KVDetector::GetAlignedIDTelescopes ( )

Return list of all ID telescopes containing detectors placed in front of this one. temporary kludge during transition to trajectory-based reconstruction ROOT-geometry-based detectors will not have fIDTelAlign filled

Definition at line 875 of file KVDetector.cpp.

◆ GetArrayName()

const Char_t * KVDetector::GetArrayName ( )
virtual

This method is called by KVASMultiDetArray::MakeListOfDetectors after the array geometry has been defined (i.e. all detectors have been placed in the array). The string returned by this method is used to set the name of the detector.

Override this method in child classes in order to define a naming convention for specific detectors of the array.

By default we return the same name as KVDetector::GetName

Reimplemented in KVSiLi, KVSi75, KVPhoswich, and KVINDRADetector.

Definition at line 471 of file KVDetector.cpp.

◆ GetCalcACQParam()

virtual Short_t KVDetector::GetCalcACQParam ( KVACQParam ,
Double_t   
) const
inlinevirtual

Calculates & returns value of given acquisition parameter corresponding to given calculated energy loss in the detector Returns -1 if detector is not calibrated

This method should be redefined in child classes i.e. for specific detector implementations: this version just returns -1.

Reimplemented in KVSilicon, and KVChIo.

Definition at line 544 of file KVDetector.h.

◆ GetCalibratedEnergy()

virtual Double_t KVDetector::GetCalibratedEnergy ( ) const
inlinevirtual

Returns energy loss in detector calculated using available calibration(s)

Definition at line 303 of file KVDetector.h.

◆ GetCalibrator() [1/2]

KVCalibrator * KVDetector::GetCalibrator ( const Char_t name,
const Char_t type 
) const
inline

Definition at line 757 of file KVDetector.h.

◆ GetCalibrator() [2/2]

KVCalibrator * KVDetector::GetCalibrator ( const Char_t type) const
inline

Definition at line 765 of file KVDetector.h.

◆ GetCentreOfEntranceWindow()

const TVector3 KVDetector::GetCentreOfEntranceWindow ( ) const
inline

This method does exactly the same as the method in previous versions of KaliVeda: it returns the vector position of the centre of the surface (entrance) of the "entrance window" of the detector i.e. the first volume encountered

Definition at line 653 of file KVDetector.h.

◆ GetCorrectedEnergy()

Double_t KVDetector::GetCorrectedEnergy ( KVNucleus nuc,
Double_t  e = -1.,
Bool_t  transmission = kTRUE 
)
virtual

Returns the total energy loss in the detector for a given nucleus including inactive absorber layers. e = energy loss in active layer (if not given, we use current value) transmission = kTRUE (default): the particle is assumed to emerge with a non-zero residual energy Eres after the detector. = kFALSE: the particle is assumed to stop in the detector.

WARNING: if transmission=kTRUE, and if the residual energy after the detector is known (i.e. measured in a detector placed after this one), you should first call SetEResAfterDetector(Eres); before calling this method. Otherwise, especially for heavy ions, the correction may be false for particles which are just above the punch-through energy.

WARNING 2: if measured energy loss in detector active layer is greater than maximum possible theoretical value for given nucleus' Z & A, this may be because the A was not measured but calculated from Z and hence could be false, or perhaps there was an (undetected) pile-up of two or more particles in the detector. In this case we return the uncorrected energy measured in the active layer and we add the following parameters to the particle (in nuc->GetParameters()):

GetCorrectedEnergy.Warning = 1 GetCorrectedEnergy.Detector = [name] GetCorrectedEnergy.MeasuredDE = [value] GetCorrectedEnergy.MaxDE = [value] GetCorrectedEnergy.Transmission = 0 or 1 GetCorrectedEnergy.ERES = [value]

Reimplemented in KVCsI.

Definition at line 949 of file KVDetector.cpp.

◆ GetCosTheta()

Double_t KVDetector::GetCosTheta ( ) const
inlinevirtual

cosinus of polar angle corresponding to centre of entrance window of detector

Reimplemented from KVPosition.

Definition at line 702 of file KVDetector.h.

◆ GetDeltaE()

Double_t KVDetector::GetDeltaE ( Int_t  Z,
Int_t  A,
Double_t  Einc 
)
virtual

Overrides KVMaterial::GetDeltaE Returns energy loss of given nucleus in the active layer of the detector. optimization for single-layer detectors

Reimplemented from KVMaterial.

Reimplemented in KVSilicon.

Definition at line 1733 of file KVDetector.cpp.

◆ GetDeltaEFromERes()

Double_t KVDetector::GetDeltaEFromERes ( Int_t  Z,
Int_t  A,
Double_t  Eres 
)
virtual

Overrides KVMaterial::GetDeltaEFromERes

Calculate energy loss in active layer of detGetAlignedDetector for nucleus (Z,A) having a residual kinetic energy Eres (MeV)

Reimplemented from KVMaterial.

Definition at line 1877 of file KVDetector.cpp.

◆ GetDepthInTelescope()

virtual Double_t KVDetector::GetDepthInTelescope ( ) const
inlinevirtual

Definition at line 269 of file KVDetector.h.

◆ GetDetectorSignal()

virtual KVDetectorSignal* KVDetector::GetDetectorSignal ( const TString type) const
inlinevirtual

Return the signal with given type, if defined for this detector If signal not defined, returns nullptr.

Reimplemented in KVCsI.

Definition at line 463 of file KVDetector.h.

◆ GetDetectorSignalValue()

Double_t KVDetector::GetDetectorSignalValue ( const TString type,
const KVNameValueList params = "" 
) const
inline

Return value of signal of given type associated with detector

Some signals require the necessary calibrators to be present & initialised

Any additional parameters which are required can be passed as a string of "param1=value,param2=value,..." parameter/value pairs.

If the signal is not available, returns 0.

Examples
ExampleRawAnalysis.cpp.

Definition at line 426 of file KVDetector.h.

◆ GetDirection()

TVector3 KVDetector::GetDirection ( )
inlinevirtual

Returns a unit vector corresponding to the direction of fTheta, fPhi i.e. the centre of the solid angle element.

direction corresponding to centre of entrance window

Reimplemented from KVPosition.

Definition at line 678 of file KVDetector.h.

◆ GetDistance()

Double_t KVDetector::GetDistance ( void  ) const
inlinevirtual

distance from target [cm] to entrance window of detector

Reimplemented from KVPosition.

Definition at line 684 of file KVDetector.h.

◆ GetEIncOfMaxDeltaE()

Double_t KVDetector::GetEIncOfMaxDeltaE ( Int_t  Z,
Int_t  A 
)
virtual

Overrides KVMaterial::GetEIncOfMaxDeltaE Returns incident energy corresponding to maximum energy loss in the active layer of the detector, for a given nucleus.

Reimplemented from KVMaterial.

Definition at line 1701 of file KVDetector.cpp.

◆ GetELossFunction()

TF1 * KVDetector::GetELossFunction ( Int_t  Z,
Int_t  A 
)
virtual

Return pointer to TF1 giving energy loss in active layer of detector as function of incident energy, for a given nucleus (Z,A). The TF1::fNpx parameter is taken from environment variable KVDetector.EnergyLoss.Npx

Reimplemented in KVSilicon.

Definition at line 1677 of file KVDetector.cpp.

◆ GetELostByParticle()

Double_t KVDetector::GetELostByParticle ( KVNucleus kvp,
TVector3 norm = 0 
)
virtual

Calculate the total energy loss of a charged particle traversing the detector. This does not affect the "stored" energy loss value of the detector, nor its ACQData, nor the energy of the particle.

If the optional argument 'norm' is given, it is supposed to be a vector normal to the detector, oriented from the origin towards the detector. In this case the effective thicknesses of the detector's absorbers 'seen' by the particle depending on its direction of motion is used for the calculation.

Reimplemented from KVMaterial.

Definition at line 305 of file KVDetector.cpp.

◆ GetEnergy()

virtual Double_t KVDetector::GetEnergy ( ) const
inlinevirtual

Returns either the calibrated energy loss measured in the active layer of the detector, or (if IsSimMode()==kTRUE) the simulated energy losses

Reimplemented in KVPhoswich.

Definition at line 308 of file KVDetector.h.

◆ GetEnergyLoss()

virtual Double_t KVDetector::GetEnergyLoss ( ) const
inlinevirtual

Reimplemented from KVMaterial.

Definition at line 328 of file KVDetector.h.

◆ GetEntranceWindow()

const KVPosition& KVDetector::GetEntranceWindow ( ) const
inline

Returns KVPosition object corresponding to the entrance window volume i.e. the first volume encountered in the detector

Definition at line 647 of file KVDetector.h.

◆ GetEntranceWindowSurfaceArea()

Double_t KVDetector::GetEntranceWindowSurfaceArea ( )
virtual

Return surface area of first layer of detector in cm2.

Definition at line 1565 of file KVDetector.cpp.

◆ GetERes()

Double_t KVDetector::GetERes ( Int_t  Z,
Int_t  A,
Double_t  Einc 
)
virtual

Overrides KVMaterial::GetERes Returns residual energy of given nucleus after the detector. Returns 0 if Einc<=0

Reimplemented from KVMaterial.

Definition at line 1766 of file KVDetector.cpp.

◆ GetEResAfterDetector()

virtual Double_t KVDetector::GetEResAfterDetector ( ) const
inlinevirtual

Definition at line 580 of file KVDetector.h.

◆ GetEResFunction()

TF1 * KVDetector::GetEResFunction ( Int_t  Z,
Int_t  A 
)
virtual

Return pointer toTF1 giving residual energy after detector as function of incident energy, for a given nucleus (Z,A). The TF1::fNpx parameter is taken from environment variable KVDetector.ResidualEnergy.Npx

Definition at line 1627 of file KVDetector.cpp.

◆ GetFiredACQParameterListFormatString()

virtual const Char_t* KVDetector::GetFiredACQParameterListFormatString ( ) const
inlinevirtual

Definition at line 540 of file KVDetector.h.

◆ GetFiredBitmask()

Binary8_t KVDetector::GetFiredBitmask ( ) const
inline

Definition at line 536 of file KVDetector.h.

◆ GetGain()

Double_t KVDetector::GetGain ( ) const
inline

Definition at line 789 of file KVDetector.h.

◆ GetGeoVolume()

TGeoVolume * KVDetector::GetGeoVolume ( )
virtual

Construct a TGeoVolume shape to represent this detector in the current geometry managed by gGeoManager.

Making the volume requires:

  • to construct a 'mother' volume (TGeoArb8) defined by the (theta-min/max, phi-min/max) and the total thickness of the detector (all layers)
  • to construct and position volumes (TGeoArb8) for each layer of the detector inside the 'mother' volume. Each layer is represented by a TGeoArb8 whose two parallel faces correspond to the front and back surfaces of the layer.

If the detector is composed of a single absorber, we do not create a superfluous "mother" volume.

gGeoManager must point to current instance of geometry manager.

Definition at line 1349 of file KVDetector.cpp.

◆ GetGroup()

KVGroup * KVDetector::GetGroup ( ) const

Definition at line 2177 of file KVDetector.cpp.

◆ GetGroupNumber()

UInt_t KVDetector::GetGroupNumber ( )

Definition at line 2186 of file KVDetector.cpp.

◆ GetHits()

KVList* KVDetector::GetHits ( ) const
inline

Return the list of particles hitting this detector in an event.

Definition at line 395 of file KVDetector.h.

◆ GetIDTelescopes()

KVList* KVDetector::GetIDTelescopes ( )
inline

Return list of IDTelescopes to which detector belongs

Definition at line 478 of file KVDetector.h.

◆ GetIncidentEnergy()

Double_t KVDetector::GetIncidentEnergy ( Int_t  Z,
Int_t  A,
Double_t  delta_e = -1.0,
enum SolType  type = kEmax 
)
virtual

Overrides KVMaterial::GetIncidentEnergy Returns incident energy corresponding to energy loss delta_e in active layer of detector for a given nucleus. If delta_e is not given, the current energy loss in the active layer is used.

By default the solution corresponding to the highest incident energy is returned This is the solution found for Einc greater than the maximum of the dE(Einc) curve. If you want the low energy solution set SolType = KVIonRangeTable::kEmin.

WARNING: calculating the incident energy of a particle using only the dE in a detector is ambiguous, as in general (and especially for very heavy ions) the maximum of the dE curve occurs for Einc greater than the punch-through energy, therefore it is not always true to assume that if the particle does not stop in the detector the required solution is that for type=KVIonRangeTable::kEmax. For a range of energies between punch-through and dE_max, the required solution is still that for type=KVIonRangeTable::kEmin. If the residual energy of the particle is unknown, there is no way to know which is the correct solution.

WARNING 2 If the given energy loss in the active layer is greater than the maximum theoretical dE for given Z & A, (dE > GetMaxDeltaE(Z,A)) then we return a NEGATIVE incident energy corresponding to the maximum, GetEIncOfMaxDeltaE(Z,A)

Reimplemented from KVMaterial.

Definition at line 1805 of file KVDetector.cpp.

◆ GetIncidentEnergyFromERes()

Double_t KVDetector::GetIncidentEnergyFromERes ( Int_t  Z,
Int_t  A,
Double_t  Eres 
)
virtual

Overrides KVMaterial::GetIncidentEnergyFromERes

Calculate incident energy of nucleus from residual energy.

Returns -1 if Eres is out of defined range of values

Reimplemented from KVMaterial.

Definition at line 1899 of file KVDetector.cpp.

◆ GetIndex()

virtual Int_t KVDetector::GetIndex ( ) const
inlinevirtual

Return a numerical identifier for the detector

Can be overridden in specialised detector classes

Reimplemented in KVINDRADetector, and KVFAZIADetector.

Definition at line 745 of file KVDetector.h.

◆ GetInverseDetectorSignalValue()

Double_t KVDetector::GetInverseDetectorSignalValue ( const TString output,
Double_t  value,
const TString input,
const KVNameValueList params = "" 
) const
inline

Calculate the value of the input signal for a given value of the output signal.

This uses the inverse calibrations of all intermediate calibrators.

Any additional parameters which are required can be passed as a string of "param1=value,param2=value,..." parameter/value pairs.

If the output signal is not defined, or if input & output are not related, this returns 0.

Definition at line 448 of file KVDetector.h.

◆ GetLinearRange()

Double_t KVDetector::GetLinearRange ( Int_t  Z,
Int_t  A,
Double_t  Einc 
)
virtual

Returns range of ion in centimetres in this detector, taking into account all layers. Note that for Einc > punch through energy, this range is no longer correct (but still > total thickness of detector).

Reimplemented from KVMaterial.

Definition at line 2094 of file KVDetector.cpp.

◆ GetListOfAbsorbers()

KVList* KVDetector::GetListOfAbsorbers ( ) const
inline

Definition at line 260 of file KVDetector.h.

◆ GetListOfCalibrators()

KVList* KVDetector::GetListOfCalibrators ( ) const
inline

Definition at line 355 of file KVDetector.h.

◆ GetListOfDetectorSignals()

const KVSeqCollection& KVDetector::GetListOfDetectorSignals ( ) const
inline

Definition at line 732 of file KVDetector.h.

◆ GetMaterialName()

const Char_t* KVDetector::GetMaterialName ( ) const
inline

Definition at line 290 of file KVDetector.h.

◆ GetMatrix()

TGeoHMatrix* KVDetector::GetMatrix ( ) const
inlineprivatevirtual
  • ROOT Geometry * Return global transformation matrix for this detector

Reimplemented from KVPosition.

Definition at line 155 of file KVDetector.h.

◆ GetMaxDeltaE()

Double_t KVDetector::GetMaxDeltaE ( Int_t  Z,
Int_t  A 
)
virtual

Overrides KVMaterial::GetMaxDeltaE Returns maximum energy loss in the active layer of the detector, for a given nucleus.

Reimplemented from KVMaterial.

Definition at line 1717 of file KVDetector.cpp.

◆ GetMisalignmentAngle()

Double_t KVDetector::GetMisalignmentAngle ( ) const
inlineprivatevirtual

Return angle (in deg.) between the vector from the target to the volume centre and the normal to the volume surface

Reimplemented from KVPosition.

Definition at line 183 of file KVDetector.h.

◆ GetNameOfArray()

const Char_t* KVDetector::GetNameOfArray ( ) const
inline

Return name of multidetector array this detector belongs to

Definition at line 726 of file KVDetector.h.

◆ GetNHits()

Int_t KVDetector::GetNHits ( ) const
inline

Return the number of particles hitting this detector in an event.

Definition at line 405 of file KVDetector.h.

◆ GetNode()

KVGeoDetectorNode* KVDetector::GetNode ( )
inline

Definition at line 285 of file KVDetector.h.

◆ GetNumberOfAbsorberLayers()

Int_t KVDetector::GetNumberOfAbsorberLayers ( ) const
inline

Definition at line 264 of file KVDetector.h.

◆ GetParentStructure()

KVGeoStrucElement * KVDetector::GetParentStructure ( const Char_t type,
const Char_t name = "" 
) const

Get parent geometry structure element of given type. Give unique name of structure if more than one element of same type is possible.

Definition at line 2215 of file KVDetector.cpp.

◆ GetParticleEIncFromERes()

Double_t KVDetector::GetParticleEIncFromERes ( KVNucleus kvp,
TVector3 norm = 0 
)
virtual

Calculate the energy of particle 'kvn' before its passage through the detector, based on the current kinetic energy, Z & A of nucleus 'kvn', supposed to be after passing through the detector.

If the optional argument 'norm' is given, it is supposed to be a vector normal to the detector, oriented from the origin towards the detector. In this case the effective thicknesses of the detector's absorbers 'seen' by the particle depending on its direction of motion is used for the calculation.

Reimplemented from KVMaterial.

Definition at line 357 of file KVDetector.cpp.

◆ GetPedestal()

Float_t KVDetector::GetPedestal ( const Char_t name) const
virtual

Access pedestal value associated to parameter with given name.

Definition at line 683 of file KVDetector.cpp.

◆ GetPhi()

Double_t KVDetector::GetPhi ( ) const
inlinevirtual

azimuthal angle [deg.] corresponding to centre of entrance window of detector

Reimplemented from KVPosition.

Definition at line 708 of file KVDetector.h.

◆ GetPunchThroughEnergy()

Double_t KVDetector::GetPunchThroughEnergy ( Int_t  Z,
Int_t  A 
)
virtual

Returns energy (in MeV) necessary for ion (Z,A) to punch through all layers of this detector

Reimplemented from KVMaterial.

Definition at line 2109 of file KVDetector.cpp.

◆ GetRandomAngles()

void KVDetector::GetRandomAngles ( Double_t th,
Double_t ph,
Option_t t = "isotropic" 
)
inlinevirtual

Set th and ph to random values between the max and min limits defining the solid angle element. Depending on the optional option string, the direction is either drawn at "random" among the corresponding angles, or "isotropic". By default, the direction is "isotropic".

  • ROOT Geometry * th and ph correspond to a random position on the detector's entrance window. The "isotropic" option has no effect.

random angles [deg.] corresponding to point on entrance window

Reimplemented from KVPosition.

Definition at line 672 of file KVDetector.h.

◆ GetRandomDirection()

TVector3 KVDetector::GetRandomDirection ( Option_t t = "isotropic")
inlinevirtual

Returns a unit vector in a random direction corresponding to this detector. Depending on the optional option string, the direction is either drawn at "random" among the corresponding angles, or "isotropic". By default, the direction is "isotropic".

  • ROOT Geometry * Direction corresponds to a random position on the entrance surface of the volume. The "isotropic" option has no effect.

random direction corresponding to point on entrance window

Reimplemented from KVPosition.

Definition at line 666 of file KVDetector.h.

◆ GetRandomPointOnSurface()

TVector3 KVDetector::GetRandomPointOnSurface ( ) const
inlineprivatevirtual
  • ROOT Geometry * Generate a vector in the world (laboratory) frame from the origin to a random point on the entrance surface of this volume.

It is assumed that the volume was defined in such a way that the entrance window corresponds to the facet in the X-Y plane placed at -dZ.

NOTE: we force the use of TGeoBBox::GetPointsOnFacet. For TGeoArb8, the method has been overridden and does nothing. We use the TGeoBBox method, and then use TGeoShape::Contains to check that the point does actually correspond to the TGeoArb8.

Reimplemented from KVPosition.

Definition at line 163 of file KVDetector.h.

◆ GetRange()

Double_t KVDetector::GetRange ( Int_t  Z,
Int_t  A,
Double_t  Einc 
)
virtual

WARNING: SAME AS KVDetector::GetLinearRange Only linear range in centimetres is calculated for detectors!

Reimplemented from KVMaterial.

Definition at line 2079 of file KVDetector.cpp.

◆ GetRangeFunction()

TF1 * KVDetector::GetRangeFunction ( Int_t  Z,
Int_t  A 
)
virtual

Return pointer toTF1 giving range (in centimetres) in detector as function of incident energy, for a given nucleus (Z,A). The TF1::fNpx parameter is taken from environment variable KVDetector.Range.Npx

Definition at line 1652 of file KVDetector.cpp.

◆ GetSegment()

UShort_t KVDetector::GetSegment ( ) const
inline

used in reconstruction of particles

Definition at line 772 of file KVDetector.h.

◆ GetShape()

TGeoBBox* KVDetector::GetShape ( ) const
inlineprivatevirtual
  • ROOT Geometry * Return shape of this detector

Reimplemented from KVPosition.

Definition at line 159 of file KVDetector.h.

◆ GetSinTheta()

Double_t KVDetector::GetSinTheta ( ) const
inlinevirtual

sinus of polar angle corresponding to centre of entrance window of detector

Reimplemented from KVPosition.

Definition at line 696 of file KVDetector.h.

◆ GetSmallestEmaxValid()

Double_t KVDetector::GetSmallestEmaxValid ( Int_t  Z,
Int_t  A 
)
virtual

Returns the smallest maximum energy for which range tables are valid for all absorbers in the detector, and given ion (Z,A)

Definition at line 1924 of file KVDetector.cpp.

◆ GetSolidAngle()

Double_t KVDetector::GetSolidAngle ( void  ) const
inlinevirtual

Return values of the solid angle (in msr) seen by the geometric ensemble For simple geometries defined by theta_min/max etc., this is exact. For ROOT geometries we calculate the area of the entrance window and divide it by the square of the distance to the detector.

Return solid angle [msr] corresponding to the entrance window of the detector

Reimplemented from KVPosition.

Definition at line 660 of file KVDetector.h.

◆ GetSurfaceArea()

Double_t KVDetector::GetSurfaceArea ( int  npoints = 100000) const
inlineprivatevirtual

Monte Carlo calculation of entrance surface area for TGeoArb8 shapes Area is calculated as area of bounding box facet multiplied by the ratio between number of random points actually on the shape surface to the number of points npoints generated over the surface of the bounding box facet

npoints is the number of points to test

Reimplemented from KVPosition.

Definition at line 179 of file KVDetector.h.

◆ GetSurfaceCentre()

TVector3 KVDetector::GetSurfaceCentre ( ) const
inlineprivatevirtual
  • ROOT Geometry * Generate a vector in the world (laboratory) frame from the origin to the centre of the entrance surface of the volume.

It is assumed that the volume was defined in such a way that the entrance surface corresponds to the facet in the X-Y plane placed at -dZ.

Reimplemented from KVPosition.

Definition at line 167 of file KVDetector.h.

◆ GetSurfaceNormal()

TVector3 KVDetector::GetSurfaceNormal ( ) const
inlineprivatevirtual
  • ROOT Geometry * Generate a vector in the world (laboratory) frame representing the normal to the entrance surface of the volume (pointing away from the target, i.e. towards the inside of the volume)

It is assumed that the volume was defined in such a way that the entrance surface corresponds to the facet in the X-Y plane placed at -dZ.

Reimplemented from KVPosition.

Definition at line 175 of file KVDetector.h.

◆ GetTelescopesForIdentification()

TList * KVDetector::GetTelescopesForIdentification ( )

Returns list of identification telescopes to be used in order to try to identify particles stopping in this detector. This is the same as GetAlignedIDTelescopes but only including the telescopes of which this detector is a member.

Definition at line 900 of file KVDetector.cpp.

◆ GetTheta()

Double_t KVDetector::GetTheta ( ) const
inlinevirtual

polar angle [deg.] corresponding to centre of entrance window of detector

Reimplemented from KVPosition.

Definition at line 690 of file KVDetector.h.

◆ GetTotalDeltaE()

Double_t KVDetector::GetTotalDeltaE ( Int_t  Z,
Int_t  A,
Double_t  Einc 
)
virtual

Returns calculated total energy loss of ion in ALL layers of the detector. This is just (Einc - GetERes(Z,A,Einc))

Definition at line 1751 of file KVDetector.cpp.

◆ GetTotalThicknessInCM()

Double_t KVDetector::GetTotalThicknessInCM ( )
inline

Calculate and return the total thickness in centimetres of ALL absorbers making up the detector, not just the active layer (value returned by GetThickness()).

Definition at line 274 of file KVDetector.h.

◆ GetVerticesInOwnFrame()

void KVDetector::GetVerticesInOwnFrame ( TVector3 corners,
Double_t  depth,
Double_t  layer_thickness 
)
virtual

This will fill the array corners[8] with the coordinates of the vertices of the front (corners[0],...,corners[3]) & back (corners[4],...,corners[7]) sides of the volume representing either a single absorber or the whole detector.

depth = depth of detector/absorber inside the KVTelescope it belongs to (in centimetres) layer_thickness = thickness of absorber/detector (in centimetres)

Positioning information is taken from the KVTelescope to which this detector belongs; if this is not the case, nothing will be done. relative distance to back of detector

Definition at line 1304 of file KVDetector.cpp.

◆ GetVolumeCentre()

TVector3 KVDetector::GetVolumeCentre ( ) const
inlineprivatevirtual
  • ROOT Geometry * Generate a vector in the world (laboratory) frame from the origin to the centre of the volume.

Reimplemented from KVPosition.

Definition at line 171 of file KVDetector.h.

◆ HasDetectorSignalValue()

Bool_t KVDetector::HasDetectorSignalValue ( const TString type) const
inline

Return kTRUE if signal with given type is defind for detector

Examples
ExampleRawAnalysis.cpp.

Definition at line 470 of file KVDetector.h.

◆ HasSameStructureAs()

Bool_t KVDetector::HasSameStructureAs ( const KVDetector other) const

Return kTRUE if the two detectors have the same internal structure, i.e.

  • the same number of absorber layers
  • in the same order
  • with the same material & thickness

Definition at line 2348 of file KVDetector.cpp.

◆ IncrementIdentifiedParticles()

void KVDetector::IncrementIdentifiedParticles ( Int_t  n = 1)
inline

Definition at line 492 of file KVDetector.h.

◆ IncrementUnidentifiedParticles()

void KVDetector::IncrementUnidentifiedParticles ( Int_t  n = 1)
inline

Definition at line 486 of file KVDetector.h.

◆ init()

void KVDetector::init ( void  )

default initialisations

Definition at line 41 of file KVDetector.cpp.

◆ IsAnalysed()

Bool_t KVDetector::IsAnalysed ( )
inline

Definition at line 412 of file KVDetector.h.

◆ IsCalibrated() [1/2]

Bool_t KVDetector::IsCalibrated ( ) const
inline

A detector is considered to be calibrated if it has a signal "Energy" available

Definition at line 359 of file KVDetector.h.

◆ IsCalibrated() [2/2]

Bool_t KVDetector::IsCalibrated ( const KVNameValueList params) const

A detector is considered to be calibrated if it has a signal "Energy" available and if depending on the supplied parameters this signal can be calculated

Definition at line 612 of file KVDetector.cpp.

◆ IsDetecting()

virtual Bool_t KVDetector::IsDetecting ( ) const
inlinevirtual

return if the detector is ready to detect or not

Definition at line 618 of file KVDetector.h.

◆ IsOK()

virtual Bool_t KVDetector::IsOK ( ) const
inlinevirtual

return kTRUE if detector is here and working

Definition at line 628 of file KVDetector.h.

◆ IsPresent()

virtual Bool_t KVDetector::IsPresent ( ) const
inlinevirtual

return the presence or not of the detector

Definition at line 609 of file KVDetector.h.

◆ IsSimMode()

virtual Bool_t KVDetector::IsSimMode ( ) const
inlinevirtual

Returns simulation mode of detector: IsSimMode()=kTRUE : we are in simulation mode (calculation of energy losses etc.) IsSimMode()=kFALSE: we are analysing/reconstruction experimental data Changes behaviour of Fired(): in simulation mode, Fired() returns kTRUE whenever the energy loss in the active layer is >0

Definition at line 599 of file KVDetector.h.

◆ IsSingleLayer()

Bool_t KVDetector::IsSingleLayer ( ) const
inline

Returns kTRUE for detectors with a single absorber layer

Definition at line 716 of file KVDetector.h.

◆ MakeDetector()

KVDetector * KVDetector::MakeDetector ( const Char_t name,
Float_t  thickness 
)
static

Static function which will create an instance of the KVDetector-derived class corresponding to 'name' These are defined as 'Plugin' objects in the file $KVROOT/KVFiles/.kvrootrc : [name_of_dataset].detector_type detector_type To use the dataset-dependent plugin, call this method with name = "[name_of_dataset].detector_type" If not, the default plugin will be used first we check if there is a special plugin for the DataSet if not we take the default one

'thickness' is passed as argument to the constructor for the detector plugin check and load plugin library

Definition at line 1254 of file KVDetector.cpp.

◆ Print()

void KVDetector::Print ( Option_t opt = "") const
virtual

Print info on this detector if option="data" the energy loss and coder channel data are displayed

Reimplemented from KVMaterial.

Reimplemented in KVCsI.

Definition at line 393 of file KVDetector.cpp.

◆ RangeDet()

Double_t KVDetector::RangeDet ( Double_t x,
Double_t par 
)
protected

Calculates range (in centimetres) of ions in detector as a function of incident energy (in MeV), taking into account all layers of the detector.

Arguments are: x[0] = incident energy in MeV Parameters are: par[0] = Z of ion par[1] = A of ion

Definition at line 1157 of file KVDetector.cpp.

◆ ReadDefinitionFromFile()

void KVDetector::ReadDefinitionFromFile ( const Char_t envrc)
virtual

Create detector from text file in 'TEnv' format.

Example:

Layer: Gold Gold.Material: Au Gold.AreaDensity: 200.*KVUnits::ug +Layer: Gas1 Gas1.Material: C3F8 Gas1.Thickness: 5.*KVUnitscm Gas1.Pressure: 50.*KVUnits::mbar Gas1.Active: yes +Layer: Si1 Si1.Material: Si Si1.Thickness: 300.*KVUnitsum

Definition at line 1961 of file KVDetector.cpp.

◆ remove_signal_for_calibrator()

void KVDetector::remove_signal_for_calibrator ( KVCalibrator K)
private

Used when a calibrator object is removed or replaced We remove and delete the corresponding output signal from the list of detector signals

Definition at line 816 of file KVDetector.cpp.

◆ RemoveCalibrators()

void KVDetector::RemoveCalibrators ( )
virtual

Removes all calibrations associated to this detector: in other words, we delete all the KVCalibrator objects in list fCalibrators.

We also destroy all signals provided by these calibrators

Reimplemented in KVCsI.

Definition at line 838 of file KVDetector.cpp.

◆ RemoveHit()

void KVDetector::RemoveHit ( KVNucleus part)
inline

Remove from list of particles hitting this detector in an event

Definition at line 386 of file KVDetector.h.

◆ RemoveParentStructure()

void KVDetector::RemoveParentStructure ( KVGeoStrucElement elem)

Definition at line 2204 of file KVDetector.cpp.

◆ ReplaceCalibrator()

Bool_t KVDetector::ReplaceCalibrator ( const Char_t type,
KVCalibrator cal,
const KVNameValueList opts = "" 
)

Replace calibrator of given type with the given calibrator object The calibrator object should not be shared with any other detectors: it now belongs to this detector, which will delete it when necessary. If an exising calibrator with the same type is already defined, it will be deleted and removed from the detector's calibrator list

Returns kFALSE in case of problems.

The (optional) KVNameValueList argument can be used to pass any extra parameters/options.

Definition at line 584 of file KVDetector.cpp.

◆ Reset()

virtual void KVDetector::Reset ( Option_t opt = "")
inlinevirtual

Definition at line 368 of file KVDetector.h.

◆ ResetAlignedDetectors()

void KVDetector::ResetAlignedDetectors ( UInt_t  direction = 1)

Definition at line 2067 of file KVDetector.cpp.

◆ SetACQParams()

void KVDetector::SetACQParams ( )
virtual

Attribute acquisition parameters to this detector. This method does nothing; it should be overridden in child classes to attribute parameters specific to each detector.

Reimplemented in KVSilicon, KVPhoswich, KVCsI, and KVChIo.

Definition at line 802 of file KVDetector.cpp.

◆ SetActiveLayer()

void KVDetector::SetActiveLayer ( KVMaterial actif)
inline

Definition at line 244 of file KVDetector.h.

◆ SetActiveLayerMatrix()

void KVDetector::SetActiveLayerMatrix ( const TGeoHMatrix m)

Definition at line 2257 of file KVDetector.cpp.

◆ SetActiveLayerShape()

void KVDetector::SetActiveLayerShape ( TGeoBBox s)

Set ROOT geometry shape of active layer volume.

Definition at line 2268 of file KVDetector.cpp.

◆ SetAnalysed()

void KVDetector::SetAnalysed ( Bool_t  b = kTRUE)
inline

Definition at line 416 of file KVDetector.h.

◆ SetDetecting()

void KVDetector::SetDetecting ( Bool_t  yes = kTRUE)
inline

Definition at line 623 of file KVDetector.h.

◆ SetDetectorSignalValue()

void KVDetector::SetDetectorSignalValue ( const TString type,
Double_t  val 
) const
inline

Set value of signal of given type associated with detector Only to be used with raw detector signals (i.e. not expressions, not calibrated signals)

Definition at line 440 of file KVDetector.h.

◆ SetEnergy()

virtual void KVDetector::SetEnergy ( Double_t  e) const
inlinevirtual

Set value of energy lost in active layer

Reimplemented in KVPhoswich.

Definition at line 320 of file KVDetector.h.

◆ SetEnergyLoss()

virtual void KVDetector::SetEnergyLoss ( Double_t  e) const
inlinevirtual

Reimplemented from KVMaterial.

Definition at line 332 of file KVDetector.h.

◆ SetEntranceWindowMatrix()

void KVDetector::SetEntranceWindowMatrix ( const TGeoHMatrix m)

Set ROOT geometry global matrix transformation to coordinate frame of entrance window.

Definition at line 2279 of file KVDetector.cpp.

◆ SetEntranceWindowShape()

void KVDetector::SetEntranceWindowShape ( TGeoBBox s)

Set ROOT geometry shape of entrance window.

Definition at line 2290 of file KVDetector.cpp.

◆ SetEResAfterDetector()

virtual void KVDetector::SetEResAfterDetector ( Double_t  e)
inlinevirtual

Definition at line 576 of file KVDetector.h.

◆ SetFiredBitmask()

void KVDetector::SetFiredBitmask ( KVString lpar)
virtual

Set bitmask used to determine which acquisition parameters are taken into account by KVDetector::Fired based on the environment variables [dataset].KVACQParam.[par name].Working: NO [dataset].[classname].Fired.ACQParameterList.[type]: PG,GG,T where [classname]=KVDetector by default, or the name of some class derived from KVDetector which calls the method KVDetector::SetKVDetectorFiredACQParameterListFormatString() in its constructor. The first allows to define certain acquisition parameters as not functioning; they will not be taken into account. The second allows to "fine-tune" what is meant by "all" or "any" acquisition parameters (i.e. when using Fired("all"), Fired("any"), Fired("Pall", etc.). For each detector type, give a comma-separated list of the acquisition parameter types to be taken into account in the KVDetector::Fired method. Only those parameters which appear in the list will be considered: then "all" means => all parameters in the list and "any" means => any of the parameters in the list These lists are read during construction of multidetector arrays (KVMultiDetArray::Build), the method KVMultiDetArray::SetACQParams uses them to define a mask for each detector of the array. Bits are set/reset in the order of the acquisition parameter list of the detector. If no variable [dataset].[classname].Fired.ACQParameterList.[type] exists, we set a bitmask authorizing all acquisition parameters of the detector, e.g. if the detector has 3 acquisition parameters the bitmask will be "111"

Definition at line 1509 of file KVDetector.cpp.

◆ SetGain()

void KVDetector::SetGain ( Double_t  gain)
inline

Definition at line 784 of file KVDetector.h.

◆ SetKVDetectorFiredACQParameterListFormatString()

void KVDetector::SetKVDetectorFiredACQParameterListFormatString ( )
protected

Set the value of fKVDetectorFiredACQParameterListFormatString to be [classname].Fired.ACQParameterList.s where [classname] is the name of the class of whatever object is calling this method

Definition at line 87 of file KVDetector.cpp.

◆ SetMaterial()

void KVDetector::SetMaterial ( const Char_t type)
virtual

Set material of active layer. If no absorbers have been added to the detector, create and add one (active layer by default)

Reimplemented from KVMaterial.

Definition at line 206 of file KVDetector.cpp.

◆ SetMatrix()

void KVDetector::SetMatrix ( const TGeoHMatrix m)
inlineprivatevirtual

Make KVPosition methods private to avoid misuse N.B. the inherited KVPosition part of KVDetector is used for the ACTIVE layer of the detector the entrance window is described by member KVPosition fEWPosition

Reimplemented from KVPosition.

Definition at line 147 of file KVDetector.h.

◆ SetNameOfArray()

void KVDetector::SetNameOfArray ( const TString n)
inline

Definition at line 722 of file KVDetector.h.

◆ SetPedestal()

void KVDetector::SetPedestal ( const Char_t name,
Float_t  ped 
)
virtual

Set value of pedestal associated to parameter with given name.

Definition at line 696 of file KVDetector.cpp.

◆ SetPresent()

void KVDetector::SetPresent ( Bool_t  yes = kTRUE)
inline

Definition at line 614 of file KVDetector.h.

◆ SetSegment()

void KVDetector::SetSegment ( UShort_t  s)
inlinevirtual

set segmentation level - used in reconstruction of particles

Reimplemented in KVINDRADetector.

Definition at line 778 of file KVDetector.h.

◆ SetShape()

void KVDetector::SetShape ( TGeoBBox b)
inlineprivatevirtual
  • ROOT Geometry * Set the shape of this detector If matrix has been set, we set the (theta,phi) angles corresponding to the centre of the volume, and the distance from the target corresponding to the distance along (theta,phi) to the entrance surface of the volume (not necessarily the same as the distance from the target to the centre of the entrance surface)

Reimplemented from KVPosition.

Definition at line 151 of file KVDetector.h.

◆ SetSimMode()

virtual void KVDetector::SetSimMode ( Bool_t  on = kTRUE)
inlinevirtual

Set simulation mode of detector If on=kTRUE (default), we are in simulation mode (calculation of energy losses etc.) If on=kFALSE, we are analysing/reconstruction experimental data Changes behaviour of Fired(): in simulation mode, Fired() returns kTRUE whenever the energy loss in the active layer is >0

Definition at line 590 of file KVDetector.h.

◆ SetThickness()

void KVDetector::SetThickness ( Double_t  thick)
virtual

Overrides KVMaterial::SetThickness

If ROOT geometry is defined, we modify the DZ thickness of the volume representing this detector in accordance with the new thickness.

This is only implemented for single-layer detectors with a simple shape.

Reimplemented from KVMaterial.

Definition at line 2306 of file KVDetector.cpp.

Member Data Documentation

◆ fAbsorbers

KVList* KVDetector::fAbsorbers
protected

list of absorbers making up the detector

Definition at line 200 of file KVDetector.h.

◆ fACQParams

KVList* KVDetector::fACQParams
protected

list of raw data parameters read from coders

Definition at line 198 of file KVDetector.h.

◆ fActiveLayer

KVMaterial* KVDetector::fActiveLayer
private

The active absorber in the detector.

Definition at line 128 of file KVDetector.h.

◆ fAlignedDetectors

TList* KVDetector::fAlignedDetectors[2]
protected

stores lists of aligned detectors in both directions

Definition at line 219 of file KVDetector.h.

◆ fCalibrators

KVList* KVDetector::fCalibrators
protected

list of associated calibrator objects

Definition at line 197 of file KVDetector.h.

◆ fCalWarning

Int_t KVDetector::fCalWarning
protected

just a counter so that missing calibrator warning is given only once

Definition at line 203 of file KVDetector.h.

◆ fDepthInTelescope

Double_t KVDetector::fDepthInTelescope
protected

used to store depth of detector in parent telescope

Definition at line 206 of file KVDetector.h.

◆ fDetCounter

Int_t KVDetector::fDetCounter = 0
staticprivate

Definition at line 127 of file KVDetector.h.

◆ fDetecting

Bool_t KVDetector::fDetecting
protected

=kTRUE if detector is "detecting", =kFALSE if not

Definition at line 223 of file KVDetector.h.

◆ fDetSignals

KVUniqueNameList KVDetector::fDetSignals
private

list of signals associated with detector

Definition at line 190 of file KVDetector.h.

◆ fELossF

TF1* KVDetector::fELossF
protected

parametric function dE in active layer vs. incident energy

Definition at line 214 of file KVDetector.h.

◆ fEResF

TF1* KVDetector::fEResF
protected

parametric function Eres residual energy after all layers of detector

Definition at line 215 of file KVDetector.h.

◆ fEResforEinc

Double_t KVDetector::fEResforEinc
protected

used by GetIncidentEnergy & GetCorrectedEnergy

Definition at line 218 of file KVDetector.h.

◆ fEWPosition

KVPosition KVDetector::fEWPosition
private

position of entrance window i.e. first volume in detector geometry

Definition at line 124 of file KVDetector.h.

◆ fFiredMask

Binary8_t KVDetector::fFiredMask
protected

bitmask used by Fired to determine which parameters to take into account

Definition at line 208 of file KVDetector.h.

◆ fFName

TString KVDetector::fFName
protected

dynamically generated full name of detector

Definition at line 196 of file KVDetector.h.

◆ fGain

Double_t KVDetector::fGain
protected

gain of amplifier

Definition at line 202 of file KVDetector.h.

◆ fIdentP

Int_t KVDetector::fIdentP
private

temporary counters, determine state of identified/unidentified particle flags

Definition at line 141 of file KVDetector.h.

◆ fIDTelAlign

KVList* KVDetector::fIDTelAlign
private

list of ID telescopes made of this detector and all aligned detectors placed in front of it

Definition at line 130 of file KVDetector.h.

◆ fIDTele4Ident

TList* KVDetector::fIDTele4Ident
private

list of ID telescopes used for particle ID

Definition at line 131 of file KVDetector.h.

◆ fIDTelescopes

KVList* KVDetector::fIDTelescopes
private

list of ID telescopes to which detector belongs

Definition at line 129 of file KVDetector.h.

◆ fKVDetectorFiredACQParameterListFormatString

TString KVDetector::fKVDetectorFiredACQParameterListFormatString
private

Definition at line 188 of file KVDetector.h.

◆ fNameOfArray

TString KVDetector::fNameOfArray
private

name of multidetector array this detector is part of

Definition at line 132 of file KVDetector.h.

◆ fNode

KVGeoDetectorNode KVDetector::fNode
private

positioning information relative to other detectors

Definition at line 126 of file KVDetector.h.

◆ fParentStrucList

KVUniqueNameList KVDetector::fParentStrucList
private

list of geometry structures which directly contain this detector

Definition at line 125 of file KVDetector.h.

◆ fParticles

KVList* KVDetector::fParticles
protected

list of particles hitting detector in an event

Definition at line 199 of file KVDetector.h.

◆ fPresent

Bool_t KVDetector::fPresent
protected

=kTRUE if detector is present, =kFALSE if it has been removed

Definition at line 222 of file KVDetector.h.

◆ fRangeF

TF1* KVDetector::fRangeF
protected

parametric function range of particles in detector

Definition at line 216 of file KVDetector.h.

◆ fSegment

UShort_t KVDetector::fSegment
protected

used in particle reconstruction

Definition at line 201 of file KVDetector.h.

◆ fSimMode

Bool_t KVDetector::fSimMode
protected

=kTRUE when using to simulate detector response, =kFALSE when analysing data

Definition at line 221 of file KVDetector.h.

◆ fSingleLayer

Bool_t KVDetector::fSingleLayer
protected

=kTRUE if detector has a single absorber layer

Definition at line 225 of file KVDetector.h.

◆ fTotThickness

Double_t KVDetector::fTotThickness
protected

used to store value calculated by GetTotalThicknessInCM

Definition at line 205 of file KVDetector.h.

◆ fUnidentP

Int_t KVDetector::fUnidentP
private

temporary counters, determine state of identified/unidentified particle flags

Definition at line 142 of file KVDetector.h.


The documentation for this class was generated from the following files: