11 edm::LogInfo(
"HotlineDQM") <<
"Constructor HotlineDQM::HotlineDQM " << std::endl;
31 edm::LogInfo(
"HotlineDQM") <<
"Destructor HotlineDQM::~HotlineDQM " << std::endl;
36 edm::LogInfo(
"HotlineDQM") <<
"HotlineDQM::bookHistograms" << std::endl;
42 h_MuPt = ibooker_.
book1D(
"MuPt",
"Muon Pt; GeV", 20, 0.0, 2000.0);
44 h_HT = ibooker_.
book1D(
"HT",
"HT; GeV", 20, 0.0, 6000.0);
45 h_MetPt = ibooker_.
book1D(
"MetPt",
"Calo MET; GeV", 20, 0.0, 2000);
58 edm::LogInfo(
"HotlineDQM") <<
"HotlineDQM::analyze" << std::endl;
65 if ( !pfMETCollection.
isValid() ){
66 edm::LogError (
"HotlineDQM") <<
"invalid collection: PFMET" <<
"\n";
71 if ( !caloMETCollection.
isValid() ){
72 edm::LogError (
"HotlineDQM") <<
"invalid collection: CaloMET" <<
"\n";
81 if ( !caloJetCollection.
isValid() ){
82 edm::LogError (
"HotlineDQM") <<
"invalid collection: CaloJets" <<
"\n";
91 if ( !MuonCollection.
isValid() ){
92 edm::LogError (
"HotlineDQM") <<
"invalid collection: Muons " <<
"\n";
101 if ( !PhotonCollection.
isValid() ){
102 edm::LogError (
"HotlineDQM") <<
"invalid collection: Photons " <<
"\n";
112 edm::LogError (
"HotlineDQM") <<
"invalid collection: TriggerResults" <<
"\n";
117 if(!triggerSummary.
isValid()) {
118 edm::LogError (
"HotlineDQM") <<
"invalid collection: TriggerSummary" <<
"\n";
122 bool hasFired =
false;
124 unsigned int numTriggers = trigNames.
size();
125 for(
unsigned int hltIndex=0; hltIndex<numTriggers; ++hltIndex ){
132 float ptMuon=-1, ptPhoton=-1,
met=-1,
pfMet=-1, ht = 0;
135 if( !(filterIndex >= triggerSummary->
sizeFilters()) ){
137 for(
unsigned short key : keys){
140 if(foundObject.
pt() > ptMuon) ptMuon = foundObject.
pt();
143 if(foundObject.
pt() > ptPhoton) ptPhoton = foundObject.
pt();
145 else if(
useMet && fabs(foundObject.
id()) == 0){
146 met = foundObject.
pt();
148 else if(
usePFMet && fabs(foundObject.
id()) == 0){
151 else if(
useHT && fabs(foundObject.
id()) == 89){
152 ht = foundObject.
pt();
166 if(!MuonCollection->empty()){
167 float maxMuPt = -1.0;
168 for(
auto &
mu : *MuonCollection){
169 if(
mu.pt() > maxMuPt) maxMuPt =
mu.pt();
175 if(!PhotonCollection->empty()){
176 float maxPhoPt = -1.0;
177 for(
auto &pho : *PhotonCollection){
178 if(pho.pt() > maxPhoPt) maxPhoPt = pho.pt();
185 for (
auto const & i_calojet : *caloJetCollection){
186 if (i_calojet.pt() < 40)
continue;
187 if (fabs(i_calojet.eta()) > 3.0)
continue;
188 caloHT += i_calojet.pt();
209 desc.
add<
std::string>(
"triggerPath",
"HLT_HT2000_v")->setComment(
"trigger path name");
211 desc.
add<
bool>(
"useMuons",
false);
212 desc.
add<
bool>(
"usePhotons",
false);
213 desc.
add<
bool>(
"useMet",
false);
214 desc.
add<
bool>(
"usePFMet",
false);
215 desc.
add<
bool>(
"useHT",
false);
216 descriptions.
add(
"HotlineDQM",desc);
T getParameter(std::string const &) const
edm::EDGetTokenT< reco::PhotonCollection > thePhotonCollection_
bool wasrun() const
Was at least one path run?
MonitorElement * h_PhotonPt
edm::EDGetTokenT< reco::MuonCollection > theMuonCollection_
trigger::size_type sizeFilters() const
edm::EDGetTokenT< reco::CaloJetCollection > theCaloJetCollection_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
HotlineDQM(const edm::ParameterSet &ps)
bool accept() const
Has at least one path accepted the event?
const Keys & filterKeys(trigger::size_type index) const
trigger::size_type filterIndex(const edm::InputTag &filterTag) const
find index of filter in data-member vector from filter tag
Strings::size_type size() const
MonitorElement * h_OnlinePhotonPt
std::vector< Muon > MuonCollection
collection of Muon objects
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Single trigger physics object (e.g., an isolated muon)
#define DEFINE_FWK_MODULE(type)
edm::EDGetTokenT< edm::TriggerResults > triggerResults_
MonitorElement * h_OnlineMuPt
void setCurrentFolder(std::string const &fullpath)
MonitorElement * h_OnlineHT
const TriggerObjectCollection & getObjects() const
MonitorElement * book1D(Args &&...args)
edm::EDGetTokenT< reco::PFMETCollection > thePfMETCollection_
ParameterDescriptionBase * add(U const &iLabel, T const &value)
MonitorElement * h_OnlineMetPt
edm::InputTag triggerFilter_
std::vector< TriggerObject > TriggerObjectCollection
collection of trigger physics objects (e.g., all isolated muons)
MonitorElement * h_OnlinePFMetPt
static const char *const trigNames[]
edm::EDGetTokenT< trigger::TriggerEvent > theTrigSummary_
std::string const & triggerName(unsigned int index) const
std::vector< size_type > Keys
std::vector< Photon > PhotonCollection
collectin of Photon objects
edm::EDGetTokenT< reco::CaloMETCollection > theMETCollection_
void add(std::string const &label, ParameterSetDescription const &psetDescription)
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
MonitorElement * h_PFMetPt
void analyze(edm::Event const &e, edm::EventSetup const &eSetup) override
edm::TriggerNames const & triggerNames(edm::TriggerResults const &triggerResults) const override