Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:49:44

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