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 ){
126 if (trigNames.
triggerName(hltIndex).find(
triggerPath_) != std::string::npos && hltresults->wasrun(hltIndex) && hltresults->accept(hltIndex)){
132 float ptMuon=-1, ptPhoton=-1,
met=-1,
pfMet=-1, ht = 0;
133 size_t filterIndex = triggerSummary->filterIndex(
triggerFilter_ );
135 if( !(filterIndex >= triggerSummary->sizeFilters()) ){
137 for(
size_t j = 0;
j < keys.size(); ++
j ){
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->size() > 0){
167 float maxMuPt = -1.0;
168 for(
auto &
mu : *MuonCollection){
169 if(
mu.pt() > maxMuPt) maxMuPt =
mu.pt();
175 if(PhotonCollection->size() > 0){
176 float maxPhoPt = -1.0;
177 for(
auto &pho : *PhotonCollection){
178 if(pho.pt() > maxPhoPt) maxPhoPt = pho.pt();
185 for (reco::CaloJetCollection::const_iterator i_calojet = caloJetCollection->begin(); i_calojet != caloJetCollection->end(); ++i_calojet){
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_
virtual edm::TriggerNames const & triggerNames(edm::TriggerResults const &triggerResults) const
MonitorElement * h_PhotonPt
edm::EDGetTokenT< reco::MuonCollection > theMuonCollection_
edm::EDGetTokenT< reco::CaloJetCollection > theCaloJetCollection_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
HotlineDQM(const edm::ParameterSet &ps)
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)
edm::EDGetTokenT< edm::TriggerResults > triggerResults_
MonitorElement * h_OnlineMuPt
MonitorElement * h_OnlineHT
tuple pfMet
____________________________________________________________________________||
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[]
void setCurrentFolder(const std::string &fullpath)
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