Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef HLTDoublet_h
0002 #define 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 #include "FWCore/ParameterSet/interface/ConfigurationDescriptions.h"
0023 #include <string>
0024 #include <vector>
0025 namespace trigger {
0026   class TriggerFilterObjectWithRefs;
0027 }
0028 
0029 //
0030 // class declaration
0031 //
0032 
0033 template <typename T1, typename T2>
0034 class HLTDoublet : public HLTFilter {
0035 public:
0036   explicit HLTDoublet(const edm::ParameterSet&);
0037   ~HLTDoublet() override;
0038   static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
0039   bool hltFilter(edm::Event&,
0040                  const edm::EventSetup&,
0041                  trigger::TriggerFilterObjectWithRefs& filterproduct) const override;
0042 
0043 private:
0044   // configuration
0045   const std::vector<edm::InputTag> originTag1_;  // input tag identifying originals 1st product
0046   const std::vector<edm::InputTag> originTag2_;  // input tag identifying originals 2nd product
0047   const edm::InputTag inputTag1_;                // input tag identifying filtered 1st product
0048   const edm::InputTag inputTag2_;                // input tag identifying filtered 2nd product
0049   const edm::EDGetTokenT<trigger::TriggerFilterObjectWithRefs> inputToken1_;
0050   const edm::EDGetTokenT<trigger::TriggerFilterObjectWithRefs> inputToken2_;
0051   const int triggerType1_;
0052   const int triggerType2_;
0053   const double min_Dphi_, max_Dphi_;  // Delta phi window
0054   const double min_Deta_, max_Deta_;  // Delta eta window
0055   const double min_Minv_, max_Minv_;  // Minv(1,2) window
0056   const double min_DelR_, max_DelR_;  // Delta R window
0057   const double min_Pt_, max_Pt_;      // Pt(1,2) window
0058   const int min_N_;                   // number of pairs passing cuts required
0059 
0060   // calculated from configuration in c'tor
0061   const bool same_;                                           // 1st and 2nd product are one and the same
0062   const bool cutdphi_, cutdeta_, cutminv_, cutdelr_, cutpt_;  // cuts are on=true or off=false
0063 
0064   //
0065   typedef std::vector<T1> T1Collection;
0066   typedef edm::Ref<T1Collection> T1Ref;
0067   typedef std::vector<T2> T2Collection;
0068   typedef edm::Ref<T2Collection> T2Ref;
0069 };
0070 
0071 #endif  //HLTDoublet_h