|
|
Go to the documentation of this file.
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) {
82 const auto& roll = dynamic_cast<const ME0Geometry*>(
geometry_)->etaPartition(
id);
85 for (
const auto&
h :
hits) {
87 pads.insert(1 + static_cast<int>(roll->padTopology().channel(lp)));
94 std::set<unsigned int>
result;
101 std::set<unsigned int>
result;
108 std::set<unsigned int>
result;
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();
155 s = dynamic_cast<const ME0Geometry*>(
geometry_)->etaPartition(
d)->strip(lp);
168 int max_nstrips = dynamic_cast<const ME0Geometry*>(
geometry_)->etaPartition(
id)->nstrips();
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) {
203 const auto& pad_ids =
detIds();
204 for (
const auto&
id : pad_ids) {
float simHitsMeanStrip(const edm::PSimHitContainer &sim_hits) const
void init(const edm::Event &e, const edm::EventSetup &eventSetup)
initialize the event
std::set< unsigned int > superChamberIdsCoincidences(int min_n_layers=4) const
const TrackingGeometry * geometry_
ME0SimHitMatcher(const edm::ParameterSet &iPS, edm::ConsumesCollector &&iC)
std::map< unsigned int, edm::PSimHitContainer > detid_to_hits_
GlobalPoint simHitsMeanPosition(const edm::PSimHitContainer &sim_hits) const
int nCoincidenceChambers(int min_n_layers=4) const
std::set< unsigned int > superChamberIds() const
edm::PSimHitContainer simHits_
std::set< int > hitStripsInDetId(unsigned int, int margin_n_strips=0) const
std::set< int > hitPartitions() const
void match(const SimTrack &t, const SimVertex &v)
do the matching
const CaloTopology * topology(nullptr)
std::set< unsigned int > chamberIds() const
edm::ParameterSet simHitPSet_
const edm::PSimHitContainer & hitsInSuperChamber(unsigned int) const
std::vector< unsigned > track_ids_
edm::PSimHitContainer no_hits_
std::map< unsigned int, edm::PSimHitContainer > superChamber_to_hits_
std::set< int > hitPadsInDetId(unsigned int) const
void match(const SimTrack &t, const SimVertex &v)
do the matching
std::map< unsigned int, edm::PSimHitContainer > chamber_to_hits_
edm::EDGetTokenT< edm::PSimHitContainer > simHitInput_
T getParameter(std::string const &) const
const edm::PSimHitContainer & hitsInDetId(unsigned int) const
edm::ESHandle< ME0Geometry > me0_geom_
void matchSimHitsToSimTrack()
int nLayersWithHitsInSuperChamber(unsigned int) const
std::map< unsigned int, std::set< int > > detids_to_pads_
const edm::PSimHitContainer & hitsInChamber(unsigned int) const
Abs< T >::type abs(const T &t)
std::vector< PSimHit > PSimHitContainer
int nPadsWithHits() const
edm::PSimHitContainer hits_
void init(const edm::Event &e, const edm::EventSetup &eventSetup)
initialize the event
strips
#turn off noise in all subdetectors simHcalUnsuppressedDigis.doNoise = False mix.digitizers....
ParameterSet const & getParameterSet(std::string const &) const
std::set< unsigned int > detIds() const