22 #include "TEveBoxSet.h"
23 #include "TEvePointSet.h"
24 #include "TEveCompound.h"
27 using namespace DD4hep;
31 void EtaPhiHistogramActor::operator()(
const DDEveHit& hit) {
33 histogram->Fill(pos.Eta(),pos.Phi(),hit.
deposit);
37 PointsetCreator::PointsetCreator(
const std::string& collection,
size_t length)
38 : pointset(0), deposit(0), count(0)
40 pointset =
new TEvePointSet(collection.c_str(),length);
46 : pointset(0), deposit(0), count(0)
48 pointset =
new TEvePointSet(collection.c_str(),length);
62 pointset->SetTitle(Form(
"Hit collection:\n"
65 "total deposit:%.3f GeV",
77 : boxset(0), emax(1e12), towerH(1e12), deposit(0.0), count(0)
81 boxset =
new TEveBoxSet(collection.c_str());
82 boxset->Reset(TEveBoxSet::kBT_FreeBox, kFALSE, 64);
83 boxset->SetMainTransparency(0);
85 boxset->SetRenderMode(TEveBoxSet::kRM_Fill);
86 boxset->CSCApplyMainColorToAllChildren();
87 boxset->CSCApplyMainTransparencyToAllChildren();
92 : boxset(0), emax(1e12), towerH(1e12), deposit(0.0), count(0)
94 boxset =
new TEveBoxSet(collection.c_str());
95 boxset->SetMainTransparency(0);
96 boxset->Reset(TEveBoxSet::kBT_FreeBox, kFALSE, 64);
97 boxset->CSCApplyMainColorToAllChildren();
98 boxset->CSCApplyMainTransparencyToAllChildren();
104 boxset->SetTitle(Form(
"Hit collection:\n"
107 "total deposit:%.3f GeV",
121 cout <<
"Hit:" << ene <<
" deposit:" << hit.
deposit <<
" " <<
" emax:" <<
emax <<
" towerH:" <<
towerH << endl;
123 double phi = p.Phi();
124 float s1X = -0.5*(scale(0)*std::sin(phi)+scale(2)*std::cos(phi));
125 float s1Y = 0.5*(scale(0)*std::cos(phi)-scale(2)*std::sin(phi));
126 float s2X = -0.5*(scale(0)*std::sin(phi)-scale(2)*std::cos(phi));
127 float s2Y = 0.5*(scale(0)*std::cos(phi)+scale(2)*std::sin(phi));
128 float s1Z = scale(1)/2.0;
130 float coords[24]= { float(p.X()+s1X),
float(p.Y()+s1Y),
float(p.Z()-s1Z),
131 float(p.X()+s1X),
float(p.Y()+s1Y),
float(p.Z()+s1Z),
132 float(p.X()-s2X),
float(p.Y()-s2Y),
float(p.Z()+s2Z),
133 float(p.X()-s2X),
float(p.Y()-s2Y),
float(p.Z()-s2Z),
134 float(p.X()+s2X),
float(p.Y()+s2Y),
float(p.Z()-s2Z),
135 float(p.X()+s2X),
float(p.Y()+s2Y),
float(p.Z()+s2Z),
136 float(p.X()-s1X),
float(p.Y()-s1Y),
float(p.Z()+s1Z),
137 float(p.X()-s1X),
float(p.Y()-s1Y),
float(p.Z()-s1Z) };
147 TVector3 scale(1,1,ene/
towerH);
149 double phi = p.Phi();
150 float s1X = -0.5*(scale(0)*std::sin(phi)+scale(2)*std::cos(phi));
151 float s1Y = 0.5*(scale(0)*std::cos(phi)-scale(2)*std::sin(phi));
152 float s2X = -0.5*(scale(0)*std::sin(phi)-scale(2)*std::cos(phi));
153 float s2Y = 0.5*(scale(0)*std::cos(phi)+scale(2)*std::sin(phi));
154 float s1Z = scale(1)/2.0;
157 float coords[24]= { float(p.X()+s1X),
float(p.Y()+s1Y),
float(p.Z()-s1Z),
158 float(p.X()+s1X),
float(p.Y()+s1Y),
float(p.Z()+s1Z),
159 float(p.X()-s2X),
float(p.Y()-s2Y),
float(p.Z()+s2Z),
160 float(p.X()-s2X),
float(p.Y()-s2Y),
float(p.Z()-s2Z),
161 float(p.X()+s2X),
float(p.Y()+s2Y),
float(p.Z()-s2Z),
162 float(p.X()+s2X),
float(p.Y()+s2Y),
float(p.Z()+s2Z),
163 float(p.X()-s1X),
float(p.Y()-s1Y),
float(p.Z()+s1Z),
164 float(p.X()-s1X),
float(p.Y()-s1Y),
float(p.Z()-s1Z) };
virtual void operator()(const DDEveHit &hit)
Action callback of this functor:
float deposit
Energy deposit.
TEveElement * element() const
Return eve element.
virtual ~PointsetCreator()
Standard destructor.
union DD4hep::DisplayConfiguration::Config::Values data
PointsetCreator(const std::string &collection, size_t length)
Standard initializing constructor.
DDEve event classes: Basic hit.
TEveElement * element() const
Return eve element.
virtual void operator()(const DDEveHit &hit)
Action callback of this functor:
ROOT::Math::XYZVector Position
virtual ~BoxsetCreator()
Standard destructor.
virtual void operator()(const DDEveHit &hit)
Action callback of this functor:
BoxsetCreator(const std::string &collection, size_t length)
Standard initializing constructor.