27 <<
"+++ Info: RPC geometry is unavailable. +++\n";
42 <<
"nSimHits " <<
simHits_.size() <<
" nTrackIds " 45 <<
"detids RPC " <<
detIds().size() << endl;
48 for (
const auto&
id : ch_ids) {
52 <<
"RPCDetId " <<
RPCDetId(
id) <<
": nHits " << simhits.size()
53 <<
" eta " << simhits_gp.eta() <<
" phi " << simhits_gp.phi()
69 if (
h.trackId() != track_id)
continue;
70 int pdgid =
h.particleType();
84 std::set<unsigned int>
result;
86 const auto&
id =
p.first;
90 detId.
ring()) != type)
99 std::set<unsigned int>
result;
101 const auto&
id =
p.first;
105 detId.
ring()) != type)
117 if (
id.
station() != st)
continue;
129 if (sim_hits.empty())
return -1.
f;
133 for (
const auto&
h : sim_hits) {
135 const auto&
d =
h.detUnitId();
139 if (n == 0)
return -1.f;
144 int margin_n_strips)
const {
147 for (
const auto& roll :
149 int max_nstrips = roll->nstrips();
152 int central_strip =
static_cast<int>(roll->topology().channel(lp));
153 int smin = central_strip - margin_n_strips;
154 smin = (smin > 0) ? smin : 1;
155 int smax = central_strip + margin_n_strips;
156 smax = (smax <= max_nstrips) ? smax : max_nstrips;
157 for (
int ss = smin; ss <= smax; ++ss) result.insert(ss);
T getParameter(std::string const &) const
const TrackingGeometry * geometry_
edm::PSimHitContainer hits_
std::set< unsigned int > detIds(int type=MuonHitHelper::RPC_ALL) const
std::set< int > hitStripsInDetId(unsigned int, int margin_n_strips=0) const
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
std::map< unsigned int, edm::PSimHitContainer > detid_to_hits_
std::set< unsigned int > chamberIds(int type=MuonHitHelper::RPC_ALL) const
float simHitsMeanStrip(const edm::PSimHitContainer &sim_hits) const
RPCSimHitMatcher(const edm::ParameterSet &iPS, edm::ConsumesCollector &&iC)
std::vector< unsigned > track_ids_
GlobalPoint simHitsMeanPosition(const edm::PSimHitContainer &sim_hits) const
edm::PSimHitContainer simHits_
edm::ParameterSet simHitPSet_
std::map< unsigned int, edm::PSimHitContainer > chamber_to_hits_
Abs< T >::type abs(const T &t)
void init(const edm::Event &e, const edm::EventSetup &eventSetup)
initialize the event
ParameterSet const & getParameterSet(std::string const &) const
const edm::PSimHitContainer & hitsInDetId(unsigned int) const
void match(const SimTrack &t, const SimVertex &v)
do the matching
edm::EDGetTokenT< edm::PSimHitContainer > simHitInput_
edm::ESHandle< RPCGeometry > rpc_geom_
void matchSimHitsToSimTrack()
std::vector< PSimHit > PSimHitContainer
void init(const edm::Event &e, const edm::EventSetup &eventSetup)
initialize the event
bool hitStation(int st) const
static int toRPCType(int re, int st, int ri)
const edm::PSimHitContainer & hitsInChamber(unsigned int) const
void match(const SimTrack &t, const SimVertex &v)
do the matching
int region() const
Region id: 0 for Barrel, +/-1 For +/- Endcap.