iIndex is the index where iData is found in the container from which it came iItemHolder is the object to which you add your own objects which inherit from TEveElement
111 const size_t N = trackster.vertices().size();
113 TEveStraightLineSet *position_marker =
nullptr;
116 position_marker =
new TEveStraightLineSet;
117 position_marker->SetLineWidth(2);
118 position_marker->SetLineColor(kWhite);
121 for (
size_t i = 0;
i <
N; ++
i) {
124 const size_t nHits = layerCluster.
size();
127 auto detIdOnLayer = layerCluster.
seed();
135 auto const z_plus_selection_ok =
z_plus_ && (zside == 1);
136 auto const z_minus_selection_ok = z_minus_ && (zside == -1);
139 if (z_selection_is_on && !(z_plus_selection_ok || z_minus_selection_ok))
146 radius =
sqrt(nHits);
152 radius = energy /
nHits;
157 float dphi = (isFine) ? 1.0 *
M_PI / 180. : 1.25 *
M_PI / 180.;
159 float dr = (isFine) ? (0.0484 * static_cast<float>(ir) + 2.1) : (0.075 *
static_cast<float>(ir) + 2.0);
160 float r = (isFine) ? (0.0239 * static_cast<float>(
pow(ir, 2)) + 2.02 * static_cast<float>(ir) + 119.6)
161 : (0.0367 *
static_cast<float>(
pow(ir, 2)) + 1.7 * static_cast<float>(ir) + 90.7);
162 area = r * dr * dphi;
165 float side = (isFine) ? 0.465 : 0.698;
166 area =
pow(side, 2) * 3 *
sqrt(3) / 2;
171 auto *eveCircle =
new TEveGeoShape(
"Circle");
173 eveCircle->SetShape(tube);
174 eveCircle->InitMainTrans();
175 eveCircle->RefMainTrans().Move3PF(position.x(), position.y(), position.z());
181 eveCircle->SetFillColor(
184 eveCircle->SetMainColor(
item()->modelInfo(iIndex).displayProperties().color());
185 eveCircle->SetMainTransparency(
item()->defaultDisplayProperties().transparency());
189 const float crossScale = 1.0f + fmin(energy, 5.0
f);
191 auto const &pos = layerCluster.
position();
192 const float position_crossScale = crossScale * 0.5;
193 position_marker->AddLine(
194 pos.x() - position_crossScale, pos.y(), pos.z(), pos.x() + position_crossScale, pos.y(), pos.z());
195 position_marker->AddLine(
196 pos.x(), pos.y() - position_crossScale, pos.z(), pos.x(), pos.y() + position_crossScale, pos.z());
201 oItemHolder.AddElement(position_marker);
204 auto &edges = trackster.edges();
206 TEveStraightLineSet *adjacent_marker =
new TEveStraightLineSet;
207 adjacent_marker->SetLineWidth(2);
208 adjacent_marker->SetLineColor(kYellow);
210 TEveStraightLineSet *non_adjacent_marker =
new TEveStraightLineSet;
211 non_adjacent_marker->SetLineWidth(2);
212 non_adjacent_marker->SetLineColor(kRed);
214 for (
auto edge : edges) {
215 auto doublet = std::make_pair(layerClusters[edge[0]], layerClusters[edge[1]]);
220 const bool isAdjacent =
std::abs(layerOut - layerIn) == 1;
225 adjacent_marker->AddLine(doublet.first.x(),
232 non_adjacent_marker->AddLine(doublet.first.x(),
240 oItemHolder.AddElement(adjacent_marker);
241 oItemHolder.AddElement(non_adjacent_marker);
edm::Handle< std::vector< reco::CaloCluster > > layerClustersHandle_
const math::XYZPoint & position() const
cluster centroid position
const float * getParameters(unsigned int id) const
static constexpr uint8_t gradient_steps
void setupAddElement(TEveElement *el, TEveElement *parent, bool set_color=true) const
const FWEventItem * item() const
double proportionalityFactor_
Abs< T >::type abs(const T &t)
double saturation_energy_
double energy() const
cluster energy
static constexpr uint8_t gradient[3][gradient_steps]
const_reference_type get(ProductID id, size_t idx) const
DetId seed() const
return DetId of seed
XYZPointD XYZPoint
point in space with cartesian internal representation
caConstants::TupleMultiplicity const CAHitNtupletGeneratorKernelsGPU::HitToTuple const cms::cuda::AtomicPairCounter GPUCACell const *__restrict__ uint32_t const *__restrict__ gpuPixelDoublets::CellNeighborsVector const gpuPixelDoublets::CellTracksVector const GPUCACell::OuterHitOfCell const int32_t nHits
bool enablePositionLines_
size_t size() const
size in number of hits (e.g. in crystals for ECAL)
static int position[264][3]
edm::Handle< edm::ValueMap< std::pair< float, float > > > TimeValueMapHandle_
Power< A, B >::type pow(const A &a, const B &b)
const FWGeometry * getGeom() const