13 #include <boost/regex.hpp>
41 namespace AlCaHBHEMuons {
83 nRun_(0), nAll_(0), nGood_(0) {
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 std::auto_ptr<reco::BeamSpot> outputBeamSpot(
new reco::BeamSpot());
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) {
T getParameter(std::string const &) const
EventNumber_t event() const
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_
virtual 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
virtual void endRun(edm::Run const &, edm::EventSetup const &) override
AlCaHBHEMuonProducer(edm::ParameterSet const &, const AlCaHBHEMuons::Counters *count)
double dydz() const
dydz slope
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
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_
std::atomic< unsigned int > nGood_
edm::EDGetTokenT< reco::BeamSpot > tok_BS_
double covariance(int i, int j) const
(i,j)-th element of error matrix
virtual void produce(edm::Event &, const edm::EventSetup &) override
std::atomic< unsigned int > nAll_
edm::EDGetTokenT< reco::VertexCollection > tok_Vtx_
const Point & position() const
position
static void globalEndJob(const AlCaHBHEMuons::Counters *counters)
virtual void endStream() override
edm::EDGetTokenT< reco::MuonCollection > tok_Muon_
const_iterator begin() const
BeamType type() const
return beam type