Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-07-03 04:17:59

0001 #ifndef HLTrigger_HLTfilters_HLTDoubletDZ_h
0002 #define HLTrigger_HLTfilters_HLTDoubletDZ_h
0003 
0004 //
0005 // Class implements |dZ|<Max for a pair of two objects
0006 //
0007 
0008 #include "DataFormats/Common/interface/Ref.h"
0009 #include "DataFormats/EgammaCandidates/interface/ElectronFwd.h"
0010 #include "HLTrigger/HLTcore/interface/HLTFilter.h"
0011 #include "DataFormats/L1Trigger/interface/P2GTAlgoBlock.h"
0012 
0013 #include <string>
0014 #include <vector>
0015 
0016 namespace edm {
0017   class ConfigurationDescriptions;
0018 }
0019 
0020 namespace trigger {
0021   class TriggerFilterObjectWithRefs;
0022 }
0023 
0024 template <typename T1, typename T2>
0025 class HLTDoubletDZ : public HLTFilter {
0026 public:
0027   explicit HLTDoubletDZ(edm::ParameterSet const&);
0028   ~HLTDoubletDZ() override = default;
0029 
0030   static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
0031 
0032   bool hltFilter(edm::Event& iEvent,
0033                  edm::EventSetup const& iSetup,
0034                  trigger::TriggerFilterObjectWithRefs& filterproduct) const override;
0035 
0036 private:
0037   using T1Ref = edm::Ref<std::vector<T1>>;
0038   using T2Ref = edm::Ref<std::vector<T2>>;
0039 
0040   bool getCollections(edm::Event const& iEvent,
0041                       std::vector<T1Ref>& coll1,
0042                       std::vector<T2Ref>& coll2,
0043                       trigger::TriggerFilterObjectWithRefs& filterproduct) const;
0044 
0045   bool haveSameSuperCluster(T1 const& c1, T2 const& c2) const;
0046 
0047   bool passCutMinDeltaR(T1 const& c1, T2 const& c2) const;
0048 
0049   bool computeDZ(edm::Event const& iEvent, T1 const& c1, T2 const& c2) const;
0050 
0051   // configuration
0052   const std::vector<edm::InputTag> originTag1_;  // input tag identifying originals 1st product
0053   const std::vector<edm::InputTag> originTag2_;  // input tag identifying originals 2nd product
0054   const edm::InputTag inputTag1_;                // input tag identifying filtered 1st product
0055   const edm::InputTag inputTag2_;                // input tag identifying filtered 2nd product
0056   const edm::EDGetTokenT<trigger::TriggerFilterObjectWithRefs> inputToken1_;
0057   const edm::EDGetTokenT<trigger::TriggerFilterObjectWithRefs> inputToken2_;
0058   const edm::EDGetTokenT<reco::ElectronCollection> electronToken_;
0059   const edm::InputTag l1GTAlgoBlockTag_;
0060   const edm::EDGetTokenT<l1t::P2GTAlgoBlockMap> algoBlockToken_;
0061   const std::string l1GTAlgoName1_;
0062   const std::string l1GTAlgoName2_;
0063   const int triggerType1_;
0064   const int triggerType2_;
0065   const double minDR_;         // minimum dR between two objects to be considered a pair
0066   const double minDR2_;        // minDR_ * minDR_
0067   const double maxDZ_;         // number of pairs passing cuts required
0068   const int min_N_;            // number of pairs passing cuts required
0069   const int minPixHitsForDZ_;  // minimum number of required pixel hits to check DZ
0070   const bool checkSC_;         // make sure SC constituents are different
0071   const bool same_;            // 1st and 2nd product are one and the same
0072 };
0073 
0074 #endif  // HLTrigger_HLTfilters_HLTDoubletDZ_h