Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef HLTrigger_HLTfilters_HLTDoublet_h
0002 #define HLTrigger_HLTfilters_HLTDoublet_h
0003 
0004 /** \class HLTDoublet
0005  *
0006  *
0007  *  This class is an HLTFilter (-> EDFilter) implementing a basic HLT
0008  *  trigger for pairs of object, evaluating all pairs with the first
0009  *  object from collection 1, and the second object from collection 2,
0010  *  cutting on variables relating to their 4-momentum representations.
0011  *  The object collections are assumed to be outputs of HLTSinglet
0012  *  single-object-type filters so that the access is thorugh
0013  *  RefToBases and polymorphic.
0014  *
0015  *
0016  *  \author Martin Grunewald
0017  *
0018  */
0019 
0020 #include "DataFormats/Common/interface/Ref.h"
0021 #include "HLTrigger/HLTcore/interface/HLTFilter.h"
0022 
0023 #include <vector>
0024 
0025 namespace edm {
0026   class ConfigurationDescriptions;
0027 }
0028 
0029 namespace trigger {
0030   class TriggerFilterObjectWithRefs;
0031 }
0032 
0033 template <typename T1, typename T2>
0034 class HLTDoublet : public HLTFilter {
0035 public:
0036   explicit HLTDoublet(const edm::ParameterSet&);
0037   ~HLTDoublet() override = default;
0038 
0039   static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
0040 
0041   bool hltFilter(edm::Event&,
0042                  const edm::EventSetup&,
0043                  trigger::TriggerFilterObjectWithRefs& filterproduct) const override;
0044 
0045 private:
0046   typedef std::vector<T1> T1Collection;
0047   typedef edm::Ref<T1Collection> T1Ref;
0048   typedef std::vector<T2> T2Collection;
0049   typedef edm::Ref<T2Collection> T2Ref;
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 int triggerType1_;
0059   const int triggerType2_;
0060   const double min_Deta_, max_Deta_;    // Delta eta window
0061   const double min_Dphi_, max_Dphi_;    // Delta phi window
0062   const double min_DelR2_, max_DelR2_;  // Delta R^2 window
0063   const double min_Pt_, max_Pt_;        // Pt(1,2) window
0064   const double min_Minv_, max_Minv_;    // Minv(1,2) window
0065   const int min_N_;                     // number of pairs passing cuts required
0066 
0067   // calculated from configuration in c'tor
0068   // 1st and 2nd product are one and the same
0069   const bool same_;
0070   // cuts are on=true or off=false
0071   const bool cutdeta_, cutdphi_, cutdelr2_, cutpt_, cutminv_;
0072 };
0073 
0074 #endif  // HLTrigger_HLTfilters_HLTDoublet_h