22 #include <TEveBoxSet.h>
23 #include <TEvePointSet.h>
24 #include <TEveCompound.h>
28 #ifdef DD4HEP_USE_GEANT4_UNITS
30 #define MEV_TO_GEV 1000.0
33 #define MEV_TO_GEV 1.0
45 pointset =
new TEvePointSet(collection.c_str(),length);
52 pointset =
new TEvePointSet(collection.c_str(),length);
67 pointset->SetTitle(Form(
"Hit collection:\n"
70 "total deposit:%.3f GeV",
88 boxset =
new TEveBoxSet(collection.c_str());
89 boxset->Reset(TEveBoxSet::kBT_FreeBox, kFALSE, 64);
90 boxset->SetMainTransparency(0);
92 boxset->SetRenderMode(TEveBoxSet::kRM_Fill);
93 boxset->CSCApplyMainColorToAllChildren();
94 boxset->CSCApplyMainTransparencyToAllChildren();
100 boxset =
new TEveBoxSet(collection.c_str());
101 boxset->SetMainTransparency(0);
102 boxset->Reset(TEveBoxSet::kBT_FreeBox, kFALSE, 64);
103 boxset->CSCApplyMainColorToAllChildren();
104 boxset->CSCApplyMainTransparencyToAllChildren();
110 boxset->SetTitle(Form(
"Hit collection:\n"
113 "total deposit:%.3f GeV",
127 std::cout <<
"Hit:" << ene <<
" deposit:" << hit.
deposit <<
" "
128 <<
" emax:" <<
emax <<
" towerH:" <<
towerH << std::endl;
130 double phi = p.Phi();
131 float s1X = -0.5*(scale(0)*std::sin(phi)+scale(2)*std::cos(phi));
132 float s1Y = 0.5*(scale(0)*std::cos(phi)-scale(2)*std::sin(phi));
133 float s2X = -0.5*(scale(0)*std::sin(phi)-scale(2)*std::cos(phi));
134 float s2Y = 0.5*(scale(0)*std::cos(phi)+scale(2)*std::sin(phi));
135 float s1Z = scale(1)/2.0;
137 float coords[24]= { float(p.X()+s1X), float(p.Y()+s1Y), float(p.Z()-s1Z),
138 float(p.X()+s1X), float(p.Y()+s1Y), float(p.Z()+s1Z),
139 float(p.X()-s2X), float(p.Y()-s2Y), float(p.Z()+s2Z),
140 float(p.X()-s2X), float(p.Y()-s2Y), float(p.Z()-s2Z),
141 float(p.X()+s2X), float(p.Y()+s2Y), float(p.Z()-s2Z),
142 float(p.X()+s2X), float(p.Y()+s2Y), float(p.Z()+s2Z),
143 float(p.X()-s1X), float(p.Y()-s1Y), float(p.Z()+s1Z),
144 float(p.X()-s1X), float(p.Y()-s1Y), float(p.Z()-s1Z) };
154 TVector3 scale(1,1,ene/
towerH);
156 double phi = p.Phi();
157 float s1X = -0.5*(scale(0)*std::sin(phi)+scale(2)*std::cos(phi));
158 float s1Y = 0.5*(scale(0)*std::cos(phi)-scale(2)*std::sin(phi));
159 float s2X = -0.5*(scale(0)*std::sin(phi)-scale(2)*std::cos(phi));
160 float s2Y = 0.5*(scale(0)*std::cos(phi)+scale(2)*std::sin(phi));
161 float s1Z = scale(1)/2.0;
164 float coords[24]= { float(p.X()+s1X), float(p.Y()+s1Y), float(p.Z()-s1Z),
165 float(p.X()+s1X), float(p.Y()+s1Y), float(p.Z()+s1Z),
166 float(p.X()-s2X), float(p.Y()-s2Y), float(p.Z()+s2Z),
167 float(p.X()-s2X), float(p.Y()-s2Y), float(p.Z()-s2Z),
168 float(p.X()+s2X), float(p.Y()+s2Y), float(p.Z()-s2Z),
169 float(p.X()+s2X), float(p.Y()+s2Y), float(p.Z()+s2Z),
170 float(p.X()-s1X), float(p.Y()-s1Y), float(p.Z()+s1Z),
171 float(p.X()-s1X), float(p.Y()-s1Y), float(p.Z()-s1Z) };