File indexing completed on 2024-04-06 12:18:52
0001 #ifndef HLTriggerOffline_Exotica_HLTExoticaPlotter_H
0002 #define HLTriggerOffline_Exotica_HLTExoticaPlotter_H
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 #include "FWCore/Framework/interface/Event.h"
0017 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0018
0019 #include "CommonTools/Utils/interface/StringCutObjectSelector.h"
0020 #include "DataFormats/Candidate/interface/Candidate.h"
0021 #include "DataFormats/Candidate/interface/LeafCandidate.h"
0022 #include "DataFormats/EgammaCandidates/interface/GsfElectron.h"
0023 #include "DataFormats/EgammaCandidates/interface/Photon.h"
0024 #include "DataFormats/HepMCCandidate/interface/GenParticle.h"
0025 #include "DataFormats/MuonReco/interface/Muon.h"
0026 #include "DataFormats/RecoCandidate/interface/RecoChargedCandidate.h"
0027 #include "DataFormats/RecoCandidate/interface/RecoChargedCandidateFwd.h"
0028 #include "DataFormats/RecoCandidate/interface/RecoEcalCandidate.h"
0029 #include "DataFormats/RecoCandidate/interface/RecoEcalCandidateFwd.h"
0030
0031 #include "DQMServices/Core/interface/DQMStore.h"
0032
0033 #include <cstring>
0034 #include <map>
0035 #include <set>
0036 #include <vector>
0037
0038
0039
0040 struct EVTColContainer;
0041
0042 class HLTExoticaPlotter {
0043 public:
0044 typedef dqm::legacy::DQMStore DQMStore;
0045 typedef dqm::legacy::MonitorElement MonitorElement;
0046
0047 HLTExoticaPlotter(const edm::ParameterSet &pset,
0048 const std::string &hltPath,
0049 const std::vector<unsigned int> &objectsType);
0050 ~HLTExoticaPlotter();
0051 void beginJob();
0052 void beginRun(const edm::Run &, const edm::EventSetup &);
0053 void plotterBookHistos(DQMStore::IBooker &iBooker, const edm::Run &iRun, const edm::EventSetup &iSetup);
0054 void analyze(const bool &isPassTrigger,
0055 const std::string &source,
0056 const std::vector<reco::LeafCandidate> &matches,
0057 std::map<int, double> theSumEt,
0058 std::vector<float> &dxys);
0059
0060 inline const std::string gethltpath() const { return _hltPath; }
0061
0062 private:
0063 void bookHist(DQMStore::IBooker &iBooker,
0064 const std::string &source,
0065 const std::string &objType,
0066 const std::string &variable);
0067 void fillHist(const bool &passTrigger,
0068 const std::string &source,
0069 const std::string &objType,
0070 const std::string &var,
0071 const float &value);
0072
0073 std::string _hltPath;
0074 std::string _hltProcessName;
0075
0076 std::set<unsigned int> _objectsType;
0077
0078 unsigned int _nObjects;
0079
0080 std::vector<double> _parametersEta;
0081 std::vector<double> _parametersPhi;
0082 std::vector<double> _parametersTurnOn;
0083 std::vector<double> _parametersTurnOnSumEt;
0084 std::vector<double> _parametersDxy;
0085
0086
0087 bool _drop_pt2;
0088 bool _drop_pt3;
0089
0090 std::map<std::string, MonitorElement *> _elements;
0091 };
0092 #endif