Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-07-24 02:52:14

0001 #ifndef L1Trigger_CSCTriggerPrimitives_CSCMuonPortCard_h
0002 #define L1Trigger_CSCTriggerPrimitives_CSCMuonPortCard_h
0003 
0004 //-----------------------------------------------------------------------------
0005 //
0006 //   Class: CSCMuonPortCard
0007 //
0008 //   Description:
0009 //    Simulates the functionality of the Muon Port Card (MPC).  Each MPC
0010 //    is responsible for 9 Trigger Mother Boards (TMBs).  It takes the up to
0011 //    18 LCTs (2/TMB) in each (sub)sector every bunch crossing, sorts them,
0012 //    selects up to three best, and puts them into an output collection.
0013 //
0014 //   Author List: Benn Tannenbaum 30 August 1999.
0015 //                Based on code by Nick Wisniewski.
0016 //
0017 //
0018 //   Modifications: Numerous later improvements by Jason Mumford and
0019 //                  Slava Valuev (see cvs in ORCA).
0020 //   Porting/reworking from ORCA by L. Gray (UF), June 2006.
0021 //
0022 //   Update for Run-II data taking by Sven Dildick (TAMU), May 2016.
0023 //   CSC MPC sends all 18 stubs from 9 TMBs. Stubs are no longer sorted by quality
0024 //   Invalid or low-quality stubs are not removed either.
0025 //
0026 //-----------------------------------------------------------------------------
0027 
0028 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0029 #include "DataFormats/CSCDigi/interface/CSCCorrelatedLCTDigiCollection.h"
0030 #include "DataFormats/L1CSCTrackFinder/interface/CSCTriggerContainer.h"
0031 #include "DataFormats/L1CSCTrackFinder/interface/TrackStub.h"
0032 #include "L1Trigger/CSCTriggerPrimitives/interface/LCTQualityControl.h"
0033 
0034 #include <vector>
0035 
0036 class CSCMuonPortCard {
0037 public:
0038   typedef CSCTriggerContainer<csctf::TrackStub> TrackStubList;
0039 
0040   CSCMuonPortCard(unsigned endcap, unsigned station, unsigned sector, const edm::ParameterSet& conf);
0041 
0042   CSCMuonPortCard();
0043 
0044   // clear the stub vector
0045   void clear();
0046 
0047   // Method to load the content of the digi container into a trigger
0048   // container.  This allows us to sort per BX more easily.
0049   void loadLCTs(const CSCCorrelatedLCTDigiCollection& thedigis);
0050 
0051   // Method to sort all Correlated LCTs generated by the TMB.
0052   void sortLCTs();
0053 
0054   // Method to sort all Correlated LCTs generated by the TMB in a subsector and BX
0055   void sortLCTs(const unsigned subsector, const int bx);
0056 
0057   // Returns a vector of TrackStubs indexed by [sorting]
0058   std::vector<csctf::TrackStub> getLCTs() const { return selectedStubs_; }
0059 
0060 private:
0061   /** Chamber id (trigger-type labels). */
0062   unsigned theEndcap;
0063   unsigned theStation;
0064   unsigned theSector;
0065 
0066   // internal stubs
0067   CSCTriggerContainer<csctf::TrackStub> stubs_;
0068 
0069   // selected stubs
0070   std::vector<csctf::TrackStub> selectedStubs_;
0071 
0072   // CSC expert options
0073   bool sort_stubs_;
0074   bool drop_invalid_stubs_;
0075   bool drop_low_quality_stubs_;
0076   unsigned max_stubs_;
0077 
0078   int minBX_, maxBX_;  // min and max BX to sort.
0079 
0080   std::string vmeName_;
0081 };
0082 
0083 #endif