13 #include "TEveBoxSet.h"
14 #include "TGeoSphere.h"
16 #include "TEveGeoShape.h"
17 #include "TEveStraightLineSet.h"
51 TEveElement &oItemHolder,
76 <<
"lower time bound is larger than upper time bound. Maybe opposite is desired?";
79 edm::LogWarning(
"DataNotFound|InvalidData") <<
"couldn't locate 'timeLayerCluster' ValueMap in root file.";
83 edm::LogWarning(
"DataNotFound|InvalidData") <<
"couldn't locate 'timeLayerCluster' ValueMap in root file.";
102 TEveElement &oItemHolder,
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
FWProxyBuilderConfiguration * getConfig() const
#define REGISTER_PROXYBUILDER_METHODS()
#define REGISTER_FWPROXYBUILDER(_name_, _type_, _purpose_, _view_)
void setItem(const FWEventItem *iItem) override
const float * getParameters(unsigned int id) const
static constexpr uint8_t gradient_steps
void setupAddElement(TEveElement *el, TEveElement *parent, bool set_color=true) const
FWTracksterLayersProxyBuilder(void)
void setItem(const FWEventItem *iItem) override
const FWEventItem * item() const
const FWTracksterLayersProxyBuilder & operator=(const FWTracksterLayersProxyBuilder &)=delete
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
FWGenericParameter< T > * assertParam(const std::string &name, T def)
const edm::EventBase * getEvent() const
~FWTracksterLayersProxyBuilder(void) override
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_
bool getByLabel(InputTag const &, Handle< T > &) const
size_t size() const
size in number of hits (e.g. in crystals for ECAL)
static int position[264][3]
T value(const std::string &name)
Log< level::Warning, false > LogWarning
edm::Handle< edm::ValueMap< std::pair< float, float > > > TimeValueMapHandle_
Power< A, B >::type pow(const A &a, const B &b)
const FWGeometry * getGeom() const