Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 /*HLTTauMCProducer
0002 Producer that creates LorentzVector Collections
0003 from offline reconstructed quantities to be used
0004 in Offline Trigger DQM etc
0005 */
0006 
0007 #ifndef HLTTauMCProducer_h
0008 #define HLTTauMCProducer_h
0009 
0010 #include "DataFormats/Candidate/interface/Candidate.h"
0011 #include "DataFormats/Common/interface/Handle.h"
0012 #include "DataFormats/HepMCCandidate/interface/GenParticle.h"
0013 #include "DataFormats/HepMCCandidate/interface/GenParticleFwd.h"
0014 #include "DataFormats/METReco/interface/GenMET.h"
0015 #include "DataFormats/METReco/interface/GenMETCollection.h"
0016 #include "DataFormats/Math/interface/LorentzVector.h"
0017 #include "FWCore/Framework/interface/global/EDProducer.h"
0018 #include "FWCore/Framework/interface/Event.h"
0019 #include "FWCore/Framework/interface/Frameworkfwd.h"
0020 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0021 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0022 #include "FWCore/Utilities/interface/InputTag.h"
0023 #include "HepMC/GenEvent.h"
0024 #include "SimDataFormats/GeneratorProducts/interface/HepMCProduct.h"
0025 
0026 #include "TLorentzVector.h"
0027 #include <string>
0028 #include <vector>
0029 
0030 typedef math::XYZTLorentzVectorD LorentzVector;
0031 typedef std::vector<LorentzVector> LorentzVectorCollection;
0032 
0033 class HLTTauMCProducer : public edm::global::EDProducer<> {
0034 public:
0035   explicit HLTTauMCProducer(const edm::ParameterSet &);
0036 
0037   void produce(edm::StreamID, edm::Event &, const edm::EventSetup &) const override;
0038 
0039 private:
0040   void getGenDecayProducts(const reco::GenParticleRef &,
0041                            reco::GenParticleRefVector &,
0042                            int status = 1,
0043                            int pdgId = 0) const;
0044 
0045   enum tauDecayModes {
0046     kElectron,
0047     kMuon,
0048     kOneProng0pi0,
0049     kOneProng1pi0,
0050     kOneProng2pi0,
0051     kThreeProng0pi0,
0052     kThreeProng1pi0,
0053     kOther,
0054     kUndefined
0055   };
0056 
0057   const edm::EDGetTokenT<reco::GenParticleCollection> MC_;
0058   const edm::EDGetTokenT<reco::GenMETCollection> MCMET_;
0059   const double ptMinMCTau_;
0060   const double ptMinMCElectron_;
0061   const double ptMinMCMuon_;
0062   const std::vector<int> m_PDG_;
0063   const double etaMin_, etaMax_, phiMin_, phiMax_;
0064 };
0065 
0066 #endif