26 <<
"+++ Info: ME0 geometry is unavailable. +++\n";
41 <<
"nTrackIds " <<
track_ids_.size() <<
" nSelectedME0SimHits " 42 <<
hits_.size() << endl;
44 <<
"detids ME0 " <<
detIds().size() << endl;
46 const auto& me0_ch_ids =
detIds();
47 for (
const auto&
id : me0_ch_ids) {
51 <<
"me0chid " <<
ME0DetId(
id) <<
": nHits " << me0_simhits.size()
52 <<
" phi " << me0_simhits_gp.phi() <<
" nCh " 68 if (
h.trackId() != track_id)
continue;
69 int pdgid =
h.particleType();
83 const auto& detids =
detIds();
84 for (
const auto&
d : detids) {
91 for (
const auto&
h :
hits) {
93 pads.insert(1 + static_cast<int>(roll->padTopology().channel(lp)));
100 std::set<unsigned int>
result;
106 std::set<unsigned int>
result;
112 std::set<unsigned int>
result;
118 unsigned int detid)
const {
125 set<int> layers_with_hits;
127 for (
const auto&
h :
hits) {
129 layers_with_hits.insert(idd.layer());
131 return layers_with_hits.size();
135 int min_n_layers)
const {
152 if (sim_hits.empty())
return -1.
f;
156 for (
const auto&
h : sim_hits) {
159 const auto&
d =
h.detUnitId();
164 if (n == 0)
return -1.f;
169 int margin_n_strips)
const {
175 for (
const auto&
h : simhits) {
182 int smin = central_strip - margin_n_strips;
183 smin = (smin > 0) ? smin : 1;
184 int smax = central_strip + margin_n_strips;
185 smax = (smax <= max_nstrips) ? smax : max_nstrips;
186 for (
int ss = smin; ss <= smax; ++ss) result.insert(ss);
200 const auto& detids =
detIds();
201 for (
const auto&
id : detids) {
203 result.insert(idd.
roll());
210 const auto& pad_ids =
detIds();
211 for (
const auto&
id : pad_ids) {
T getParameter(std::string const &) const
std::set< int > hitStripsInDetId(unsigned int, int margin_n_strips=0) const
std::set< int > hitPartitions() const
const TrackingGeometry * geometry_
edm::PSimHitContainer hits_
std::set< unsigned int > chamberIds() const
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
std::set< int > hitPadsInDetId(unsigned int) const
std::map< unsigned int, edm::PSimHitContainer > detid_to_hits_
std::set< unsigned int > superChamberIdsCoincidences(int min_n_layers=4) const
std::map< unsigned int, std::set< int > > detids_to_pads_
edm::ESHandle< ME0Geometry > me0_geom_
std::vector< unsigned > track_ids_
void matchSimHitsToSimTrack()
GlobalPoint simHitsMeanPosition(const edm::PSimHitContainer &sim_hits) const
int nPadsWithHits() const
edm::PSimHitContainer simHits_
edm::ParameterSet simHitPSet_
std::map< unsigned int, edm::PSimHitContainer > chamber_to_hits_
Abs< T >::type abs(const T &t)
int nCoincidenceChambers(int min_n_layers=4) const
std::set< unsigned int > detIds() const
void init(const edm::Event &e, const edm::EventSetup &eventSetup)
initialize the event
edm::PSimHitContainer no_hits_
ParameterSet const & getParameterSet(std::string const &) const
const edm::PSimHitContainer & hitsInDetId(unsigned int) const
float simHitsMeanStrip(const edm::PSimHitContainer &sim_hits) const
ME0SimHitMatcher(const edm::ParameterSet &iPS, edm::ConsumesCollector &&iC)
void match(const SimTrack &t, const SimVertex &v)
do the matching
int nLayersWithHitsInSuperChamber(unsigned int) const
edm::EDGetTokenT< edm::PSimHitContainer > simHitInput_
void match(const SimTrack &t, const SimVertex &v)
do the matching
std::set< unsigned int > superChamberIds() const
std::vector< PSimHit > PSimHitContainer
void init(const edm::Event &e, const edm::EventSetup &eventSetup)
initialize the event
const edm::PSimHitContainer & hitsInChamber(unsigned int) const
std::map< unsigned int, edm::PSimHitContainer > superChamber_to_hits_
const edm::PSimHitContainer & hitsInSuperChamber(unsigned int) const