File indexing completed on 2024-04-06 12:19:28
0001
0002
0003
0004
0005
0006
0007
0008 #ifndef CSCTrackFinder_CSCTFSectorProcessor_h
0009 #define CSCTrackFinder_CSCTFSectorProcessor_h
0010
0011 #include <vector>
0012 #include <map>
0013 #include <string>
0014 #include "CondFormats/L1TObjects/interface/L1MuCSCTFConfiguration.h"
0015 #include "CondFormats/DataRecord/interface/L1MuCSCTFConfigurationRcd.h"
0016 #include "DataFormats/L1CSCTrackFinder/interface/L1CSCTrackCollection.h"
0017 #include "DataFormats/L1CSCTrackFinder/interface/TrackStub.h"
0018 #include "DataFormats/L1CSCTrackFinder/interface/CSCTriggerContainer.h"
0019 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0020
0021 #include "L1Trigger/CSCTrackFinder/interface/CSCSectorReceiverLUT.h"
0022 #include "L1Trigger/CSCTrackFinder/interface/CSCTFSPCoreLogic.h"
0023 #include "L1Trigger/CSCTrackFinder/interface/CSCTFPtLUT.h"
0024
0025 #include "FWCore/Framework/interface/EventSetup.h"
0026
0027
0028 class CSCTFSectorProcessor {
0029 public:
0030 struct Tokens {
0031 CSCTFPtLUT::Tokens ptLUT;
0032 edm::ESGetToken<L1MuCSCTFConfiguration, L1MuCSCTFConfigurationRcd> config;
0033 };
0034
0035 static Tokens consumes(const edm::ParameterSet& pset, edm::ConsumesCollector iC);
0036
0037 CSCTFSectorProcessor(const unsigned& endcap,
0038 const unsigned& sector,
0039 const edm::ParameterSet& pset,
0040 bool tmb07,
0041 const L1MuTriggerScales* scales,
0042 const L1MuTriggerPtScale* ptScale);
0043
0044
0045 void initialize(const edm::EventSetup& c, const Tokens& tokens);
0046
0047
0048 ~CSCTFSectorProcessor();
0049
0050
0051
0052 int run(const CSCTriggerContainer<csctf::TrackStub>&);
0053
0054 CSCTriggerContainer<csc::L1Track> tracks() const { return l1_tracks; }
0055 std::vector<csctf::TrackStub> filteredStubs() const { return stub_vec_filtered; }
0056
0057 CSCTriggerContainer<csctf::TrackStub> dtStubs() const { return dt_stubs; }
0058
0059 int minBX() const { return m_minBX; }
0060 int maxBX() const { return m_maxBX; }
0061
0062 void readParameters(const edm::ParameterSet& pset);
0063
0064 void printDisclaimer(int firmSP, int firmFA);
0065
0066 private:
0067
0068 CSCTFSectorProcessor& operator=(const CSCTFSectorProcessor& rhs) { return *this; };
0069 CSCTFSectorProcessor(const CSCTFSectorProcessor& par) {}
0070
0071 bool m_gangedME1a;
0072
0073 bool initializeFromPSet;
0074 unsigned m_endcap, m_sector, TMB07;
0075 unsigned m_latency;
0076
0077
0078 int m_bxa_depth, m_allowALCTonly, m_allowCLCTonly, m_preTrigger;
0079 int m_minBX, m_maxBX;
0080 int m_etawin[7], m_etamin[8], m_etamax[8];
0081 int m_mindphip, m_mindetap;
0082 int m_mindeta12_accp, m_maxdeta12_accp, m_maxdphi12_accp;
0083 int m_mindeta13_accp, m_maxdeta13_accp, m_maxdphi13_accp;
0084 int m_mindeta112_accp, m_maxdeta112_accp, m_maxdphi112_accp;
0085 int m_mindeta113_accp, m_maxdeta113_accp, m_maxdphi113_accp;
0086 int m_mindphip_halo, m_mindetap_halo;
0087 int m_straightp, m_curvedp;
0088 int m_mbaPhiOff, m_mbbPhiOff;
0089 int m_widePhi;
0090
0091
0092 int QualityEnableME1a, QualityEnableME1b, QualityEnableME1c, QualityEnableME1d, QualityEnableME1e, QualityEnableME1f;
0093 int QualityEnableME2a, QualityEnableME2b, QualityEnableME2c;
0094 int QualityEnableME3a, QualityEnableME3b, QualityEnableME3c;
0095 int QualityEnableME4a, QualityEnableME4b, QualityEnableME4c;
0096 int kill_fiber;
0097 int run_core;
0098 int trigger_on_ME1a, trigger_on_ME1b, trigger_on_ME2, trigger_on_ME3, trigger_on_ME4;
0099 int trigger_on_MB1a, trigger_on_MB1d;
0100 unsigned int singlesTrackOutput;
0101 int rescaleSinglesPhi;
0102
0103 int m_firmSP, m_firmFA, m_firmDD, m_firmVM;
0104
0105 CSCTriggerContainer<csc::L1Track> l1_tracks;
0106 CSCTriggerContainer<csctf::TrackStub> dt_stubs;
0107 std::vector<csctf::TrackStub>
0108 stub_vec_filtered;
0109
0110 static const std::string FPGAs[5];
0111
0112 std::map<std::string, CSCSectorReceiverLUT*> srLUTs_;
0113 CSCTFSPCoreLogic* core_;
0114 CSCTFPtLUT* ptLUT_;
0115
0116
0117 std::map<int, int> firmSP_Map;
0118 bool isCoreVerbose;
0119 bool initFail_;
0120 };
0121
0122 #endif