File indexing completed on 2024-04-06 12:21:53
0001 #ifndef L1Trigger_TrackFindingTracklet_ChannelAssignment_h
0002 #define L1Trigger_TrackFindingTracklet_ChannelAssignment_h
0003
0004 #include "FWCore/Framework/interface/data_default_record_trait.h"
0005 #include "L1Trigger/TrackFindingTracklet/interface/ChannelAssignmentRcd.h"
0006 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0007 #include "DataFormats/L1TrackTrigger/interface/TTTypes.h"
0008 #include "L1Trigger/TrackTrigger/interface/Setup.h"
0009
0010 #include <vector>
0011
0012 namespace trklet {
0013
0014
0015
0016
0017
0018
0019
0020 class ChannelAssignment {
0021 public:
0022 ChannelAssignment() {}
0023 ChannelAssignment(const edm::ParameterSet& iConfig, const tt::Setup* setup);
0024 ~ChannelAssignment() {}
0025
0026 int channelId(const TTTrackRef& ttTrackRef) const;
0027
0028 int numChannelsTrack() const { return numChannelsTrack_; }
0029
0030 int numChannelsStub() const { return numChannelsStub_; }
0031
0032 int widthLayerId() const { return widthLayerId_; }
0033
0034 int widthStubId() const { return widthStubId_; }
0035
0036 int widthSeedStubId() const { return widthSeedStubId_; }
0037
0038 int widthPSTilt() const { return widthPSTilt_; }
0039
0040 int depthMemory() const { return depthMemory_; }
0041
0042 int numComparisonModules() const { return numComparisonModules_; }
0043
0044 int minIdenticalStubs() const { return minIdenticalStubs_; }
0045
0046 int numNodesDR() const { return numNodesDR_; }
0047
0048 int numSeedTypes() const { return numSeedTypes_; }
0049
0050 bool layerId(int seedType, const TTStubRef& ttStubRef, int& layerId) const;
0051
0052 int numProjectionLayers(int seedType) const { return (int)seedTypesProjectionLayers_.at(seedType).size(); }
0053
0054 int maxNumProjectionLayers() const { return maxNumProjectionLayers_; }
0055
0056 const std::vector<int>& channelEncoding() const { return channelEncoding_; }
0057
0058 int offsetStub(int channelTrack) const;
0059
0060 const std::vector<int>& seedingLayers(int seedType) const { return seedTypesSeedLayers_.at(seedType); }
0061
0062 tt::SensorModule::Type type(const TTStubRef& ttStubRef) const { return setup_->type(ttStubRef); }
0063
0064 int layerId(int seedType, int channel) const;
0065
0066 int channelId(int seedType, int layerId) const;
0067
0068 int numSeedingLayers() const { return numSeedingLayers_; }
0069
0070 int nodeDR(const TTTrackRef& ttTrackRef) const;
0071
0072 private:
0073
0074 const tt::Setup* setup_;
0075
0076 edm::ParameterSet pSetDRin_;
0077
0078 int widthLayerId_;
0079
0080 int widthStubId_;
0081
0082 int widthSeedStubId_;
0083
0084 int widthPSTilt_;
0085
0086 int depthMemory_;
0087
0088 std::vector<double> ptBoundaries_;
0089
0090 edm::ParameterSet pSetDR_;
0091
0092 int numComparisonModules_;
0093
0094 int minIdenticalStubs_;
0095
0096 int numNodesDR_;
0097
0098 std::vector<std::string> seedTypeNames_;
0099
0100 int numSeedTypes_;
0101
0102 int numChannelsTrack_;
0103
0104 int numChannelsStub_;
0105
0106 std::vector<std::vector<int>> seedTypesSeedLayers_;
0107
0108 std::vector<std::vector<int>> seedTypesProjectionLayers_;
0109
0110 int maxNumProjectionLayers_;
0111
0112 std::vector<int> channelEncoding_;
0113
0114 std::vector<int> offsetsStubs_;
0115
0116 int numSeedingLayers_;
0117 };
0118
0119 }
0120
0121 EVENTSETUP_DATA_DEFAULT_RECORD(trklet::ChannelAssignment, trklet::ChannelAssignmentRcd);
0122
0123 #endif