Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef L1TTkEleFilter_h
0002 #define L1TTkEleFilter_h
0003 
0004 /** \class L1TTkEleFilter
0005  *
0006  *
0007  *  This class is an HLTFilter (-> EDFilter) implementing a very basic
0008  *  HLT trigger acting on TkEle candidates
0009  *  This has support for *two* collections, since electrons can come
0010  *  either from crystal calo or HGCAL
0011  *
0012  *  \author Simone Gennai
0013  *  \author Thiago Tomei
0014  */
0015 
0016 #include "HLTrigger/HLTcore/interface/HLTFilter.h"
0017 #include "DataFormats/L1TCorrelator/interface/TkElectron.h"
0018 #include "DataFormats/L1TCorrelator/interface/TkElectronFwd.h"
0019 
0020 //
0021 // class declaration
0022 //
0023 
0024 class L1TTkEleFilter : public HLTFilter {
0025 public:
0026   explicit L1TTkEleFilter(const edm::ParameterSet&);
0027   ~L1TTkEleFilter() override;
0028   static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
0029   bool hltFilter(edm::Event&,
0030                  const edm::EventSetup&,
0031                  trigger::TriggerFilterObjectWithRefs& filterproduct) const override;
0032 
0033 private:
0034   edm::InputTag l1TkEleTag1_;  //input tag for L1 Tk Ele product
0035   edm::InputTag l1TkEleTag2_;  //input tag for L1 Tk Ele product
0036 
0037   typedef std::vector<l1t::TkElectron> TkEleCollection;
0038   edm::EDGetTokenT<TkEleCollection> tkEleToken1_;  // token identifying product containing L1 TkEles
0039   edm::EDGetTokenT<TkEleCollection> tkEleToken2_;  // token identifying product containing L1 TkEles
0040 
0041   double min_Pt_;                            // min pt cut
0042   int min_N_;                                // min number of candidates above pT cut
0043   double min_AbsEta1_;                       //min eta cut
0044   double max_AbsEta1_;                       //max eta cut
0045   double min_AbsEta2_;                       //min eta cut
0046   double max_AbsEta2_;                       //max eta cut
0047   edm::ParameterSet scalings_;               // all scalings. An indirection level allows extra flexibility
0048   std::vector<double> barrelScalings_;       // barrel scalings
0049   std::vector<double> endcapScalings_;       // endcap scalings
0050   std::vector<double> etaBinsForIsolation_;  // abs. eta bin edges for isolation. First edge at 0.0 must be explicit!
0051   std::vector<double> trkIsolation_;         // values for track isolation in the bins defined above
0052   int quality1_;                             // quality for electrons of 1st collection
0053   int quality2_;                             // quality for electrons of 2nd collection
0054   int qual1IsMask_;                          // is qual for electrons of 1st collection a mask?
0055   int qual2IsMask_;                          // is qual for electrons of 2nd collection a mask?
0056   bool applyQual1_;                          // should we apply quality 1?
0057   bool applyQual2_;                          // should we apply quality 2?
0058 
0059   double TkEleOfflineEt(double Et, double Eta) const;
0060 };
0061 
0062 #endif  //L1TTkEleFilter_h