New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding digi-based shower tagging to reco::Muon #26369
Changes from 7 commits
11dcb2c
5d065c0
708b771
549abd6
a0b7545
dd4fb70
d9a44d0
fb618e5
d719e62
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -334,6 +334,78 @@ unsigned int Muon::stationGapMaskPull( float sigmaCut ) const | |
return totMask; | ||
} | ||
|
||
int Muon::nDigisInStation( int station, int muonSubdetId ) const | ||
{ | ||
int nDigis(0); | ||
std::map<int, int> me11DigisPerCh; | ||
|
||
if ( muonSubdetId != MuonSubdetId::CSC && | ||
muonSubdetId != MuonSubdetId::DT ) | ||
return 0; | ||
|
||
for ( auto & match : muMatches_ ) | ||
{ | ||
if ( match.detector() != muonSubdetId || | ||
match.station() != station ) | ||
continue; | ||
|
||
int nDigisInCh = match.nDigisInRange; | ||
|
||
if( muonSubdetId == MuonSubdetId::CSC && station == 1 ) | ||
{ | ||
CSCDetId id(match.id.rawId()); | ||
|
||
int chamber = id.chamber(); | ||
int ring = id.ring(); | ||
|
||
if ( ring == 1 || ring == 4 ) // merge ME1/1a and ME1/1b digis | ||
{ | ||
if( me11DigisPerCh.find(chamber) == me11DigisPerCh.end() ) | ||
me11DigisPerCh[chamber] = 0; | ||
|
||
me11DigisPerCh[chamber] += nDigisInCh; | ||
|
||
continue; | ||
} | ||
} | ||
|
||
if( nDigisInCh > nDigis ) | ||
nDigis = nDigisInCh; | ||
} | ||
|
||
for ( const auto & me11DigisInCh : me11DigisPerCh ) | ||
{ | ||
int nMe11DigisInCh = me11DigisInCh.second; | ||
if ( nMe11DigisInCh > nDigis ) | ||
nDigis = nMe11DigisInCh; | ||
} | ||
|
||
return nDigis; | ||
} | ||
|
||
bool Muon::hasShowerInStation( int station, int muonSubdetId, int nDtDigisCut, int nCscDigisCut ) const | ||
{ | ||
bool hasShower = muonSubdetId == MuonSubdetId::DT ? | ||
nDigisInStation(station,muonSubdetId) >= nDtDigisCut : | ||
nDigisInStation(station,muonSubdetId) >= nCscDigisCut; | ||
|
||
return hasShower; | ||
} | ||
|
||
int Muon::numberOfShowers( int nDtDigisCut, int nCscDigisCut ) const | ||
{ | ||
int nShowers = 0; | ||
for ( int iCh = 1; iCh < 5; ++iCh ) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. to reduce possible confusion when reading this, perhaps There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Changed in |
||
{ | ||
if ( hasShowerInStation(iCh,MuonSubdetId::DT,nDtDigisCut,nCscDigisCut) ) | ||
nShowers++; | ||
if ( hasShowerInStation(iCh,MuonSubdetId::CSC,nDtDigisCut,nCscDigisCut) ) | ||
nShowers++; | ||
} | ||
|
||
return nShowers; | ||
} | ||
|
||
int Muon::numberOfSegments( int station, int muonSubdetId, ArbitrationType type ) const | ||
{ | ||
int segments(0); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
#ifndef MuonIdentification_MuonShowerDigiFiller_h | ||
#define MuonIdentification_MuonShowerDigiFiller_h | ||
|
||
// -*- C++ -*- | ||
// | ||
// Package: MuonShowerDigiFiller | ||
// Class: MuonShowerDigiFiller | ||
// | ||
/**\class MuonShowerDigiFiller MuonShowerDigiFiller.h RecoMuon/MuonIdentification/interface/MuonShowerDigiFiller.h | ||
|
||
Description: Class filling shower information using DT and CSC digis | ||
|
||
Implementation: | ||
<Notes on implementation> | ||
*/ | ||
// | ||
// Original Author: Carlo Battilana, INFN BO | ||
// Created: Sat Mar 23 14:36:22 CET 2019 | ||
// | ||
// | ||
|
||
// system include files | ||
|
||
// user include files | ||
#include "FWCore/Framework/interface/Frameworkfwd.h" | ||
|
||
#include "FWCore/Framework/interface/Event.h" | ||
#include "FWCore/Framework/interface/EventSetup.h" | ||
#include "FWCore/Framework/interface/MakerMacros.h" | ||
|
||
#include "FWCore/ParameterSet/interface/ParameterSet.h" | ||
#include "FWCore/Framework/interface/ConsumesCollector.h" | ||
|
||
#include "DataFormats/DTDigi/interface/DTDigiCollection.h" | ||
#include "DataFormats/CSCDigi/interface/CSCStripDigiCollection.h" | ||
|
||
#include "Geometry/DTGeometry/interface/DTGeometry.h" | ||
#include "Geometry/CSCGeometry/interface/CSCGeometry.h" | ||
|
||
#include "DataFormats/MuonReco/interface/MuonChamberMatch.h" | ||
#include "TrackingTools/TrackAssociator/interface/TAMuonChamberMatch.h" | ||
|
||
// | ||
// class decleration | ||
// | ||
|
||
class MuonShowerDigiFiller | ||
{ | ||
|
||
public: | ||
|
||
MuonShowerDigiFiller(const edm::ParameterSet&, edm::ConsumesCollector&& iC); | ||
|
||
void getES( const edm::EventSetup& iSetup ); | ||
void getDigis( edm::Event& iEvent ); | ||
|
||
void fill( reco::MuonChamberMatch & muChMatch ) const; | ||
void fillDefault( reco::MuonChamberMatch & muChMatch ) const; | ||
|
||
private: | ||
|
||
double m_digiMaxDistanceX; | ||
|
||
edm::EDGetTokenT<DTDigiCollection> m_dtDigisToken; | ||
edm::EDGetTokenT<CSCStripDigiCollection> m_cscDigisToken; | ||
|
||
edm::ESHandle<DTGeometry> m_dtGeometry; | ||
edm::ESHandle<CSCGeometry> m_cscGeometry; | ||
|
||
edm::Handle<DTDigiCollection> m_dtDigis; | ||
edm::Handle<CSCStripDigiCollection> m_cscDigis; | ||
|
||
}; | ||
|
||
#endif |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import FWCore.ParameterSet.Config as cms | ||
|
||
MuonShowerDigiFillerBlock = cms.PSet( | ||
ShowerDigiFillerParameters = cms.PSet( | ||
digiMaxDistanceX = cms.double(25.0), | ||
dtDigiCollectionLabel = cms.InputTag("muonDTDigis"), | ||
cscDigiCollectionLabel = cms.InputTag("muonCSCDigis","MuonCSCStripDigi") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @battibass @slava77 it looks like this line is creating issues in wf 1102.0 step4 RECOFROMRECO:
This clearly needs to be fixed, my question is: if this is not affecting any other standard workflow as it seems, and it is not preventing the basic validation of pre4, can we consider to postpone its fix after pre4 is built? Or do you see further possible issues? Switching this module off in the configuration allows also the step4 of 1102 to run without problems. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @fabiocos , @slava77 can surely reply more accurately than I can. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @battibass indeed this is a bit special case, and only wf 1102.0 implementing it shows this issue. I see that @slava77 has already mentioned it in #26500 . |
||
) | ||
) | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is perhaps shorter and more explicit about DT vs CSC.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But the OR should be an AND.