CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_10/src/L1Trigger/CSCTrackFinder/interface/CSCTFSectorProcessor.h

Go to the documentation of this file.
00001 
00008 #ifndef CSCTrackFinder_CSCTFSectorProcessor_h
00009 #define CSCTrackFinder_CSCTFSectorProcessor_h
00010 
00011 #include <vector>
00012 #include <map>
00013 #include <string>
00014 #include <DataFormats/L1CSCTrackFinder/interface/L1CSCTrackCollection.h>
00015 #include <DataFormats/L1CSCTrackFinder/interface/TrackStub.h>
00016 #include <DataFormats/L1CSCTrackFinder/interface/CSCTriggerContainer.h>
00017 #include <FWCore/ParameterSet/interface/ParameterSet.h>
00018 
00019 #include <L1Trigger/CSCTrackFinder/interface/CSCSectorReceiverLUT.h>
00020 #include <L1Trigger/CSCTrackFinder/interface/CSCTFSPCoreLogic.h>
00021 #include <L1Trigger/CSCTrackFinder/interface/CSCTFPtLUT.h>
00023 #include <FWCore/Framework/interface/EventSetup.h>
00025 
00026 class CSCTFSectorProcessor
00027 {
00028 public:
00029   CSCTFSectorProcessor(const unsigned& endcap,
00030                        const unsigned& sector,
00031                        const edm::ParameterSet& pset,
00032                        bool tmb07,
00033                        const L1MuTriggerScales* scales,
00034                        const L1MuTriggerPtScale* ptScale );
00035 
00037   void initialize(const edm::EventSetup& c);
00039 
00040   ~CSCTFSectorProcessor();
00041 
00042   //returns 0 for normal fail, 1 for success, and -1 for exception
00043   // on -1, Producer should produce empty collections for event
00044   int run(const CSCTriggerContainer<csctf::TrackStub>&);
00045 
00046   CSCTriggerContainer<csc::L1Track> tracks() const { return l1_tracks; }
00047   std::vector<csctf::TrackStub> filteredStubs() const { return stub_vec_filtered; }
00048 
00049   CSCTriggerContainer<csctf::TrackStub> dtStubs() const { return dt_stubs; }
00050 
00051   int minBX() const { return m_minBX; }
00052   int maxBX() const { return m_maxBX; }
00053 
00054   void readParameters(const edm::ParameterSet& pset);
00055 
00056   void printDisclaimer(int firmSP, int firmFA);
00057 
00058  private:
00059   // disallow copy and assignment
00060   CSCTFSectorProcessor& operator=(const CSCTFSectorProcessor& rhs) { return *this; };
00061   CSCTFSectorProcessor(const CSCTFSectorProcessor& par) {}
00062 
00063   bool m_gangedME1a;
00064   
00065   bool initializeFromPSet;
00066   unsigned m_endcap, m_sector, TMB07;
00067   unsigned m_latency;
00068 
00069   // All parameters below are signed to allow for uninitialized (<0) state
00070   int m_bxa_depth, m_allowALCTonly, m_allowCLCTonly, m_preTrigger;
00071   int m_minBX, m_maxBX;
00072   int m_etawin[7], m_etamin[8], m_etamax[8];
00073   int m_mindphip, m_mindetap;
00074   int m_mindeta12_accp, m_maxdeta12_accp, m_maxdphi12_accp;
00075   int m_mindeta13_accp, m_maxdeta13_accp, m_maxdphi13_accp;
00076   int m_mindeta112_accp, m_maxdeta112_accp, m_maxdphi112_accp;
00077   int m_mindeta113_accp, m_maxdeta113_accp, m_maxdphi113_accp;
00078   int m_mindphip_halo, m_mindetap_halo;
00079   int m_straightp, m_curvedp;
00080   int m_mbaPhiOff, m_mbbPhiOff;
00081   int m_widePhi;
00082   
00083   //  following parameters were moved here from the CSCTFTrackBuilder because they naturally belong here
00084   int QualityEnableME1a, QualityEnableME1b, QualityEnableME1c, QualityEnableME1d, QualityEnableME1e, QualityEnableME1f;
00085   int QualityEnableME2a, QualityEnableME2b, QualityEnableME2c;
00086   int QualityEnableME3a, QualityEnableME3b, QualityEnableME3c;
00087   int QualityEnableME4a, QualityEnableME4b, QualityEnableME4c;
00088   int kill_fiber;
00089   int run_core;
00090   int trigger_on_ME1a, trigger_on_ME1b, trigger_on_ME2, trigger_on_ME3, trigger_on_ME4;
00091   int trigger_on_MB1a, trigger_on_MB1d;
00092   int singlesTrackPt;
00093   unsigned int singlesTrackOutput;
00094   int rescaleSinglesPhi;
00095 
00096   int m_firmSP, m_firmFA, m_firmDD, m_firmVM;
00097 
00098   CSCTriggerContainer<csc::L1Track> l1_tracks; // fully defined L1Tracks
00099   CSCTriggerContainer<csctf::TrackStub> dt_stubs; // Track Stubs to be sent to the DTTF
00100   std::vector<csctf::TrackStub> stub_vec_filtered; // Collectin of stubs after applying kill_fiber and QualityEnable masks
00101 
00102   static const std::string FPGAs[5];
00103 
00104   std::map<std::string, CSCSectorReceiverLUT*> srLUTs_; // indexed by FPGA
00105   CSCTFSPCoreLogic* core_;
00106   CSCTFPtLUT* ptLUT_;
00107 
00108   // firmware map
00109   std::map<int, int> firmSP_Map; 
00110   bool isCoreVerbose;
00111   bool initFail_;
00112 };
00113 
00114 #endif