CMS 3D CMS Logo

ChannelAssignment.h
Go to the documentation of this file.
1 #ifndef L1Trigger_TrackFindingTracklet_ChannelAssignment_h
2 #define L1Trigger_TrackFindingTracklet_ChannelAssignment_h
3 
9 
10 #include <vector>
11 
12 namespace trklet {
13 
21  public:
23  ChannelAssignment(const edm::ParameterSet& iConfig, const tt::Setup* setup);
25  // returns channelId of given TTTrackRef from TrackBuilder
26  int channelId(const TTTrackRef& ttTrackRef) const;
27  // number of used TB channels for tracks
28  int numChannelsTrack() const { return numChannelsTrack_; }
29  // number of used TB channels for stubs
30  int numChannelsStub() const { return numChannelsStub_; }
31  // number of bits used to represent layer id [barrel: 0-5, discs: 6-10]
32  int widthLayerId() const { return widthLayerId_; }
33  // number of bits used to represent stub id for projected stubs
34  int widthStubId() const { return widthStubId_; }
35  // number of bits used to represent stub id for seed stubs
36  int widthSeedStubId() const { return widthSeedStubId_; }
37  // number of bits used to distinguish between tilted and untilded barrel modules or 2S and PS endcap modules
38  int widthPSTilt() const { return widthPSTilt_; }
39  // depth of fifos within systolic array
40  int depthMemory() const { return depthMemory_; }
41  // number of comparison modules used in each DR node
43  // min number of shared stubs to identify duplicates
44  int minIdenticalStubs() const { return minIdenticalStubs_; }
45  // number of DR nodes
46  int numNodesDR() const { return numNodesDR_; }
47  // number of used seed types in tracklet algorithm
48  int numSeedTypes() const { return numSeedTypes_; }
49  // sets layerId (0-7 in sequence the seed type projects to) of given TTStubRef and seedType, returns false if seeed stub
50  bool layerId(int seedType, const TTStubRef& ttStubRef, int& layerId) const;
51  // number layers a given seed type projects to
52  int numProjectionLayers(int seedType) const { return (int)seedTypesProjectionLayers_.at(seedType).size(); }
53  // max. no. layers that any seed type projects to
55  // map of used DTC tfp channels in InputRouter
56  const std::vector<int>& channelEncoding() const { return channelEncoding_; }
57  // index of first stub channel belonging to given track channel
58  int offsetStub(int channelTrack) const;
59  // seed layers for given seed type id
60  const std::vector<int>& seedingLayers(int seedType) const { return seedTypesSeedLayers_.at(seedType); }
61  // returns SensorModule::Type for given TTStubRef
62  tt::SensorModule::Type type(const TTStubRef& ttStubRef) const { return setup_->type(ttStubRef); }
63  // layers a seed types can project to using default layer id [barrel: 1-6, discs: 11-15]
64  int layerId(int seedType, int channel) const;
65  // returns TBout channel Id for given seed type and default layer id [barrel: 1-6, discs: 11-15], returns -1 if layerId and seedType are inconsistent
66  int channelId(int seedType, int layerId) const;
67  // max number of seeding layers
68  int numSeedingLayers() const { return numSeedingLayers_; }
69  // return DR node for given ttTrackRef
70  int nodeDR(const TTTrackRef& ttTrackRef) const;
71 
72  private:
73  // helper class to store configurations
74  const tt::Setup* setup_;
75  // DRin parameter
77  // number of bits used to represent layer id [barrel: 0-5, discs: 6-10]
79  // number of bits used to represent stub id for projected stubs
81  // number of bits used to represent stub id for seed stubs
83  // number of bits used to distinguish between tilted and untilded barrel modules or 2S and PS endcap modules
85  // depth of fifos within systolic array
87  // positive pt Boundaries in GeV (symmetric negatives are assumed), first boundary is pt cut, last boundary is infinity, defining ot bins used by DR
88  std::vector<double> ptBoundaries_;
89  // DRin parameter
91  // number of comparison modules used in each DR node
93  // min number of shared stubs to identify duplicates [default: 3]
95  // number of DR nodes
97  // seed type names
98  std::vector<std::string> seedTypeNames_;
99  // number of used seed types in tracklet algorithm
101  // number of used TB channels for tracks
103  // number of used TB channels for stubs
105  // seeding layers of seed types using default layer id [barrel: 1-6, discs: 11-15]
106  std::vector<std::vector<int>> seedTypesSeedLayers_;
107  // layers a seed types can project to using default layer id [barrel: 1-6, discs: 11-15]
108  std::vector<std::vector<int>> seedTypesProjectionLayers_;
109  // max. number of layers to which any seed type projects
111  // map of used DTC tfp channels in InputRouter
112  std::vector<int> channelEncoding_;
113  // accumulated number of projections layer from seed 0 to vector index
114  std::vector<int> offsetsStubs_;
115  // max number of seeding layers
117  };
118 
119 } // namespace trklet
120 
122 
123 #endif
std::vector< std::string > seedTypeNames_
Class to process and provide run-time constants used by Track Trigger emulators.
Definition: Setup.h:44
const std::vector< int > & seedingLayers(int seedType) const
int nodeDR(const TTTrackRef &ttTrackRef) const
std::vector< int > channelEncoding_
int channelId(const TTTrackRef &ttTrackRef) const
Class to assign tracklet tracks and stubs to output channel based on their Pt or seed type as well as...
SensorModule::Type type(const TTStubRef &ttStubRef) const
Definition: Setup.cc:329
int offsetStub(int channelTrack) const
const std::vector< int > & channelEncoding() const
#define EVENTSETUP_DATA_DEFAULT_RECORD(_data_, _record_)
edm::ParameterSet pSetDRin_
std::vector< int > offsetsStubs_
int numProjectionLayers(int seedType) const
tt::SensorModule::Type type(const TTStubRef &ttStubRef) const
std::vector< std::vector< int > > seedTypesProjectionLayers_
std::vector< std::vector< int > > seedTypesSeedLayers_
std::vector< double > ptBoundaries_
bool layerId(int seedType, const TTStubRef &ttStubRef, int &layerId) const