CMS 3D CMS Logo

FWTrackResidualDetailView.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: TRacks
4 // Class : FWTrackDetailView
5 //
6 // Original Author: Chad Jarvis
7 // Created: Wed Mar 7 09:13:47 EST 2008
8 //
9 // Implementation:
10 // use following table pasted from HitPattern.h
11 //
12 // +-----+-----+-----+-----+-----+-----+-----+-----+----------------+-----+-----+
13 // |tk/mu| sub-structure | sub-sub-structure | stereo | hit type |
14 // +-----+-----+-----+-----+-----+-----+-----+-----+----------------+-----+-----+
15 // | 10 | 9 8 7 | 6 5 4 3 | 2 | 1 0 | bit
16 //
17 // |tk = 1 PXB = 1 layer = 1-3 hit type = 0-3
18 // |tk = 1 PXF = 2 disk = 1-2 hit type = 0-3
19 // |tk = 1 TIB = 3 layer = 1-4 0=rphi,1=stereo hit type = 0-3
20 // |tk = 1 TID = 4 wheel = 1-3 0=rphi,1=stereo hit type = 0-3
21 // |tk = 1 TOB = 5 layer = 1-6 0=rphi,1=stereo hit type = 0-3
22 // |tk = 1 TEC = 6 wheel = 1-9 0=rphi,1=stereo hit type = 0-3
23 // |mu = 0 DT = 1 layer hit type = 0-3
24 // |mu = 0 CSC = 2 layer hit type = 0-3
25 // |mu = 0 RPC = 3 layer hit type = 0-3
26 // |mu = 0 GEM = 3 layer hit type = 0-3
27 //
28 // hit type, see DataFormats/TrackingRecHit/interface/TrackingRecHit.h
29 // valid = valid hit = 0
30 // missing = detector is good, but no rec hit found = 1
31 // inactive = detector is off, so there was no hope = 2
32 // bad = there were many bad strips within the ellipse = 3
33 //
34 
35 #include <array>
36 #include <vector>
37 #include "Rtypes.h"
39 
40 class FWGeometry;
41 class FWModelId;
42 class TEveWindowSlot;
43 class TEveWindow;
44 
45 namespace reco {
46  class Track;
47 }
48 
49 class FWTrackResidualDetailView : public FWDetailViewCanvas<reco::Track> {
50 public:
52  ~FWTrackResidualDetailView() override;
53 
54  FWTrackResidualDetailView(const FWTrackResidualDetailView &) = delete; // stop default
55  const FWTrackResidualDetailView &operator=(const FWTrackResidualDetailView &) = delete; // stop default
56 
57 private:
59  void build(const FWModelId &id, const reco::Track *) override;
61  void setTextInfo(const FWModelId &id, const reco::Track *) override;
62 
63  double getSignedResidual(const FWGeometry *geom, unsigned int id, double resX);
64  void prepareData(const FWModelId &id, const reco::Track *);
65  void printDebug();
66 
67  int m_ndet;
68  int m_nhits;
69  std::vector<int> m_det;
70  std::array<std::vector<float>, 2> res;
71  std::vector<int> hittype;
72  std::vector<int> stereo;
73  std::vector<int> substruct;
74  std::vector<int> subsubstruct;
75  std::vector<int> m_detector;
76 
77  Int_t m_resXFill;
78  Color_t m_resXCol;
79  Int_t m_resYFill;
80  Color_t m_resYCol;
81  Int_t m_stereoFill;
82  Color_t m_stereoCol;
84  Color_t m_invalidCol;
85 
86  const static char *m_det_tracker_str[];
87 };
const FWTrackResidualDetailView & operator=(const FWTrackResidualDetailView &)=delete
double getSignedResidual(const FWGeometry *geom, unsigned int id, double resX)
void setTextInfo(const FWModelId &id, const reco::Track *) override
std::array< std::vector< float >, 2 > res
void build(const FWModelId &id, const reco::Track *) override
void prepareData(const FWModelId &id, const reco::Track *)
fixed size matrix
static const char * m_det_tracker_str[]