22 edm::LogWarning(
"ME0SimHitMatcher") <<
"+++ Info: ME0 geometry is unavailable. +++\n";
40 const auto& me0_ch_ids =
detIds();
41 for (
const auto&
id : me0_ch_ids) {
44 edm::LogInfo(
"ME0SimHitMatcher") <<
"me0chid " <<
ME0DetId(
id) <<
": nHits " << me0_simhits.size() <<
" phi " 60 if (
h.trackId() != track_id)
62 int pdgid =
h.particleType();
78 const auto& detids =
detIds();
79 for (
const auto&
d : detids) {
85 for (
const auto&
h :
hits) {
87 pads.insert(1 + static_cast<int>(roll->padTopology().channel(lp)));
94 std::set<unsigned int>
result;
96 result.insert(
p.first);
101 std::set<unsigned int>
result;
103 result.insert(
p.first);
108 std::set<unsigned int>
result;
110 result.insert(
p.first);
121 set<int> layers_with_hits;
123 for (
const auto&
h :
hits) {
125 layers_with_hits.insert(idd.layer());
127 return layers_with_hits.size();
146 if (sim_hits.empty())
151 for (
const auto&
h : sim_hits) {
154 const auto&
d =
h.detUnitId();
172 1 +
static_cast<int>(
dynamic_cast<const ME0Geometry*
>(
geometry_)->etaPartition(
id)->topology().channel(lp));
173 int smin = central_strip - margin_n_strips;
174 smin = (smin > 0) ? smin : 1;
175 int smax = central_strip + margin_n_strips;
176 smax = (smax <= max_nstrips) ? smax : max_nstrips;
177 for (
int ss = smin;
ss <= smax; ++
ss)
193 const auto& detids =
detIds();
194 for (
const auto&
id : detids) {
196 result.insert(idd.
roll());
203 const auto& pad_ids =
detIds();
204 for (
const auto&
id : pad_ids) {
T getParameter(std::string const &) const
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
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
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
strips
#turn off noise in all subdetectors simHcalUnsuppressedDigis.doNoise = False mix.digitizers.hcal.doNoise = False simEcalUnsuppressedDigis.doNoise = False mix.digitizers.ecal.doNoise = False simEcalUnsuppressedDigis.doESNoise = False simSiPixelDigis.AddNoise = False mix.digitizers.pixel.AddNoise = False simSiStripDigis.Noise = False mix.digitizers.strip.AddNoise = False
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