13 #include <boost/regex.hpp>
41 namespace AlCaHBHEMuons {
54 return std::make_unique<AlCaHBHEMuons::Counters>();
85 labelBS_(iConfig.getParameter<edm::
InputTag>(
"BeamSpotLabel")),
86 labelVtx_(iConfig.getParameter<edm::
InputTag>(
"VertexLabel")),
87 labelEB_(iConfig.getParameter<edm::
InputTag>(
"EBRecHitLabel")),
88 labelEE_(iConfig.getParameter<edm::
InputTag>(
"EERecHitLabel")),
89 labelHBHE_(iConfig.getParameter<edm::
InputTag>(
"HBHERecHitLabel")),
90 labelMuon_(iConfig.getParameter<edm::
InputTag>(
"MuonLabel")),
91 pMuonMin_(iConfig.getParameter<double>(
"MinimumMuonP")) {
111 produces<reco::MuonCollection>(labelMuon_.label());
127 if (!bmspot.isValid()) {
139 if (!barrelRecHitsHandle.isValid()) {
145 if (!endcapRecHitsHandle.isValid()) {
151 if (!hbhe.isValid()) {
157 if (!muonhandle.isValid()) {
163 edm::LogVerbatim(
"HcalHBHEMuon") <<
"AlCaHBHEMuonProducer::obtained the collections with validity flag " << valid;
167 auto outputBeamSpot = std::make_unique<reco::BeamSpot>();
168 auto outputVColl = std::make_unique<reco::VertexCollection>();
169 auto outputEBColl = std::make_unique<EBRecHitCollection>();
170 auto outputEEColl = std::make_unique<EERecHitCollection>();
171 auto outputHBHEColl = std::make_unique<HBHERecHitCollection>();
172 auto outputMColl = std::make_unique<reco::MuonCollection>();
176 outputBeamSpot = std::make_unique<reco::BeamSpot>(
189 for (reco::VertexCollection::const_iterator vtr = vtx.begin(); vtr != vtx.end(); ++vtr)
190 outputVColl->push_back(*vtr);
193 outputEBColl->push_back(*ehit);
196 outputEEColl->push_back(*ehit);
198 for (std::vector<HBHERecHit>::const_iterator hhit = hbhecoll.
begin(); hhit != hbhecoll.
end(); ++hhit)
199 outputHBHEColl->push_back(*hhit);
201 for (reco::MuonCollection::const_iterator
muon = muons.begin();
muon != muons.end(); ++
muon)
202 outputMColl->push_back(*
muon);
215 globalCache()->nAll_ +=
nAll_;
216 globalCache()->nGood_ +=
nGood_;
233 desc.
add<
double>(
"MinimumMuonP", 10.0);
234 descriptions.
add(
"alcaHBHEMuonProducer", desc);
248 for (
unsigned int k = 0;
k < muons.size(); ++
k) {
std::atomic< unsigned int > nGood_
Log< level::Info, true > LogVerbatim
EventNumber_t event() const
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
bool select(const reco::MuonCollection &)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
static std::unique_ptr< AlCaHBHEMuons::Counters > initializeGlobalCache(edm::ParameterSet const &)
#define DEFINE_FWK_MODULE(type)
edm::EDGetTokenT< EcalRecHitCollection > tok_EE_
std::atomic< unsigned int > nAll_
const edm::InputTag labelEE_
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
const edm::InputTag labelHBHE_
bool accept(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
const edm::InputTag labelBS_
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
Handle< PROD > getHandle(EDGetTokenT< PROD > token) const
caConstants::TupleMultiplicity const CAHitNtupletGeneratorKernelsGPU::HitToTuple const cms::cuda::AtomicPairCounter GPUCACell const *__restrict__ uint32_t const *__restrict__ gpuPixelDoublets::CellNeighborsVector const gpuPixelDoublets::CellTracksVector const GPUCACell::OuterHitOfCell const int32_t uint32_t CAHitNtupletGeneratorKernelsGPU::Counters * counters
const edm::InputTag labelEB_
edm::EDGetTokenT< HBHERecHitCollection > tok_HBHE_
const edm::InputTag labelVtx_
const edm::InputTag labelMuon_
double BeamWidthX() const
beam width X
ParameterDescriptionBase * add(U const &iLabel, T const &value)
double dxdz() const
dxdz slope
const_iterator end() const
double sigmaZ() const
sigma z
void add(std::string const &label, ParameterSetDescription const &psetDescription)
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
Log< level::Warning, false > LogWarning
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