13 #include <boost/regex.hpp> 54 return std::make_unique<AlCaHBHEMuons::Counters>();
58 void endStream()
override;
101 edm::LogInfo(
"HcalHBHEMuon") <<
"Parameters read from config file \n" 102 <<
"\t minP of muon " << pMuonMin_
103 <<
"\t input labels " <<
labelBS_ <<
" " 104 << labelVtx_ <<
" " << labelEB_ <<
" " << labelEE_
109 produces<reco::VertexCollection>(labelVtx_.
label());
110 produces<EcalRecHitCollection>(labelEB_.
instance());
111 produces<EcalRecHitCollection>(labelEE_.
instance());
112 produces<HBHERecHitCollection>(labelHBHE_.
label());
113 produces<reco::MuonCollection>(labelMuon_.label());
123 edm::LogInfo(
"HcalHBHEMuon") <<
"AlCaHBHEMuonProducer::Run " 124 << iEvent.
id().
run() <<
" Event " 125 << iEvent.
id().
event() <<
" Luminosity " 147 if (!barrelRecHitsHandle.
isValid()) {
154 if (!endcapRecHitsHandle.
isValid()) {
174 edm::LogInfo(
"HcalHBHEMuon") <<
"AlCaHBHEMuonProducer::obtained the collections with validity flag " << valid;
178 auto outputBeamSpot = std::make_unique<reco::BeamSpot>();
179 auto outputVColl = std::make_unique<reco::VertexCollection>();
180 auto outputEBColl = std::make_unique<EBRecHitCollection>();
181 auto outputEEColl = std::make_unique<EERecHitCollection>();
182 auto outputHBHEColl = std::make_unique<HBHERecHitCollection>();
183 auto outputMColl = std::make_unique<reco::MuonCollection>();
187 outputBeamSpot = std::make_unique<reco::BeamSpot>(beam.
position(),beam.
sigmaZ(),
201 for (reco::VertexCollection::const_iterator vtr=vtx.begin(); vtr!=vtx.end(); ++vtr)
202 outputVColl->push_back(*vtr);
205 outputEBColl->push_back(*ehit);
208 outputEEColl->push_back(*ehit);
210 for (std::vector<HBHERecHit>::const_iterator hhit=hbhecoll.
begin(); hhit!=hbhecoll.
end(); ++hhit)
211 outputHBHEColl->push_back(*hhit);
213 for (reco::MuonCollection::const_iterator
muon=muons.begin();
muon!=muons.end(); ++
muon)
214 outputMColl->push_back(*
muon);
227 globalCache()->nAll_ +=
nAll_;
228 globalCache()->nGood_ +=
nGood_;
233 << count->
nAll_ <<
" events";
248 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
#define DEFINE_FWK_MODULE(type)
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
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