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);
139 if (z_selection_is_on && !(z_plus_selection_ok || z_minus_selection_ok))
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);
165 float side = (isFine) ? 0.465 : 0.698;
171 auto *eveCircle =
new TEveGeoShape(
"Circle");
173 eveCircle->SetShape(tube);
174 eveCircle->InitMainTrans();
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);
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);
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) {
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
#define REGISTER_PROXYBUILDER_METHODS()
#define REGISTER_FWPROXYBUILDER(_name_, _type_, _purpose_, _view_)
void setItem(const FWEventItem *iItem) override
void setupAddElement(TEveElement *el, TEveElement *parent, bool set_color=true) const
FWProxyBuilderConfiguration * getConfig() const
static constexpr uint8_t gradient_steps
const_reference_type get(ProductID id, size_t idx) const
DetId seed() const
return DetId of seed
FWTracksterLayersProxyBuilder(void)
bool getByLabel(InputTag const &, Handle< T > &) const
std::vector< std::array< unsigned int, 2 > > & edges()
void setItem(const FWEventItem *iItem) override
const FWTracksterLayersProxyBuilder & operator=(const FWTracksterLayersProxyBuilder &)=delete
double proportionalityFactor_
Abs< T >::type abs(const T &t)
double saturation_energy_
size_t size() const
size in number of hits (e.g. in crystals for ECAL)
static constexpr uint8_t gradient[3][gradient_steps]
const edm::EventBase * getEvent() const
FWGenericParameter< T > * assertParam(const std::string &name, T def)
double energy() const
cluster energy
std::vector< unsigned int > & vertices()
~FWTracksterLayersProxyBuilder(void) override
const FWGeometry * getGeom() const
XYZPointD XYZPoint
point in space with cartesian internal representation
bool enablePositionLines_
const float * getParameters(unsigned int id) const
static int position[264][3]
T value(const std::string &name)
Log< level::Warning, false > LogWarning
TupleMultiplicity< TrackerTraits > const *__restrict__ uint32_t nHits
edm::Handle< edm::ValueMap< std::pair< float, float > > > TimeValueMapHandle_
const FWEventItem * item() const
Power< A, B >::type pow(const A &a, const B &b)