Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-03-17 11:09:26

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