42 namespace AlCaHBHEMuons {
91 nRun_(0), nAll_(0), nGood_(0) {
101 edm::LogInfo(
"HcalHBHEMuon") <<
"Parameters read from config file \n"
119 edm::LogInfo(
"HcalHBHEMuon") <<
"AlCaHBHEMuonFilter::Run "
120 << iEvent.
id().
run() <<
" Event "
121 << iEvent.
id().
event() <<
" Luminosity "
129 if (triggerResults.
isValid()) {
131 std::vector<std::string>
modules;
133 const std::vector<std::string> & triggerNames_ = triggerNames.
triggerNames();
134 for (
unsigned int iHLT=0; iHLT<triggerResults->size(); iHLT++) {
135 int hlt = triggerResults->accept(iHLT);
137 if (triggerNames_[iHLT].
find(
trigNames_[
i].c_str())!=std::string::npos){
142 edm::LogInfo(
"HcalHBHEMuon") <<
"AlCaHBHEMuonFilter::Trigger "
143 << triggerNames_[iHLT] <<
" Flag "
164 edm::LogInfo(
"HcalHBHEMuon") <<
"AlCaHBHEMuonFilter::Muon Handle "
168 for (reco::MuonCollection::const_iterator RecMuon = _Muon->begin();
169 RecMuon!= _Muon->end(); ++RecMuon) {
171 edm::LogInfo(
"HcalHBHEMuon") <<
"AlCaHBHEMuonFilter::Muon:Track " << RecMuon->track().isNonnull() <<
" innerTrack " << RecMuon->innerTrack().isNonnull() <<
" outerTrack " << RecMuon->outerTrack().isNonnull() <<
" globalTrack " << RecMuon->globalTrack().isNonnull();
173 if ((RecMuon->track().isNonnull()) &&
174 (RecMuon->innerTrack().isNonnull()) &&
175 (RecMuon->outerTrack().isNonnull()) &&
176 (RecMuon->globalTrack().isNonnull())) {
177 const reco::Track* pTrack = (RecMuon->innerTrack()).
get();
180 edm::LogInfo(
"HcalHBHEMuon")<<
"AlCaHBHEMuonFilter::Propagate: ECAL "
181 << trackID.
okECAL <<
" to HCAL "
201 globalCache()->nAll_ +=
nAll_;
202 globalCache()->nGood_ +=
nGood_;
207 << count->
nAll_ <<
" events";
216 <<
" hltconfig.init " << flag;
T getParameter(std::string const &) const
EventNumber_t event() const
virtual edm::TriggerNames const & triggerNames(edm::TriggerResults const &triggerResults) const
std::vector< spr::propagatedTrackID > propagateCALO(edm::Handle< reco::TrackCollection > &trkCollection, const CaloGeometry *geo, const MagneticField *bField, std::string &theTrackQuality, bool debug=false)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
virtual void endStream() override
#define DEFINE_FWK_MODULE(type)
edm::EDGetTokenT< reco::MuonCollection > tok_Muon_
int bunchCrossing() const
edm::LuminosityBlockNumber_t luminosityBlock() const
virtual void beginRun(edm::Run const &, edm::EventSetup const &) override
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
bool accept(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
Strings const & triggerNames() const
static void globalEndJob(const AlCaHBHEMuons::Counters *counters)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
void addDefault(ParameterSetDescription const &psetDescription)
AlCaHBHEMuonFilter(edm::ParameterSet const &, const AlCaHBHEMuons::Counters *count)
edm::InputTag triggerResults_
static std::string const triggerResults
std::vector< std::string > HLTNames_
bool init(const edm::Run &iRun, const edm::EventSetup &iSetup, const std::string &processName, bool &changed)
d'tor
T const * product() const
std::atomic< unsigned int > nGood_
static std::unique_ptr< AlCaHBHEMuons::Counters > initializeGlobalCache(edm::ParameterSet const &)
virtual void endRun(edm::Run const &, edm::EventSetup const &) override
std::atomic< unsigned int > nAll_
virtual bool filter(edm::Event &, edm::EventSetup const &) override
std::vector< std::string > trigNames_
HLTConfigProvider hltConfig_
edm::EDGetTokenT< edm::TriggerResults > tok_trigRes_
edm::EDGetTokenT< trigger::TriggerEvent > tok_trigEvt