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  // sets channelId of given TTTrackRef from TrackBuilder or PurgeDuplicate (if enabled), return false if track outside pt range
26  bool channelId(const TTTrackRef& ttTrackRef, int& channelId);
27  // number of used channels for tracks
28  int numChannelsTrack() const { return numChannelsTrack_; }
29  // number of used channels for stubs
30  int numChannelsStub() const { return numChannelsStub_; }
31  // number of used seed types in tracklet algorithm
32  int numSeedTypes() const { return numSeedTypes_; }
33  // sets layerId (0-7 in sequence the seed type projects to) of given TTStubRef and seedType, returns false if seeed stub
34  bool layerId(int seedType, const TTStubRef& ttStubRef, int& layerId) const;
35  // number layers a given seed type projects to
36  int numProjectionLayers(int seedType) const { return (int)seedTypesProjectionLayers_.at(seedType).size(); }
37  // max. no. layers that any seed type projects to
39  // map of used DTC tfp channels in InputRouter
40  const std::vector<int>& channelEncoding() const { return channelEncoding_; }
41  // index of first stub channel belonging to given track channel
42  int offsetStub(int channelTrack) const;
43  // seed layers for given seed type id
44  const std::vector<int>& seedingLayers(int seedType) const { return seedTypesSeedLayers_.at(seedType); }
45  //
46  tt::SensorModule::Type type(const TTStubRef& ttStubRef) const { return setup_->type(ttStubRef); }
47  //
48  int layerId(int seedType, int channel) const { return seedTypesProjectionLayers_.at(seedType).at(channel); }
49  //
50  int channelId(int seedType, int layerId) const;
51  // max number of seeding layers
52  int numSeedingLayers() const { return numSeedingLayers_; }
53 
54  private:
55  // helper class to store configurations
56  const tt::Setup* setup_;
57  // use tracklet seed type as channel id if False, binned track pt used if True
59  // pt Boundaries in GeV, last boundary is infinity
60  std::vector<double> boundaries_;
61  // seed type names
62  std::vector<std::string> seedTypeNames_;
63  // number of used seed types in tracklet algorithm
65  // number of used channels for tracks
67  // number of used channels for stubs
69  // seeding layers of seed types using default layer id [barrel: 1-6, discs: 11-15]
70  std::vector<std::vector<int>> seedTypesSeedLayers_;
71  // layers a seed types can project to using default layer id [barrel: 1-6, discs: 11-15]
72  std::vector<std::vector<int>> seedTypesProjectionLayers_;
73  // max. number of layers to which any seed type projects
75  // map of used DTC tfp channels in InputRouter
76  std::vector<int> channelEncoding_;
77  // accumulated number of projections layer from seed 0 to vector index
78  std::vector<int> offsetsStubs_;
79  // max number of seeding layers
81  };
82 
83 } // namespace trklet
84 
86 
87 #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 layerId(int seedType, int channel) const
std::vector< int > channelEncoding_
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:325
int offsetStub(int channelTrack) const
bool channelId(const TTTrackRef &ttTrackRef, int &channelId)
const std::vector< int > & channelEncoding() const
#define EVENTSETUP_DATA_DEFAULT_RECORD(_data_, _record_)
std::vector< double > boundaries_
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_
bool layerId(int seedType, const TTStubRef &ttStubRef, int &layerId) const