CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Stub.h
Go to the documentation of this file.
1 #ifndef __L1Trigger_VertexFinder_Stub_h__
2 #define __L1Trigger_VertexFinder_Stub_h__
3 
15 
16 #include <array>
17 #include <map>
18 #include <set>
19 
20 class TrackerGeometry;
21 
22 namespace l1tVertexFinder {
23 
24  class AnalysisSettings;
25 
34 
35  //=== Represents a Tracker stub (=pair of hits)
36 
37  class Stub : public TTStubRef {
38  public:
39  // Fill useful info about stub.
40  Stub();
41  Stub(const TTStubRef& ttStubRef,
42  const AnalysisSettings& settings,
43  const TrackerGeometry* trackerGeometry,
44  const TrackerTopology* trackerTopology);
45  ~Stub() {}
46 
47  // Fill truth info with association from stub to tracking particles.
48  void fillTruth(edm::Handle<TTStubAssMap> mcTruthTTStubHandle, edm::Handle<TTClusterAssMap> mcTruthTTClusterHandle);
49 
50  // === Functions for returning info about reconstructed stubs ===
51 
52  //--- Stub data and quantities derived from it ---
53 
54  // Stub coordinates (optionally after digitisation, if digitisation requested via cfg).
55  // N.B. Digitisation is not run when the stubs are created, but later, after stubs are assigned to sectors.
56  // Until then, these functions return the original coordinates.
57  float phi() const { return phi_; }
58  float r() const { return r_; }
59  float z() const { return z_; }
60 
61  //--- Quantities common to all stubs in a given module ---
62 
63  // Module type: PS or 2S?
64  bool psModule() const { return psModule_; }
65  // Tracker layer ID number (1-6 = barrel layer; 11-15 = endcap A disk; 21-25 = endcap B disk)
66  unsigned int layerId() const { return layerId_; }
67 
68  //--- Truth info
69 
70  // Association of stub to tracking particles
71  const std::set<TrackingParticlePtr>& assocTPs() const {
72  return assocTPs_;
73  } // Return TPs associated to this stub. (Whether only TPs contributing to both clusters are returned is determined by "StubMatchStrict" config param.)
74  const TrackingParticlePtr assocTP() const {
75  return assocTP_;
76  } // If only one TP contributed to both clusters, this tells you which TP it is. Returns nullptr if none.
77 
78  private:
79  // Set info about the module that this stub is in.
80  void setModuleInfo(const TrackerGeometry* trackerGeometry,
81  const TrackerTopology* trackerTopology,
82  const DetId& detId);
83 
84  private:
85  const AnalysisSettings* settings_; // configuration parameters.
86 
87  float phi_; // stub coords, optionally after digitisation.
88  float r_;
89  float z_;
90 
91  //--- Parameters common to all stubs in a given module.
92  unsigned int idDet_;
93  float moduleMinR_;
94  float moduleMaxR_;
97  float moduleMinZ_;
98  float moduleMaxZ_;
99  bool psModule_;
100  unsigned int layerId_;
101  unsigned int endcapRing_;
102  bool barrel_;
103  float sigmaPerp_;
104  float sigmaPar_;
105  float stripPitch_;
107  unsigned int nStrips_;
110  //--- Truth info about stub.
112  std::set<TrackingParticlePtr> assocTPs_;
113  };
114 
115 } // end namespace l1tVertexFinder
116 
117 #endif
void fillTruth(edm::Handle< TTStubAssMap > mcTruthTTStubHandle, edm::Handle< TTClusterAssMap > mcTruthTTClusterHandle)
Definition: Stub.cc:57
bool psModule() const
Definition: Stub.h:64
std::set< TrackingParticlePtr > assocTPs_
Definition: Stub.h:112
TTStubAssociationMap< Ref_Phase2TrackerDigi_ > TTStubAssMap
Definition: Stub.h:32
unsigned int idDet_
Definition: Stub.h:92
const AnalysisSettings * settings_
Definition: Stub.h:85
float moduleMaxPhi_
Definition: Stub.h:96
float phi() const
Definition: Stub.h:57
float moduleMinPhi_
Definition: Stub.h:95
unsigned int layerId_
Definition: Stub.h:100
edm::Ref< edmNew::DetSetVector< TTCluster< Ref_Phase2TrackerDigi_ > >, TTCluster< Ref_Phase2TrackerDigi_ > > TTClusterRef
Definition: Stub.h:31
edm::Ptr< TrackingParticle > TrackingParticlePtr
Definition: InputData.h:26
edm::Ref< DetSetVec, TTStub< Ref_Phase2TrackerDigi_ > > TTStubRef
Definition: Stub.h:29
Stores association of Truth Particles (TP) to L1 Track-Trigger Clusters.
unsigned int layerId() const
Definition: Stub.h:66
edmNew::DetSet< TTStub< Ref_Phase2TrackerDigi_ > > DetSet
Definition: Stub.h:28
unsigned int nStrips_
Definition: Stub.h:107
edmNew::DetSetVector< TTStub< Ref_Phase2TrackerDigi_ > > DetSetVec
Definition: Stub.h:27
const TrackingParticlePtr assocTP() const
Definition: Stub.h:74
float moduleMaxR_
Definition: Stub.h:94
float z() const
Definition: Stub.h:59
void setModuleInfo(const TrackerGeometry *trackerGeometry, const TrackerTopology *trackerTopology, const DetId &detId)
Definition: Stub.cc:90
TTClusterAssociationMap< Ref_Phase2TrackerDigi_ > TTClusterAssMap
Definition: Stub.h:33
float moduleMinZ_
Definition: Stub.h:97
float stripLength_
Definition: Stub.h:106
Definition: DetId.h:17
NOTE: this is needed even if it seems not.
Definition: TTCluster.h:27
bool outerModuleAtSmallerR_
Definition: Stub.h:109
float sensorWidth_
Definition: Stub.h:108
unsigned int endcapRing_
Definition: Stub.h:101
TrackingParticlePtr assocTP_
Definition: Stub.h:111
float moduleMinR_
Definition: Stub.h:93
float r() const
Definition: Stub.h:58
float moduleMaxZ_
Definition: Stub.h:98
Stores association of Truth Particles (TP) to L1 Track-Trigger Stubs.
const std::set< TrackingParticlePtr > & assocTPs() const
Definition: Stub.h:71