DD4hep  1.30.0
Detector Description Toolkit for High Energy Physics
ObjectsInterna.h
Go to the documentation of this file.
1 //==========================================================================
2 // AIDA Detector description implementation
3 //--------------------------------------------------------------------------
4 // Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN)
5 // All rights reserved.
6 //
7 // For the licensing terms see $DD4hepINSTALL/LICENSE.
8 // For the list of contributors see $DD4hepINSTALL/doc/CREDITS.
9 //
10 // Author : M.Frank
11 //
12 //==========================================================================
13 #ifndef DD4HEP_DETAIL_OBJECTSINTERNA_H
14 #define DD4HEP_DETAIL_OBJECTSINTERNA_H
15 
16 // Framework include files
17 #include <DD4hep/Volumes.h>
18 #include <DD4hep/NamedObject.h>
19 #include <DD4hep/IDDescriptor.h>
20 #include <DD4hep/Segmentations.h>
21 #include <DD4hep/BitFieldCoder.h>
22 
23 // C/C++ include files
24 #include <set>
25 
26 // Forward declarations
27 class TColor;
28 
30 namespace dd4hep {
31 
33 
39  class HeaderObject: public NamedObject {
40  public:
41  std::string url;
42  std::string author;
43  std::string status;
44  std::string version;
45  std::string comment;
47  HeaderObject();
49  virtual ~HeaderObject();
50  private:
54  HeaderObject& operator=(const HeaderObject&) { return *this; }
55  };
56 
58 
64  class ConstantObject: public NamedObject {
65  public:
67  std::string dataType;
71  ConstantObject(const std::string& nam, const std::string& val, const std::string& typ);
73  virtual ~ConstantObject();
74  private:
78  ConstantObject& operator=(const ConstantObject&) { return *this; }
79  };
80 
82 
88  class VisAttrObject: public NamedObject {
89  public:
90  unsigned long magic;
91  TColor* color = nullptr;
92  TColor* colortr = nullptr;
93  float alpha = 0;
94  unsigned char drawingStyle = VisAttr::SOLID;
95  unsigned char lineStyle = VisAttr::SOLID;
96  unsigned char showDaughters = true;
97  unsigned char visible = true;
99  VisAttrObject();
101  virtual ~VisAttrObject();
102  };
103 
105 
111  class RegionObject: public NamedObject {
112  public:
113  unsigned long magic;
114  double threshold = 10.0;
115  double cut = 10.0;
116  bool store_secondaries = false;
117  bool use_default_cut = true;
118  bool was_threshold_set = false;
120  std::vector<std::string> user_limits;
122  RegionObject();
124  virtual ~RegionObject();
125  };
126 
128 
134  class LimitSetObject: public NamedObject {
135  public:
137  typedef std::set<Limit>::iterator iterator;
138  typedef std::set<Limit>::const_iterator const_iterator;
139  public:
141  std::set<Limit> limits;
143  std::set<Limit> cuts;
144  public:
146  LimitSetObject();
148  virtual ~LimitSetObject();
149  };
150 
152 
158  public:
160  std::string name;
162  std::string key;
166  HitCollection() : key_min(~0x0), key_max(~0x0) {}
168  HitCollection(const HitCollection& c);
170  HitCollection(const std::string& name, const std::string& key="",long k_min=~0x0, long kmax=~0x0);
173  };
174 
176 
182  class ReadoutObject: public NamedObject {
183  public:
191  std::vector<HitCollection> hits;
193  ReadoutObject();
195  virtual ~ReadoutObject();
196  };
197 
199 
207  public:
208  typedef std::vector<std::pair<std::string, const BitFieldElement*> > FieldMap;
209  typedef std::vector<std::pair<size_t, std::string> > FieldIDs;
216 
218  std::string description;
222  IDDescriptorObject(const std::string& initString);
224  virtual ~IDDescriptorObject();
225 #if 0
226 #ifndef __CINT__
227  const std::vector<BitFieldElement*>& fields() const {
229  return decoder.fields();
230  }
231 #endif
232 #endif
233  };
234 } /* End namespace dd4hep */
235 #endif // DD4HEP_DETAIL_OBJECTSINTERNA_H
dd4hep::RegionObject::was_threshold_set
bool was_threshold_set
Definition: ObjectsInterna.h:118
dd4hep::RegionObject::user_limits
std::vector< std::string > user_limits
References to user limits.
Definition: ObjectsInterna.h:120
dd4hep::HitCollection::name
std::string name
Hit collection name.
Definition: ObjectsInterna.h:160
dd4hep::HitCollection::key_min
long key_min
Range values of the key is not empty.
Definition: ObjectsInterna.h:164
dd4hep::VisAttrObject::colortr
TColor * colortr
Definition: ObjectsInterna.h:92
dd4hep::HeaderObject
Concrete object implementation for the Header handle.
Definition: ObjectsInterna.h:39
Segmentations.h
dd4hep::IDDescriptorObject
Concrete object implementation of the IDDescriptorObject Handle.
Definition: ObjectsInterna.h:206
dd4hep::IDDescriptorObject::decoder
BitFieldCoder decoder
Decoder object.
Definition: ObjectsInterna.h:215
Volumes.h
dd4hep::ReadoutObject::segmentation
Segmentation segmentation
Handle to the readout segmentation.
Definition: ObjectsInterna.h:185
dd4hep::IDDescriptorObject::fieldIDs
FieldIDs fieldIDs
String map of id descriptors.
Definition: ObjectsInterna.h:213
dd4hep::HitCollection
Definition of the HitCollection parameters used by the Readout.
Definition: ObjectsInterna.h:157
dd4hep::RegionObject::use_default_cut
bool use_default_cut
Definition: ObjectsInterna.h:117
dd4hep::ReadoutObject
Concrete object implementation of the Readout Handle.
Definition: ObjectsInterna.h:182
dd4hep::ReadoutObject::~ReadoutObject
virtual ~ReadoutObject()
Default destructor.
Definition: ObjectsInterna.cpp:100
dd4hep::DDSegmentation::BitFieldCoder
Helper class for decoding and encoding a bit field of 64bits for convenient declaration.
Definition: BitFieldCoder.h:114
dd4hep::HitCollection::key
std::string key
Discriminator key name from the <id> string.
Definition: ObjectsInterna.h:162
dd4hep::IDDescriptorObject::IDDescriptorObject
IDDescriptorObject()
Default constructor.
Definition: ObjectsInterna.cpp:112
dd4hep::IDDescriptor
Class implementing the ID encoding of the detector response.
Definition: IDDescriptor.h:37
dd4hep::IDDescriptorObject::FieldIDs
std::vector< std::pair< size_t, std::string > > FieldIDs
Definition: ObjectsInterna.h:209
dd4hep::RegionObject::cut
double cut
Definition: ObjectsInterna.h:115
dd4hep::DDSegmentation::BitFieldCoder::fields
const std::vector< BitFieldElement > & fields() const
Definition: BitFieldCoder.h:218
dd4hep::ReadoutObject::readoutWorld
Volume readoutWorld
Handle to the volume.
Definition: ObjectsInterna.h:187
dd4hep::IDDescriptorObject::~IDDescriptorObject
virtual ~IDDescriptorObject()
Default destructor.
Definition: ObjectsInterna.cpp:124
dd4hep::ConstantObject::ConstantObject
ConstantObject(const ConstantObject &)
Private copy constructor.
Definition: ObjectsInterna.h:76
dd4hep::HeaderObject::url
std::string url
Definition: ObjectsInterna.h:41
dd4hep::ReadoutObject::id
IDDescriptor id
Handle to the field descriptor.
Definition: ObjectsInterna.h:189
dd4hep::LimitSetObject::iterator
std::set< Limit >::iterator iterator
Iterator definitions.
Definition: ObjectsInterna.h:137
dd4hep::RegionObject::store_secondaries
bool store_secondaries
Definition: ObjectsInterna.h:116
dd4hep::HitCollection::HitCollection
HitCollection()
Default constructor.
Definition: ObjectsInterna.h:166
dd4hep::LimitSetObject::~LimitSetObject
virtual ~LimitSetObject()
Default destructor.
Definition: ObjectsInterna.cpp:88
dd4hep::HitCollection::key_max
long key_max
Definition: ObjectsInterna.h:164
dd4hep::IDDescriptorObject::description
std::string description
The description string to build the bit-field descriptors.
Definition: ObjectsInterna.h:218
dd4hep::Volume
Handle class holding a placed volume (also called physical volume)
Definition: Volumes.h:378
dd4hep::LimitSetObject::LimitSetObject
LimitSetObject()
Standard constructor.
Definition: ObjectsInterna.cpp:83
dd4hep::VisAttrObject::showDaughters
unsigned char showDaughters
Definition: ObjectsInterna.h:96
dd4hep::VisAttrObject::lineStyle
unsigned char lineStyle
Definition: ObjectsInterna.h:95
dd4hep::RegionObject
Concrete object implementation of the Region Handle.
Definition: ObjectsInterna.h:111
dd4hep::VisAttrObject::~VisAttrObject
virtual ~VisAttrObject()
Default destructor.
Definition: ObjectsInterna.cpp:32
dd4hep::VisAttrObject::magic
unsigned long magic
Definition: ObjectsInterna.h:90
dd4hep::VisAttrObject::color
TColor * color
Definition: ObjectsInterna.h:91
dd4hep::VisAttrObject::drawingStyle
unsigned char drawingStyle
Definition: ObjectsInterna.h:94
dd4hep::ReadoutObject::ReadoutObject
ReadoutObject()
Standard constructor.
Definition: ObjectsInterna.cpp:95
dd4hep::IDDescriptorObject::FieldMap
std::vector< std::pair< std::string, const BitFieldElement * > > FieldMap
Definition: ObjectsInterna.h:208
dd4hep::ConstantObject::dataType
std::string dataType
Constant type.
Definition: ObjectsInterna.h:67
NamedObject.h
dd4hep::ConstantObject
Concrete object implementation for the Constant handle.
Definition: ObjectsInterna.h:64
dd4hep::HeaderObject::~HeaderObject
virtual ~HeaderObject()
Default destructor.
Definition: ObjectsInterna.cpp:45
dd4hep::HeaderObject::HeaderObject
HeaderObject()
Standard constructor.
Definition: ObjectsInterna.cpp:39
dd4hep::ConstantObject::operator=
ConstantObject & operator=(const ConstantObject &)
Private assignment operator.
Definition: ObjectsInterna.h:78
dd4hep::VisAttrObject::VisAttrObject
VisAttrObject()
Standard constructor.
Definition: ObjectsInterna.cpp:27
dd4hep::HeaderObject::HeaderObject
HeaderObject(const HeaderObject &)
Private copy constructor.
Definition: ObjectsInterna.h:52
dd4hep::RegionObject::~RegionObject
virtual ~RegionObject()
Default destructor.
Definition: ObjectsInterna.cpp:76
dd4hep::HeaderObject::author
std::string author
Definition: ObjectsInterna.h:42
IDDescriptor.h
dd4hep::HeaderObject::status
std::string status
Definition: ObjectsInterna.h:43
dd4hep::HeaderObject::comment
std::string comment
Definition: ObjectsInterna.h:45
dd4hep::VisAttr::SOLID
@ SOLID
Definition: Objects.h:327
dd4hep::RegionObject::threshold
double threshold
Definition: ObjectsInterna.h:114
dd4hep
Namespace for the AIDA detector description toolkit.
Definition: AlignmentsCalib.h:28
dd4hep::NamedObject
Implementation of a named object.
Definition: NamedObject.h:30
dd4hep::HitCollection::operator=
HitCollection & operator=(const HitCollection &c)
Assignment operator.
Definition: Readout.cpp:39
dd4hep::Segmentation
Handle class supporting generic Segmentations of sensitive detectors.
Definition: Segmentations.h:41
dd4hep::IDDescriptorObject::fieldMap
FieldMap fieldMap
Map of id-fields in the descriptor.
Definition: ObjectsInterna.h:211
dd4hep::LimitSetObject
Concrete object implementation of the LimitSet Handle.
Definition: ObjectsInterna.h:134
dd4hep::LimitSetObject::limits
std::set< Limit > limits
Particle specific limits.
Definition: ObjectsInterna.h:141
dd4hep::RegionObject::magic
unsigned long magic
Definition: ObjectsInterna.h:113
dd4hep::VisAttrObject::alpha
float alpha
Definition: ObjectsInterna.h:93
dd4hep::LimitSetObject::cuts
std::set< Limit > cuts
Particle specific production cuts.
Definition: ObjectsInterna.h:143
dd4hep::ReadoutObject::hits
std::vector< HitCollection > hits
Hit collection container (if defined)
Definition: ObjectsInterna.h:191
dd4hep::HeaderObject::version
std::string version
Definition: ObjectsInterna.h:44
dd4hep::ConstantObject::~ConstantObject
virtual ~ConstantObject()
Default destructor.
Definition: ObjectsInterna.cpp:64
dd4hep::ConstantObject::ConstantObject
ConstantObject()
Default constructor for ROOT persistency.
Definition: ObjectsInterna.cpp:52
BitFieldCoder.h
dd4hep::LimitSetObject::const_iterator
std::set< Limit >::const_iterator const_iterator
Definition: ObjectsInterna.h:138
dd4hep::HeaderObject::operator=
HeaderObject & operator=(const HeaderObject &)
Private assignment operator.
Definition: ObjectsInterna.h:54
dd4hep::VisAttrObject::visible
unsigned char visible
Definition: ObjectsInterna.h:97
dd4hep::VisAttrObject
Concrete object implementation of the VisAttr Handle.
Definition: ObjectsInterna.h:88
dd4hep::RegionObject::RegionObject
RegionObject()
Standard constructor.
Definition: ObjectsInterna.cpp:71