Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:18:36

0001 #ifndef HLTMuonL1Filter_h
0002 #define HLTMuonL1Filter_h
0003 
0004 /** \class HLTMuonL1Filter
0005  *
0006  *
0007  *  This class is an HLTFilter (-> EDFilter) implementing a
0008  *  filter on L1 GMT input
0009  *
0010  *  \author J. Alcaraz
0011  *
0012  */
0013 
0014 #include "HLTrigger/HLTcore/interface/HLTFilter.h"
0015 
0016 #include "DataFormats/L1Trigger/interface/L1MuonParticle.h"
0017 #include "DataFormats/L1Trigger/interface/L1MuonParticleFwd.h"
0018 
0019 // CSCTF
0020 #include "DataFormats/L1CSCTrackFinder/interface/L1CSCTrackCollection.h"
0021 #include "L1Trigger/CSCTrackFinder/interface/CSCTrackFinderDataTypes.h"
0022 #include "CondFormats/L1TObjects/interface/L1MuTriggerScales.h"
0023 #include "CondFormats/DataRecord/interface/L1MuTriggerScalesRcd.h"
0024 
0025 namespace edm {
0026   class ConfigurationDescriptions;
0027 }
0028 
0029 class HLTMuonL1Filter : public HLTFilter {
0030 public:
0031   explicit HLTMuonL1Filter(const edm::ParameterSet&);
0032   ~HLTMuonL1Filter() override;
0033   static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
0034   bool hltFilter(edm::Event&,
0035                  const edm::EventSetup&,
0036                  trigger::TriggerFilterObjectWithRefs& filterproduct) const override;
0037 
0038 private:
0039   edm::ESGetToken<L1MuTriggerScales, L1MuTriggerScalesRcd> const l1MuTriggerScalesRcdToken_;
0040 
0041   /// input tag identifying the product containing muons
0042   edm::InputTag candTag_;
0043   edm::EDGetTokenT<l1extra::L1MuonParticleCollection> candToken_;
0044 
0045   /// input tag identifying the product containing refs to muons passing the previous level
0046   edm::InputTag previousCandTag_;
0047   edm::EDGetTokenT<trigger::TriggerFilterObjectWithRefs> previousCandToken_;
0048 
0049   /// max Eta cut
0050   double maxEta_;
0051 
0052   /// pT threshold
0053   double minPt_;
0054 
0055   /// Quality codes:
0056   ///
0057   /// 0  .. no muon
0058   /// 1  .. beam halo muon (CSC)
0059   /// 2  .. very low quality level 1 (e.g. ignore in single and di-muon trigger)
0060   /// 3  .. very low quality level 2 (e.g. ignore in single muon trigger use in di-muon trigger)
0061   /// 4  .. very low quality level 3 (e.g. ignore in di-muon trigger, use in single-muon trigger)
0062   /// 5  .. unmatched RPC
0063   /// 6  .. unmatched DT or CSC
0064   /// 7  .. matched DT-RPC or CSC-RPC
0065   ///
0066   /// attention: try not to rely on quality codes in analysis: they may change again
0067   ///
0068   /// Quality bit mask:
0069   ///
0070   /// the eight lowest order or least significant bits correspond to the qulity codes above;
0071   /// if a bit is 1, that code is accepted, otherwise not;
0072   /// example: 11101000 accepts qualities 3, 5, 6, 7
0073   int qualityBitMask_;
0074 
0075   /// required number of passing candidates to pass the filter
0076   int minN_;
0077 
0078   /// should we exclude single-segment CSC trigger objects from our counting?
0079   bool excludeSingleSegmentCSC_;
0080 
0081   /// checks if the passed L1MuExtraParticle is a single segment CSC
0082   bool isSingleSegmentCSC(const l1extra::L1MuonParticleRef& muon,
0083                           L1CSCTrackCollection const& csctfTracks,
0084                           L1MuTriggerScales const& scales) const;
0085 
0086   /// input tag identifying the product containing CSCTF tracks
0087   edm::InputTag csctfTag_;
0088   edm::EDGetTokenT<L1CSCTrackCollection> csctfToken_;
0089 };
0090 
0091 #endif  //HLTMuonL1Filter_h