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?";
81 << __FILE__ <<
":" << __LINE__
82 <<
" couldn't locate 'hgcalLayerClusters:timeLayerCluster' ValueMap in input file. Trying to access " 83 "'hgcalMergeLayerClusters:timeLayerClusters' ValueMap";
86 << __FILE__ <<
":" << __LINE__
87 <<
" couldn't locate 'hgcalMergeLayerClusters:timeLayerCluster' ValueMap in input file.";
94 << __FILE__ <<
":" << __LINE__
95 <<
" couldn't locate 'hgcalLayerClusters' collection " 96 "in input file. Trying to access 'hgcalMergeLayerClusters' collection.";
99 << __FILE__ <<
":" << __LINE__ <<
" couldn't locate 'hgcalMergeLayerClusters' collection in input file.";
119 TEveElement &oItemHolder,
128 const size_t N = trackster.
vertices().size();
130 TEveStraightLineSet *position_marker =
nullptr;
133 position_marker =
new TEveStraightLineSet;
134 position_marker->SetLineWidth(2);
135 position_marker->SetLineColor(kWhite);
138 for (
size_t i = 0;
i <
N; ++
i) {
141 const size_t nHits = layerCluster.
size();
144 auto detIdOnLayer = layerCluster.
seed();
152 auto const z_plus_selection_ok =
z_plus_ && (
zside == 1);
156 if (z_selection_is_on && !(z_plus_selection_ok || z_minus_selection_ok))
174 float dphi = (isFine) ? 1.0 *
M_PI / 180. : 1.25 *
M_PI / 180.;
176 float dr = (isFine) ? (0.0484 * static_cast<float>(ir) + 2.1) : (0.075 *
static_cast<float>(ir) + 2.0);
177 float r = (isFine) ? (0.0239 * static_cast<float>(
pow(ir, 2)) + 2.02 * static_cast<float>(ir) + 119.6)
178 : (0.0367 *
static_cast<float>(
pow(ir, 2)) + 1.7 * static_cast<float>(ir) + 90.7);
182 float side = (isFine) ? 0.465 : 0.698;
188 auto *eveCircle =
new TEveGeoShape(
"Circle");
190 eveCircle->SetShape(tube);
191 eveCircle->InitMainTrans();
198 eveCircle->SetFillColor(
201 eveCircle->SetMainColor(
item()->modelInfo(iIndex).displayProperties().color());
202 eveCircle->SetMainTransparency(
item()->defaultDisplayProperties().transparency());
206 const float crossScale = 1.0f + fmin(
energy, 5.0
f);
209 const float position_crossScale = crossScale * 0.5;
210 position_marker->AddLine(
211 pos.x() - position_crossScale,
pos.y(),
pos.z(),
pos.x() + position_crossScale,
pos.y(),
pos.z());
212 position_marker->AddLine(
213 pos.x(),
pos.y() - position_crossScale,
pos.z(),
pos.x(),
pos.y() + position_crossScale,
pos.z());
218 oItemHolder.AddElement(position_marker);
223 TEveStraightLineSet *adjacent_marker =
new TEveStraightLineSet;
224 adjacent_marker->SetLineWidth(2);
225 adjacent_marker->SetLineColor(kYellow);
227 TEveStraightLineSet *non_adjacent_marker =
new TEveStraightLineSet;
228 non_adjacent_marker->SetLineWidth(2);
229 non_adjacent_marker->SetLineColor(kRed);
231 for (
auto edge :
edges) {
237 const bool isAdjacent =
std::abs(layerOut - layerIn) == 1;
242 adjacent_marker->AddLine(doublet.first.x(),
249 non_adjacent_marker->AddLine(doublet.first.x(),
257 oItemHolder.AddElement(adjacent_marker);
258 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)