KaliVeda  1.12/06
Heavy-Ion Analysis Toolkit
KVDetector.h
Go to the documentation of this file.
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 "KVACQParam.h"
35 #include "Binary_t.h"
36 #include "KVGeoDetectorNode.h"
37 #include "KVUniqueNameList.h"
38 #include "KVDetectorSignal.h"
39 
40 class KVGeoStrucElement;
41 class KVGroup;
42 class KVCalibrator;
43 class TGeoVolume;
44 class TTree;
45 class TGraph;
46 class KVEvent;
47 
121 class KVDetector: public KVMaterial, public KVPosition {
122 
123 private:
133 
134  enum {
135  kIsAnalysed = BIT(14), //for reconstruction of particles
136  kActiveSet = BIT(15), //internal - flag set true when SetActiveLayer called
137  kUnidentifiedParticle = BIT(16), //set if detector is in an unidentified particle's list
138  kIdentifiedParticle = BIT(17), //set if detector is in an identified particle's list
139  };
140 
143 
147  void SetMatrix(const TGeoHMatrix* m)
148  {
150  }
152  {
154  }
156  {
157  return KVPosition::GetMatrix();
158  }
160  {
161  return KVPosition::GetShape();
162  }
164  {
166  }
168  {
170  }
172  {
174  }
176  {
178  }
179  Double_t GetSurfaceArea(int npoints = 100000) const
180  {
181  return KVPosition::GetSurfaceArea(npoints);
182  }
184  {
186  }
187 
189 
191 
193 
194 protected:
195 
204 
207 
209 
211  Double_t EResDet(Double_t* x, Double_t* par);
213 
217 
220 
224 
226 
228 
229 public:
230  KVDetector();
231  KVDetector(const Char_t* type, const Float_t thick = 0.0);
232  KVDetector(const KVDetector&);
233  void init();
234  virtual ~ KVDetector();
235 
236 #if ROOT_VERSION_CODE >= ROOT_VERSION(3,4,0)
237  virtual void Copy(TObject& obj) const;
238 #else
239  virtual void Copy(TObject& obj);
240 #endif
241 
242  virtual void SetMaterial(const Char_t* type);
243  void AddAbsorber(KVMaterial*);
245  {
246  fActiveLayer = actif;
248  }
250  {
252  return fActiveLayer;
253  }
254  KVMaterial* GetAbsorber(Int_t i) const;
255  KVMaterial* GetAbsorber(const Char_t* name) const
256  {
258  return (KVMaterial*)(fAbsorbers ? fAbsorbers->FindObject(name) : 0);
259  }
261  {
262  return fAbsorbers;
263  }
265  {
266  return fAbsorbers->GetEntries();
267  }
268  virtual const Char_t* GetArrayName();
270  {
271  return fDepthInTelescope;
272  }
273 
275  {
278 
279  fTotThickness = 0;
280  TIter next(fAbsorbers);
281  KVMaterial* mat;
282  while ((mat = (KVMaterial*)next())) fTotThickness += mat->GetThickness();
283  return fTotThickness;
284  };
286  {
287  return &fNode;
288  }
289 
290  const Char_t* GetMaterialName() const
291  {
292  if (GetActiveLayer())
293  return GetActiveLayer()->GetName();
294  return KVMaterial::GetName();
295  };
296  virtual void DetectParticle(KVNucleus*, TVector3* norm = 0);
297  virtual Double_t GetELostByParticle(KVNucleus*, TVector3* norm = 0);
298  virtual Double_t GetParticleEIncFromERes(KVNucleus*, TVector3* norm = 0);
299 
300  void SetGain(Double_t gain);
301  Double_t GetGain() const;
302 
304  {
306  return GetDetectorSignalValue("Energy");
307  }
308  virtual Double_t GetEnergy() const
309  {
313  if (IsSimMode()) return ELoss; // in simulation mode, return calculated energy loss in active layer
314  if (ELoss > 0) return ELoss;
315  ELoss = GetCalibratedEnergy();
316  if (ELoss < 0) ELoss = 0;
317  SetEnergy(ELoss);
318  return ELoss;
319  }
320  virtual void SetEnergy(Double_t e) const
321  {
327  }
328  virtual Double_t GetEnergyLoss() const
329  {
330  return GetEnergy();
331  }
332  virtual void SetEnergyLoss(Double_t e) const
333  {
334  SetEnergy(e);
335  }
337  -1., Bool_t transmission = kTRUE);
338  virtual Int_t FindZmin(Double_t ELOSS = -1., Char_t mass_formula = -1);
339 
340  void AddACQParam(KVACQParam*);
341  virtual KVACQParam* GetACQParam(const Char_t* /*name*/) const;
343  {
344  return fACQParams;
345  }
346  virtual Float_t GetACQData(const Char_t* /*name*/) const;
347  virtual Float_t GetPedestal(const Char_t* /*name*/) const;
348  virtual void SetPedestal(const Char_t* /*name*/, Float_t);
349 
350  Bool_t AddCalibrator(KVCalibrator* cal, const KVNameValueList& opts = "");
351  Bool_t ReplaceCalibrator(const Char_t* type, KVCalibrator* cal, const KVNameValueList& opts = "");
352  KVCalibrator* GetCalibrator(const Char_t* name,
353  const Char_t* type) const;
354  KVCalibrator* GetCalibrator(const Char_t* type) const;
356  {
357  return fCalibrators;
358  }
360  {
363  return (HasDetectorSignalValue("Energy") && IsOK());
364  }
365  Bool_t IsCalibrated(const KVNameValueList& params) const;
366 
367  virtual void Clear(Option_t* opt = "");
368  virtual void Reset(Option_t* opt = "")
369  {
370  Clear(opt);
371  }
372  virtual void Print(Option_t* option = "") const;
373 
374  void AddHit(KVNucleus* part)
375  {
377 
378  if (!fParticles) {
379  fParticles = new KVList(kFALSE);
381  }
382  fParticles->Add(part);
383  SetAnalysed();
384  }
385 
386  void RemoveHit(KVNucleus* part)
387  {
389 
390  fParticles->Remove(part);
392  }
393 
395  KVList* GetHits() const
396  {
397  return fParticles;
398  }
399  void ClearHits()
400  {
402  if (fParticles) fParticles->Clear();
403  }
405  Int_t GetNHits() const
406  {
407  return (fParticles ? fParticles->GetEntries() : 0);
408  }
409 
410  inline UShort_t GetSegment() const;
411  inline virtual void SetSegment(UShort_t s);
413  {
414  return TestBit(kIsAnalysed);
415  }
416  void SetAnalysed(Bool_t b = kTRUE)
417  {
418  SetBit(kIsAnalysed, b);
419  }
420  inline virtual Bool_t Fired(Option_t* opt = "any") const;
421  inline virtual Bool_t FiredP(Option_t* opt = "any") const;
422 
423  virtual void SetACQParams();
424  virtual void RemoveCalibrators();
425 
426  Double_t GetDetectorSignalValue(const TString& type, const KVNameValueList& params = "") const
427  {
436 
438  return (s ? s->GetValue(params) : 0);
439  }
440  void SetDetectorSignalValue(const TString& type, Double_t val) const
441  {
444 
446  if (s) s->SetValue(val);
447  }
448  Double_t GetInverseDetectorSignalValue(const TString& output, Double_t value, const TString& input, const KVNameValueList& params = "") const
449  {
459 
461  return (s ? s->GetInverseValue(value, input, params) : 0);
462  }
463  virtual KVDetectorSignal* GetDetectorSignal(const TString& type) const
464  {
467 
469  }
471  {
473  return (GetDetectorSignal(type) != nullptr);
474  }
475 
476 
477  virtual void AddIDTelescope(TObject* idt);
479  {
481  return fIDTelescopes;
482  }
485 
487  {
488  fUnidentP += n;
489  fUnidentP = (fUnidentP > 0) * fUnidentP;
491  }
493  {
494  fIdentP += n;
495  fIdentP = (fIdentP > 0) * fIdentP;
497  }
499  {
501  }
503  {
505  }
506 
507  static KVDetector* MakeDetector(const Char_t* name, Float_t thick);
508 
509  virtual TGeoVolume* GetGeoVolume();
510  virtual void AddToGeometry();
511  virtual void GetVerticesInOwnFrame(TVector3* /*corners[8]*/, Double_t /*depth*/, Double_t /*layer_thickness*/);
514  {
517  return GetSurfaceCentre();
518  }
520  {
523  }
525  {
527  return GetShape();
528  }
530  {
532  return GetMatrix();
533  }
534 
535  virtual void SetFiredBitmask(KVString&);
537  {
538  return fFiredMask;
539  }
541  {
543  }
545  {
552  return -1;
553  }
554  virtual Double_t GetMaxDeltaE(Int_t Z, Int_t A);
555  virtual Double_t GetEIncOfMaxDeltaE(Int_t Z, Int_t A);
556  virtual Double_t GetDeltaE(Int_t Z, Int_t A, Double_t Einc);
557  virtual Double_t GetTotalDeltaE(Int_t Z, Int_t A, Double_t Einc);
558  virtual Double_t GetERes(Int_t Z, Int_t A, Double_t Einc);
559  virtual Double_t GetIncidentEnergy(Int_t Z, Int_t A, Double_t delta_e =
560  -1.0, enum SolType type = kEmax);
561  /*virtual Double_t GetEResFromDeltaE(...) - DON'T IMPLEMENT, CALLS GETINCIDENTENERGY*/
562  virtual Double_t GetDeltaEFromERes(Int_t Z, Int_t A, Double_t Eres);
564  virtual Double_t GetRange(Int_t Z, Int_t A, Double_t Einc);
565  virtual Double_t GetLinearRange(Int_t Z, Int_t A, Double_t Einc);
569 
570  virtual TF1* GetEResFunction(Int_t Z, Int_t A);
571  virtual TF1* GetELossFunction(Int_t Z, Int_t A);
572  virtual TF1* GetRangeFunction(Int_t Z, Int_t A);
573 
575 
577  {
578  fEResforEinc = e;
579  }
581  {
582  return fEResforEinc;
583  }
584 
585  virtual void ReadDefinitionFromFile(const Char_t*);
586 
587  virtual TList* GetAlignedDetectors(UInt_t direction = /*KVGroup::kBackwards*/ 1);
588  void ResetAlignedDetectors(UInt_t direction = /*KVGroup::kBackwards*/ 1);
589 
590  virtual void SetSimMode(Bool_t on = kTRUE)
591  {
597  fSimMode = on;
598  }
599  virtual Bool_t IsSimMode() const
600  {
606  return fSimMode;
607  }
608 
609  virtual Bool_t IsPresent() const
610  {
612  return fPresent;
613  }
614  void SetPresent(Bool_t yes = kTRUE)
615  {
616  fPresent = yes;
617  }
618  virtual Bool_t IsDetecting() const
619  {
621  return fDetecting;
622  }
623  void SetDetecting(Bool_t yes = kTRUE)
624  {
625  fDetecting = yes;
626  }
627 
628  virtual Bool_t IsOK() const
629  {
631  return (fPresent && fDetecting);
632  }
633 
635 
636  KVGroup* GetGroup() const;
638 
641  KVGeoStrucElement* GetParentStructure(const Char_t* type, const Char_t* name = "") const;
642 
643  void SetActiveLayerMatrix(const TGeoHMatrix*);
648  {
651  return fEWPosition;
652  }
654  {
659  }
661  {
663  if (ROOTGeo()) return fEWPosition.GetSolidAngle();
664  return KVPosition::GetSolidAngle();
665  }
667  {
669  if (ROOTGeo()) return fEWPosition.GetRandomDirection(t);
671  }
672  void GetRandomAngles(Double_t& th, Double_t& ph, Option_t* t = "isotropic")
673  {
675  if (ROOTGeo()) fEWPosition.GetRandomAngles(th, ph, t);
676  else KVPosition::GetRandomAngles(th, ph, t);
677  }
679  {
681  if (ROOTGeo()) return fEWPosition.GetDirection();
682  return KVPosition::GetDirection();
683  }
685  {
687  if (ROOTGeo()) return fEWPosition.GetDistance();
688  return KVPosition::GetDistance();
689  }
691  {
693  if (ROOTGeo()) return fEWPosition.GetTheta();
694  return KVPosition::GetTheta();
695  }
697  {
699  if (ROOTGeo()) return fEWPosition.GetSinTheta();
700  return KVPosition::GetSinTheta();
701  }
703  {
705  if (ROOTGeo()) return fEWPosition.GetCosTheta();
706  return KVPosition::GetCosTheta();
707  }
708  Double_t GetPhi() const
709  {
711  if (ROOTGeo()) return fEWPosition.GetPhi();
712  return KVPosition::GetPhi();
713  }
714 
715  void SetThickness(Double_t thick);
717  {
719  return fSingleLayer;
720  }
721  Bool_t HasSameStructureAs(const KVDetector*) const;
722  void SetNameOfArray(const TString& n)
723  {
724  fNameOfArray = n;
725  }
726  const Char_t* GetNameOfArray() const
727  {
729  return fNameOfArray;
730  }
731 
733  {
734  return fDetSignals;
735  }
737  {
740 
741  fDetSignals.Add(ds);
742  }
743  Bool_t AddDetectorSignalExpression(const TString& type, const KVString& _expr);
744 
745  virtual Int_t GetIndex() const
746  {
750 
751  return 0;
752  }
753 
754  ClassDef(KVDetector, 10) //Base class for the description of detectors in multidetector arrays
755 };
756 
758  const Char_t* type) const
759 {
760  if (fCalibrators)
762  return 0;
763 }
764 
766 {
767  if (fCalibrators)
769  return 0;
770 }
771 
773 {
775  return fSegment;
776 }
777 
779 {
781  fSegment = s;
782 }
783 
784 inline void KVDetector::SetGain(Double_t gain)
785 {
786  fGain = gain;
787 }
788 
790 {
791  return fGain;
792 }
793 
795 
797 {
824 
825  if (!IsDetecting()) return kFALSE; //detector not working, no answer at all
826  if (IsSimMode()) return (GetActiveLayer()->GetEnergyLoss() > 0.); // simulation mode: detector fired if energy lost in active layer
827 
828  if (opt[0] == 'P') return FiredP(opt + 1);
829 
830  Binary8_t event; // bitmask for event
831  TIter next(fACQParams);
832  KVACQParam* par;
833  Int_t id = 0;
834  while ((par = (KVACQParam*)next())) {
835  if (par->Fired()) event.SetBit(id);
836  else event.ResetBit(id);
837  id++;
838  }
842  if (!strcmp(opt, "all")) return (ok == fFiredMask);
843  return (ok != "0");
844 }
846 
848 {
862 
863  if (!IsDetecting()) return kFALSE; //detector not working, no answer at all
864 
865  Binary8_t event; // bitmask for event
866  TIter next(fACQParams);
867  KVACQParam* par;
868  Int_t id = 0;
869  while ((par = (KVACQParam*)next())) {
870  if (par->Fired("P")) event.SetBit(id);
871  else event.ResetBit(id);
872  id++;
873  }
877  if (!strcmp(opt, "all")) return (ok == fFiredMask);
878  return (ok != "0");
879 }
880 
881 #endif
Binary_t< UChar_t > Binary8_t
Definition: Binary_t.h:617
int Int_t
unsigned int UInt_t
#define b(i)
#define e(i)
unsigned short UShort_t
char Char_t
const Bool_t kFALSE
bool Bool_t
short Short_t
double Double_t
float Float_t
const char Option_t
#define ClassDef(name, id)
#define BIT(n)
int type
GANIL VXI/VME acquisition parameter.
Definition: KVACQParam.h:15
Bool_t Fired(Option_t *what="") const
Definition: KVACQParam.h:85
Base class for all detector calibrations.
Definition: KVCalibrator.h:75
Output signal data produced by a detector.
Base class for detector geometry description, interface to energy-loss calculations.
Definition: KVDetector.h:121
void SetNameOfArray(const TString &n)
Definition: KVDetector.h:722
KVMaterial * GetAbsorber(const Char_t *name) const
Definition: KVDetector.h:255
virtual KVDetectorSignal * GetDetectorSignal(const TString &type) const
Definition: KVDetector.h:463
static KVDetector * MakeDetector(const Char_t *name, Float_t thick)
TString fKVDetectorFiredACQParameterListFormatString
Definition: KVDetector.h:188
virtual const Char_t * GetArrayName()
Definition: KVDetector.cpp:471
TGeoHMatrix * GetActiveLayerMatrix() const
Definition: KVDetector.h:529
void IncrementIdentifiedParticles(Int_t n=1)
Definition: KVDetector.h:492
virtual Bool_t IsSimMode() const
Definition: KVDetector.h:599
virtual Bool_t IsOK() const
Definition: KVDetector.h:628
Int_t fCalWarning
just a counter so that missing calibrator warning is given only once
Definition: KVDetector.h:203
void SetMatrix(const TGeoHMatrix *m)
Definition: KVDetector.h:147
KVPosition fEWPosition
position of entrance window i.e. first volume in detector geometry
Definition: KVDetector.h:124
Bool_t AddDetectorSignalExpression(const TString &type, const KVString &_expr)
virtual Double_t GetMaxDeltaE(Int_t Z, Int_t A)
virtual void SetSimMode(Bool_t on=kTRUE)
Definition: KVDetector.h:590
@ kIdentifiedParticle
Definition: KVDetector.h:138
@ kUnidentifiedParticle
Definition: KVDetector.h:137
const Char_t * GetMaterialName() const
Definition: KVDetector.h:290
KVUniqueNameList fParentStrucList
list of geometry structures which directly contain this detector
Definition: KVDetector.h:125
Int_t GetNumberOfAbsorberLayers() const
Definition: KVDetector.h:264
void IncrementUnidentifiedParticles(Int_t n=1)
Definition: KVDetector.h:486
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:305
Double_t ELossActive(Double_t *x, Double_t *par)
TList * GetTelescopesForIdentification()
Definition: KVDetector.cpp:900
virtual void AddIDTelescope(TObject *idt)
Add ID telescope to list of telescopes to which detector belongs.
Definition: KVDetector.cpp:861
KVList * GetAlignedIDTelescopes()
Definition: KVDetector.cpp:875
KVList * fCalibrators
list of associated calibrator objects
Definition: KVDetector.h:197
KVGeoStrucElement * GetParentStructure(const Char_t *type, const Char_t *name="") const
virtual Short_t GetCalcACQParam(KVACQParam *, Double_t) const
Definition: KVDetector.h:544
KVGroup * GetGroup() const
void AddDetectorSignal(KVDetectorSignal *ds)
Definition: KVDetector.h:736
void GetRandomAngles(Double_t &th, Double_t &ph, Option_t *t="isotropic")
Definition: KVDetector.h:672
virtual ~ KVDetector()
Bool_t fDetecting
=kTRUE if detector is "detecting", =kFALSE if not
Definition: KVDetector.h:223
virtual Double_t GetRange(Int_t Z, Int_t A, Double_t Einc)
virtual void SetEnergyLoss(Double_t e) const
Definition: KVDetector.h:332
Bool_t ReplaceCalibrator(const Char_t *type, KVCalibrator *cal, const KVNameValueList &opts="")
Definition: KVDetector.cpp:584
virtual void SetPedestal(const Char_t *, Float_t)
Set value of pedestal associated to parameter with given name.
Definition: KVDetector.cpp:696
KVList * GetHits() const
Return the list of particles hitting this detector in an event.
Definition: KVDetector.h:395
virtual Double_t GetTotalDeltaE(Int_t Z, Int_t A, Double_t Einc)
virtual TGeoVolume * GetGeoVolume()
virtual Double_t GetEnergy() const
Definition: KVDetector.h:308
Int_t GetNHits() const
Return the number of particles hitting this detector in an event.
Definition: KVDetector.h:405
virtual TF1 * GetEResFunction(Int_t Z, Int_t A)
virtual void SetSegment(UShort_t s)
Definition: KVDetector.h:778
TVector3 GetSurfaceNormal() const
Definition: KVDetector.h:175
Binary8_t fFiredMask
bitmask used by Fired to determine which parameters to take into account
Definition: KVDetector.h:208
virtual const Char_t * GetFiredACQParameterListFormatString() const
Definition: KVDetector.h:540
KVList * GetListOfCalibrators() const
Definition: KVDetector.h:355
virtual Double_t GetEIncOfMaxDeltaE(Int_t Z, Int_t A)
void RemoveHit(KVNucleus *part)
Definition: KVDetector.h:386
Double_t GetSinTheta() const
Definition: KVDetector.h:696
virtual TGraph * DrawPunchThroughEsurAVsZ(Int_t massform=KVNucleus::kBetaMass)
Double_t GetDetectorSignalValue(const TString &type, const KVNameValueList &params="") const
Definition: KVDetector.h:426
Double_t GetSolidAngle() const
Definition: KVDetector.h:660
static Int_t fDetCounter
Definition: KVDetector.h:127
void AddAbsorber(KVMaterial *)
Definition: KVDetector.cpp:753
virtual Double_t GetEnergyLoss() const
Definition: KVDetector.h:328
virtual Double_t GetEResAfterDetector() const
Definition: KVDetector.h:580
virtual void SetACQParams()
Definition: KVDetector.cpp:802
KVList * GetIDTelescopes()
Definition: KVDetector.h:478
KVList * fIDTelescopes
list of ID telescopes to which detector belongs
Definition: KVDetector.h:129
void SetShape(TGeoBBox *s)
Definition: KVDetector.h:151
TVector3 GetRandomPointOnSurface() const
Definition: KVDetector.h:163
void AddParentStructure(KVGeoStrucElement *elem)
Bool_t IsSingleLayer() const
Definition: KVDetector.h:716
Double_t GetTheta() const
Definition: KVDetector.h:690
Double_t fEResforEinc
used by GetIncidentEnergy & GetCorrectedEnergy
Definition: KVDetector.h:218
KVList * fIDTelAlign
list of ID telescopes made of this detector and all aligned detectors placed in front of it
Definition: KVDetector.h:130
TGeoHMatrix * GetMatrix() const
Definition: KVDetector.h:155
virtual Int_t GetIndex() const
Definition: KVDetector.h:745
virtual Int_t FindZmin(Double_t ELOSS=-1., Char_t mass_formula=-1)
TF1 * fELossF
parametric function dE in active layer vs. incident energy
Definition: KVDetector.h:214
TList * fAlignedDetectors[2]
stores lists of aligned detectors in both directions
Definition: KVDetector.h:219
void SetDetectorSignalValue(const TString &type, Double_t val) const
Definition: KVDetector.h:440
virtual void Clear(Option_t *opt="")
Definition: KVDetector.cpp:713
const KVPosition & GetEntranceWindow() const
Definition: KVDetector.h:647
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:769
void ClearHits()
Definition: KVDetector.h:399
void remove_signal_for_calibrator(KVCalibrator *K)
Definition: KVDetector.cpp:816
Binary8_t GetFiredBitmask() const
Definition: KVDetector.h:536
KVList * fAbsorbers
list of absorbers making up the detector
Definition: KVDetector.h:200
TVector3 GetVolumeCentre() const
Definition: KVDetector.h:171
TList * fIDTele4Ident
list of ID telescopes used for particle ID
Definition: KVDetector.h:131
Double_t GetGain() const
Definition: KVDetector.h:789
TF1 * fEResF
parametric function Eres residual energy after all layers of detector
Definition: KVDetector.h:215
virtual void DeduceACQParameters(KVEvent *, KVNumberList &)
Definition: KVDetector.h:634
virtual Double_t GetSmallestEmaxValid(Int_t Z, Int_t A)
TVector3 GetActiveLayerSurfaceCentre() const
Definition: KVDetector.h:513
virtual Float_t GetACQData(const Char_t *) const
Definition: KVDetector.cpp:666
Bool_t HasSameStructureAs(const KVDetector *) const
void SetThickness(Double_t thick)
virtual void AddToGeometry()
KVList * fACQParams
list of raw data parameters read from coders
Definition: KVDetector.h:198
UInt_t GetGroupNumber()
virtual Double_t GetIncidentEnergy(Int_t Z, Int_t A, Double_t delta_e=-1.0, enum SolType type=kEmax)
virtual void ReadDefinitionFromFile(const Char_t *)
Double_t GetTotalThicknessInCM()
Definition: KVDetector.h:274
Bool_t IsCalibrated() const
Definition: KVDetector.h:359
void AddACQParam(KVACQParam *)
Add given acquisition parameter to this detector.
Definition: KVDetector.cpp:627
void SetDetecting(Bool_t yes=kTRUE)
Definition: KVDetector.h:623
virtual TF1 * GetELossFunction(Int_t Z, Int_t A)
Double_t GetSurfaceArea(int npoints=100000) const
Definition: KVDetector.h:179
void SetActiveLayer(KVMaterial *actif)
Definition: KVDetector.h:244
KVDetector()
default ctor
Definition: KVDetector.cpp:104
Bool_t BelongsToUnidentifiedParticle() const
Definition: KVDetector.h:498
Double_t RangeDet(Double_t *x, Double_t *par)
virtual Bool_t Fired(Option_t *opt="any") const
Definition: KVDetector.h:796
KVMaterial * GetActiveLayer() const
Definition: KVDetector.h:249
const Char_t * GetNameOfArray() const
Definition: KVDetector.h:726
virtual void RemoveCalibrators()
Definition: KVDetector.cpp:838
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:190
Double_t GetPhi() const
Definition: KVDetector.h:708
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:142
TF1 * fRangeF
parametric function range of particles in detector
Definition: KVDetector.h:216
virtual void SetFiredBitmask(KVString &)
virtual void SetEnergy(Double_t e) const
Definition: KVDetector.h:320
virtual Double_t GetParticleEIncFromERes(KVNucleus *, TVector3 *norm=0)
Definition: KVDetector.cpp:357
virtual void SetEResAfterDetector(Double_t e)
Definition: KVDetector.h:576
virtual Double_t GetCalibratedEnergy() const
Definition: KVDetector.h:303
KVGeoDetectorNode fNode
positioning information relative to other detectors
Definition: KVDetector.h:126
void SetActiveLayerMatrix(const TGeoHMatrix *)
UShort_t fSegment
used in particle reconstruction
Definition: KVDetector.h:201
UShort_t GetSegment() const
Definition: KVDetector.h:772
virtual Bool_t IsDetecting() const
Definition: KVDetector.h:618
TVector3 GetSurfaceCentre() const
Definition: KVDetector.h:167
virtual void Copy(TObject &obj) const
Definition: KVDetector.cpp:155
Bool_t IsAnalysed()
Definition: KVDetector.h:412
virtual KVACQParam * GetACQParam(const Char_t *) const
Definition: KVDetector.cpp:646
Double_t GetInverseDetectorSignalValue(const TString &output, Double_t value, const TString &input, const KVNameValueList &params="") const
Definition: KVDetector.h:448
void RemoveParentStructure(KVGeoStrucElement *elem)
TVector3 GetDirection()
Definition: KVDetector.h:678
const KVSeqCollection & GetListOfDetectorSignals() const
Definition: KVDetector.h:732
virtual Float_t GetPedestal(const Char_t *) const
Access pedestal value associated to parameter with given name.
Definition: KVDetector.cpp:683
KVList * fParticles
list of particles hitting detector in an event
Definition: KVDetector.h:199
virtual TList * GetAlignedDetectors(UInt_t direction=1)
KVGeoDetectorNode * GetNode()
Definition: KVDetector.h:285
Bool_t HasDetectorSignalValue(const TString &type) const
Definition: KVDetector.h:470
Double_t GetDistance() const
Definition: KVDetector.h:684
Bool_t fSimMode
=kTRUE when using to simulate detector response, =kFALSE when analysing data
Definition: KVDetector.h:221
TString fNameOfArray
name of multidetector array this detector is part of
Definition: KVDetector.h:132
virtual Bool_t FiredP(Option_t *opt="any") const
Definition: KVDetector.h:847
Bool_t BelongsToIdentifiedParticle() const
Definition: KVDetector.h:502
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:524
KVList * GetListOfAbsorbers() const
Definition: KVDetector.h:260
virtual Double_t GetDepthInTelescope() const
Definition: KVDetector.h:269
Double_t fDepthInTelescope
used to store depth of detector in parent telescope
Definition: KVDetector.h:206
virtual void Reset(Option_t *opt="")
Definition: KVDetector.h:368
Double_t fGain
gain of amplifier
Definition: KVDetector.h:202
TVector3 GetActiveLayerVolumeCentre() const
Definition: KVDetector.h:519
const TVector3 GetCentreOfEntranceWindow() const
Definition: KVDetector.h:653
KVMaterial * fActiveLayer
The active absorber in the detector.
Definition: KVDetector.h:128
void AddHit(KVNucleus *part)
Definition: KVDetector.h:374
KVCalibrator * GetCalibrator(const Char_t *name, const Char_t *type) const
Definition: KVDetector.h:757
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:141
Double_t GetMisalignmentAngle() const
Definition: KVDetector.h:183
KVList * GetACQParamList() const
Definition: KVDetector.h:342
void SetKVDetectorFiredACQParameterListFormatString()
Definition: KVDetector.cpp:87
virtual Bool_t IsPresent() const
Definition: KVDetector.h:609
virtual Double_t GetDeltaEFromERes(Int_t Z, Int_t A, Double_t Eres)
TVector3 GetRandomDirection(Option_t *t="isotropic")
Definition: KVDetector.h:666
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:222
void ResetAlignedDetectors(UInt_t direction=1)
virtual void DetectParticle(KVNucleus *, TVector3 *norm=0)
Definition: KVDetector.cpp:232
void SetActiveLayerShape(TGeoBBox *)
Set ROOT geometry shape of active layer volume.
void SetAnalysed(Bool_t b=kTRUE)
Definition: KVDetector.h:416
void SetGain(Double_t gain)
Definition: KVDetector.h:784
TString fFName
dynamically generated full name of detector
Definition: KVDetector.h:196
virtual void Print(Option_t *option="") const
Definition: KVDetector.cpp:393
Bool_t fSingleLayer
=kTRUE if detector has a single absorber layer
Definition: KVDetector.h:225
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:949
void init()
default initialisations
Definition: KVDetector.cpp:41
Bool_t AddCalibrator(KVCalibrator *cal, const KVNameValueList &opts="")
Definition: KVDetector.cpp:510
Double_t GetCosTheta() const
Definition: KVDetector.h:702
Double_t fTotThickness
used to store value calculated by GetTotalThicknessInCM
Definition: KVDetector.h:205
void SetPresent(Bool_t yes=kTRUE)
Definition: KVDetector.h:614
TGeoBBox * GetShape() const
Definition: KVDetector.h:159
virtual void SetMaterial(const Char_t *type)
Definition: KVDetector.cpp:206
Base class container for multi-particle events.
Definition: KVEvent.h:176
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:19
Extended TList class which owns its objects by default.
Definition: KVList.h:27
Description of physical materials used to construct detectors; interface to range tables.
Definition: KVMaterial.h:41
virtual void SetEnergyLoss(Double_t e) const
Definition: KVMaterial.h:95
virtual Double_t GetThickness() const
Definition: KVMaterial.cpp:380
virtual Double_t GetEnergyLoss() const
Definition: KVMaterial.h:91
Handles lists of named parameters with different types, a list of KVNamedParameter objects.
Description of properties and kinematics of atomic nuclei.
Definition: KVNucleus.h:125
Strings used to represent a set of ranges of values.
Definition: KVNumberList.h:83
Base class used for handling geometry in a multidetector array.
Definition: KVPosition.h:90
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:159
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:171
virtual Double_t GetDistance(void) const
Definition: KVPosition.h:189
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:163
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:167
virtual TVector3 GetDirection()
Definition: KVPosition.cpp:463
virtual TVector3 GetRandomPointOnSurface() const
Definition: KVPosition.cpp:813
KaliVeda extensions to ROOT collection classes.
virtual void Clear(Option_t *option="")
T * get_object(const char *name) const
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:72
Optimised list in which named objects can only be placed once.
virtual void Add(TObject *obj)
virtual Int_t GetEntries() const
virtual const char * GetName() const
void SetBit(UInt_t f)
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
const char * Data() const
const Int_t n
const long double s
Definition: KVUnits.h:94
const long double m
Definition: KVUnits.h:70