File indexing completed on 2023-03-17 11:05:39
0001 #ifndef HeavyFlavorAnalysis_SpecificDecay_TestBPHSpecificDecay_h
0002 #define HeavyFlavorAnalysis_SpecificDecay_TestBPHSpecificDecay_h
0003
0004 #include "HeavyFlavorAnalysis/RecoDecay/interface/BPHAnalyzerTokenWrapper.h"
0005 #include "HeavyFlavorAnalysis/RecoDecay/interface/BPHTrackReference.h"
0006
0007 #include "FWCore/Framework/interface/Event.h"
0008 #include "FWCore/Framework/interface/EventSetup.h"
0009 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0010
0011 #include "DataFormats/TrackReco/interface/Track.h"
0012 #include "DataFormats/ParticleFlowCandidate/interface/PFCandidate.h"
0013 #include "DataFormats/PatCandidates/interface/Muon.h"
0014 #include "DataFormats/PatCandidates/interface/GenericParticle.h"
0015 #include "DataFormats/PatCandidates/interface/CompositeCandidate.h"
0016
0017 #include "TrackingTools/TransientTrack/interface/TransientTrackBuilder.h"
0018 #include "TrackingTools/Records/interface/TransientTrackRecord.h"
0019
0020 #include <string>
0021
0022 class TH1F;
0023 class BPHRecoCandidate;
0024
0025 class TestBPHSpecificDecay : public BPHAnalyzerWrapper<BPHModuleWrapper::one_analyzer> {
0026 public:
0027 explicit TestBPHSpecificDecay(const edm::ParameterSet& ps);
0028 ~TestBPHSpecificDecay() override = default;
0029
0030 static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
0031
0032 void beginJob() override;
0033 void analyze(const edm::Event& ev, const edm::EventSetup& es) override;
0034 void endJob() override;
0035
0036 private:
0037 std::string patMuonLabel;
0038 std::string ccCandsLabel;
0039 std::string pfCandsLabel;
0040 std::string pcCandsLabel;
0041 std::string gpCandsLabel;
0042
0043
0044 BPHESTokenWrapper<TransientTrackBuilder, TransientTrackRecord> ttBToken;
0045 BPHTokenWrapper<pat::MuonCollection> patMuonToken;
0046 BPHTokenWrapper<std::vector<pat::CompositeCandidate> > ccCandsToken;
0047 BPHTokenWrapper<std::vector<reco::PFCandidate> > pfCandsToken;
0048 BPHTokenWrapper<std::vector<BPHTrackReference::candidate> > pcCandsToken;
0049 BPHTokenWrapper<std::vector<pat::GenericParticle> > gpCandsToken;
0050
0051 bool usePM;
0052 bool useCC;
0053 bool usePF;
0054 bool usePC;
0055 bool useGP;
0056
0057 std::string outDump;
0058 std::string outHist;
0059
0060 std::ostream* fPtr;
0061
0062 std::map<std::string, TH1F*> histoMap;
0063
0064 void dumpRecoCand(const std::string& name, const BPHRecoCandidate* cand);
0065 void fillHisto(const std::string& name, const BPHRecoCandidate* cand);
0066 void fillHisto(const std::string& name, float x);
0067
0068 void createHisto(const std::string& name, int nbin, float hmin, float hmax);
0069 };
0070
0071 #endif