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 "KVNucleus.h"
34 #include "Binary_t.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;
46 
160 class KVDetector: public KVMaterial, public KVPosition {
161 
162 private:
172 
173  enum {
174  kIsAnalysed = BIT(14), //for reconstruction of particles
175  kActiveSet = BIT(15), //internal - flag set true when SetActiveLayer called
176  kUnidentifiedParticle = BIT(16), //set if detector is in an unidentified particle's list
177  kIdentifiedParticle = BIT(17), //set if detector is in an identified particle's list
178  };
179 
182 
186  void SetMatrix(const TGeoHMatrix* m)
187  {
189  }
191  {
193  }
195  {
196  return KVPosition::GetMatrix();
197  }
199  {
200  return KVPosition::GetShape();
201  }
203  {
205  }
207  {
209  }
211  {
213  }
215  {
217  }
218  Double_t GetSurfaceArea(int npoints = 100000) const
219  {
220  return KVPosition::GetSurfaceArea(npoints);
221  }
223  {
225  }
226 
228 
230 
231 protected:
232 
240 
243 
245  Double_t EResDet(Double_t* x, Double_t* par);
247 
251 
254 
258 
260 
262  {
266  ds->SetDetector(this);
267  fDetSignals.Add(ds);
268  }
269 
270 public:
271  KVDetector();
272  KVDetector(const Char_t* type, const Float_t thick = 0.0);
273  KVDetector(const KVDetector&);
274  void init();
275  virtual ~ KVDetector();
276 
277 #if ROOT_VERSION_CODE >= ROOT_VERSION(3,4,0)
278  virtual void Copy(TObject& obj) const;
279 #else
280  virtual void Copy(TObject& obj);
281 #endif
282 
283  virtual void SetMaterial(const Char_t* type);
284  void AddAbsorber(KVMaterial*);
286  {
287  fActiveLayer = actif;
289  }
291  {
293  return fActiveLayer;
294  }
295  KVMaterial* GetAbsorber(Int_t i) const;
296  KVMaterial* GetAbsorber(const Char_t* name) const
297  {
299  return (KVMaterial*)(fAbsorbers ? fAbsorbers->FindObject(name) : 0);
300  }
302  {
303  return fAbsorbers;
304  }
306  {
307  return fAbsorbers->GetEntries();
308  }
309  virtual const Char_t* GetArrayName();
311  {
312  return fDepthInTelescope;
313  }
314 
316  {
319 
320  fTotThickness = 0;
321  TIter next(fAbsorbers);
322  KVMaterial* mat;
323  while ((mat = (KVMaterial*)next())) fTotThickness += mat->GetThickness();
324  return fTotThickness;
325  };
327  {
328  return &fNode;
329  }
330 
331  const Char_t* GetMaterialName() const
332  {
333  if (GetActiveLayer())
334  return GetActiveLayer()->GetName();
335  return KVMaterial::GetName();
336  };
337  virtual void DetectParticle(KVNucleus*, TVector3* norm = 0);
338  virtual Double_t GetELostByParticle(KVNucleus*, TVector3* norm = 0);
339  virtual Double_t GetParticleEIncFromERes(KVNucleus*, TVector3* norm = 0);
340 
341  void SetGain(Double_t gain);
342  Double_t GetGain() const;
343 
345  {
347  return GetDetectorSignalValue("Energy");
348  }
349  virtual Double_t GetEnergy() const
350  {
354  if (IsSimMode()) return ELoss; // in simulation mode, return calculated energy loss in active layer
355  if (ELoss > 0) return ELoss;
356  ELoss = GetCalibratedEnergy();
357  if (ELoss < 0) ELoss = 0;
358  SetEnergy(ELoss);
359  return ELoss;
360  }
361  virtual void SetEnergy(Double_t e) const
362  {
368  }
369  virtual Double_t GetEnergyLoss() const
370  {
371  return GetEnergy();
372  }
373  virtual void SetEnergyLoss(Double_t e) const
374  {
375  SetEnergy(e);
376  }
378  -1., Bool_t transmission = kTRUE);
379  virtual Int_t FindZmin(Double_t ELOSS = -1., Char_t mass_formula = -1);
380 
381  Bool_t AddCalibrator(KVCalibrator* cal, const KVNameValueList& opts = "");
382  Bool_t ReplaceCalibrator(const Char_t* type, KVCalibrator* cal, const KVNameValueList& opts = "");
383  KVCalibrator* GetCalibrator(const Char_t* name,
384  const Char_t* type) const;
385  KVCalibrator* GetCalibrator(const Char_t* type) const;
387  {
388  return fCalibrators;
389  }
391  {
394  return (HasDetectorSignal("Energy") && IsOK());
395  }
396  Bool_t IsCalibrated(const KVNameValueList& params) const;
397 
398  virtual void Clear(Option_t* opt = "");
399  virtual void Reset(Option_t* opt = "")
400  {
401  Clear(opt);
402  }
403  virtual void Print(Option_t* option = "") const;
404 
405  void AddHit(KVNucleus* part)
406  {
408 
409  if (!fParticles) {
410  fParticles = new KVList(kFALSE);
412  }
413  fParticles->Add(part);
414  SetAnalysed();
415  }
416 
417  void RemoveHit(KVNucleus* part)
418  {
420 
421  fParticles->Remove(part);
423  }
424 
426  KVList* GetHits() const
427  {
428  return fParticles;
429  }
430  void ClearHits()
431  {
433  if (fParticles) fParticles->Clear();
434  }
436  Int_t GetNHits() const
437  {
438  return (fParticles ? fParticles->GetEntries() : 0);
439  }
440 
441  inline UShort_t GetSegment() const;
442  inline virtual void SetSegment(UShort_t s);
444  {
445  return TestBit(kIsAnalysed);
446  }
447  void SetAnalysed(Bool_t b = kTRUE)
448  {
449  SetBit(kIsAnalysed, b);
450  }
451  virtual Bool_t Fired(Option_t* opt = "any") const
452  {
467 
468  if (!IsDetecting()) return kFALSE; //detector not working, no answer at all
469  if (IsSimMode()) return (GetActiveLayer()->GetEnergyLoss() > 0.); // simulation mode: detector fired if energy lost in active layer
470 
471  TString OPT(opt);
472  OPT.ToLower();
473  Bool_t all = (OPT == "all");
474 
475  TIter raw_it(&GetListOfDetectorSignals());
476  KVDetectorSignal* ds;
477  int count_raw = 0;
478  while ((ds = (KVDetectorSignal*)raw_it())) {
479  if (ds->IsRaw()) {
480  ++count_raw;
481  if (ds->IsFired()) {
482  if (!all) return kTRUE;
483  }
484  else {
485  if (all) return kFALSE;
486  }
487  }
488  }
489  return all && count_raw;
490  }
491  virtual void RemoveCalibrators();
492 
493  Double_t GetDetectorSignalValue(const KVString& type, const KVNameValueList& params = "") const
494  {
502 
504  return (s ? s->GetValue(params) : 0);
505  }
506  void SetDetectorSignalValue(const KVString& type, Double_t val) const
507  {
513 
515  if (s) s->SetValue(val);
516  }
517  Double_t GetInverseDetectorSignalValue(const KVString& output, Double_t value, const KVString& input, const KVNameValueList& params = "") const
518  {
529 
530  KVDetectorSignal* s = GetDetectorSignal(output);
531  return (s ? s->GetInverseValue(value, input, params) : 0);
532  }
533  virtual KVDetectorSignal* GetDetectorSignal(const KVString& type) const
534  {
539 
541  }
542  Bool_t HasDetectorSignal(const KVString& type) const
543  {
546  return (GetDetectorSignal(type) != nullptr);
547  }
548 
549 
550  virtual void AddIDTelescope(TObject* idt);
552  {
554  return fIDTelescopes;
555  }
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 
582  virtual TGeoVolume* GetGeoVolume();
583  virtual void AddToGeometry();
584  virtual void GetVerticesInOwnFrame(TVector3* /*corners[8]*/, Double_t /*depth*/, Double_t /*layer_thickness*/);
587  {
590  return GetSurfaceCentre();
591  }
593  {
596  }
598  {
600  return GetShape();
601  }
603  {
605  return GetMatrix();
606  }
607 
608  virtual Double_t GetMaxDeltaE(Int_t Z, Int_t A);
609  virtual Double_t GetEIncOfMaxDeltaE(Int_t Z, Int_t A);
610  virtual Double_t GetDeltaE(Int_t Z, Int_t A, Double_t Einc);
611  virtual Double_t GetTotalDeltaE(Int_t Z, Int_t A, Double_t Einc);
612  virtual Double_t GetERes(Int_t Z, Int_t A, Double_t Einc);
613  virtual Double_t GetIncidentEnergy(Int_t Z, Int_t A, Double_t delta_e =
614  -1.0, enum SolType type = kEmax);
615  /*virtual Double_t GetEResFromDeltaE(...) - DON'T IMPLEMENT, CALLS GETINCIDENTENERGY*/
616  virtual Double_t GetDeltaEFromERes(Int_t Z, Int_t A, Double_t Eres);
618  virtual Double_t GetRange(Int_t Z, Int_t A, Double_t Einc);
619  virtual Double_t GetLinearRange(Int_t Z, Int_t A, Double_t Einc);
623 
624  virtual TF1* GetEResFunction(Int_t Z, Int_t A);
625  virtual TF1* GetELossFunction(Int_t Z, Int_t A);
626  virtual TF1* GetRangeFunction(Int_t Z, Int_t A);
627 
629 
631  {
632  fEResforEinc = e;
633  }
635  {
636  return fEResforEinc;
637  }
638 
639  virtual void ReadDefinitionFromFile(const Char_t*);
640 
641  virtual TList* GetAlignedDetectors(UInt_t direction = /*KVGroup::kBackwards*/ 1);
642  void ResetAlignedDetectors(UInt_t direction = /*KVGroup::kBackwards*/ 1);
643 
644  virtual void SetSimMode(Bool_t on = kTRUE)
645  {
651  fSimMode = on;
652  }
653  virtual Bool_t IsSimMode() const
654  {
660  return fSimMode;
661  }
662 
663  virtual Bool_t IsPresent() const
664  {
666  return fPresent;
667  }
668  void SetPresent(Bool_t yes = kTRUE)
669  {
670  fPresent = yes;
671  }
672  virtual Bool_t IsDetecting() const
673  {
675  return fDetecting;
676  }
677  void SetDetecting(Bool_t yes = kTRUE)
678  {
679  fDetecting = yes;
680  }
681 
682  virtual Bool_t IsOK() const
683  {
685  return (fPresent && fDetecting);
686  }
687 
689 
690  KVGroup* GetGroup() const;
692 
695  KVGeoStrucElement* GetParentStructure(const Char_t* type, const Char_t* name = "") const;
696 
697  void SetActiveLayerMatrix(const TGeoHMatrix*);
702  {
705  return fEWPosition;
706  }
708  {
713  }
715  {
717  if (ROOTGeo()) return fEWPosition.GetSolidAngle();
718  return KVPosition::GetSolidAngle();
719  }
721  {
723  if (ROOTGeo()) return fEWPosition.GetRandomDirection(t);
725  }
726  void GetRandomAngles(Double_t& th, Double_t& ph, Option_t* t = "isotropic")
727  {
729  if (ROOTGeo()) fEWPosition.GetRandomAngles(th, ph, t);
730  else KVPosition::GetRandomAngles(th, ph, t);
731  }
733  {
735  if (ROOTGeo()) return fEWPosition.GetDirection();
736  return KVPosition::GetDirection();
737  }
739  {
741  if (ROOTGeo()) return fEWPosition.GetDistance();
742  return KVPosition::GetDistance();
743  }
745  {
747  if (ROOTGeo()) return fEWPosition.GetTheta();
748  return KVPosition::GetTheta();
749  }
751  {
753  if (ROOTGeo()) return fEWPosition.GetSinTheta();
754  return KVPosition::GetSinTheta();
755  }
757  {
759  if (ROOTGeo()) return fEWPosition.GetCosTheta();
760  return KVPosition::GetCosTheta();
761  }
762  Double_t GetPhi() const
763  {
765  if (ROOTGeo()) return fEWPosition.GetPhi();
766  return KVPosition::GetPhi();
767  }
768 
769  void SetThickness(Double_t thick);
771  {
773  return fSingleLayer;
774  }
775  Bool_t HasSameStructureAs(const KVDetector*) const;
776  void SetNameOfArray(const TString& n)
777  {
778  fNameOfArray = n;
779  }
780  const Char_t* GetNameOfArray() const
781  {
783  return fNameOfArray;
784  }
785 
787  {
788  return fDetSignals;
789  }
791  {
796 
797  auto signal = new KVDetectorSignal(type, this);
798  fDetSignals.Add(signal);
799  return signal;
800  }
801  Bool_t AddDetectorSignalExpression(const KVString& type, const KVString& _expr);
802 
803  virtual Int_t GetIndex() const
804  {
808 
809  return 0;
810  }
811 
812  ClassDef(KVDetector, 10) //Base class for the description of detectors in multidetector arrays
813 };
814 
816  const Char_t* type) const
817 {
818  if (fCalibrators)
820  return 0;
821 }
822 
824 {
825  if (fCalibrators)
827  return 0;
828 }
829 
831 {
833  return fSegment;
834 }
835 
837 {
839  fSegment = s;
840 }
841 
842 inline void KVDetector::SetGain(Double_t gain)
843 {
844  fGain = gain;
845 }
846 
848 {
849  return fGain;
850 }
851 #endif
int Int_t
unsigned int UInt_t
#define OPT
#define e(i)
bool Bool_t
unsigned short UShort_t
char Char_t
float Float_t
constexpr Bool_t kFALSE
double Double_t
constexpr Bool_t kTRUE
const char Option_t
#define ClassDef(name, id)
#define BIT(n)
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
Base class for output signal data produced by a detector.
virtual Bool_t IsRaw() const
Bool_t IsFired() const
void SetDetector(const KVDetector *d)
Base class for detector geometry description.
Definition: KVDetector.h:160
void SetDetectorSignalValue(const KVString &type, Double_t val) const
Definition: KVDetector.h:506
void SetNameOfArray(const TString &n)
Definition: KVDetector.h:776
KVMaterial * GetAbsorber(const Char_t *name) const
Definition: KVDetector.h:296
Double_t GetInverseDetectorSignalValue(const KVString &output, Double_t value, const KVString &input, const KVNameValueList &params="") const
Definition: KVDetector.h:517
static KVDetector * MakeDetector(const Char_t *name, Float_t thick)
virtual const Char_t * GetArrayName()
Definition: KVDetector.cpp:439
TGeoHMatrix * GetActiveLayerMatrix() const
Definition: KVDetector.h:602
void IncrementIdentifiedParticles(Int_t n=1)
Definition: KVDetector.h:565
virtual Bool_t IsSimMode() const
Definition: KVDetector.h:653
virtual Bool_t IsOK() const
Definition: KVDetector.h:682
Int_t fCalWarning
just a counter so that missing calibrator warning is given only once
Definition: KVDetector.h:239
void SetMatrix(const TGeoHMatrix *m)
Definition: KVDetector.h:186
KVPosition fEWPosition
position of entrance window i.e. first volume in detector geometry
Definition: KVDetector.h:163
virtual Double_t GetMaxDeltaE(Int_t Z, Int_t A)
virtual void SetSimMode(Bool_t on=kTRUE)
Definition: KVDetector.h:644
@ kIdentifiedParticle
Definition: KVDetector.h:177
@ kUnidentifiedParticle
Definition: KVDetector.h:176
const Char_t * GetMaterialName() const
Definition: KVDetector.h:331
KVUniqueNameList fParentStrucList
list of geometry structures which directly contain this detector
Definition: KVDetector.h:164
Int_t GetNumberOfAbsorberLayers() const
Definition: KVDetector.h:305
void IncrementUnidentifiedParticles(Int_t n=1)
Definition: KVDetector.h:559
virtual void GetVerticesInOwnFrame(TVector3 *, Double_t, Double_t)
virtual Double_t GetERes(Int_t Z, Int_t A, Double_t Einc)
virtual Double_t GetELostByParticle(KVNucleus *, TVector3 *norm=0)
Definition: KVDetector.cpp:276
Double_t ELossActive(Double_t *x, Double_t *par)
Definition: KVDetector.cpp:981
TList * GetTelescopesForIdentification()
Definition: KVDetector.cpp:762
virtual void AddIDTelescope(TObject *idt)
Add ID telescope to list of telescopes to which detector belongs.
Definition: KVDetector.cpp:723
KVList * GetAlignedIDTelescopes()
Definition: KVDetector.cpp:737
KVList * fCalibrators
list of associated calibrator objects
Definition: KVDetector.h:234
KVGeoStrucElement * GetParentStructure(const Char_t *type, const Char_t *name="") const
KVGroup * GetGroup() const
void AddDetectorSignal(KVDetectorSignal *ds)
Definition: KVDetector.h:261
void GetRandomAngles(Double_t &th, Double_t &ph, Option_t *t="isotropic")
Definition: KVDetector.h:726
virtual ~ KVDetector()
Bool_t fDetecting
=kTRUE if detector is "detecting", =kFALSE if not
Definition: KVDetector.h:257
virtual Double_t GetRange(Int_t Z, Int_t A, Double_t Einc)
virtual void SetEnergyLoss(Double_t e) const
Definition: KVDetector.h:373
Bool_t ReplaceCalibrator(const Char_t *type, KVCalibrator *cal, const KVNameValueList &opts="")
Definition: KVDetector.cpp:552
KVList * GetHits() const
Return the list of particles hitting this detector in an event.
Definition: KVDetector.h:426
virtual Double_t GetTotalDeltaE(Int_t Z, Int_t A, Double_t Einc)
virtual TGeoVolume * GetGeoVolume()
virtual Double_t GetEnergy() const
Definition: KVDetector.h:349
Int_t GetNHits() const
Return the number of particles hitting this detector in an event.
Definition: KVDetector.h:436
virtual TF1 * GetEResFunction(Int_t Z, Int_t A)
virtual void SetSegment(UShort_t s)
Definition: KVDetector.h:836
TVector3 GetSurfaceNormal() const
Definition: KVDetector.h:214
KVList * GetListOfCalibrators() const
Definition: KVDetector.h:386
virtual Double_t GetEIncOfMaxDeltaE(Int_t Z, Int_t A)
void RemoveHit(KVNucleus *part)
Definition: KVDetector.h:417
Double_t GetSinTheta() const
Definition: KVDetector.h:750
virtual TGraph * DrawPunchThroughEsurAVsZ(Int_t massform=KVNucleus::kBetaMass)
Double_t GetSolidAngle() const
Definition: KVDetector.h:714
static Int_t fDetCounter
Definition: KVDetector.h:166
void AddAbsorber(KVMaterial *)
Definition: KVDetector.cpp:630
virtual Double_t GetEnergyLoss() const
Definition: KVDetector.h:369
virtual Double_t GetEResAfterDetector() const
Definition: KVDetector.h:634
KVList * GetIDTelescopes()
Definition: KVDetector.h:551
KVList * fIDTelescopes
list of ID telescopes to which detector belongs
Definition: KVDetector.h:168
void SetShape(TGeoBBox *s)
Definition: KVDetector.h:190
TVector3 GetRandomPointOnSurface() const
Definition: KVDetector.h:202
void AddParentStructure(KVGeoStrucElement *elem)
Bool_t IsSingleLayer() const
Definition: KVDetector.h:770
Double_t GetTheta() const
Definition: KVDetector.h:744
Double_t fEResforEinc
used by GetIncidentEnergy & GetCorrectedEnergy
Definition: KVDetector.h:252
KVList * fIDTelAlign
list of ID telescopes made of this detector and all aligned detectors placed in front of it
Definition: KVDetector.h:169
TGeoHMatrix * GetMatrix() const
Definition: KVDetector.h:194
virtual Int_t GetIndex() const
Definition: KVDetector.h:803
virtual Int_t FindZmin(Double_t ELOSS=-1., Char_t mass_formula=-1)
Definition: KVDetector.cpp:907
TF1 * fELossF
parametric function dE in active layer vs. incident energy
Definition: KVDetector.h:248
TList * fAlignedDetectors[2]
stores lists of aligned detectors in both directions
Definition: KVDetector.h:253
virtual void Clear(Option_t *opt="")
Definition: KVDetector.cpp:597
const KVPosition & GetEntranceWindow() const
Definition: KVDetector.h:701
Bool_t HasDetectorSignal(const KVString &type) const
Definition: KVDetector.h:542
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:646
void ClearHits()
Definition: KVDetector.h:430
void remove_signal_for_calibrator(KVCalibrator *K)
Definition: KVDetector.cpp:678
KVList * fAbsorbers
list of absorbers making up the detector
Definition: KVDetector.h:236
TVector3 GetVolumeCentre() const
Definition: KVDetector.h:210
TList * fIDTele4Ident
list of ID telescopes used for particle ID
Definition: KVDetector.h:170
Double_t GetGain() const
Definition: KVDetector.h:847
TF1 * fEResF
parametric function Eres residual energy after all layers of detector
Definition: KVDetector.h:249
KVDetectorSignal * AddDetectorSignal(const KVString &type)
Definition: KVDetector.h:790
virtual void DeduceACQParameters(KVEvent *, KVNumberList &)
Definition: KVDetector.h:688
virtual Double_t GetSmallestEmaxValid(Int_t Z, Int_t A)
TVector3 GetActiveLayerSurfaceCentre() const
Definition: KVDetector.h:586
Bool_t HasSameStructureAs(const KVDetector *) const
void SetThickness(Double_t thick)
virtual Bool_t Fired(Option_t *opt="any") const
Definition: KVDetector.h:451
virtual void AddToGeometry()
UInt_t GetGroupNumber()
virtual Double_t GetIncidentEnergy(Int_t Z, Int_t A, Double_t delta_e=-1.0, enum SolType type=kEmax)
virtual KVDetectorSignal * GetDetectorSignal(const KVString &type) const
Definition: KVDetector.h:533
virtual void ReadDefinitionFromFile(const Char_t *)
Double_t GetTotalThicknessInCM()
Definition: KVDetector.h:315
Bool_t IsCalibrated() const
Definition: KVDetector.h:390
void SetDetecting(Bool_t yes=kTRUE)
Definition: KVDetector.h:677
virtual TF1 * GetELossFunction(Int_t Z, Int_t A)
Double_t GetSurfaceArea(int npoints=100000) const
Definition: KVDetector.h:218
void SetActiveLayer(KVMaterial *actif)
Definition: KVDetector.h:285
KVDetector()
default ctor
Definition: KVDetector.cpp:76
Bool_t BelongsToUnidentifiedParticle() const
Definition: KVDetector.h:571
Double_t RangeDet(Double_t *x, Double_t *par)
KVMaterial * GetActiveLayer() const
Definition: KVDetector.h:290
const Char_t * GetNameOfArray() const
Definition: KVDetector.h:780
virtual void RemoveCalibrators()
Definition: KVDetector.cpp:700
virtual Double_t GetEntranceWindowSurfaceArea()
Return surface area of first layer of detector in cm2.
virtual TGraph * DrawPunchThroughEnergyVsZ(Int_t massform=KVNucleus::kBetaMass)
KVUniqueNameList fDetSignals
list of signals associated with detector
Definition: KVDetector.h:227
Double_t GetPhi() const
Definition: KVDetector.h:762
virtual Double_t GetPunchThroughEnergy(Int_t Z, Int_t A)
Int_t fUnidentP
temporary counters, determine state of identified/unidentified particle flags
Definition: KVDetector.h:181
TF1 * fRangeF
parametric function range of particles in detector
Definition: KVDetector.h:250
Bool_t AddDetectorSignalExpression(const KVString &type, const KVString &_expr)
Double_t GetDetectorSignalValue(const KVString &type, const KVNameValueList &params="") const
Definition: KVDetector.h:493
virtual void SetEnergy(Double_t e) const
Definition: KVDetector.h:361
virtual Double_t GetParticleEIncFromERes(KVNucleus *, TVector3 *norm=0)
Definition: KVDetector.cpp:328
virtual void SetEResAfterDetector(Double_t e)
Definition: KVDetector.h:630
virtual Double_t GetCalibratedEnergy() const
Definition: KVDetector.h:344
KVGeoDetectorNode fNode
positioning information relative to other detectors
Definition: KVDetector.h:165
void SetActiveLayerMatrix(const TGeoHMatrix *)
Set ROOT geometry global matrix transformation to coordinate frame of active layer volume.
UShort_t fSegment
used in particle reconstruction
Definition: KVDetector.h:237
UShort_t GetSegment() const
Definition: KVDetector.h:830
virtual Bool_t IsDetecting() const
Definition: KVDetector.h:672
TVector3 GetSurfaceCentre() const
Definition: KVDetector.h:206
virtual void Copy(TObject &obj) const
Definition: KVDetector.cpp:127
Bool_t IsAnalysed()
Definition: KVDetector.h:443
void RemoveParentStructure(KVGeoStrucElement *elem)
TVector3 GetDirection()
Definition: KVDetector.h:732
const KVSeqCollection & GetListOfDetectorSignals() const
Definition: KVDetector.h:786
KVList * fParticles
list of particles hitting detector in an event
Definition: KVDetector.h:235
virtual TList * GetAlignedDetectors(UInt_t direction=1)
KVGeoDetectorNode * GetNode()
Definition: KVDetector.h:326
Double_t GetDistance() const
Definition: KVDetector.h:738
Bool_t fSimMode
=kTRUE when using to simulate detector response, =kFALSE when analysing data
Definition: KVDetector.h:255
TString fNameOfArray
name of multidetector array this detector is part of
Definition: KVDetector.h:171
Bool_t BelongsToIdentifiedParticle() const
Definition: KVDetector.h:575
void SetEntranceWindowMatrix(const TGeoHMatrix *)
Set ROOT geometry global matrix transformation to coordinate frame of entrance window.
virtual Double_t GetDeltaE(Int_t Z, Int_t A, Double_t Einc)
Double_t EResDet(Double_t *x, Double_t *par)
TGeoBBox * GetActiveLayerShape() const
Definition: KVDetector.h:597
KVList * GetListOfAbsorbers() const
Definition: KVDetector.h:301
virtual Double_t GetDepthInTelescope() const
Definition: KVDetector.h:310
Double_t fDepthInTelescope
used to store depth of detector in parent telescope
Definition: KVDetector.h:242
virtual void Reset(Option_t *opt="")
Definition: KVDetector.h:399
Double_t fGain
gain of amplifier
Definition: KVDetector.h:238
TVector3 GetActiveLayerVolumeCentre() const
Definition: KVDetector.h:592
const TVector3 GetCentreOfEntranceWindow() const
Definition: KVDetector.h:707
KVMaterial * fActiveLayer
The active absorber in the detector.
Definition: KVDetector.h:167
void AddHit(KVNucleus *part)
Definition: KVDetector.h:405
KVCalibrator * GetCalibrator(const Char_t *name, const Char_t *type) const
Definition: KVDetector.h:815
virtual Double_t GetIncidentEnergyFromERes(Int_t Z, Int_t A, Double_t Eres)
Int_t fIdentP
temporary counters, determine state of identified/unidentified particle flags
Definition: KVDetector.h:180
Double_t GetMisalignmentAngle() const
Definition: KVDetector.h:222
virtual Bool_t IsPresent() const
Definition: KVDetector.h:663
virtual Double_t GetDeltaEFromERes(Int_t Z, Int_t A, Double_t Eres)
TVector3 GetRandomDirection(Option_t *t="isotropic")
Definition: KVDetector.h:720
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:256
void ResetAlignedDetectors(UInt_t direction=1)
virtual void DetectParticle(KVNucleus *, TVector3 *norm=0)
Definition: KVDetector.cpp:203
void SetActiveLayerShape(TGeoBBox *)
Set ROOT geometry shape of active layer volume.
void SetAnalysed(Bool_t b=kTRUE)
Definition: KVDetector.h:447
void SetGain(Double_t gain)
Definition: KVDetector.h:842
TString fFName
dynamically generated full name of detector
Definition: KVDetector.h:233
virtual void Print(Option_t *option="") const
Definition: KVDetector.cpp:364
Bool_t fSingleLayer
=kTRUE if detector has a single absorber layer
Definition: KVDetector.h:259
virtual Double_t GetLinearRange(Int_t Z, Int_t A, Double_t Einc)
virtual TF1 * GetRangeFunction(Int_t Z, Int_t A)
virtual Double_t GetCorrectedEnergy(KVNucleus *, Double_t e=-1., Bool_t transmission=kTRUE)
Definition: KVDetector.cpp:811
void init()
default initialisations
Definition: KVDetector.cpp:38
Bool_t AddCalibrator(KVCalibrator *cal, const KVNameValueList &opts="")
Definition: KVDetector.cpp:478
Double_t GetCosTheta() const
Definition: KVDetector.h:756
Double_t fTotThickness
used to store value calculated by GetTotalThicknessInCM
Definition: KVDetector.h:241
void SetPresent(Bool_t yes=kTRUE)
Definition: KVDetector.h:668
TGeoBBox * GetShape() const
Definition: KVDetector.h:198
virtual void SetMaterial(const Char_t *type)
Definition: KVDetector.cpp:177
Abstract base class container for multi-particle events.
Definition: KVEvent.h:67
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:28
Description of physical materials used to construct detectors & targets; interface to range tables.
Definition: KVMaterial.h:94
virtual void SetEnergyLoss(Double_t e) const
Definition: KVMaterial.h:154
virtual Double_t GetThickness() const
Definition: KVMaterial.cpp:487
virtual Double_t GetEnergyLoss() const
Definition: KVMaterial.h:144
Handles lists of named parameters with different types, a list of KVNamedParameter objects.
Description of properties and kinematics of atomic nuclei.
Definition: KVNucleus.h:126
Strings used to represent a set of ranges of values.
Definition: KVNumberList.h:85
Base class used for handling geometry in a multidetector array.
Definition: KVPosition.h:91
virtual void GetRandomAngles(Double_t &th, Double_t &ph, Option_t *t="isotropic")
Definition: KVPosition.cpp:280
virtual TVector3 GetRandomDirection(Option_t *t="isotropic")
Definition: KVPosition.cpp:242
virtual void SetShape(TGeoBBox *)
Definition: KVPosition.cpp:743
virtual Double_t GetSolidAngle(void) const
Definition: KVPosition.cpp:567
virtual Double_t GetTheta() const
Definition: KVPosition.h:160
Bool_t ROOTGeo() const
Returns kTRUE if ROOT geometry is used, kFALSE if not.
Definition: KVPosition.cpp:598
virtual TVector3 GetSurfaceCentre() const
Definition: KVPosition.cpp:886
virtual TGeoHMatrix * GetMatrix() const
Definition: KVPosition.cpp:777
virtual Double_t GetPhi() const
Definition: KVPosition.h:172
virtual Double_t GetDistance(void) const
Definition: KVPosition.h:190
virtual TVector3 GetVolumeCentre() const
Definition: KVPosition.cpp:915
virtual Double_t GetSurfaceArea(int npoints=100000) const
Definition: KVPosition.cpp:974
virtual Double_t GetSinTheta() const
Definition: KVPosition.h:164
virtual TVector3 GetSurfaceNormal() const
Definition: KVPosition.cpp:945
virtual Double_t GetMisalignmentAngle() const
virtual void SetMatrix(const TGeoHMatrix *)
Definition: KVPosition.cpp:702
virtual TGeoBBox * GetShape() const
Definition: KVPosition.cpp:790
virtual Double_t GetCosTheta() const
Definition: KVPosition.h:168
virtual TVector3 GetDirection()
Definition: KVPosition.cpp:463
virtual TVector3 GetRandomPointOnSurface() const
Definition: KVPosition.cpp:813
KaliVeda extensions to ROOT collection classes.
T * get_object(const TString &name) const
virtual void Clear(Option_t *option="")
virtual void SetCleanup(Bool_t enable=kTRUE)
virtual TObject * FindObjectByType(const Char_t *) const
virtual void Add(TObject *obj)
virtual TObject * FindObjectWithNameAndType(const Char_t *name, const Char_t *type) const
virtual TObject * Remove(TObject *obj)
Remove object from list.
virtual TObject * FindObject(const char *name) 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.
virtual void Add(TObject *obj)
virtual Int_t GetEntries() 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