39 const auto& gem_ch_ids =
detIds();
40 for (
const auto&
id : gem_ch_ids) {
43 edm::LogInfo(
"GEMSimHitMatcher") <<
"gemchid " <<
GEMDetId(
id) <<
": nHits " << gem_simhits.size() <<
" phi "
53 for (
const auto&
id : gem_sch_ids) {
57 << gem_simhits.size() <<
" " << gem_simhits_gp.phi() <<
" "
66 if (
h.trackId() != track_id)
71 int pdgid =
h.particleType();
89 const auto& detids =
detIds();
91 for (
const auto&
d : detids) {
97 for (
const auto&
h : hits) {
99 pads.insert(static_cast<int>(roll->padTopology().channel(lp)));
105 for (
const auto&
d : detids) {
107 if (id1.
layer() != 1)
117 for (
const auto&
h : hits1) {
119 pads1.insert(static_cast<int>(roll1->padTopology().channel(lp)));
121 edm::LogInfo(
"GEMSimHitMatcher") <<
"GEMHits detid1 " << id1 <<
" pad1 "
122 <<
static_cast<int>(roll1->padTopology().channel(lp)) << std::endl;
126 for (
const auto& d2 : detids) {
135 for (
const auto&
h : hits2) {
137 pads2.insert(static_cast<int>(roll2->padTopology().channel(lp)));
139 edm::LogInfo(
"GEMSimHitMatcher") <<
"GEMHits detid2 " << id2 <<
" pad2 "
140 <<
static_cast<int>(roll2->padTopology().channel(lp)) << std::endl;
144 for (
const auto&
pad1 : pads1) {
145 for (
const auto&
pad2 : pads2) {
147 if (copads.find(
pad1) == copads.end())
149 if (copads.find(
pad2) == copads.end())
164 std::set<unsigned int>
result;
166 const auto&
id =
p.first;
178 std::set<unsigned int>
result;
180 result.insert(
p.first);
185 std::set<unsigned int>
result;
187 const auto&
id =
p.first;
199 std::set<unsigned int>
result;
201 result.insert(
p.first);
206 std::set<unsigned int>
result;
226 set<int> layers_with_hits;
228 for (
const auto&
h : hits) {
230 layers_with_hits.insert(idd.layer());
232 return layers_with_hits.size();
253 if (sim_hits.empty())
258 for (
const auto&
h : sim_hits) {
266 edm::LogWarning(
"GEMSimHitMatcher") <<
"warning! find more than one simhits in GEM chamber " << std::endl;
274 if (sim_hits.empty())
279 for (
const auto&
h : sim_hits) {
281 const auto&
d =
h.detUnitId();
295 for (
const auto&
h : simhits) {
298 static_cast<int>(
dynamic_cast<const GEMGeometry*
>(
geometry_)->etaPartition(
id)->topology().channel(lp));
299 int smin = central_strip - margin_n_strips;
300 smin = (smin > 0) ? smin : 0;
301 int smax = central_strip + margin_n_strips;
302 smax = (smax <= max_nstrips) ? smax : max_nstrips;
303 for (
int ss = smin;
ss <= smax; ++
ss)
326 const auto& detids =
detIds();
327 for (
const auto&
id : detids) {
329 result.insert(idd.
roll());
336 const auto& pad_ids =
detIds();
337 for (
const auto&
id : pad_ids) {
346 for (
const auto&
id : copad_ids) {
float simHitsGEMCentralPosition(const edm::PSimHitContainer &sim_hits) const
bool hitStation(int, int) const
const TrackingGeometry * geometry_
std::map< unsigned int, std::set< int > > detids_to_pads_
void init(const edm::Event &e, const edm::EventSetup &eventSetup)
initialize the event
edm::PSimHitContainer hits_
int nPadsWithHits() const
uint16_t *__restrict__ id
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventIDconst &, edm::Timestampconst & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
std::map< unsigned int, edm::PSimHitContainer > detid_to_hits_
edm::ESGetToken< GEMGeometry, MuonGeometryRecord > geomToken_
constexpr int roll() const
std::set< unsigned int > chamberIds(int gem_type=MuonHitHelper::GEM_ALL) const
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
constexpr uint32_t rawId() const
get the raw id
GEMSimHitMatcher(const edm::ParameterSet &iPS, edm::ConsumesCollector &&iC)
static int toGEMType(int st, int ri)
std::vector< unsigned > track_ids_
std::set< unsigned int > superChamberIds() const
std::set< unsigned int > detIds(int gem_type=MuonHitHelper::GEM_ALL) const
bool getData(T &iHolder) const
int nCoincidencePadsWithHits() const
GlobalPoint simHitsMeanPosition(const edm::PSimHitContainer &sim_hits) const
std::set< int > hitPadsInDetId(unsigned int) const
edm::PSimHitContainer simHits_
edm::ParameterSet simHitPSet_
int nStations(int nl=2) const
tuple 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
constexpr int region() const
std::set< unsigned int > detIdsCoincidences() const
std::map< unsigned int, edm::PSimHitContainer > superchamber_to_hits_
std::map< unsigned int, edm::PSimHitContainer > chamber_to_hits_
Abs< T >::type abs(const T &t)
std::set< int > hitStripsInDetId(unsigned int, int margin_n_strips=1) const
std::set< int > hitPartitions() const
Log< level::Info, false > LogInfo
edm::PSimHitContainer no_hits_
virtual const GeomDet * idToDet(DetId) const =0
ParameterSet const & getParameterSet(std::string const &) const
const edm::PSimHitContainer & hitsInDetId(unsigned int) const
constexpr int ring() const
constexpr int layer() const
std::set< int > hitCoPadsInDetId(unsigned int) const
T getParameter(std::string const &) const
constexpr int station() const
std::map< unsigned int, std::set< int > > detids_to_copads_
void match(const SimTrack &t, const SimVertex &v)
do the matching
static bool isGEM(unsigned int detId)
int nLayersWithHitsInSuperChamber(unsigned int) const
edm::EDGetTokenT< edm::PSimHitContainer > simHitInput_
float simHitsMeanStrip(const edm::PSimHitContainer &sim_hits) const
void matchSimHitsToSimTrack()
const math::XYZTLorentzVectorD & momentum() const
void match(const SimTrack &t, const SimVertex &v)
do the matching
std::vector< PSimHit > PSimHitContainer
void init(const edm::Event &e, const edm::EventSetup &eventSetup)
initialize the event
constexpr GEMDetId superChamberId() const
Log< level::Warning, false > LogWarning
const edm::PSimHitContainer & hitsInSuperChamber(unsigned int) const
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
std::set< unsigned int > superChamberIdsCoincidences() const