DD4hep  1.30.0
Detector Description Toolkit for High Energy Physics
HitActors.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 DDEVE_HITACTORS_H
14 #define DDEVE_HITACTORS_H
15 
16 // Framework include files
17 #include "DDEve/EventHandler.h"
19 
20 // Forward declarations
21 class THF2;
22 class TEveElement;
23 class TEvePointSet;
24 class TEveBoxSet;
25 
27 namespace dd4hep {
28 
30  /*
31  * \author M.Frank
32  * \version 1.0
33  * \ingroup DD4HEP_EVE
34  */
36  TH2F* histogram;
40  virtual void operator()(const DDEveHit& hit);
41  };
42 
44  /*
45  * \author M.Frank
46  * \version 1.0
47  * \ingroup DD4HEP_EVE
48  */
49  struct PointsetCreator : public DDEveHitActor {
50  TEvePointSet* pointset {nullptr};
51  float threshold {0};
52  float deposit {0};
53  int count {0};
55  PointsetCreator(const std::string& collection, size_t length);
57  PointsetCreator(const std::string& collection, size_t length, const DisplayConfiguration::Config& cfg);
59  virtual ~PointsetCreator();
61  TEveElement* element() const;
63  virtual void operator()(const DDEveHit& hit);
64  };
65 
67  /*
68  * \author M.Frank
69  * \version 1.0
70  * \ingroup DD4HEP_EVE
71  */
72  struct BoxsetCreator : public DDEveHitActor {
73  TEveBoxSet* boxset {0};
74  float emax = 1e12, towerH = 1e12, deposit = 0e0;
75  int count {0};
77  BoxsetCreator(const std::string& collection, size_t length);
79  BoxsetCreator(const std::string& collection, size_t length, const DisplayConfiguration::Config& cfg);
81  virtual ~BoxsetCreator();
83  TEveElement* element() const;
85  virtual void operator()(const DDEveHit& hit);
86  };
87 
89  /*
90  * \author M.Frank
91  * \version 1.0
92  * \ingroup DD4HEP_EVE
93  */
94  struct TowersetCreator : public BoxsetCreator {
96  TowersetCreator(const std::string& collection, size_t length)
97  : BoxsetCreator(collection,length) {}
99  TowersetCreator(const std::string& collection, size_t length, const DisplayConfiguration::Config& cfg)
100  : BoxsetCreator(collection, length, cfg) {}
102  virtual ~TowersetCreator() {}
104  virtual void operator()(const DDEveHit& hit);
105  };
106 
107 } /* End namespace dd4hep */
108 
109 
110 #endif // DDEVE_HITACTORS_H
111 
dd4hep::TowersetCreator
Fill a 3D tower set from a hit collection.
Definition: HitActors.h:94
dd4hep::DDEveHit
DDEve event classes: Basic hit.
Definition: DDEveEventData.h:29
dd4hep::EtaPhiHistogramActor::histogram
TH2F * histogram
Definition: HitActors.h:36
dd4hep::BoxsetCreator::deposit
float deposit
Definition: HitActors.h:74
dd4hep::EtaPhiHistogramActor::EtaPhiHistogramActor
EtaPhiHistogramActor(TH2F *h)
Standard initializing constructor.
Definition: HitActors.h:38
dd4hep::TowersetCreator::~TowersetCreator
virtual ~TowersetCreator()
Standard destructor.
Definition: HitActors.h:102
DisplayConfiguration.h
dd4hep::PointsetCreator::deposit
float deposit
Definition: HitActors.h:52
dd4hep::PointsetCreator::element
TEveElement * element() const
Return eve element.
Definition: HitActors.cpp:60
dd4hep::BoxsetCreator::boxset
TEveBoxSet * boxset
Definition: HitActors.h:73
dd4hep::DDEveHitActor
Event data actor base class for hits. Used to extract data from concrete classes.
Definition: EventHandler.h:43
dd4hep::TowersetCreator::TowersetCreator
TowersetCreator(const std::string &collection, size_t length)
Standard initializing constructor.
Definition: HitActors.h:96
dd4hep::TowersetCreator::TowersetCreator
TowersetCreator(const std::string &collection, size_t length, const DisplayConfiguration::Config &cfg)
Standard initializing constructor.
Definition: HitActors.h:99
dd4hep::BoxsetCreator::count
int count
Definition: HitActors.h:75
dd4hep::BoxsetCreator::operator()
virtual void operator()(const DDEveHit &hit)
Action callback of this functor:
Definition: HitActors.cpp:124
dd4hep::BoxsetCreator::BoxsetCreator
BoxsetCreator(const std::string &collection, size_t length)
Standard initializing constructor.
Definition: HitActors.cpp:98
dd4hep::PointsetCreator::count
int count
Definition: HitActors.h:53
dd4hep::BoxsetCreator::~BoxsetCreator
virtual ~BoxsetCreator()
Standard destructor.
Definition: HitActors.cpp:108
dd4hep::PointsetCreator
Fill a 3D pointset from a hit collection.
Definition: HitActors.h:49
dd4hep::PointsetCreator::pointset
TEvePointSet * pointset
Definition: HitActors.h:50
dd4hep::EtaPhiHistogramActor
Fill EtaPhi histograms from a hit collection.
Definition: HitActors.h:35
dd4hep::EtaPhiHistogramActor::operator()
virtual void operator()(const DDEveHit &hit)
Action callback of this functor:
Definition: HitActors.cpp:37
dd4hep::BoxsetCreator::element
TEveElement * element() const
Return eve element.
Definition: HitActors.cpp:119
dd4hep::BoxsetCreator::emax
float emax
Definition: HitActors.h:74
EventHandler.h
dd4hep::DisplayConfiguration::Config
Container with full display configuration.
Definition: DisplayConfiguration.h:92
dd4hep::TowersetCreator::operator()
virtual void operator()(const DDEveHit &hit)
Action callback of this functor:
Definition: HitActors.cpp:152
dd4hep::PointsetCreator::threshold
float threshold
Definition: HitActors.h:51
dd4hep
Namespace for the AIDA detector description toolkit.
Definition: AlignmentsCalib.h:28
dd4hep::PointsetCreator::operator()
virtual void operator()(const DDEveHit &hit)
Action callback of this functor:
Definition: HitActors.cpp:76
dd4hep::PointsetCreator::PointsetCreator
PointsetCreator(const std::string &collection, size_t length)
Standard initializing constructor.
Definition: HitActors.cpp:43
dd4hep::PointsetCreator::~PointsetCreator
virtual ~PointsetCreator()
Standard destructor.
Definition: HitActors.cpp:65
dd4hep::BoxsetCreator::towerH
float towerH
Definition: HitActors.h:74
dd4hep::BoxsetCreator
Fill a 3D box set from a hit collection.
Definition: HitActors.h:72