Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:11:53

0001 // -*- C++ -*-
0002 //
0003 // Package:     TRacks
0004 // Class  :     FWTrackDetailView
0005 //
0006 // Original Author:  Chad Jarvis
0007 //         Created:  Wed Mar  7 09:13:47 EST 2008
0008 //
0009 // Implementation:
0010 //      use following table pasted from HitPattern.h
0011 //
0012 //      +-----+-----+-----+-----+-----+-----+-----+-----+----------------+-----+-----+
0013 //      |tk/mu|  sub-structure  |   sub-sub-structure   |     stereo     |  hit type |
0014 //      +-----+-----+-----+-----+-----+-----+-----+-----+----------------+-----+-----+
0015 //      | 10  |   9    8     7  |   6    5     4     3  |        2       |  1     0  | bit
0016 //
0017 //      |tk = 1      PXB = 1            layer = 1-3                       hit type = 0-3
0018 //      |tk = 1      PXF = 2            disk  = 1-2                       hit type = 0-3
0019 //      |tk = 1      TIB = 3            layer = 1-4      0=rphi,1=stereo  hit type = 0-3
0020 //      |tk = 1      TID = 4            wheel = 1-3      0=rphi,1=stereo  hit type = 0-3
0021 //      |tk = 1      TOB = 5            layer = 1-6      0=rphi,1=stereo  hit type = 0-3
0022 //      |tk = 1      TEC = 6            wheel = 1-9      0=rphi,1=stereo  hit type = 0-3
0023 //      |mu = 0      DT  = 1            layer                             hit type = 0-3
0024 //      |mu = 0      CSC = 2            layer                             hit type = 0-3
0025 //      |mu = 0      RPC = 3            layer                             hit type = 0-3
0026 //      |mu = 0      GEM = 3            layer                             hit type = 0-3
0027 //
0028 //      hit type, see DataFormats/TrackingRecHit/interface/TrackingRecHit.h
0029 //      valid    = valid hit                                     = 0
0030 //      missing  = detector is good, but no rec hit found        = 1
0031 //      inactive = detector is off, so there was no hope         = 2
0032 //      bad      = there were many bad strips within the ellipse = 3
0033 //
0034 
0035 #include <array>
0036 #include <vector>
0037 #include "Rtypes.h"
0038 #include "Fireworks/Core/interface/FWDetailViewCanvas.h"
0039 
0040 class FWGeometry;
0041 class FWModelId;
0042 class TEveWindowSlot;
0043 class TEveWindow;
0044 
0045 namespace reco {
0046   class Track;
0047 }
0048 
0049 class FWTrackResidualDetailView : public FWDetailViewCanvas<reco::Track> {
0050 public:
0051   FWTrackResidualDetailView();
0052   ~FWTrackResidualDetailView() override;
0053 
0054   FWTrackResidualDetailView(const FWTrackResidualDetailView &) = delete;                   // stop default
0055   const FWTrackResidualDetailView &operator=(const FWTrackResidualDetailView &) = delete;  // stop default
0056 
0057 private:
0058   using FWDetailViewCanvas<reco::Track>::build;
0059   void build(const FWModelId &id, const reco::Track *) override;
0060   using FWDetailViewCanvas<reco::Track>::setTextInfo;
0061   void setTextInfo(const FWModelId &id, const reco::Track *) override;
0062 
0063   double getSignedResidual(const FWGeometry *geom, unsigned int id, double resX);
0064   void prepareData(const FWModelId &id, const reco::Track *);
0065   void printDebug();
0066 
0067   int m_ndet;
0068   int m_nhits;
0069   std::vector<int> m_det;
0070   std::array<std::vector<float>, 2> res;
0071   std::vector<int> hittype;
0072   std::vector<int> stereo;
0073   std::vector<int> substruct;
0074   std::vector<int> subsubstruct;
0075   std::vector<int> m_detector;
0076 
0077   Int_t m_resXFill;
0078   Color_t m_resXCol;
0079   Int_t m_resYFill;
0080   Color_t m_resYCol;
0081   Int_t m_stereoFill;
0082   Color_t m_stereoCol;
0083   Int_t m_invalidFill;
0084   Color_t m_invalidCol;
0085 
0086   const static char *m_det_tracker_str[];
0087 };