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
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
0051 const std::vector<edm::InputTag> originTag1_;
0052 const std::vector<edm::InputTag> originTag2_;
0053 const edm::InputTag inputTag1_;
0054 const edm::InputTag inputTag2_;
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_;
0061 const double minDR2_;
0062 const double maxDZ_;
0063 const int min_N_;
0064 const int minPixHitsForDZ_;
0065 const bool checkSC_;
0066 const bool same_;
0067 };
0068
0069 #endif