KaliVeda
Toolkit for HIC analysis
KVINDRADetector.cpp
1 //Created by KVClassFactory on Sat Oct 3 14:18:09 2009
2 //Author: John Frankland,,,
3 
4 #include "KVINDRADetector.h"
5 #include "KVGroup.h"
6 
8 
9 
10 
16 {
17  //PRIVATE METHOD
18  //Used when GetChIo is called the first time to retrieve the
19  //pointer to the ChIo of the group associated to this detector
20 
21  KVGroup* kvgr = GetGroup();
22  if (kvgr) {
23  const KVSeqCollection* dets = kvgr->GetDetectors();
24  TIter next_det(dets);
25  KVINDRADetector* dd;
26  while ((dd = (KVINDRADetector*) next_det())) {
27  if (dd->InheritsFrom("KVChIo"))
28  fChIo = dd;
29  }
30  }
31  return fChIo;
32 }
33 
34 
35 
38 
39 void KVINDRADetector::SetName(const char* _name)
40 {
41  // Deduce ring and module number (and index) from name of detector
42 
43  KVDetector::SetName(_name);
44  KVString name(_name);
45  name.Begin("_");
46  KVString type = name.Next(kTRUE);
47  KVString index = name.Next(kTRUE);
48  if (type == "SILI" || type == "SI75") {
49  ring = index.Atoi();
50  module = 0; //no module number in name: should be CsI module numer?
51  }
52  else if (type == "PHOS") {
53  ring = 1;
54  module = index.Atoi();
55  }
56  else {
57  ring = index.Atoi() / 100;
58  module = index.Atoi() % 100;
59  }
60 }
61 
62 
63 
68 
70 {
71  // Temporarily disable warnings about ROOT geometry (which makes these methods caduc)
72  // so that we can set the simple (theta,theta_min,theta_max) dimensions of detector
73  // (used in GUI for INDRA scalers)
74 
76  KVDetector::SetPolarMinMax(min,max);
78 }
79 
80 
81 
86 
88 {
89  // Temporarily disable warnings about ROOT geometry (which makes these methods caduc)
90  // so that we can set the simple (phi,phi_min,phi_max) dimensions of detector
91  // (used in GUI for INDRA scalers)
92 
94  KVDetector::SetAzimuthalMinMax(min,max);
96 }
97 
98 
double Double_t
constexpr Bool_t kTRUE
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t index
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]
const KVSeqCollection * GetDetectors() const
Group of detectors which can be treated independently of all others in array.
Definition: KVGroup.h:19
Base class for detectors of INDRA array.
void SetAzimuthalMinMax(Double_t min, Double_t max) override
void SetName(const char *name) override
Deduce ring and module number (and index) from name of detector.
Bool_t disable_root_geo_warning
void SetPolarMinMax(Double_t min, Double_t max) override
KaliVeda extensions to ROOT collection classes.
Extension of ROOT TString class which allows backwards compatibility with ROOT v3....
Definition: KVString.h:73
double min(double x, double y)
double max(double x, double y)
ClassImp(TPyArg)