13 #include <boost/regex.hpp> 54 return std::make_unique<AlCaHBHEMuons::Counters>();
58 void endStream()
override;
99 edm::LogInfo(
"HcalHBHEMuon") <<
"Parameters read from config file \n" 100 <<
"\t minP of muon " << pMuonMin_ <<
"\t input labels " <<
labelBS_ <<
" " << labelVtx_
101 <<
" " << labelEB_ <<
" " << labelEE_ <<
" " << labelHBHE_ <<
" " <<
labelMuon_;
105 produces<reco::VertexCollection>(labelVtx_.
label());
106 produces<EcalRecHitCollection>(labelEB_.
instance());
107 produces<EcalRecHitCollection>(labelEE_.
instance());
108 produces<HBHERecHitCollection>(labelHBHE_.
label());
109 produces<reco::MuonCollection>(labelMuon_.label());
118 edm::LogInfo(
"HcalHBHEMuon") <<
"AlCaHBHEMuonProducer::Run " << iEvent.
id().
run() <<
" Event " << iEvent.
id().
event()
139 if (!barrelRecHitsHandle.
isValid()) {
146 if (!endcapRecHitsHandle.
isValid()) {
166 edm::LogInfo(
"HcalHBHEMuon") <<
"AlCaHBHEMuonProducer::obtained the collections with validity flag " << valid;
170 auto outputBeamSpot = std::make_unique<reco::BeamSpot>();
171 auto outputVColl = std::make_unique<reco::VertexCollection>();
172 auto outputEBColl = std::make_unique<EBRecHitCollection>();
173 auto outputEEColl = std::make_unique<EERecHitCollection>();
174 auto outputHBHEColl = std::make_unique<HBHERecHitCollection>();
175 auto outputMColl = std::make_unique<reco::MuonCollection>();
179 outputBeamSpot = std::make_unique<reco::BeamSpot>(
192 for (reco::VertexCollection::const_iterator vtr = vtx.begin(); vtr != vtx.end(); ++vtr)
193 outputVColl->push_back(*vtr);
196 outputEBColl->push_back(*ehit);
199 outputEEColl->push_back(*ehit);
201 for (std::vector<HBHERecHit>::const_iterator hhit = hbhecoll.
begin(); hhit != hbhecoll.
end(); ++hhit)
202 outputHBHEColl->push_back(*hhit);
204 for (reco::MuonCollection::const_iterator
muon = muons.begin();
muon != muons.end(); ++
muon)
205 outputMColl->push_back(*
muon);
218 globalCache()->nAll_ +=
nAll_;
219 globalCache()->nGood_ +=
nGood_;
237 for (
unsigned int k = 0;
k < muons.size(); ++
k) {
std::atomic< unsigned int > nGood_
T getParameter(std::string const &) const
EventNumber_t event() const
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
bool select(const reco::MuonCollection &)
static std::unique_ptr< AlCaHBHEMuons::Counters > initializeGlobalCache(edm::ParameterSet const &)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
edm::EDGetTokenT< EcalRecHitCollection > tok_EE_
std::atomic< unsigned int > nAll_
void beginRun(edm::Run const &, edm::EventSetup const &) override
std::vector< T >::const_iterator const_iterator
int bunchCrossing() const
edm::LuminosityBlockNumber_t luminosityBlock() const
std::vector< Vertex > VertexCollection
collection of Vertex objects
bool accept(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
std::vector< Muon > MuonCollection
collection of Muon objects
void endRun(edm::Run const &, edm::EventSetup const &) override
AlCaHBHEMuonProducer(edm::ParameterSet const &, const AlCaHBHEMuons::Counters *count)
double dydz() const
dydz slope
#define DEFINE_FWK_MODULE(type)
edm::EDGetTokenT< HBHERecHitCollection > tok_HBHE_
double BeamWidthX() const
beam width X
double dxdz() const
dxdz slope
const_iterator end() const
T const * product() const
double sigmaZ() const
sigma z
edm::EDGetTokenT< EcalRecHitCollection > tok_EB_
edm::EDGetTokenT< reco::BeamSpot > tok_BS_
double covariance(int i, int j) const
(i,j)-th element of error matrix
~AlCaHBHEMuonProducer() override
void produce(edm::Event &, const edm::EventSetup &) override
edm::EDGetTokenT< reco::VertexCollection > tok_Vtx_
const Point & position() const
position
static void globalEndJob(const AlCaHBHEMuons::Counters *counters)
void endStream() override
edm::EDGetTokenT< reco::MuonCollection > tok_Muon_
const_iterator begin() const
BeamType type() const
return beam type