27 m_trackPropagator->SetProjTrackBreaking(TEveTrackPropagator::kPTB_UseLastPointPos);
53 t.fP = TEveVector(iData.
px(), iData.
py(), iData.
pz());
67 int wraps[3] = {-1, -1, -1};
70 std::vector<TEveVector> trackPoints(
trk->GetN() - 1);
71 const Float_t *points =
trk->GetP();
72 TEveStraightLineSet *legoTrack =
new TEveStraightLineSet();
75 if (fabs(iData.
eta()) < 2.0 && iData.
pt() > 0.5 && iData.
pt() < 30) {
83 for (Int_t
i = 1;
i <
trk->GetN(); ++
i) {
85 TEveVector
temp = TEveVector(points[
j], points[
j + 1], points[
j + 2]);
86 TEveVector vec = TEveVector(
temp.Eta(),
temp.Phi(), 0.001);
88 trackPoints[
i - 1] = vec;
92 for (Int_t
i = 1;
i <
trk->GetN(); ++
i) {
94 TEveVector v1 = TEveVector(points[
j], points[
j + 1], points[
j + 2]);
98 TEveVector v2 = TEveVector(points[
j - 3], points[
j - 2], points[
j - 1]);
102 zPoint = TEveVector(xyPoint.fX, xyPoint.fY, v1.fZ - 50.f);
104 zPoint = TEveVector(xyPoint.fX, xyPoint.fY, v1.fZ + 50.f);
107 legoTrack->AddMarker(vec.Eta(), vec.Phi(), 0.001, 0);
111 }
else if (fabs(v1.fZ) >=
caloZ1()) {
113 TEveVector vec, v2 = TEveVector(points[
j - 3], points[
j - 2], points[
j - 1]);
121 p1 = TEveVector(v2.fX + 50,
y,
z);
122 p2 = TEveVector(v2.fX - 50,
y,
z);
125 legoTrack->AddMarker(vec.Eta(), vec.Phi(), 0.001, 0);
130 TEveVector v2 = TEveVector(points[
j - 3], points[
j - 2], points[
j - 1]);
134 zPoint = TEveVector(xyPoint.fX, xyPoint.fY, v1.fZ - 50.f);
136 zPoint = TEveVector(xyPoint.fX, xyPoint.fY, v1.fZ + 50.f);
139 legoTrack->AddMarker(vec.Eta(), vec.Phi(), 0.001, 1);
148 int i = (
trk->GetN() - 1) * 3;
149 int j =
trk->GetN() - 2;
150 TEveVector vec = TEveVector(points[
i], points[
i + 1], points[
i + 2]);
153 legoTrack->AddMarker(vec.Eta(), vec.Phi(), 0.001, 2);
155 }
else if (fabs(vec.fZ) >=
caloZ2()) {
156 legoTrack->AddMarker(vec.Eta(), vec.Phi(), 0.001, 2);
162 for (
int i = 0; i < static_cast<int>(trackPoints.size() - 1); ++
i) {
163 if ((trackPoints[
i + 1].fY - trackPoints[
i].fY) > 1) {
166 TEveChunkManager::iterator mi(legoTrack->GetMarkerPlex());
168 TEveStraightLineSet::Marker_t &
m = *(TEveStraightLineSet::Marker_t *)mi();
169 m.fV[0] = trackPoints[
i + 1].fX;
170 m.fV[1] = trackPoints[
i + 1].fY;
172 }
else if (
i == wraps[1]) {
173 TEveChunkManager::iterator mi(legoTrack->GetMarkerPlex());
176 TEveStraightLineSet::Marker_t &
m = *(TEveStraightLineSet::Marker_t *)mi();
177 m.fV[0] = trackPoints[
i + 1].fX;
178 m.fV[1] = trackPoints[
i + 1].fY;
183 if ((trackPoints[
i].fY - trackPoints[
i + 1].fY) > 1) {
186 TEveChunkManager::iterator mi(legoTrack->GetMarkerPlex());
188 TEveStraightLineSet::Marker_t &
m = *(TEveStraightLineSet::Marker_t *)mi();
189 m.fV[0] = trackPoints[
i + 1].fX;
190 m.fV[1] = trackPoints[
i + 1].fY;
192 }
else if (
i == wraps[1]) {
193 TEveChunkManager::iterator mi(legoTrack->GetMarkerPlex());
196 TEveStraightLineSet::Marker_t &
m = *(TEveStraightLineSet::Marker_t *)mi();
197 m.fV[0] = trackPoints[
i + 1].fX;
198 m.fV[1] = trackPoints[
i + 1].fY;
204 int end =
static_cast<int>(trackPoints.size() - 1);
205 if (wraps[2] ==
end) {
206 TEveChunkManager::iterator mi(legoTrack->GetMarkerPlex());
210 TEveStraightLineSet::Marker_t &
m = *(TEveStraightLineSet::Marker_t *)mi();
211 m.fV[0] = trackPoints[
end].fX;
212 m.fV[1] = trackPoints[
end].fY;
217 for (
unsigned int i = 0;
i < trackPoints.size() - 1; ++
i)
218 legoTrack->AddLine(trackPoints[
i], trackPoints[
i + 1]);
220 legoTrack->SetDepthTest(
false);
221 legoTrack->SetMarkerStyle(4);
222 legoTrack->SetMarkerSize(1);
223 legoTrack->SetRnrMarkers(
true);
233 if (fabs(iData.
eta()) < 2.0 && iData.
pt() > 0.5 && iData.
pt() < 30) {
250 const Float_t *points =
trk->GetP();
251 TEvePointSet *ps =
new TEvePointSet();
253 for (Int_t
i = 1;
i <
trk->GetN(); ++
i) {
255 TEveVector v1 = TEveVector(points[
j], points[
j + 1], points[
j + 2]);
259 TEveVector v2 = TEveVector(points[
j - 3], points[
j - 2], points[
j - 1]);
263 zPoint = TEveVector(xyPoint.fX, xyPoint.fY, v1.fZ - 50.f);
265 zPoint = TEveVector(xyPoint.fX, xyPoint.fY, v1.fZ + 50.f);
268 ps->SetNextPoint(vec.fX, vec.fY, vec.fZ);
271 }
else if (fabs(v1.fZ) >=
caloZ1()) {
273 TEveVector vec, v2 = TEveVector(points[
j - 3], points[
j - 2], points[
j - 1]);
281 p1 = TEveVector(v2.fX + 50,
y,
z);
282 p2 = TEveVector(v2.fX - 50,
y,
z);
285 ps->SetNextPoint(vec.fX, vec.fY, vec.fZ);
289 TEveVector v2 = TEveVector(points[
j - 3], points[
j - 2], points[
j - 1]);
293 zPoint = TEveVector(xyPoint.fX, xyPoint.fY, v1.fZ - 50.f);
295 zPoint = TEveVector(xyPoint.fX, xyPoint.fY, v1.fZ + 50.f);
298 ps->SetNextPoint(vec.fX, vec.fY, vec.fZ);
304 int i = (
trk->GetN() - 1) * 3;
305 TEveVector vec = TEveVector(points[
i], points[
i + 1], points[
i + 2]);
308 ps->SetNextPoint(vec.fX, vec.fY, vec.fZ);
309 else if (fabs(vec.fZ) >=
caloZ2())
310 ps->SetNextPoint(vec.fX, vec.fY, vec.fZ);
TEvePointSet * getCollisionMarkers(const TEveTrack *)
TEveTrack * setupTrack(const reco::Track &)
double px() const
x coordinate of momentum vector
double py() const
y coordinate of momentum vector
FWPFTrackSingleton * m_singleton
float linearInterpolation(const TEveVector &p1, const TEveVector &p2, float r)
double estimate_field(const reco::Track &track, bool highQuality=false)
bool checkIntersect(const TEveVector &vec, float r)
TEveTrackPropagator * m_trackerTrackPropagator
double pt() const
track transverse momentum
int charge() const
track electric charge
static FWPFTrackSingleton * pInstance
const Point & vertex() const
reference point on the track. This method is DEPRECATED, please use referencePoint() instead ...
TEveTrackPropagator * getTrackPropagator()
TEveStraightLineSet * setupLegoTrack(const reco::Track &)
double eta() const
pseudorapidity of momentum vector
static FWPFTrackSingleton * Instance()
void guessField(float estimate) const
TEveTrack * getTrack(const reco::Track &)
double pz() const
z coordinate of momentum vector
TEveVector lineCircleIntersect(const TEveVector &v1, const TEveVector &v2, float r)
TEveTrackPropagator * m_trackPropagator
TEveVector lineLineIntersect(const TEveVector &v1, const TEveVector &v2, const TEveVector &v3, const TEveVector &v4)
ESource getSource() const
TEveTrackPropagator * getTrackerTrackPropagator()
const TrackExtraRef & extra() const
reference to "extra" object