KaliVeda
Toolkit for HIC analysis
KVDetector.h
1 /***************************************************************************
2  kvdetector.h - description
3  -------------------
4  begin : Thu May 16 2002
5  copyright : (C) 2002 by J.D. Frankland
6  email : frankland@ganil.fr
7 
8 $Id: KVDetector.h,v 1.71 2009/05/22 14:45:40 ebonnet Exp $
9  ***************************************************************************/
10 
11 /***************************************************************************
12  * *
13  * This program is free software; you can redistribute it and/or modify *
14  * it under the terms of the GNU General Public License as published by *
15  * the Free Software Foundation; either version 2 of the License, or *
16  * (at your option) any later version. *
17  * *
18  ***************************************************************************/
19 
20 #ifndef KVDETECTOR_H
21 #define KVDETECTOR_H
22 
23 #ifndef KVD_RECPRC_CNXN
24 #define KVD_RECPRC_CNXN 1
25 #endif
26 #ifndef KVD_NORECPRC_CNXN
27 #define KVD_NORECPRC_CNXN 0
28 #endif
29 
30 #include "KVMaterial.h"
31 #include "KVPosition.h"
32 #include "KVList.h"
33 #include "KVUnownedList.h"
34 #include "KVNucleus.h"
35 #include "KVGeoDetectorNode.h"
36 #include "KVUniqueNameList.h"
37 #include "KVDetectorSignal.h"
38 #include "KVEvent.h"
39 
40 class KVGeoStrucElement;
41 class KVGroup;
42 class KVCalibrator;
43 class TGeoVolume;
44 class TTree;
45 class TGraph;
47 
173 class KVDetector: public KVMaterial, public KVPosition {
174 
175 private:
182 
183  enum {
184  kIsAnalysed = BIT(14), //for reconstruction of particles
185  kActiveSet = BIT(15), //internal - flag set true when SetActiveLayer called
186  kUnidentifiedParticle = BIT(16), //set if detector is in an unidentified particle's list
187  kIdentifiedParticle = BIT(17), //set if detector is in an identified particle's list
188  };
189 
192 
196  void SetMatrix(const TGeoHMatrix* m) override
197  {
199  }
200  void SetShape(TGeoBBox* s) override
201  {
203  }
204  TGeoHMatrix* GetMatrix() const override
205  {
206  return KVPosition::GetMatrix();
207  }
208  TGeoBBox* GetShape() const override
209  {
210  return KVPosition::GetShape();
211  }
213  {
215  }
216  TVector3 GetSurfaceCentre() const override
217  {
219  }
220  TVector3 GetVolumeCentre() const override
221  {
223  }
224  TVector3 GetNormalIntoShape() const override
225  {
227  }
228  Double_t GetSurfaceArea(int npoints = 100000) const override
229  {
230  return KVPosition::GetSurfaceArea(npoints);
231  }
232 
235 
237 
238  template<typename AbsorberStack>
239  Double_t get_corrected_energy(AbsorberStack* stack, KVNucleus* nuc, Double_t e, Bool_t transmission)
240  {
241  auto z = nuc->GetZ();
242  auto a = nuc->GetA();
243  enum SolType solution = kEmax;
244  if (!transmission) solution = kEmin;
245  Double_t EINC, ERES = GetEResAfterDetector();
246  if (transmission && ERES > 0.) { // if residual energy is known we use it to calculate EINC.
247 
248  EINC = stack->GetIncidentEnergyFromERes(z, a, ERES);
249  if (EINC < stack->GetEIncOfMaxDeltaE(z, a)) {// if EINC < max of dE curve, we change solution
250  solution = kEmin;
251  } // we could keep the EINC value calculated using ERES, but then the corrected dE of this detector would not depend on the measured dE !
252  }
253  EINC = stack->GetIncidentEnergy(z, a, e, solution);
254  if (EINC < 0) {
256  return EINC;
257  }
258  ERES = stack->GetERes(z, a, EINC);
259 
261  return (EINC - ERES);
262  }
263 
264 protected:
265 
270 
272  Double_t EResDet(Double_t* x, Double_t* par);
274 
278 
280 
284 
286 
288  {
292  ds->SetDetector(this);
293  fDetSignals.Add(ds);
294  }
296  {
297  return true;
298  }
299 
300 public:
301  KVDetector();
302  KVDetector(const Char_t* type, const Float_t thick = 0.0);
303  KVDetector(const Char_t* gas, const Double_t thick, const Double_t pressure, const Double_t temperature = 19.0);
304  KVDetector(const KVDetector&);
305  void init();
306  virtual ~ KVDetector();
307 
308  void Copy(TObject& obj) const override;
309 
310  void SetMaterial(const Char_t* type) override;
311  void AddAbsorber(KVMaterial*);
313  {
314  fActiveLayer = actif;
316  }
318  {
320  if (auto mat = GetAbsorber(i)) SetActiveLayer(mat);
321  }
322  KVMaterial* GetActiveLayer() const override
323  {
325  return fActiveLayer;
326  }
327  KVMaterial* GetAbsorber(Int_t i) const;
328  KVMaterial* GetAbsorber(const Char_t* name) const
329  {
332  }
333  const KVList* GetListOfAbsorbers() const
334  {
335  return &fAbsorbers;
336  }
338  {
339  return fAbsorbers.GetEntries();
340  }
341  void RemoveAllAbsorbers();
342 
344  {
347 
348  double fTotThickness = 0;
349  TIter next(&fAbsorbers);
350  KVMaterial* mat;
351  while ((mat = (KVMaterial*)next())) fTotThickness += mat->GetThickness();
352  return fTotThickness;
353  }
355  {
356  return &fNode;
357  }
358 
359  const Char_t* GetMaterialName() const
360  {
361  if (GetActiveLayer())
362  return GetActiveLayer()->GetName();
363  return KVMaterial::GetName();
364  }
365  void DetectParticle(KVNucleus*, TVector3* norm = 0) override;
366  Double_t GetELostByParticle(KVNucleus*, TVector3* norm = 0) override;
367  Double_t GetParticleEIncFromERes(KVNucleus*, TVector3* norm = 0) override;
368 
370  {
372  return GetDetectorSignalValue("Energy");
373  }
374  virtual Double_t GetEnergy() const
375  {
379  if (IsSimMode()) return ELoss; // in simulation mode, return calculated energy loss in active layer
380  if (ELoss > 0) return ELoss;
381  ELoss = GetCalibratedEnergy();
382  if (ELoss < 0) ELoss = 0;
383  SetEnergy(ELoss);
384  return ELoss;
385  }
386  virtual void SetEnergy(Double_t e) const
387  {
393  }
394  Double_t GetEnergyLoss() const override
395  {
396  return GetEnergy();
397  }
398  void SetEnergyLoss(Double_t e) const override
399  {
400  SetEnergy(e);
401  }
403  -1., Bool_t transmission = kTRUE);
404  virtual Int_t FindZmin(Double_t ELOSS = -1., Char_t mass_formula = -1);
405 
406  Bool_t AddCalibrator(KVCalibrator* cal, const KVNameValueList& opts = "");
407  Bool_t ReplaceCalibrator(const Char_t* type, KVCalibrator* cal, const KVNameValueList& opts = "");
408  KVCalibrator* GetCalibrator(const Char_t* name,
409  const Char_t* type) const;
410  KVCalibrator* GetCalibrator(const Char_t* type) const;
412  {
413  return fCalibrators;
414  }
415  Bool_t IsCalibrated(const KVNameValueList& params = {}) const;
416 
417  void Clear(Option_t* opt = "") override;
418  virtual void Reset(Option_t* opt = "")
419  {
420  Clear(opt);
421  }
422  void Print(Option_t* option = "") const override;
423 
424  void AddHit(KVNucleus* part)
425  {
427 
428  fParticles.Add(part);
429  }
430 
431  auto RemoveHit(KVNucleus* part)
432  {
436 
437  auto p = fParticles.Remove(part);
439  return p;
440  }
441 
442  void ClearHits()
443  {
445  fParticles.Clear();
446  }
448  Int_t GetNHits() const
449  {
450  return fParticles.GetEntries();
451  }
452 
454  {
455  return TestBit(kIsAnalysed);
456  }
457  void SetAnalysed(Bool_t b = kTRUE)
458  {
459  SetBit(kIsAnalysed, b);
460  }
461  virtual Bool_t Fired(Option_t* opt = "any") const
462  {
477 
478  if (!IsDetecting()) return kFALSE; //detector not working, no answer at all
479  if (IsSimMode()) return (GetActiveLayer() ? GetActiveLayer()->GetEnergyLoss() > 0. : KVMaterial::GetEnergyLoss() > 0.); // simulation mode: detector fired if energy lost in active layer
480 
481  TString OPT(opt);
482  OPT.ToLower();
483  Bool_t all = (OPT == "all");
484 
485  TIter raw_it(&GetListOfDetectorSignals());
486  KVDetectorSignal* ds;
487  int count_raw = 0;
488  while ((ds = (KVDetectorSignal*)raw_it())) {
489  if (ds->IsRaw()) {
490  ++count_raw;
491  if (ds->IsFired()) {
492  if (!all) return kTRUE;
493  }
494  else {
495  if (all) return kFALSE;
496  }
497  }
498  }
499  return all && count_raw;
500  }
501  virtual void RemoveCalibrators();
502 
503  Double_t GetDetectorSignalValue(const KVString& type, const KVNameValueList& params = "") const
504  {
512 
514  return (s ? s->GetValue(params) : 0);
515  }
516  void SetDetectorSignalValue(const KVString& type, Double_t val) const
517  {
523 
525  if (s) s->SetValue(val);
526  }
527  Double_t GetInverseDetectorSignalValue(const KVString& output, Double_t value, const KVString& input, const KVNameValueList& params = "") const
528  {
539 
540  KVDetectorSignal* s = GetDetectorSignal(output);
541  return (s ? s->GetInverseValue(value, input, params) : 0);
542  }
543  virtual KVDetectorSignal* GetDetectorSignal(const KVString& type) const
544  {
549 
551  }
552  Bool_t HasDetectorSignal(const KVString& type) const
553  {
556  return (GetDetectorSignal(type) != nullptr);
557  }
558 
560  {
561  fUnidentP += n;
562  fUnidentP = (fUnidentP > 0) * fUnidentP;
564  }
566  {
567  fIdentP += n;
568  fIdentP = (fIdentP > 0) * fIdentP;
570  }
572  {
574  }
576  {
578  }
579 
580  static KVDetector* MakeDetector(const Char_t* name, Float_t thick);
581 
584  {
587  return GetSurfaceCentre();
588  }
590  {
593  }
595  {
597  return GetShape();
598  }
600  {
602  return GetMatrix();
603  }
604 
605  Double_t GetMaxDeltaE(Int_t Z, Int_t A) override;
606  Double_t GetEIncOfMaxDeltaE(Int_t Z, Int_t A) override;
607  Double_t GetDeltaE(Int_t Z, Int_t A, Double_t Einc, Double_t = 0.) override;
608  virtual Double_t GetTotalDeltaE(Int_t Z, Int_t A, Double_t Einc);
609  Double_t GetERes(Int_t Z, Int_t A, Double_t Einc, Double_t = 0.) override;
611  -1.0, enum SolType type = kEmax) override;
612  /*virtual Double_t GetEResFromDeltaE(...) - DON'T IMPLEMENT, CALLS GETINCIDENTENERGY*/
613  Double_t GetDeltaEFromERes(Int_t Z, Int_t A, Double_t Eres) override;
615  Double_t GetRange(Int_t Z, Int_t A, Double_t Einc) override;
616  Double_t GetLinearRange(Int_t Z, Int_t A, Double_t Einc) override;
617  Double_t GetPunchThroughEnergy(Int_t Z, Int_t A) override;
620 
621  virtual TF1* GetEResFunction(Int_t Z, Int_t A);
622  virtual TF1* GetELossFunction(Int_t Z, Int_t A);
623  virtual TF1* GetRangeFunction(Int_t Z, Int_t A);
624 
625  virtual Double_t GetSmallestEmaxValid(Int_t Z, Int_t A) const;
626 
628  {
629  fEResforEinc = e;
630  }
632  {
633  return fEResforEinc;
634  }
635 
636  virtual void ReadDefinitionFromFile(const Char_t*);
637 
638  virtual void SetSimMode(Bool_t on = kTRUE)
639  {
645  fSimMode = on;
646  }
647  virtual Bool_t IsSimMode() const
648  {
654  return fSimMode;
655  }
656 
657  virtual Bool_t IsPresent() const
658  {
660  return fPresent;
661  }
662  void SetPresent(Bool_t yes = kTRUE)
663  {
664  fPresent = yes;
665  }
666  virtual Bool_t IsDetecting() const
667  {
669  return fDetecting;
670  }
671  void SetDetecting(Bool_t yes = kTRUE)
672  {
673  fDetecting = yes;
674  }
675 
676  virtual Bool_t IsOK() const
677  {
679  return (fPresent && fDetecting);
680  }
681 
682  KVGroup* GetGroup() const;
684 
687  KVGeoStrucElement* GetParentStructure(const Char_t* type, const Char_t* name = "") const;
688 
689  void SetActiveLayerMatrix(const TGeoHMatrix*);
694  {
697  return fEWPosition;
698  }
700  {
705  }
706  Double_t GetSolidAngle() const override
707  {
709  if (ROOTGeo()) return fEWPosition.GetSolidAngle();
710  return KVPosition::GetSolidAngle();
711  }
712  TVector3 GetRandomDirection(Option_t* t = "isotropic") override
713  {
715  if (ROOTGeo()) return fEWPosition.GetRandomDirection(t);
717  }
718  void GetRandomAngles(Double_t& th, Double_t& ph, Option_t* t = "isotropic") override
719  {
721  if (ROOTGeo()) fEWPosition.GetRandomAngles(th, ph, t);
722  else KVPosition::GetRandomAngles(th, ph, t);
723  }
725  {
727  if (ROOTGeo()) return fEWPosition.GetDirection();
728  return KVPosition::GetDirection();
729  }
730  Double_t GetDistance() const override
731  {
733  if (ROOTGeo()) return fEWPosition.GetDistance();
734  return KVPosition::GetDistance();
735  }
736  Double_t GetTheta() const override
737  {
739  if (ROOTGeo()) return fEWPosition.GetTheta();
740  return KVPosition::GetTheta();
741  }
742  Double_t GetSinTheta() const override
743  {
745  if (ROOTGeo()) return fEWPosition.GetSinTheta();
746  return KVPosition::GetSinTheta();
747  }
748  Double_t GetCosTheta() const override
749  {
751  if (ROOTGeo()) return fEWPosition.GetCosTheta();
752  return KVPosition::GetCosTheta();
753  }
754  Double_t GetPhi() const override
755  {
757  if (ROOTGeo()) return fEWPosition.GetPhi();
758  return KVPosition::GetPhi();
759  }
761  {
773  }
775  {
787  }
789  {
794  }
795 
796  void SetThickness(Double_t thick) override;
798  {
800  return fSingleLayer;
801  }
803  {
805  return !IsSingleLayer();
806  }
808  {
810  return IsGas();
811  }
812  Bool_t HasSameStructureAs(const KVDetector*) const;
813  void SetNameOfArray(const TString& n)
814  {
815  fNameOfArray = n;
816  }
817  const Char_t* GetNameOfArray() const
818  {
820  return fNameOfArray;
821  }
822 
824  {
825  return fDetSignals;
826  }
828  {
832 
834  {
835  for(auto s : fDetSignals)
836  {
837  auto sig = dynamic_cast<KVDetectorSignal*>(s);
838  if(use_signal_for_raw_data_tree(sig->GetName()))
840  }
841  }
842  return fDetSignalsForRawTree;
843  }
846  Bool_t AddDetectorSignalExpression(const KVString& type, const KVString& _expr);
847 
848  virtual Int_t GetIndex() const
849  {
853 
854  return 0;
855  }
856 
857  void SetPressure(Double_t P) override;
858  void SetTemperature(Double_t T) override;
859 
860  virtual Bool_t IsSegmented() const
861  {
862  return kFALSE;
863  }
864  virtual void AddEnergyLossInSubDetector(int, double) {}
865 
866  ClassDefOverride(KVDetector, 10) //Base class for the description of detectors in multidetector arrays
867 };
868 
870  const Char_t* type) const
871 {
872  if (fCalibrators)
874  return 0;
875 }
876 
878 {
879  if (fCalibrators)
881  return 0;
882 }
883 #endif
int Int_t
unsigned int UInt_t
#define OPT
#define e(i)
bool Bool_t
char Char_t
float Float_t
constexpr Bool_t kFALSE
double Double_t
constexpr Bool_t kTRUE
const char Option_t
#define BIT(n)
#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
char name[80]
Base class for all detector calibrations.
Definition: KVCalibrator.h:99
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.
Definition: KVDetector.h:173
Double_t GetCosineMaximumMisalignmentAngle() const override
Definition: KVDetector.h:774
void SetDetectorSignalValue(const KVString &type, Double_t val) const
Definition: KVDetector.h:516
void SetNameOfArray(const TString &n)
Definition: KVDetector.h:813
KVMaterial * GetAbsorber(const Char_t *name) const
Definition: KVDetector.h:328
Double_t GetInverseDetectorSignalValue(const KVString &output, Double_t value, const KVString &input, const KVNameValueList &params="") const
Definition: KVDetector.h:527
static KVDetector * MakeDetector(const Char_t *name, Float_t thick)
TGeoHMatrix * GetActiveLayerMatrix() const
Definition: KVDetector.h:599
void SetThickness(Double_t thick) override
void IncrementIdentifiedParticles(Int_t n=1)
Definition: KVDetector.h:565
virtual Bool_t IsSimMode() const
Definition: KVDetector.h:647
virtual Bool_t IsOK() const
Definition: KVDetector.h:676
virtual Bool_t use_signal_for_raw_data_tree(const TString &) const
Definition: KVDetector.h:295
KVPosition fEWPosition
position of entrance window i.e. first volume in detector geometry
Definition: KVDetector.h:176
virtual void SetSimMode(Bool_t on=kTRUE)
Definition: KVDetector.h:638
const Char_t * GetMaterialName() const
Definition: KVDetector.h:359
KVMaterial * GetActiveLayer() const override
Definition: KVDetector.h:322
KVUniqueNameList fParentStrucList
list of geometry structures which directly contain this detector
Definition: KVDetector.h:177
Int_t GetNumberOfAbsorberLayers() const
Definition: KVDetector.h:337
void IncrementUnidentifiedParticles(Int_t n=1)
Definition: KVDetector.h:559
Double_t GetSurfaceArea(int npoints=100000) const override
Definition: KVDetector.h:228
auto RemoveHit(KVNucleus *part)
Definition: KVDetector.h:431
virtual void AddEnergyLossInSubDetector(int, double)
Definition: KVDetector.h:864
void SetMaterial(const Char_t *type) override
Definition: KVDetector.cpp:169
Double_t ELossActive(Double_t *x, Double_t *par)
Definition: KVDetector.cpp:967
virtual KVDrawable< TGraph > DrawPunchThroughEnergyVsZ(Int_t massform=KVNucleus::kBetaMass)
void SetTemperature(Double_t T) override
TVector3 GetNormalIntoShape() const override
Definition: KVDetector.h:224
KVList * fCalibrators
list of associated calibrator objects
Definition: KVDetector.h:267
KVGeoStrucElement * GetParentStructure(const Char_t *type, const Char_t *name="") const
KVGroup * GetGroup() const
void AddDetectorSignal(KVDetectorSignal *ds)
Definition: KVDetector.h:287
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
virtual ~ KVDetector()
Bool_t IsCalibrated(const KVNameValueList &params={}) const
Definition: KVDetector.cpp:527
Bool_t fDetecting
=kTRUE if detector is "detecting", =kFALSE if not
Definition: KVDetector.h:283
Bool_t ReplaceCalibrator(const Char_t *type, KVCalibrator *cal, const KVNameValueList &opts="")
Definition: KVDetector.cpp:499
virtual Double_t GetTotalDeltaE(Int_t Z, Int_t A, Double_t Einc)
virtual Double_t GetEnergy() const
Definition: KVDetector.h:374
Int_t GetNHits() const
Return the number of particles hitting this detector in an event.
Definition: KVDetector.h:448
virtual TF1 * GetEResFunction(Int_t Z, Int_t A)
KVList * GetListOfCalibrators() const
Definition: KVDetector.h:411
const KVSeqCollection & GetListOfDetectorSignalsForRawTree() const
Definition: KVDetector.h:827
static Int_t fDetCounter
Definition: KVDetector.h:179
void AddAbsorber(KVMaterial *)
Definition: KVDetector.cpp:592
KVDetectorSignalTrace * AddDetectorSignalTrace()
virtual Double_t GetEResAfterDetector() const
Definition: KVDetector.h:631
TVector3 GetSurfaceCentre() const override
Definition: KVDetector.h:216
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
Definition: KVDetector.h:802
void AddParentStructure(KVGeoStrucElement *elem)
Bool_t IsSingleLayer() const
Definition: KVDetector.h:797
Double_t GetDeltaE(Int_t Z, Int_t A, Double_t Einc, Double_t=0.) override
Double_t fEResforEinc
used by GetIncidentEnergy & GetCorrectedEnergy
Definition: KVDetector.h:279
void Print(Option_t *option="") const override
Definition: KVDetector.cpp:338
virtual KVDrawable< TGraph > DrawPunchThroughEsurAVsZ(Int_t massform=KVNucleus::kBetaMass)
TVector3 GetVolumeCentre() const override
Definition: KVDetector.h:220
virtual Int_t GetIndex() const
Definition: KVDetector.h:848
virtual Int_t FindZmin(Double_t ELOSS=-1., Char_t mass_formula=-1)
Definition: KVDetector.cpp:897
Double_t GetSinTheta() const override
Definition: KVDetector.h:742
TF1 * fELossF
parametric function dE in active layer vs. incident energy
Definition: KVDetector.h:275
Double_t GetLinearRange(Int_t Z, Int_t A, Double_t Einc) override
const KVPosition & GetEntranceWindow() const
Definition: KVDetector.h:693
Bool_t HasDetectorSignal(const KVString &type) const
Definition: KVDetector.h:552
KVMaterial * GetAbsorber(Int_t i) const
Returns pointer to the i-th absorber in the detector (i=0 first absorber, i=1 second,...
Definition: KVDetector.cpp:608
@ kIdentifiedParticle
Definition: KVDetector.h:187
@ kUnidentifiedParticle
Definition: KVDetector.h:186
void ClearHits()
Definition: KVDetector.h:442
void SetEnergyLoss(Double_t e) const override
Definition: KVDetector.h:398
void remove_signal_for_calibrator(KVCalibrator *K)
Definition: KVDetector.cpp:662
Double_t GetMaximumMisalignmentAngle() const override
Definition: KVDetector.h:760
TF1 * fEResF
parametric function Eres residual energy after all layers of detector
Definition: KVDetector.h:276
TVector3 GetActiveLayerSurfaceCentre() const
Definition: KVDetector.h:583
TVector3 GetNormalToDetector() const
Definition: KVDetector.h:788
Bool_t HasSameStructureAs(const KVDetector *) const
virtual Bool_t Fired(Option_t *opt="any") const
Definition: KVDetector.h:461
UInt_t GetGroupNumber()
Double_t GetPhi() const override
Definition: KVDetector.h:754
virtual KVDetectorSignal * GetDetectorSignal(const KVString &type) const
Definition: KVDetector.h:543
virtual void ReadDefinitionFromFile(const Char_t *)
Double_t GetEnergyLoss() const override
Definition: KVDetector.h:394
void SetShape(TGeoBBox *s) override
Definition: KVDetector.h:200
void Copy(TObject &obj) const override
Definition: KVDetector.cpp:130
void SetDetecting(Bool_t yes=kTRUE)
Definition: KVDetector.h:671
virtual TF1 * GetELossFunction(Int_t Z, Int_t A)
KVUnownedList fParticles
list of particles hitting detector in an event
Definition: KVDetector.h:268
void SetActiveLayer(KVMaterial *actif)
Definition: KVDetector.h:312
KVDetector()
default ctor
Definition: KVDetector.cpp:59
TGeoHMatrix * GetMatrix() const override
Definition: KVDetector.h:204
Double_t GetSolidAngle() const override
Definition: KVDetector.h:706
Bool_t BelongsToUnidentifiedParticle() const
Definition: KVDetector.h:571
void DetectParticle(KVNucleus *, TVector3 *norm=0) override
Definition: KVDetector.cpp:200
Double_t RangeDet(Double_t *x, Double_t *par)
const Char_t * GetNameOfArray() const
Definition: KVDetector.h:817
Double_t GetParticleEIncFromERes(KVNucleus *, TVector3 *norm=0) override
Definition: KVDetector.cpp:301
virtual void RemoveCalibrators()
Definition: KVDetector.cpp:684
virtual Double_t GetEntranceWindowSurfaceArea()
Return surface area of first layer of detector in cm2.
TGeoBBox * GetShape() const override
Definition: KVDetector.h:208
const KVList * GetListOfAbsorbers() const
Definition: KVDetector.h:333
KVUniqueNameList fDetSignals
list of signals associated with detector
Definition: KVDetector.h:233
Bool_t IsGasDetector() const
Definition: KVDetector.h:807
Double_t get_corrected_energy(AbsorberStack *stack, KVNucleus *nuc, Double_t e, Bool_t transmission)
Definition: KVDetector.h:239
Int_t fUnidentP
temporary counters, determine state of identified/unidentified particle flags
Definition: KVDetector.h:191
TF1 * fRangeF
parametric function range of particles in detector
Definition: KVDetector.h:277
Bool_t AddDetectorSignalExpression(const KVString &type, const KVString &_expr)
Double_t GetDetectorSignalValue(const KVString &type, const KVNameValueList &params="") const
Definition: KVDetector.h:503
virtual void SetEnergy(Double_t e) const
Definition: KVDetector.h:386
virtual void SetEResAfterDetector(Double_t e)
Definition: KVDetector.h:627
virtual Double_t GetCalibratedEnergy() const
Definition: KVDetector.h:369
KVGeoDetectorNode fNode
positioning information relative to other detectors
Definition: KVDetector.h:178
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
Definition: KVDetector.h:666
virtual Bool_t IsSegmented() const
Definition: KVDetector.h:860
void SetActiveLayer(Int_t i)
Definition: KVDetector.h:317
Double_t GetMaxDeltaE(Int_t Z, Int_t A) override
Bool_t IsAnalysed()
Definition: KVDetector.h:453
TVector3 GetRandomDirection(Option_t *t="isotropic") override
Definition: KVDetector.h:712
void RemoveParentStructure(KVGeoStrucElement *elem)
virtual Double_t GetSmallestEmaxValid(Int_t Z, Int_t A) const
const KVSeqCollection & GetListOfDetectorSignals() const
Definition: KVDetector.h:823
KVUniqueNameList fDetSignalsForRawTree
list of signals used for raw data TTree
Definition: KVDetector.h:234
KVGeoDetectorNode * GetNode()
Definition: KVDetector.h:354
TVector3 GetRandomPointOnSurface() const override
Definition: KVDetector.h:212
Bool_t fSimMode
=kTRUE when using to simulate detector response, =kFALSE when analysing data
Definition: KVDetector.h:281
Double_t GetDeltaEFromERes(Int_t Z, Int_t A, Double_t Eres) override
TString fNameOfArray
name of multidetector array this detector is part of
Definition: KVDetector.h:181
Bool_t BelongsToIdentifiedParticle() const
Definition: KVDetector.h:575
void SetMatrix(const TGeoHMatrix *m) override
Definition: KVDetector.h:196
void SetEntranceWindowMatrix(const TGeoHMatrix *)
Set ROOT geometry global matrix transformation to coordinate frame of entrance window.
Double_t EResDet(Double_t *x, Double_t *par)
TGeoBBox * GetActiveLayerShape() const
Definition: KVDetector.h:594
virtual void Reset(Option_t *opt="")
Definition: KVDetector.h:418
TVector3 GetActiveLayerVolumeCentre() const
Definition: KVDetector.h:589
const TVector3 GetCentreOfEntranceWindow() const
Definition: KVDetector.h:699
KVMaterial * fActiveLayer
The active absorber in the detector.
Definition: KVDetector.h:180
void AddHit(KVNucleus *part)
Definition: KVDetector.h:424
void RemoveAllAbsorbers()
Definition: KVDetector.cpp:631
Double_t GetEIncOfMaxDeltaE(Int_t Z, Int_t A) override
Double_t GetTotalThicknessInCM() const
Definition: KVDetector.h:343
KVCalibrator * GetCalibrator(const Char_t *name, const Char_t *type) const
Definition: KVDetector.h:869
Int_t fIdentP
temporary counters, determine state of identified/unidentified particle flags
Definition: KVDetector.h:190
void SetPressure(Double_t P) override
Double_t GetELostByParticle(KVNucleus *, TVector3 *norm=0) override
Definition: KVDetector.cpp:266
virtual Bool_t IsPresent() const
Definition: KVDetector.h:657
void SetEntranceWindowShape(TGeoBBox *)
Set ROOT geometry shape of entrance window.
Bool_t fPresent
=kTRUE if detector is present, =kFALSE if it has been removed
Definition: KVDetector.h:282
void GetRandomAngles(Double_t &th, Double_t &ph, Option_t *t="isotropic") override
Definition: KVDetector.h:718
void SetActiveLayerShape(TGeoBBox *)
Set ROOT geometry shape of active layer volume.
TVector3 GetDirection() override
Definition: KVDetector.h:724
void SetAnalysed(Bool_t b=kTRUE)
Definition: KVDetector.h:457
TString fFName
dynamically generated full name of detector
Definition: KVDetector.h:266
Bool_t fSingleLayer
=kTRUE if detector has a single absorber layer
Definition: KVDetector.h:285
virtual TF1 * GetRangeFunction(Int_t Z, Int_t A)
Double_t GetDistance() const override
Definition: KVDetector.h:730
virtual Double_t GetCorrectedEnergy(KVNucleus *, Double_t e=-1., Bool_t transmission=kTRUE)
Definition: KVDetector.cpp:762
void init()
default initialisations
Definition: KVDetector.cpp:32
void Clear(Option_t *opt="") override
Definition: KVDetector.cpp:550
KVList fAbsorbers
list of absorbers making up the detector
Definition: KVDetector.h:269
Bool_t AddCalibrator(KVCalibrator *cal, const KVNameValueList &opts="")
Definition: KVDetector.cpp:421
Double_t GetCosTheta() const override
Definition: KVDetector.h:748
void SetPresent(Bool_t yes=kTRUE)
Definition: KVDetector.h:662
Double_t GetTheta() const override
Definition: KVDetector.h:736
Simple wrapper for objects which can be drawn (graphs, histograms)
Definition: KVDrawable.h:29
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.
Definition: KVGroup.h:20
Extended TList class which owns its objects by default.
Definition: KVList.h:22
Description of physical materials used to construct detectors & targets; interface to range tables.
Definition: KVMaterial.h:115
virtual void SetEnergyLoss(Double_t e) const
Definition: KVMaterial.h:176
virtual Double_t GetThickness() const
Definition: KVMaterial.cpp:537
Bool_t IsGas() const
Definition: KVMaterial.cpp:371
virtual Double_t GetEnergyLoss() const
Definition: KVMaterial.h:166
Handles lists of named parameters with different types, a list of KVNamedParameter objects.
Description of properties and kinematics of atomic nuclei.
Definition: KVNucleus.h:123
Int_t GetA() const
Definition: KVNucleus.cpp:796
Int_t GetZ() const
Return the number of proton / atomic number.
Definition: KVNucleus.cpp:767
Base class used for handling geometry in a multidetector array.
Definition: KVPosition.h:92
virtual void GetRandomAngles(Double_t &th, Double_t &ph, Option_t *t="isotropic")
Definition: KVPosition.cpp:238
virtual TVector3 GetRandomDirection(Option_t *t="isotropic")
Definition: KVPosition.cpp:200
virtual void SetShape(TGeoBBox *)
Definition: KVPosition.cpp:729
virtual Double_t GetSolidAngle(void) const
Definition: KVPosition.cpp:554
virtual Double_t GetTheta() const
Definition: KVPosition.h:216
virtual TGeoHMatrix * GetMatrix() const
Definition: KVPosition.cpp:746
virtual TVector3 GetSurfaceCentre() const
Definition: KVPosition.h:267
virtual TVector3 GetVolumeCentre() const
Definition: KVPosition.h:271
virtual Double_t GetPhi() const
Definition: KVPosition.h:228
virtual Double_t GetDistance(void) const
Definition: KVPosition.h:246
virtual Double_t GetSurfaceArea(int npoints=100000) const
Definition: KVPosition.cpp:902
virtual Double_t GetSinTheta() const
Definition: KVPosition.h:220
virtual TVector3 GetNormalIntoShape() const
Definition: KVPosition.h:275
virtual void SetMatrix(const TGeoHMatrix *)
Set the global transformation matrix for this volume.
Definition: KVPosition.cpp:713
virtual Double_t GetCosineMaximumMisalignmentAngle() const
Definition: KVPosition.h:291
virtual TGeoBBox * GetShape() const
Definition: KVPosition.cpp:759
virtual Double_t GetCosTheta() const
Definition: KVPosition.h:224
virtual Double_t GetMaximumMisalignmentAngle() const
Definition: KVPosition.h:282
virtual Bool_t ROOTGeo() const
Definition: KVPosition.h:257
virtual TVector3 GetDirection()
Definition: KVPosition.cpp:450
virtual TVector3 GetRandomPointOnSurface() const
Definition: KVPosition.cpp:782
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....
Definition: KVString.h:73
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.
Definition: KVUnownedList.h:20
virtual Int_t GetEntries() const
virtual Bool_t IsEmpty() const
const char * GetName() const override
void SetBit(UInt_t f)
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
const Int_t n
TMarker m
TArc a