13 #include <boost/regex.hpp>
41 namespace AlCaHBHEMuons {
54 return std::make_unique<AlCaHBHEMuons::Counters>();
82 : nRun_(0), nAll_(0), nGood_(0) {
101 <<
"\t minP of muon " << pMuonMin_ <<
"\t input labels " <<
labelBS_ <<
" "
102 << labelVtx_ <<
" " << labelEB_ <<
" " << labelEE_ <<
" " << labelHBHE_ <<
" "
107 produces<reco::VertexCollection>(labelVtx_.
label());
108 produces<EcalRecHitCollection>(labelEB_.
instance());
109 produces<EcalRecHitCollection>(labelEE_.
instance());
110 produces<HBHERecHitCollection>(labelHBHE_.
label());
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_
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
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
edm::EDGetTokenT< HBHERecHitCollection > tok_HBHE_
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
T getParameter(std::string const &) const
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