CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
MuonIdProducer Class Reference

#include <MuonIdProducer.h>

Inheritance diagram for MuonIdProducer:
edm::stream::EDProducer<> edm::stream::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Types

typedef reco::Muon::MuonTrackType TrackType
 
- Public Types inherited from edm::stream::EDProducer<>
typedef CacheContexts< T...> CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T...> HasAbility
 
typedef
CacheTypes::LuminosityBlockCache 
LuminosityBlockCache
 
typedef
LuminosityBlockContextT
< LuminosityBlockCache,
RunCache, GlobalCache
LuminosityBlockContext
 
typedef
CacheTypes::LuminosityBlockSummaryCache 
LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache,
GlobalCache
RunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 
- Public Types inherited from edm::stream::EDProducerBase
typedef EDProducerAdaptorBase ModuleType
 
- Public Types inherited from edm::ProducerBase
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 

Public Member Functions

virtual void beginRun (const edm::Run &, const edm::EventSetup &) override
 
 MuonIdProducer (const edm::ParameterSet &)
 
virtual void produce (edm::Event &, const edm::EventSetup &) override
 
virtual ~MuonIdProducer ()
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
- Public Member Functions inherited from edm::stream::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDProducerBase ()
 
- Public Member Functions inherited from edm::ProducerBase
 ProducerBase ()
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription
const &)> 
registrationCallback () const
 used by the fwk to register list of products More...
 
virtual ~ProducerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Static Public Member Functions

static double sectorPhi (const DetId &id)
 
- Static Public Member Functions inherited from edm::stream::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

Private Member Functions

unsigned int chamberId (const DetId &)
 
bool checkLinks (const reco::MuonTrackLinks *) const
 
void fillArbitrationInfo (reco::MuonCollection *)
 
void fillGlbQuality (edm::Event &, const edm::EventSetup &, reco::Muon &aMuon)
 
void fillMuonId (edm::Event &, const edm::EventSetup &, reco::Muon &, TrackDetectorAssociator::Direction direction=TrackDetectorAssociator::InsideOut)
 
void fillMuonIsolation (edm::Event &, const edm::EventSetup &, reco::Muon &aMuon, reco::IsoDeposit &trackDep, reco::IsoDeposit &ecalDep, reco::IsoDeposit &hcalDep, reco::IsoDeposit &hoDep, reco::IsoDeposit &jetDep)
 
void fillTrackerKink (reco::Muon &aMuon)
 
void init (edm::Event &, const edm::EventSetup &)
 
bool isGoodRPCMuon (const reco::Muon &muon)
 
bool isGoodTrack (const reco::Track &track)
 
bool isGoodTrackerMuon (const reco::Muon &muon)
 
reco::CaloMuon makeCaloMuon (const reco::Muon &)
 
reco::Muon makeMuon (edm::Event &iEvent, const edm::EventSetup &iSetup, const reco::TrackRef &track, TrackType type)
 
reco::Muon makeMuon (const reco::MuonTrackLinks &links)
 
reco::Muon makeMuon (const reco::Track &track)
 
int overlap (const reco::Muon &muon, const reco::Track &track)
 
double phiOfMuonIneteractionRegion (const reco::Muon &muon) const
 

Private Attributes

bool addExtraSoftMuons_
 
bool arbClean_
 
double caloCut_
 
bool debugWithTruthMatching_
 
edm::Handle
< reco::TrackToTrackMap
dytCollectionHandle_
 
edm::EDGetTokenT
< reco::TrackToTrackMap
dytCollectionToken_
 
std::string ecalDepositName_
 
bool fillCaloCompatibility_
 
bool fillEnergy_
 
bool fillGlobalTrackQuality_
 
bool fillGlobalTrackRefits_
 
bool fillIsolation_
 
bool fillMatching_
 
bool fillTrackerKink_
 
edm::EDGetTokenT
< edm::ValueMap
< reco::MuonQuality > > 
glbQualToken_
 
edm::InputTag globalTrackQualityInputTag_
 
std::string hcalDepositName_
 
std::string hoDepositName_
 
edm::Handle
< reco::TrackCollection
innerTrackCollectionHandle_
 
edm::EDGetTokenT
< reco::TrackCollection
innerTrackCollectionToken_
 
std::vector< edm::InputTaginputCollectionLabels_
 
std::vector< std::string > inputCollectionTypes_
 
std::string jetDepositName_
 
edm::Handle
< reco::MuonTrackLinksCollection
linkCollectionHandle_
 
edm::EDGetTokenT
< reco::MuonTrackLinksCollection
linkCollectionToken_
 
double maxAbsDx_
 
double maxAbsDy_
 
double maxAbsEta_
 
double maxAbsPullX_
 
double maxAbsPullY_
 
MuonMeshmeshAlgo_
 
int minNumberOfMatches_
 
double minP_
 
double minPCaloMuon_
 
double minPt_
 
reco::isodeposit::IsoDepositExtractormuIsoExtractorCalo_
 
reco::isodeposit::IsoDepositExtractormuIsoExtractorJet_
 
reco::isodeposit::IsoDepositExtractormuIsoExtractorTrack_
 
MuonCaloCompatibility muonCaloCompatibility_
 
edm::Handle< reco::MuonCollectionmuonCollectionHandle_
 
edm::EDGetTokenT
< reco::MuonCollection
muonCollectionToken_
 
edm::Handle
< reco::TrackCollection
outerTrackCollectionHandle_
 
edm::EDGetTokenT
< reco::TrackCollection
outerTrackCollectionToken_
 
TrackAssociatorParameters parameters_
 
edm::Handle
< reco::TrackToTrackMap
pickyCollectionHandle_
 
edm::EDGetTokenT
< reco::TrackToTrackMap
pickyCollectionToken_
 
double ptThresholdToFillCandidateP4WithGlobalFit_
 
edm::EDGetTokenT
< RPCRecHitCollection
rpcHitToken_
 
double sigmaThresholdToFillCandidateP4WithGlobalFit_
 
MuonTimingFillertheTimingFiller_
 
edm::Handle
< reco::TrackToTrackMap
tpfmsCollectionHandle_
 
edm::EDGetTokenT
< reco::TrackToTrackMap
tpfmsCollectionToken_
 
TrackDetectorAssociator trackAssociator_
 
std::string trackDepositName_
 
std::auto_ptr< MuonKinkFindertrackerKinkFinder_
 
bool writeIsoDeposits_
 

Additional Inherited Members

- Protected Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Detailed Description

Definition at line 67 of file MuonIdProducer.h.

Member Typedef Documentation

Definition at line 69 of file MuonIdProducer.h.

Constructor & Destructor Documentation

MuonIdProducer::MuonIdProducer ( const edm::ParameterSet iConfig)
explicit

Definition at line 55 of file MuonIdProducer.cc.

References addExtraSoftMuons_, arbClean_, caloCut_, MuonCaloCompatibility::configure(), edm::EDConsumerBase::consumesCollector(), debugWithTruthMatching_, dytCollectionToken_, ecalDepositName_, edm::hlt::Exception, fillCaloCompatibility_, fillEnergy_, fillGlobalTrackQuality_, fillGlobalTrackRefits_, fillIsolation_, fillMatching_, fillTrackerKink_, reco::get(), edm::ParameterSet::getParameter(), glbQualToken_, globalTrackQualityInputTag_, hcalDepositName_, hoDepositName_, i, innerTrackCollectionToken_, inputCollectionLabels_, inputCollectionTypes_, jetDepositName_, linkCollectionToken_, TrackAssociatorParameters::loadParameters(), maxAbsDx_, maxAbsDy_, maxAbsEta_, maxAbsPullX_, maxAbsPullY_, meshAlgo_, minNumberOfMatches_, minP_, minPCaloMuon_, minPt_, muIsoExtractorCalo_, muIsoExtractorJet_, muIsoExtractorTrack_, muonCaloCompatibility_, muonCollectionToken_, outerTrackCollectionToken_, Parameters::parameters, parameters_, pickyCollectionToken_, ptThresholdToFillCandidateP4WithGlobalFit_, rpcHitToken_, sigmaThresholdToFillCandidateP4WithGlobalFit_, AlCaHLTBitMon_QueryRunRegistry::string, theTimingFiller_, tpfmsCollectionToken_, trackDepositName_, trackerKinkFinder_, and writeIsoDeposits_.

55  :
57 {
58  produces<reco::MuonCollection>();
59  produces<reco::CaloMuonCollection>();
60  produces<reco::MuonTimeExtraMap>("combined");
61  produces<reco::MuonTimeExtraMap>("dt");
62  produces<reco::MuonTimeExtraMap>("csc");
63 
64  minPt_ = iConfig.getParameter<double>("minPt");
65  minP_ = iConfig.getParameter<double>("minP");
66  minPCaloMuon_ = iConfig.getParameter<double>("minPCaloMuon");
67  minNumberOfMatches_ = iConfig.getParameter<int>("minNumberOfMatches");
68  addExtraSoftMuons_ = iConfig.getParameter<bool>("addExtraSoftMuons");
69  maxAbsEta_ = iConfig.getParameter<double>("maxAbsEta");
70  maxAbsDx_ = iConfig.getParameter<double>("maxAbsDx");
71  maxAbsPullX_ = iConfig.getParameter<double>("maxAbsPullX");
72  maxAbsDy_ = iConfig.getParameter<double>("maxAbsDy");
73  maxAbsPullY_ = iConfig.getParameter<double>("maxAbsPullY");
74  fillCaloCompatibility_ = iConfig.getParameter<bool>("fillCaloCompatibility");
75  fillEnergy_ = iConfig.getParameter<bool>("fillEnergy");
76  fillMatching_ = iConfig.getParameter<bool>("fillMatching");
77  fillIsolation_ = iConfig.getParameter<bool>("fillIsolation");
78  writeIsoDeposits_ = iConfig.getParameter<bool>("writeIsoDeposits");
79  fillGlobalTrackQuality_ = iConfig.getParameter<bool>("fillGlobalTrackQuality");
80  fillGlobalTrackRefits_ = iConfig.getParameter<bool>("fillGlobalTrackRefits");
81  //SK: (maybe temporary) run it only if the global is also run
82  fillTrackerKink_ = false;
83  if (fillGlobalTrackQuality_) fillTrackerKink_ = iConfig.getParameter<bool>("fillTrackerKink");
84 
85  ptThresholdToFillCandidateP4WithGlobalFit_ = iConfig.getParameter<double>("ptThresholdToFillCandidateP4WithGlobalFit");
86  sigmaThresholdToFillCandidateP4WithGlobalFit_ = iConfig.getParameter<double>("sigmaThresholdToFillCandidateP4WithGlobalFit");
87  caloCut_ = iConfig.getParameter<double>("minCaloCompatibility"); //CaloMuons
88  arbClean_ = iConfig.getParameter<bool>("runArbitrationCleaner"); // muon mesh
89 
90  // Load TrackDetectorAssociator parameters
91  edm::ParameterSet parameters = iConfig.getParameter<edm::ParameterSet>("TrackAssociatorParameters");
93  parameters_.loadParameters( parameters, iC );
94 
95  // Load parameters for the TimingFiller
96  edm::ParameterSet timingParameters = iConfig.getParameter<edm::ParameterSet>("TimingFillerParameters");
97  theTimingFiller_ = new MuonTimingFiller(timingParameters,consumesCollector());
98 
99 
100  if (fillCaloCompatibility_){
101  // Load MuonCaloCompatibility parameters
102  parameters = iConfig.getParameter<edm::ParameterSet>("MuonCaloCompatibility");
103  muonCaloCompatibility_.configure( parameters );
104  }
105 
106  if (fillIsolation_){
107  // Load MuIsoExtractor parameters
108  edm::ParameterSet caloExtractorPSet = iConfig.getParameter<edm::ParameterSet>("CaloExtractorPSet");
109  std::string caloExtractorName = caloExtractorPSet.getParameter<std::string>("ComponentName");
110  muIsoExtractorCalo_ = IsoDepositExtractorFactory::get()->create( caloExtractorName, caloExtractorPSet,consumesCollector());
111 
112  edm::ParameterSet trackExtractorPSet = iConfig.getParameter<edm::ParameterSet>("TrackExtractorPSet");
113  std::string trackExtractorName = trackExtractorPSet.getParameter<std::string>("ComponentName");
114  muIsoExtractorTrack_ = IsoDepositExtractorFactory::get()->create( trackExtractorName, trackExtractorPSet,consumesCollector());
115 
116  edm::ParameterSet jetExtractorPSet = iConfig.getParameter<edm::ParameterSet>("JetExtractorPSet");
117  std::string jetExtractorName = jetExtractorPSet.getParameter<std::string>("ComponentName");
118  muIsoExtractorJet_ = IsoDepositExtractorFactory::get()->create( jetExtractorName, jetExtractorPSet,consumesCollector());
119  }
120  if (fillIsolation_ && writeIsoDeposits_){
121  trackDepositName_ = iConfig.getParameter<std::string>("trackDepositName");
122  produces<reco::IsoDepositMap>(trackDepositName_);
123  ecalDepositName_ = iConfig.getParameter<std::string>("ecalDepositName");
124  produces<reco::IsoDepositMap>(ecalDepositName_);
125  hcalDepositName_ = iConfig.getParameter<std::string>("hcalDepositName");
126  produces<reco::IsoDepositMap>(hcalDepositName_);
127  hoDepositName_ = iConfig.getParameter<std::string>("hoDepositName");
128  produces<reco::IsoDepositMap>(hoDepositName_);
129  jetDepositName_ = iConfig.getParameter<std::string>("jetDepositName");
130  produces<reco::IsoDepositMap>(jetDepositName_);
131  }
132 
133  inputCollectionLabels_ = iConfig.getParameter<std::vector<edm::InputTag> >("inputCollectionLabels");
134  inputCollectionTypes_ = iConfig.getParameter<std::vector<std::string> >("inputCollectionTypes");
135  if (inputCollectionLabels_.size() != inputCollectionTypes_.size())
136  throw cms::Exception("ConfigurationError") << "Number of input collection labels is different from number of types. " <<
137  "For each collection label there should be exactly one collection type specified.";
138  if (inputCollectionLabels_.size()>7 ||inputCollectionLabels_.empty())
139  throw cms::Exception("ConfigurationError") << "Number of input collections should be from 1 to 7.";
140 
141  debugWithTruthMatching_ = iConfig.getParameter<bool>("debugWithTruthMatching");
142  if (debugWithTruthMatching_) edm::LogWarning("MuonIdentification")
143  << "========================================================================\n"
144  << "Debugging mode with truth matching is turned on!!! Make sure you understand what you are doing!\n"
145  << "========================================================================\n";
146  if (fillGlobalTrackQuality_){
147  globalTrackQualityInputTag_ = iConfig.getParameter<edm::InputTag>("globalTrackQualityInputTag");
148  }
149 
150  if (fillTrackerKink_) {
151  trackerKinkFinder_.reset(new MuonKinkFinder(iConfig.getParameter<edm::ParameterSet>("TrackerKinkFinderParameters")));
152  }
153 
154  //create mesh holder
155  meshAlgo_ = new MuonMesh(iConfig.getParameter<edm::ParameterSet>("arbitrationCleanerOptions"));
156 
157 
158  edm::InputTag rpcHitTag("rpcRecHits");
159  rpcHitToken_ = consumes<RPCRecHitCollection>(rpcHitTag);
160  glbQualToken_ = consumes<edm::ValueMap<reco::MuonQuality> >(globalTrackQualityInputTag_);
161 
162 
163  //Consumes... UGH
164  for ( unsigned int i = 0; i < inputCollectionLabels_.size(); ++i ) {
165  if ( inputCollectionTypes_[i] == "inner tracks" ) {
166  innerTrackCollectionToken_ = consumes<reco::TrackCollection>(inputCollectionLabels_.at(i));
167  continue;
168  }
169  if ( inputCollectionTypes_[i] == "outer tracks" ) {
170  outerTrackCollectionToken_ = consumes<reco::TrackCollection>(inputCollectionLabels_.at(i));
171  continue;
172  }
173  if ( inputCollectionTypes_[i] == "links" ) {
174  linkCollectionToken_ = consumes<reco::MuonTrackLinksCollection>(inputCollectionLabels_.at(i));
175  continue;
176  }
177  if ( inputCollectionTypes_[i] == "muons" ) {
178  muonCollectionToken_ = consumes<reco::MuonCollection>(inputCollectionLabels_.at(i));
179  continue;
180  }
181  if ( fillGlobalTrackRefits_ && inputCollectionTypes_[i] == "tev firstHit" ) {
182  tpfmsCollectionToken_ = consumes<reco::TrackToTrackMap>(inputCollectionLabels_.at(i));
183  continue;
184  }
185 
186  if ( fillGlobalTrackRefits_ && inputCollectionTypes_[i] == "tev picky" ) {
187  pickyCollectionToken_ = consumes<reco::TrackToTrackMap>(inputCollectionLabels_.at(i));
188  continue;
189  }
190 
191  if ( fillGlobalTrackRefits_ && inputCollectionTypes_[i] == "tev dyt" ) {
192  dytCollectionToken_ = consumes<reco::TrackToTrackMap>(inputCollectionLabels_.at(i));
193  continue;
194  }
195  throw cms::Exception("FatalError") << "Unknown input collection type: " << inputCollectionTypes_[i];
196  }
197 
198 
199 }
std::string hoDepositName_
T getParameter(std::string const &) const
std::string jetDepositName_
int i
Definition: DBlmapReader.cc:9
edm::EDGetTokenT< reco::TrackCollection > innerTrackCollectionToken_
dictionary parameters
Definition: Parameters.py:2
edm::EDGetTokenT< edm::ValueMap< reco::MuonQuality > > glbQualToken_
reco::isodeposit::IsoDepositExtractor * muIsoExtractorCalo_
edm::EDGetTokenT< RPCRecHitCollection > rpcHitToken_
bool fillCaloCompatibility_
std::string trackDepositName_
void loadParameters(const edm::ParameterSet &, edm::ConsumesCollector &)
std::vector< std::string > inputCollectionTypes_
MuonCaloCompatibility muonCaloCompatibility_
edm::EDGetTokenT< reco::TrackToTrackMap > pickyCollectionToken_
std::auto_ptr< MuonKinkFinder > trackerKinkFinder_
MuonMesh * meshAlgo_
edm::EDGetTokenT< reco::TrackToTrackMap > tpfmsCollectionToken_
double ptThresholdToFillCandidateP4WithGlobalFit_
TrackAssociatorParameters parameters_
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
std::string ecalDepositName_
edm::EDGetTokenT< reco::MuonCollection > muonCollectionToken_
edm::EDGetTokenT< reco::TrackCollection > outerTrackCollectionToken_
edm::EDGetTokenT< reco::MuonTrackLinksCollection > linkCollectionToken_
bool fillGlobalTrackRefits_
reco::isodeposit::IsoDepositExtractor * muIsoExtractorTrack_
void configure(const edm::ParameterSet &)
reco::isodeposit::IsoDepositExtractor * muIsoExtractorJet_
MuonTimingFiller * theTimingFiller_
std::vector< edm::InputTag > inputCollectionLabels_
bool fillGlobalTrackQuality_
std::string hcalDepositName_
double sigmaThresholdToFillCandidateP4WithGlobalFit_
bool debugWithTruthMatching_
T get(const Candidate &c)
Definition: component.h:55
edm::InputTag globalTrackQualityInputTag_
edm::EDGetTokenT< reco::TrackToTrackMap > dytCollectionToken_
MuonIdProducer::~MuonIdProducer ( )
virtual

Definition at line 203 of file MuonIdProducer.cc.

References meshAlgo_, muIsoExtractorCalo_, muIsoExtractorJet_, muIsoExtractorTrack_, and theTimingFiller_.

204 {
209  if (meshAlgo_) delete meshAlgo_;
210  // TimingReport::current()->dump(std::cout);
211 }
reco::isodeposit::IsoDepositExtractor * muIsoExtractorCalo_
MuonMesh * meshAlgo_
reco::isodeposit::IsoDepositExtractor * muIsoExtractorTrack_
reco::isodeposit::IsoDepositExtractor * muIsoExtractorJet_
MuonTimingFiller * theTimingFiller_

Member Function Documentation

void MuonIdProducer::beginRun ( const edm::Run iRun,
const edm::EventSetup iSetup 
)
overridevirtual

Reimplemented from edm::stream::EDProducerBase.

Definition at line 453 of file MuonIdProducer.cc.

References edm::EventSetup::get(), meshAlgo_, edm::ESHandle< class >::product(), and MuonMesh::setCSCGeometry().

454 {
455  edm::ESHandle<CSCGeometry> geomHandle;
456  iSetup.get<MuonGeometryRecord>().get(geomHandle);
457 
458  meshAlgo_->setCSCGeometry(geomHandle.product());
459 
460 }
MuonMesh * meshAlgo_
void setCSCGeometry(const CSCGeometry *pg)
Definition: MuonMesh.h:43
const T & get() const
Definition: EventSetup.h:55
T const * product() const
Definition: ESHandle.h:62
unsigned int MuonIdProducer::chamberId ( const DetId id)
private

Definition at line 393 of file MuonIdProducer.cc.

References CSCDetId::chamberId(), MuonSubdetId::CSC, MuonSubdetId::DT, DetId::Muon, and DetId::rawId().

Referenced by overlap().

394 {
395  switch ( id.det() ) {
396  case DetId::Muon:
397  switch ( id.subdetId() ) {
398  case MuonSubdetId::DT:
399  {
400  DTChamberId detId(id.rawId());
401  return detId.rawId();
402  }
403  break;
404  case MuonSubdetId::CSC:
405  {
406  CSCDetId detId(id.rawId());
407  return detId.chamberId().rawId();
408  }
409  break;
410  default:
411  return 0;
412  }
413  default:
414  return 0;
415  }
416  return 0;
417 }
static const int CSC
Definition: MuonSubdetId.h:13
static const int DT
Definition: MuonSubdetId.h:12
bool MuonIdProducer::checkLinks ( const reco::MuonTrackLinks links) const
private

Definition at line 1304 of file MuonIdProducer.cc.

References reco::MuonTrackLinks::globalTrack(), edm::Ref< C, T, F >::isNull(), reco::MuonTrackLinks::standAloneTrack(), and reco::MuonTrackLinks::trackerTrack().

Referenced by produce().

1304  {
1305  bool trackBAD = links->trackerTrack().isNull();
1306  bool staBAD = links->standAloneTrack().isNull();
1307  bool glbBAD = links->globalTrack().isNull();
1308  if (trackBAD || staBAD || glbBAD )
1309  {
1310  edm::LogWarning("muonIDbadLinks") << "Global muon links to constituent tracks are invalid: trkBad "
1311  <<trackBAD <<" standaloneBad "<<staBAD<<" globalBad "<<glbBAD
1312  <<". There should be no such object. Muon is skipped.";
1313  return false;
1314  }
1315  return true;
1316 }
bool isNull() const
Checks for null.
Definition: Ref.h:247
void MuonIdProducer::fillArbitrationInfo ( reco::MuonCollection pOutputMuons)
private

Definition at line 1009 of file MuonIdProducer.cc.

References arbClean_, reco::MuonSegmentMatch::Arbitrated, reco::MuonSegmentMatch::BelongsToTrackByDR, reco::MuonSegmentMatch::BelongsToTrackByDRSlope, reco::MuonSegmentMatch::BelongsToTrackByDX, reco::MuonSegmentMatch::BelongsToTrackByDXSlope, reco::MuonSegmentMatch::BelongsToTrackByME1aClean, reco::MuonSegmentMatch::BestInChamberByDR, reco::MuonSegmentMatch::BestInChamberByDRSlope, reco::MuonSegmentMatch::BestInChamberByDX, reco::MuonSegmentMatch::BestInChamberByDXSlope, reco::MuonSegmentMatch::BestInStationByDR, reco::MuonSegmentMatch::BestInStationByDRSlope, reco::MuonSegmentMatch::BestInStationByDX, reco::MuonSegmentMatch::BestInStationByDXSlope, MuonMesh::clearMesh(), MuonSubdetId::CSC, MuonMesh::isDuplicateOf(), meshAlgo_, CSCDetId::ring(), MuonMesh::runMesh(), python.multivaluedict::sort(), and plotscripts::stationIndex().

Referenced by produce().

1010 {
1011  //
1012  // apply segment flags
1013  //
1014  std::vector<std::pair<reco::MuonChamberMatch*,reco::MuonSegmentMatch*> > chamberPairs; // for chamber segment sorting
1015  std::vector<std::pair<reco::MuonChamberMatch*,reco::MuonSegmentMatch*> > stationPairs; // for station segment sorting
1016  std::vector<std::pair<reco::MuonChamberMatch*,reco::MuonSegmentMatch*> > arbitrationPairs; // for muon segment arbitration
1017 
1018  // muonIndex1
1019  for( unsigned int muonIndex1 = 0; muonIndex1 < pOutputMuons->size(); ++muonIndex1 )
1020  {
1021  // chamberIter1
1022  for( std::vector<reco::MuonChamberMatch>::iterator chamberIter1 = pOutputMuons->at(muonIndex1).matches().begin();
1023  chamberIter1 != pOutputMuons->at(muonIndex1).matches().end(); ++chamberIter1 )
1024  {
1025  if(chamberIter1->segmentMatches.empty()) continue;
1026  chamberPairs.clear();
1027 
1028  // segmentIter1
1029  for( std::vector<reco::MuonSegmentMatch>::iterator segmentIter1 = chamberIter1->segmentMatches.begin();
1030  segmentIter1 != chamberIter1->segmentMatches.end(); ++segmentIter1 )
1031  {
1032  chamberPairs.push_back(std::make_pair(&(*chamberIter1), &(*segmentIter1)));
1033  if(!segmentIter1->isMask()) // has not yet been arbitrated
1034  {
1035  arbitrationPairs.clear();
1036  arbitrationPairs.push_back(std::make_pair(&(*chamberIter1), &(*segmentIter1)));
1037 
1038 
1039 
1040  // find identical segments with which to arbitrate
1041  // tracker muons only
1042  if (pOutputMuons->at(muonIndex1).isTrackerMuon()) {
1043  // muonIndex2
1044  for( unsigned int muonIndex2 = muonIndex1+1; muonIndex2 < pOutputMuons->size(); ++muonIndex2 )
1045  {
1046  // tracker muons only
1047  if (! pOutputMuons->at(muonIndex2).isTrackerMuon()) continue;
1048  // chamberIter2
1049  for( std::vector<reco::MuonChamberMatch>::iterator chamberIter2 = pOutputMuons->at(muonIndex2).matches().begin();
1050  chamberIter2 != pOutputMuons->at(muonIndex2).matches().end(); ++chamberIter2 )
1051  {
1052  // segmentIter2
1053  for( std::vector<reco::MuonSegmentMatch>::iterator segmentIter2 = chamberIter2->segmentMatches.begin();
1054  segmentIter2 != chamberIter2->segmentMatches.end(); ++segmentIter2 )
1055  {
1056  if(segmentIter2->isMask()) continue; // has already been arbitrated
1057  if(fabs(segmentIter2->x - segmentIter1->x ) < 1E-3 &&
1058  fabs(segmentIter2->y - segmentIter1->y ) < 1E-3 &&
1059  fabs(segmentIter2->dXdZ - segmentIter1->dXdZ ) < 1E-3 &&
1060  fabs(segmentIter2->dYdZ - segmentIter1->dYdZ ) < 1E-3 &&
1061  fabs(segmentIter2->xErr - segmentIter1->xErr ) < 1E-3 &&
1062  fabs(segmentIter2->yErr - segmentIter1->yErr ) < 1E-3 &&
1063  fabs(segmentIter2->dXdZErr - segmentIter1->dXdZErr) < 1E-3 &&
1064  fabs(segmentIter2->dYdZErr - segmentIter1->dYdZErr) < 1E-3)
1065  arbitrationPairs.push_back(std::make_pair(&(*chamberIter2), &(*segmentIter2)));
1066  } // segmentIter2
1067  } // chamberIter2
1068  } // muonIndex2
1069  }
1070 
1071  // arbitration segment sort
1072  if(arbitrationPairs.empty()) continue; // this should never happen
1073  if(arbitrationPairs.size()==1) {
1074  arbitrationPairs.front().second->setMask(reco::MuonSegmentMatch::BelongsToTrackByDRSlope);
1075  arbitrationPairs.front().second->setMask(reco::MuonSegmentMatch::BelongsToTrackByDXSlope);
1076  arbitrationPairs.front().second->setMask(reco::MuonSegmentMatch::BelongsToTrackByDR);
1077  arbitrationPairs.front().second->setMask(reco::MuonSegmentMatch::BelongsToTrackByDX);
1078  arbitrationPairs.front().second->setMask(reco::MuonSegmentMatch::Arbitrated);
1079  } else {
1080  sort(arbitrationPairs.begin(), arbitrationPairs.end(), SortMuonSegmentMatches(reco::MuonSegmentMatch::BelongsToTrackByDRSlope));
1081  arbitrationPairs.front().second->setMask(reco::MuonSegmentMatch::BelongsToTrackByDRSlope);
1082  sort(arbitrationPairs.begin(), arbitrationPairs.end(), SortMuonSegmentMatches(reco::MuonSegmentMatch::BelongsToTrackByDXSlope));
1083  arbitrationPairs.front().second->setMask(reco::MuonSegmentMatch::BelongsToTrackByDXSlope);
1084  sort(arbitrationPairs.begin(), arbitrationPairs.end(), SortMuonSegmentMatches(reco::MuonSegmentMatch::BelongsToTrackByDR));
1085  arbitrationPairs.front().second->setMask(reco::MuonSegmentMatch::BelongsToTrackByDR);
1086  sort(arbitrationPairs.begin(), arbitrationPairs.end(), SortMuonSegmentMatches(reco::MuonSegmentMatch::BelongsToTrackByDX));
1087  arbitrationPairs.front().second->setMask(reco::MuonSegmentMatch::BelongsToTrackByDX);
1088  for( unsigned int it = 0; it < arbitrationPairs.size(); ++it )
1089  arbitrationPairs.at(it).second->setMask(reco::MuonSegmentMatch::Arbitrated);
1090  }
1091  }
1092 
1093  // setup me1a cleaning for later
1094  if( chamberIter1->id.subdetId() == MuonSubdetId::CSC && arbClean_ ) {
1095  CSCDetId cscid(chamberIter1->id);
1096  if(cscid.ring() == 4)
1097  for( std::vector<reco::MuonSegmentMatch>::iterator segmentIter2 = chamberIter1->segmentMatches.begin();
1098  segmentIter2 != chamberIter1->segmentMatches.end(); ++segmentIter2 ) {
1099  if( segmentIter1->cscSegmentRef.isNonnull() && segmentIter2->cscSegmentRef.isNonnull() )
1100  if( meshAlgo_->isDuplicateOf(segmentIter1->cscSegmentRef,segmentIter2->cscSegmentRef) &&
1101  (segmentIter2->mask & 0x1e0000) &&
1102  (segmentIter1->mask & 0x1e0000) )
1104  //if the track has lost the segment already through normal arbitration no need to do it again.
1105  }
1106  }// mark all ME1/a duplicates that this track owns
1107 
1108  } // segmentIter1
1109 
1110  // chamber segment sort
1111  if(chamberPairs.empty()) continue; // this should never happen
1112  if(chamberPairs.size()==1) {
1113  chamberPairs.front().second->setMask(reco::MuonSegmentMatch::BestInChamberByDRSlope);
1114  chamberPairs.front().second->setMask(reco::MuonSegmentMatch::BestInChamberByDXSlope);
1115  chamberPairs.front().second->setMask(reco::MuonSegmentMatch::BestInChamberByDR);
1116  chamberPairs.front().second->setMask(reco::MuonSegmentMatch::BestInChamberByDX);
1117  } else {
1118  sort(chamberPairs.begin(), chamberPairs.end(), SortMuonSegmentMatches(reco::MuonSegmentMatch::BestInChamberByDRSlope));
1119  chamberPairs.front().second->setMask(reco::MuonSegmentMatch::BestInChamberByDRSlope);
1120  sort(chamberPairs.begin(), chamberPairs.end(), SortMuonSegmentMatches(reco::MuonSegmentMatch::BestInChamberByDXSlope));
1121  chamberPairs.front().second->setMask(reco::MuonSegmentMatch::BestInChamberByDXSlope);
1122  sort(chamberPairs.begin(), chamberPairs.end(), SortMuonSegmentMatches(reco::MuonSegmentMatch::BestInChamberByDR));
1123  chamberPairs.front().second->setMask(reco::MuonSegmentMatch::BestInChamberByDR);
1124  sort(chamberPairs.begin(), chamberPairs.end(), SortMuonSegmentMatches(reco::MuonSegmentMatch::BestInChamberByDX));
1125  chamberPairs.front().second->setMask(reco::MuonSegmentMatch::BestInChamberByDX);
1126  }
1127  } // chamberIter1
1128 
1129  // station segment sort
1130  for( int stationIndex = 1; stationIndex < 5; ++stationIndex )
1131  for( int detectorIndex = 1; detectorIndex < 4; ++detectorIndex )
1132  {
1133  stationPairs.clear();
1134 
1135  // chamberIter
1136  for( std::vector<reco::MuonChamberMatch>::iterator chamberIter = pOutputMuons->at(muonIndex1).matches().begin();
1137  chamberIter != pOutputMuons->at(muonIndex1).matches().end(); ++chamberIter )
1138  {
1139  if(!(chamberIter->station()==stationIndex && chamberIter->detector()==detectorIndex)) continue;
1140  if(chamberIter->segmentMatches.empty()) continue;
1141 
1142  for( std::vector<reco::MuonSegmentMatch>::iterator segmentIter = chamberIter->segmentMatches.begin();
1143  segmentIter != chamberIter->segmentMatches.end(); ++segmentIter )
1144  stationPairs.push_back(std::make_pair(&(*chamberIter), &(*segmentIter)));
1145  } // chamberIter
1146 
1147  if(stationPairs.empty()) continue; // this may very well happen
1148  if(stationPairs.size()==1) {
1149  stationPairs.front().second->setMask(reco::MuonSegmentMatch::BestInStationByDRSlope);
1150  stationPairs.front().second->setMask(reco::MuonSegmentMatch::BestInStationByDXSlope);
1151  stationPairs.front().second->setMask(reco::MuonSegmentMatch::BestInStationByDR);
1152  stationPairs.front().second->setMask(reco::MuonSegmentMatch::BestInStationByDX);
1153  } else {
1154  sort(stationPairs.begin(), stationPairs.end(), SortMuonSegmentMatches(reco::MuonSegmentMatch::BestInStationByDRSlope));
1155  stationPairs.front().second->setMask(reco::MuonSegmentMatch::BestInStationByDRSlope);
1156  sort(stationPairs.begin(), stationPairs.end(), SortMuonSegmentMatches(reco::MuonSegmentMatch::BestInStationByDXSlope));
1157  stationPairs.front().second->setMask(reco::MuonSegmentMatch::BestInStationByDXSlope);
1158  sort(stationPairs.begin(), stationPairs.end(), SortMuonSegmentMatches(reco::MuonSegmentMatch::BestInStationByDR));
1159  stationPairs.front().second->setMask(reco::MuonSegmentMatch::BestInStationByDR);
1160  sort(stationPairs.begin(), stationPairs.end(), SortMuonSegmentMatches(reco::MuonSegmentMatch::BestInStationByDX));
1161  stationPairs.front().second->setMask(reco::MuonSegmentMatch::BestInStationByDX);
1162  }
1163  }
1164 
1165  } // muonIndex1
1166 
1167  if(arbClean_) {
1168  // clear old mesh, create and prune new mesh!
1169  meshAlgo_->clearMesh();
1170  meshAlgo_->runMesh(pOutputMuons);
1171  }
1172 }
static const unsigned int BelongsToTrackByME1aClean
void runMesh(std::vector< reco::Muon > *p)
Definition: MuonMesh.h:39
static const unsigned int Arbitrated
segment mask flags
static const unsigned int BestInStationByDRSlope
static const unsigned int BelongsToTrackByDXSlope
static const unsigned int BestInStationByDR
void clearMesh()
Definition: MuonMesh.h:41
MuonMesh * meshAlgo_
static const int CSC
Definition: MuonSubdetId.h:13
static const unsigned int BestInChamberByDX
static const unsigned int BestInChamberByDR
static const unsigned int BestInStationByDXSlope
static const unsigned int BestInChamberByDXSlope
bool isDuplicateOf(const CSCSegmentRef &lhs, const CSCSegmentRef &rhs) const
Definition: MuonMesh.cc:342
static const unsigned int BelongsToTrackByDRSlope
static const unsigned int BelongsToTrackByDR
static const unsigned int BelongsToTrackByDX
functor predicate for standard library sort algorithm
def stationIndex
Definition: plotscripts.py:353
static const unsigned int BestInStationByDX
static const unsigned int BestInChamberByDRSlope
void MuonIdProducer::fillGlbQuality ( edm::Event iEvent,
const edm::EventSetup iSetup,
reco::Muon aMuon 
)
private

Definition at line 1280 of file MuonIdProducer.cc.

References reco::Muon::combinedMuon(), reco::Muon::combinedQuality(), edm::HandleBase::failedToGet(), edm::Event::getByToken(), glbQualToken_, reco::Muon::isGlobalMuon(), edm::HandleBase::isValid(), LogDebug, reco::Muon::setCombinedQuality(), and reco::MuonQuality::trkRelChi2.

Referenced by produce().

1281 {
1283  iEvent.getByToken(glbQualToken_, glbQualH);
1284 
1285  if(aMuon.isGlobalMuon() && glbQualH.isValid() && !glbQualH.failedToGet()) {
1286  aMuon.setCombinedQuality((*glbQualH)[aMuon.combinedMuon()]);
1287  }
1288 
1289  LogDebug("MuonIdentification") << "tkChiVal " << aMuon.combinedQuality().trkRelChi2;
1290 
1291 }
#define LogDebug(id)
edm::EDGetTokenT< edm::ValueMap< reco::MuonQuality > > glbQualToken_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:434
bool isGlobalMuon() const
Definition: Muon.h:218
float trkRelChi2
chi2 value for the inner track stub with respect to the global track
Definition: MuonQuality.h:15
MuonQuality combinedQuality() const
get energy deposition information
Definition: Muon.h:121
bool isValid() const
Definition: HandleBase.h:76
bool failedToGet() const
Definition: HandleBase.h:80
virtual TrackRef combinedMuon() const
reference to a stand-alone muon Track
Definition: Muon.h:55
void setCombinedQuality(const MuonQuality &combinedQuality)
set energy deposition information
Definition: Muon.h:123
void MuonIdProducer::fillMuonId ( edm::Event iEvent,
const edm::EventSetup iSetup,
reco::Muon aMuon,
TrackDetectorAssociator::Direction  direction = TrackDetectorAssociator::InsideOut 
)
private

Definition at line 822 of file MuonIdProducer.cc.

References TrackDetectorAssociator::associate(), reco::MuonRPCHitMatch::bx, TrackDetMatchInfo::chambers, TrackDetMatchInfo::crossedEcalIds, TrackDetMatchInfo::crossedEnergy(), TrackDetMatchInfo::crossedHcalIds, reco::MuonSegmentMatch::cscSegmentRef, reco::MuonSegmentMatch::dtSegmentRef, reco::MuonChamberMatch::dXdZ, reco::MuonSegmentMatch::dXdZ, reco::MuonChamberMatch::dXdZErr, reco::MuonSegmentMatch::dXdZErr, reco::MuonChamberMatch::dYdZ, reco::MuonSegmentMatch::dYdZ, reco::MuonChamberMatch::dYdZErr, reco::MuonSegmentMatch::dYdZErr, reco::MuonEnergy::ecal_id, reco::MuonEnergy::ecal_position, reco::MuonEnergy::ecal_time, TrackDetMatchInfo::EcalRecHits, TrackDetMatchInfo::ecalRecHits, reco::MuonChamberMatch::edgeX, reco::MuonChamberMatch::edgeY, reco::MuonEnergy::em, reco::MuonEnergy::emMax, reco::MuonEnergy::emS25, reco::MuonEnergy::emS9, edm::hlt::Exception, fillEnergy_, fillMatching_, TrackDetMatchInfo::findMaxDeposition(), edm::Ref< C, T, F >::get(), edm::Event::getByToken(), reco::MuonEnergy::had, reco::MuonEnergy::hadMax, reco::MuonEnergy::hadS9, reco::MuonSegmentMatch::hasPhi_, reco::MuonSegmentMatch::hasZed_, reco::MuonEnergy::hcal_id, reco::MuonEnergy::hcal_position, reco::MuonEnergy::hcal_time, TrackDetMatchInfo::HcalRecHits, TrackDetMatchInfo::hcalRecHits, reco::MuonEnergy::ho, TrackDetMatchInfo::HORecHits, reco::MuonEnergy::hoS9, reco::MuonChamberMatch::id, info(), edm::Ref< C, T, F >::isNull(), reco::Muon::isRPCMuon(), reco::Muon::isTrackerMuon(), edm::HandleBase::isValid(), LogTrace, reco::MuonRPCHitMatch::mask, reco::MuonSegmentMatch::mask, reco::Muon::matches(), maxAbsDx_, maxAbsDy_, maxAbsPullX_, maxAbsPullY_, reco::Muon::NoArbitration, reco::Muon::numberOfMatches(), TrackDetMatchInfo::nXnEnergy(), or, parameters_, funct::pow(), rpcHitToken_, reco::MuonChamberMatch::rpcMatches, rpcRecHits_cfi::rpcRecHits, reco::MuonChamberMatch::segmentMatches, reco::Muon::setCalEnergy(), reco::Muon::setMatches(), mathSSE::sqrt(), reco::Muon::standAloneMuon(), reco::MuonSegmentMatch::t0, reco::MuonEnergy::tower, reco::MuonEnergy::towerS9, TrackDetMatchInfo::TowerTotal, reco::Muon::track(), trackAssociator_, TrackDetMatchInfo::trkGlobPosAtEcal, TrackDetMatchInfo::trkGlobPosAtHcal, reco::MuonRPCHitMatch::x, reco::MuonChamberMatch::x, reco::MuonSegmentMatch::x, reco::MuonChamberMatch::xErr, reco::MuonSegmentMatch::xErr, LocalError::xx(), reco::MuonChamberMatch::y, reco::MuonSegmentMatch::y, reco::MuonChamberMatch::yErr, reco::MuonSegmentMatch::yErr, and LocalError::yy().

Referenced by produce().

825 {
826  // perform track - detector association
827  const reco::Track* track = 0;
828  if ( ! aMuon.track().isNull() )
829  track = aMuon.track().get();
830  else
831  {
832  if ( ! aMuon.standAloneMuon().isNull() )
833  track = aMuon.standAloneMuon().get();
834  else
835  throw cms::Exception("FatalError") << "Failed to fill muon id information for a muon with undefined references to tracks";
836  }
837 
838  TrackDetMatchInfo info = trackAssociator_.associate(iEvent, iSetup, *track, parameters_, direction);
839 
840  if ( fillEnergy_ ) {
841  reco::MuonEnergy muonEnergy;
844  muonEnergy.ho = info.crossedEnergy(TrackDetMatchInfo::HORecHits);
846  muonEnergy.emS9 = info.nXnEnergy(TrackDetMatchInfo::EcalRecHits,1); // 3x3 energy
847  muonEnergy.emS25 = info.nXnEnergy(TrackDetMatchInfo::EcalRecHits,2); // 5x5 energy
848  muonEnergy.hadS9 = info.nXnEnergy(TrackDetMatchInfo::HcalRecHits,1); // 3x3 energy
849  muonEnergy.hoS9 = info.nXnEnergy(TrackDetMatchInfo::HORecHits,1); // 3x3 energy
850  muonEnergy.towerS9 = info.nXnEnergy(TrackDetMatchInfo::TowerTotal,1); // 3x3 energy
851  muonEnergy.ecal_position = info.trkGlobPosAtEcal;
852  muonEnergy.hcal_position = info.trkGlobPosAtHcal;
853  if (! info.crossedEcalIds.empty() ) muonEnergy.ecal_id = info.crossedEcalIds.front();
854  if (! info.crossedHcalIds.empty() ) muonEnergy.hcal_id = info.crossedHcalIds.front();
855  // find maximal energy depositions and their time
856  DetId emMaxId = info.findMaxDeposition(TrackDetMatchInfo::EcalRecHits,2); // max energy deposit in 5x5 shape
857  for(std::vector<const EcalRecHit*>::const_iterator hit=info.ecalRecHits.begin();
858  hit!=info.ecalRecHits.end(); ++hit) {
859  if ((*hit)->id() != emMaxId) continue;
860  muonEnergy.emMax = (*hit)->energy();
861  muonEnergy.ecal_time = (*hit)->time();
862  }
863  DetId hadMaxId = info.findMaxDeposition(TrackDetMatchInfo::HcalRecHits,1); // max energy deposit in 3x3 shape
864  for(std::vector<const HBHERecHit*>::const_iterator hit=info.hcalRecHits.begin();
865  hit!=info.hcalRecHits.end(); ++hit) {
866  if ((*hit)->id() != hadMaxId) continue;
867  muonEnergy.hadMax = (*hit)->energy();
868  muonEnergy.hcal_time = (*hit)->time();
869  }
870  aMuon.setCalEnergy( muonEnergy );
871  }
872  if ( ! fillMatching_ && ! aMuon.isTrackerMuon() && ! aMuon.isRPCMuon() ) return;
873 
875  iEvent.getByToken(rpcHitToken_, rpcRecHits);
876 
877  // fill muon match info
878  std::vector<reco::MuonChamberMatch> muonChamberMatches;
879  unsigned int nubmerOfMatchesAccordingToTrackAssociator = 0;
880  for( std::vector<TAMuonChamberMatch>::const_iterator chamber=info.chambers.begin();
881  chamber!=info.chambers.end(); chamber++ )
882  {
883  if (chamber->id.subdetId() == 3 && rpcRecHits.isValid() ) continue; // Skip RPC chambers, they are taken care of below)
884  reco::MuonChamberMatch matchedChamber;
885 
886  LocalError localError = chamber->tState.localError().positionError();
887  matchedChamber.x = chamber->tState.localPosition().x();
888  matchedChamber.y = chamber->tState.localPosition().y();
889  matchedChamber.xErr = sqrt( localError.xx() );
890  matchedChamber.yErr = sqrt( localError.yy() );
891 
892  matchedChamber.dXdZ = chamber->tState.localDirection().z()!=0?chamber->tState.localDirection().x()/chamber->tState.localDirection().z():9999;
893  matchedChamber.dYdZ = chamber->tState.localDirection().z()!=0?chamber->tState.localDirection().y()/chamber->tState.localDirection().z():9999;
894  // DANGEROUS - compiler cannot guaranty parameters ordering
895  AlgebraicSymMatrix55 trajectoryCovMatrix = chamber->tState.localError().matrix();
896  matchedChamber.dXdZErr = trajectoryCovMatrix(1,1)>0?sqrt(trajectoryCovMatrix(1,1)):0;
897  matchedChamber.dYdZErr = trajectoryCovMatrix(2,2)>0?sqrt(trajectoryCovMatrix(2,2)):0;
898 
899  matchedChamber.edgeX = chamber->localDistanceX;
900  matchedChamber.edgeY = chamber->localDistanceY;
901 
902  matchedChamber.id = chamber->id;
903  if ( ! chamber->segments.empty() ) ++nubmerOfMatchesAccordingToTrackAssociator;
904 
905  // fill segments
906  for( std::vector<TAMuonSegmentMatch>::const_iterator segment = chamber->segments.begin();
907  segment != chamber->segments.end(); segment++ )
908  {
909  reco::MuonSegmentMatch matchedSegment;
910  matchedSegment.x = segment->segmentLocalPosition.x();
911  matchedSegment.y = segment->segmentLocalPosition.y();
912  matchedSegment.dXdZ = segment->segmentLocalDirection.z()?segment->segmentLocalDirection.x()/segment->segmentLocalDirection.z():0;
913  matchedSegment.dYdZ = segment->segmentLocalDirection.z()?segment->segmentLocalDirection.y()/segment->segmentLocalDirection.z():0;
914  matchedSegment.xErr = segment->segmentLocalErrorXX>0?sqrt(segment->segmentLocalErrorXX):0;
915  matchedSegment.yErr = segment->segmentLocalErrorYY>0?sqrt(segment->segmentLocalErrorYY):0;
916  matchedSegment.dXdZErr = segment->segmentLocalErrorDxDz>0?sqrt(segment->segmentLocalErrorDxDz):0;
917  matchedSegment.dYdZErr = segment->segmentLocalErrorDyDz>0?sqrt(segment->segmentLocalErrorDyDz):0;
918  matchedSegment.t0 = segment->t0;
919  matchedSegment.mask = 0;
920  matchedSegment.dtSegmentRef = segment->dtSegmentRef;
921  matchedSegment.cscSegmentRef = segment->cscSegmentRef;
922  matchedSegment.hasZed_ = segment->hasZed;
923  matchedSegment.hasPhi_ = segment->hasPhi;
924  // test segment
925  bool matchedX = false;
926  bool matchedY = false;
927  LogTrace("MuonIdentification") << " matching local x, segment x: " << matchedSegment.x <<
928  ", chamber x: " << matchedChamber.x << ", max: " << maxAbsDx_;
929  LogTrace("MuonIdentification") << " matching local y, segment y: " << matchedSegment.y <<
930  ", chamber y: " << matchedChamber.y << ", max: " << maxAbsDy_;
931  if (matchedSegment.xErr>0 && matchedChamber.xErr>0 )
932  LogTrace("MuonIdentification") << " xpull: " <<
933  fabs(matchedSegment.x - matchedChamber.x)/sqrt(pow(matchedSegment.xErr,2) + pow(matchedChamber.xErr,2));
934  if (matchedSegment.yErr>0 && matchedChamber.yErr>0 )
935  LogTrace("MuonIdentification") << " ypull: " <<
936  fabs(matchedSegment.y - matchedChamber.y)/sqrt(pow(matchedSegment.yErr,2) + pow(matchedChamber.yErr,2));
937 
938  if (fabs(matchedSegment.x - matchedChamber.x) < maxAbsDx_) matchedX = true;
939  if (fabs(matchedSegment.y - matchedChamber.y) < maxAbsDy_) matchedY = true;
940  if (matchedSegment.xErr>0 && matchedChamber.xErr>0 &&
941  fabs(matchedSegment.x - matchedChamber.x)/sqrt(pow(matchedSegment.xErr,2) + pow(matchedChamber.xErr,2)) < maxAbsPullX_) matchedX = true;
942  if (matchedSegment.yErr>0 && matchedChamber.yErr>0 &&
943  fabs(matchedSegment.y - matchedChamber.y)/sqrt(pow(matchedSegment.yErr,2) + pow(matchedChamber.yErr,2)) < maxAbsPullY_) matchedY = true;
944  if (matchedX && matchedY) matchedChamber.segmentMatches.push_back(matchedSegment);
945  }
946  muonChamberMatches.push_back(matchedChamber);
947  }
948 
949  // Fill RPC info
950  if ( rpcRecHits.isValid() )
951  {
952 
953  for( std::vector<TAMuonChamberMatch>::const_iterator chamber=info.chambers.begin();
954  chamber!=info.chambers.end(); chamber++ )
955  {
956 
957  if ( chamber->id.subdetId() != 3 ) continue; // Consider RPC chambers only
958 
959  reco::MuonChamberMatch matchedChamber;
960 
961  LocalError localError = chamber->tState.localError().positionError();
962  matchedChamber.x = chamber->tState.localPosition().x();
963  matchedChamber.y = chamber->tState.localPosition().y();
964  matchedChamber.xErr = sqrt( localError.xx() );
965  matchedChamber.yErr = sqrt( localError.yy() );
966 
967  matchedChamber.dXdZ = chamber->tState.localDirection().z()!=0?chamber->tState.localDirection().x()/chamber->tState.localDirection().z():9999;
968  matchedChamber.dYdZ = chamber->tState.localDirection().z()!=0?chamber->tState.localDirection().y()/chamber->tState.localDirection().z():9999;
969  // DANGEROUS - compiler cannot guaranty parameters ordering
970  AlgebraicSymMatrix55 trajectoryCovMatrix = chamber->tState.localError().matrix();
971  matchedChamber.dXdZErr = trajectoryCovMatrix(1,1)>0?sqrt(trajectoryCovMatrix(1,1)):0;
972  matchedChamber.dYdZErr = trajectoryCovMatrix(2,2)>0?sqrt(trajectoryCovMatrix(2,2)):0;
973 
974  matchedChamber.edgeX = chamber->localDistanceX;
975  matchedChamber.edgeY = chamber->localDistanceY;
976 
977  matchedChamber.id = chamber->id;
978 
979  for ( RPCRecHitCollection::const_iterator rpcRecHit = rpcRecHits->begin();
980  rpcRecHit != rpcRecHits->end(); ++rpcRecHit )
981  {
982  reco::MuonRPCHitMatch rpcHitMatch;
983 
984  if ( rpcRecHit->rawId() != chamber->id.rawId() ) continue;
985 
986  rpcHitMatch.x = rpcRecHit->localPosition().x();
987  rpcHitMatch.mask = 0;
988  rpcHitMatch.bx = rpcRecHit->BunchX();
989 
990  const double AbsDx = fabs(rpcRecHit->localPosition().x()-chamber->tState.localPosition().x());
991  if( AbsDx <= 20 or AbsDx/sqrt(localError.xx()) <= 4 ) matchedChamber.rpcMatches.push_back(rpcHitMatch);
992  }
993 
994  muonChamberMatches.push_back(matchedChamber);
995  }
996  }
997 
998  aMuon.setMatches(muonChamberMatches);
999 
1000  LogTrace("MuonIdentification") << "number of muon chambers: " << aMuon.matches().size() << "\n"
1001  << "number of chambers with segments according to the associator requirements: " <<
1002  nubmerOfMatchesAccordingToTrackAssociator;
1003  LogTrace("MuonIdentification") << "number of segment matches with the producer requirements: " <<
1005 
1006  // fillTime( iEvent, iSetup, aMuon );
1007 }
float xx() const
Definition: LocalError.h:24
DTRecSegment4DRef dtSegmentRef
static const TGPicture * info(bool iBackgroundIsBlack)
TrackDetectorAssociator trackAssociator_
CSCSegmentRef cscSegmentRef
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
Definition: Activities.doc:12
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:434
edm::EDGetTokenT< RPCRecHitCollection > rpcHitToken_
bool isTrackerMuon() const
Definition: Muon.h:219
std::vector< const EcalRecHit * > ecalRecHits
hits in the cone
std::vector< DetId > crossedEcalIds
DetId findMaxDeposition(EnergyType)
Find detector elements with highest energy deposition.
virtual TrackRef track() const
reference to a Track
Definition: Muon.h:49
float emS9
energy deposited in 3x3 ECAL crystal shape around central crystal
Definition: MuonEnergy.h:18
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
void setCalEnergy(const MuonEnergy &calEnergy)
set energy deposition information
Definition: Muon.h:113
std::vector< DetId > crossedHcalIds
double nXnEnergy(const DetId &, EnergyType, int gridSize=1)
get energy of the NxN shape (N = 2*gridSize + 1) around given detector element
float towerS9
total energy in 3x3 tower shape
Definition: MuonEnergy.h:12
math::XYZPoint trkGlobPosAtHcal
float ecal_time
Calorimeter timing.
Definition: MuonEnergy.h:37
float ho
energy deposited in crossed HO towers
Definition: MuonEnergy.h:32
bool isRPCMuon() const
Definition: Muon.h:223
DetId hcal_id
DetId of the central HCAL tower with smallest depth.
Definition: MuonEnergy.h:50
bool isNull() const
Checks for null.
Definition: Ref.h:247
TrackAssociatorParameters parameters_
float yy() const
Definition: LocalError.h:26
float emS25
energy deposited in 5x5 ECAL crystal shape around central crystal
Definition: MuonEnergy.h:20
T sqrt(T t)
Definition: SSEVec.h:48
std::vector< TAMuonChamberMatch > chambers
std::vector< const HBHERecHit * > hcalRecHits
float hoS9
energy deposited in 3x3 HO tower shape around central tower
Definition: MuonEnergy.h:34
std::vector< reco::MuonRPCHitMatch > rpcMatches
bool isValid() const
Definition: HandleBase.h:76
double crossedEnergy(EnergyType)
energy in detector elements crossed by the track by types
#define LogTrace(id)
math::XYZPointF hcal_position
Definition: MuonEnergy.h:44
int numberOfMatches(ArbitrationType type=SegmentAndTrackArbitration) const
get number of chambers with matched segments
Definition: Muon.cc:60
float emMax
maximal energy of ECAL crystal in the 5x5 shape
Definition: MuonEnergy.h:22
Definition: DetId.h:18
float hadMax
maximal energy of HCAL tower in the 3x3 shape
Definition: MuonEnergy.h:30
std::vector< MuonChamberMatch > & matches()
get muon matching information
Definition: Muon.h:140
std::vector< reco::MuonSegmentMatch > segmentMatches
DetId ecal_id
DetId of the central ECAL crystal.
Definition: MuonEnergy.h:47
TrackDetMatchInfo associate(const edm::Event &, const edm::EventSetup &, const FreeTrajectoryState &, const AssociatorParameters &)
math::XYZPoint trkGlobPosAtEcal
Track position at different parts of the calorimeter.
void setMatches(const std::vector< MuonChamberMatch > &matches)
set muon matching information
Definition: Muon.h:143
T const * get() const
Returns C++ pointer to the item.
Definition: Ref.h:242
math::XYZPointF ecal_position
Trajectory position at the calorimeter.
Definition: MuonEnergy.h:43
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:40
float hadS9
energy deposited in 3x3 HCAL tower shape around central tower
Definition: MuonEnergy.h:28
virtual TrackRef standAloneMuon() const
reference to a stand-alone muon Track
Definition: Muon.h:52
void MuonIdProducer::fillMuonIsolation ( edm::Event iEvent,
const edm::EventSetup iSetup,
reco::Muon aMuon,
reco::IsoDeposit trackDep,
reco::IsoDeposit ecalDep,
reco::IsoDeposit hcalDep,
reco::IsoDeposit hoDep,
reco::IsoDeposit jetDep 
)
private

Definition at line 1174 of file MuonIdProducer.cc.

References reco::IsoDeposit::candEnergy(), reco::isodeposit::IsoDepositExtractor::deposit(), reco::IsoDeposit::depositAndCountWithin(), reco::isodeposit::IsoDepositExtractor::deposits(), reco::IsoDeposit::depositWithin(), reco::MuonIsolation::emEt, reco::MuonIsolation::emVetoEt, edm::hlt::Exception, edm::Ref< C, T, F >::get(), reco::MuonIsolation::hadEt, reco::MuonIsolation::hadVetoEt, reco::MuonIsolation::hoEt, reco::MuonIsolation::hoVetoEt, edm::Ref< C, T, F >::isNull(), LogTrace, muIsoExtractorCalo_, muIsoExtractorJet_, muIsoExtractorTrack_, reco::MuonIsolation::nJets, reco::MuonIsolation::nTracks, reco::Muon::setIsolation(), reco::Muon::standAloneMuon(), reco::MuonIsolation::sumPt, reco::Muon::track(), and reco::MuonIsolation::trackerVetoPt.

Referenced by produce().

1177 {
1178  reco::MuonIsolation isoR03, isoR05;
1179  const reco::Track* track = 0;
1180  if ( ! aMuon.track().isNull() )
1181  track = aMuon.track().get();
1182  else
1183  {
1184  if ( ! aMuon.standAloneMuon().isNull() )
1185  track = aMuon.standAloneMuon().get();
1186  else
1187  throw cms::Exception("FatalError") << "Failed to compute muon isolation information for a muon with undefined references to tracks";
1188  }
1189 
1190  // get deposits
1191  reco::IsoDeposit depTrk = muIsoExtractorTrack_->deposit(iEvent, iSetup, *track );
1192  std::vector<reco::IsoDeposit> caloDeps = muIsoExtractorCalo_->deposits(iEvent, iSetup, *track);
1193  reco::IsoDeposit depJet = muIsoExtractorJet_->deposit(iEvent, iSetup, *track );
1194 
1195  if(caloDeps.size()!=3) {
1196  LogTrace("MuonIdentification") << "Failed to fill vector of calorimeter isolation deposits!";
1197  return;
1198  }
1199 
1200  reco::IsoDeposit depEcal = caloDeps.at(0);
1201  reco::IsoDeposit depHcal = caloDeps.at(1);
1202  reco::IsoDeposit depHo = caloDeps.at(2);
1203 
1204  trackDep = depTrk;
1205  ecalDep = depEcal;
1206  hcalDep = depHcal;
1207  hoDep = depHo;
1208  jetDep = depJet;
1209 
1210  isoR03.sumPt = depTrk.depositWithin(0.3);
1211  isoR03.emEt = depEcal.depositWithin(0.3);
1212  isoR03.hadEt = depHcal.depositWithin(0.3);
1213  isoR03.hoEt = depHo.depositWithin(0.3);
1214  isoR03.nTracks = depTrk.depositAndCountWithin(0.3).second;
1215  isoR03.nJets = depJet.depositAndCountWithin(0.3).second;
1216  isoR03.trackerVetoPt = depTrk.candEnergy();
1217  isoR03.emVetoEt = depEcal.candEnergy();
1218  isoR03.hadVetoEt = depHcal.candEnergy();
1219  isoR03.hoVetoEt = depHo.candEnergy();
1220 
1221  isoR05.sumPt = depTrk.depositWithin(0.5);
1222  isoR05.emEt = depEcal.depositWithin(0.5);
1223  isoR05.hadEt = depHcal.depositWithin(0.5);
1224  isoR05.hoEt = depHo.depositWithin(0.5);
1225  isoR05.nTracks = depTrk.depositAndCountWithin(0.5).second;
1226  isoR05.nJets = depJet.depositAndCountWithin(0.5).second;
1227  isoR05.trackerVetoPt = depTrk.candEnergy();
1228  isoR05.emVetoEt = depEcal.candEnergy();
1229  isoR05.hadVetoEt = depHcal.candEnergy();
1230  isoR05.hoVetoEt = depHo.candEnergy();
1231 
1232 
1233  aMuon.setIsolation(isoR03, isoR05);
1234 
1235 }
float hadEt
hcal sum-Et
Definition: MuonIsolation.h:9
double candEnergy() const
Get energy or pT attached to cand trajectory.
Definition: IsoDeposit.h:136
float sumPt
sum-pt of tracks
Definition: MuonIsolation.h:7
reco::isodeposit::IsoDepositExtractor * muIsoExtractorCalo_
float hadVetoEt
hcal sum-et in the veto region in r-phi
Definition: MuonIsolation.h:15
virtual TrackRef track() const
reference to a Track
Definition: Muon.h:49
void setIsolation(const MuonIsolation &isoR03, const MuonIsolation &isoR05)
Definition: Muon.cc:805
double depositWithin(double coneSize, const Vetos &vetos=Vetos(), bool skipDepositVeto=false) const
Get deposit.
Definition: IsoDeposit.cc:34
bool isNull() const
Checks for null.
Definition: Ref.h:247
float emEt
ecal sum-Et
Definition: MuonIsolation.h:8
int nJets
number of jets in the cone
Definition: MuonIsolation.h:12
float hoEt
ho sum-Et
Definition: MuonIsolation.h:10
#define LogTrace(id)
float hoVetoEt
ho sum-et in the veto region in r-phi
Definition: MuonIsolation.h:16
int nTracks
number of tracks in the cone (excluding veto region)
Definition: MuonIsolation.h:11
reco::isodeposit::IsoDepositExtractor * muIsoExtractorTrack_
float emVetoEt
ecal sum-et in the veto region in r-phi
Definition: MuonIsolation.h:14
reco::isodeposit::IsoDepositExtractor * muIsoExtractorJet_
virtual std::vector< reco::IsoDeposit > deposits(const edm::Event &ev, const edm::EventSetup &evSetup, const reco::Track &track) const
std::pair< double, int > depositAndCountWithin(double coneSize, const Vetos &vetos=Vetos(), double threshold=-1e+36, bool skipDepositVeto=false) const
Get deposit.
Definition: IsoDeposit.cc:44
virtual reco::IsoDeposit deposit(const edm::Event &ev, const edm::EventSetup &evSetup, const reco::Track &track) const =0
T const * get() const
Returns C++ pointer to the item.
Definition: Ref.h:242
float trackerVetoPt
(sum-)pt inside the veto region in r-phi
Definition: MuonIsolation.h:13
virtual TrackRef standAloneMuon() const
reference to a stand-alone muon Track
Definition: Muon.h:52
void MuonIdProducer::fillTrackerKink ( reco::Muon aMuon)
private

Definition at line 1293 of file MuonIdProducer.cc.

References reco::Muon::combinedQuality(), reco::Muon::innerTrack(), edm::Ref< C, T, F >::isNull(), reco::Muon::isQualityValid(), reco::Muon::setCombinedQuality(), and trackerKinkFinder_.

Referenced by produce().

1293  {
1294  // skip muons with no tracks
1295  if (aMuon.innerTrack().isNull()) return;
1296  // get quality from muon if already there, otherwise make empty one
1297  reco::MuonQuality quality = (aMuon.isQualityValid() ? aMuon.combinedQuality() : reco::MuonQuality());
1298  // fill it
1299  bool filled = trackerKinkFinder_->fillTrkKink(quality, *aMuon.innerTrack());
1300  // if quality was there, or if we filled it, commit to the muon
1301  if (filled || aMuon.isQualityValid()) aMuon.setCombinedQuality(quality);
1302 }
virtual TrackRef innerTrack() const
Definition: Muon.h:48
std::auto_ptr< MuonKinkFinder > trackerKinkFinder_
bool isNull() const
Checks for null.
Definition: Ref.h:247
MuonQuality combinedQuality() const
get energy deposition information
Definition: Muon.h:121
bool isQualityValid() const
Definition: Muon.h:119
void setCombinedQuality(const MuonQuality &combinedQuality)
set energy deposition information
Definition: Muon.h:123
void MuonIdProducer::init ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
private

Definition at line 213 of file MuonIdProducer.cc.

References edm::HandleBase::clear(), dytCollectionHandle_, dytCollectionToken_, edm::hlt::Exception, fillGlobalTrackRefits_, fillTrackerKink_, edm::EventSetup::get(), edm::Event::getByToken(), i, innerTrackCollectionHandle_, innerTrackCollectionToken_, inputCollectionLabels_, inputCollectionTypes_, edm::HandleBase::isValid(), linkCollectionHandle_, linkCollectionToken_, LogTrace, muonCollectionHandle_, muonCollectionToken_, outerTrackCollectionHandle_, outerTrackCollectionToken_, pickyCollectionHandle_, pickyCollectionToken_, edm::ESHandle< class >::product(), TrackDetectorAssociator::setPropagator(), tpfmsCollectionHandle_, tpfmsCollectionToken_, trackAssociator_, and trackerKinkFinder_.

Referenced by produce().

214 {
215  // TimerStack timers;
216  // timers.push("MuonIdProducer::produce::init");
217 
222 
226 
227 
228  // timers.push("MuonIdProducer::produce::init::getPropagator");
229  edm::ESHandle<Propagator> propagator;
230  iSetup.get<TrackingComponentsRecord>().get("SteppingHelixPropagatorAny", propagator);
231  trackAssociator_.setPropagator(propagator.product());
232 
233  if (fillTrackerKink_) trackerKinkFinder_->init(iSetup);
234 
235  // timers.pop_and_push("MuonIdProducer::produce::init::getInputCollections");
236  for ( unsigned int i = 0; i < inputCollectionLabels_.size(); ++i ) {
237  if ( inputCollectionTypes_[i] == "inner tracks" ) {
240  throw cms::Exception("FatalError") << "Failed to get input track collection with label: " << inputCollectionLabels_[i];
241  LogTrace("MuonIdentification") << "Number of input inner tracks: " << innerTrackCollectionHandle_->size();
242  continue;
243  }
244  if ( inputCollectionTypes_[i] == "outer tracks" ) {
247  throw cms::Exception("FatalError") << "Failed to get input track collection with label: " << inputCollectionLabels_[i];
248  LogTrace("MuonIdentification") << "Number of input outer tracks: " << outerTrackCollectionHandle_->size();
249  continue;
250  }
251  if ( inputCollectionTypes_[i] == "links" ) {
254  throw cms::Exception("FatalError") << "Failed to get input link collection with label: " << inputCollectionLabels_[i];
255  LogTrace("MuonIdentification") << "Number of input links: " << linkCollectionHandle_->size();
256  continue;
257  }
258  if ( inputCollectionTypes_[i] == "muons" ) {
261  throw cms::Exception("FatalError") << "Failed to get input muon collection with label: " << inputCollectionLabels_[i];
262  LogTrace("MuonIdentification") << "Number of input muons: " << muonCollectionHandle_->size();
263  continue;
264  }
265  if ( fillGlobalTrackRefits_ && inputCollectionTypes_[i] == "tev firstHit" ) {
268  throw cms::Exception("FatalError") << "Failed to get input muon collection with label: " << inputCollectionLabels_[i];
269  LogTrace("MuonIdentification") << "Number of input muons: " << tpfmsCollectionHandle_->size();
270  continue;
271  }
272 
273  if ( fillGlobalTrackRefits_ && inputCollectionTypes_[i] == "tev picky" ) {
276  throw cms::Exception("FatalError") << "Failed to get input muon collection with label: " << inputCollectionLabels_[i];
277  LogTrace("MuonIdentification") << "Number of input muons: " << pickyCollectionHandle_->size();
278  continue;
279  }
280 
281  if ( fillGlobalTrackRefits_ && inputCollectionTypes_[i] == "tev dyt" ) {
283  if (! dytCollectionHandle_.isValid())
284  throw cms::Exception("FatalError") << "Failed to get input muon collection with label: " << inputCollectionLabels_[i];
285  LogTrace("MuonIdentification") << "Number of input muons: " << dytCollectionHandle_->size();
286  continue;
287  }
288  throw cms::Exception("FatalError") << "Unknown input collection type: " << inputCollectionTypes_[i];
289  }
290 }
int i
Definition: DBlmapReader.cc:9
edm::EDGetTokenT< reco::TrackCollection > innerTrackCollectionToken_
TrackDetectorAssociator trackAssociator_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:434
edm::Handle< reco::MuonTrackLinksCollection > linkCollectionHandle_
std::vector< std::string > inputCollectionTypes_
edm::EDGetTokenT< reco::TrackToTrackMap > pickyCollectionToken_
std::auto_ptr< MuonKinkFinder > trackerKinkFinder_
edm::EDGetTokenT< reco::TrackToTrackMap > tpfmsCollectionToken_
void setPropagator(const Propagator *)
use a user configured propagator
edm::EDGetTokenT< reco::MuonCollection > muonCollectionToken_
edm::EDGetTokenT< reco::TrackCollection > outerTrackCollectionToken_
edm::Handle< reco::TrackToTrackMap > dytCollectionHandle_
bool isValid() const
Definition: HandleBase.h:76
edm::Handle< reco::TrackCollection > outerTrackCollectionHandle_
edm::EDGetTokenT< reco::MuonTrackLinksCollection > linkCollectionToken_
#define LogTrace(id)
bool fillGlobalTrackRefits_
const T & get() const
Definition: EventSetup.h:55
T const * product() const
Definition: ESHandle.h:62
std::vector< edm::InputTag > inputCollectionLabels_
edm::Handle< reco::TrackToTrackMap > tpfmsCollectionHandle_
edm::Handle< reco::TrackCollection > innerTrackCollectionHandle_
edm::Handle< reco::MuonCollection > muonCollectionHandle_
edm::Handle< reco::TrackToTrackMap > pickyCollectionHandle_
edm::EDGetTokenT< reco::TrackToTrackMap > dytCollectionToken_
bool MuonIdProducer::isGoodRPCMuon ( const reco::Muon muon)
private

Definition at line 813 of file MuonIdProducer.cc.

References addExtraSoftMuons_, reco::LeafCandidate::eta(), minNumberOfMatches_, minP_, minPt_, reco::Muon::numberOfMatchedRPCLayers(), reco::LeafCandidate::pt(), reco::Muon::RPCHitAndTrackArbitration, and reco::Muon::track().

Referenced by produce().

814 {
815  if(muon.track()->pt() < minPt_ || muon.track()->p() < minP_) return false;
816  if ( addExtraSoftMuons_ &&
817  muon.pt()<5 && fabs(muon.eta())<1.5 &&
820 }
virtual float pt() const
transverse momentum
int numberOfMatchedRPCLayers(ArbitrationType type=RPCHitAndTrackArbitration) const
Definition: Muon.cc:203
virtual TrackRef track() const
reference to a Track
Definition: Muon.h:49
virtual float eta() const
momentum pseudorapidity
bool MuonIdProducer::isGoodTrack ( const reco::Track track)
private

Definition at line 376 of file MuonIdProducer.cc.

References reco::TrackBase::eta(), LogTrace, maxAbsEta_, minP_, minPCaloMuon_, minPt_, reco::TrackBase::p(), and reco::TrackBase::pt().

Referenced by produce().

377 {
378  // Pt and absolute momentum requirement
379  if (track.pt() < minPt_ || (track.p() < minP_ && track.p() < minPCaloMuon_)){
380  LogTrace("MuonIdentification") << "Skipped low momentum track (Pt,P): " << track.pt() <<
381  ", " << track.p() << " GeV";
382  return false;
383  }
384 
385  // Eta requirement
386  if ( fabs(track.eta()) > maxAbsEta_ ){
387  LogTrace("MuonIdentification") << "Skipped track with large pseudo rapidity (Eta: " << track.eta() << " )";
388  return false;
389  }
390  return true;
391 }
double p() const
momentum vector magnitude
Definition: TrackBase.h:127
double eta() const
pseudorapidity of momentum vector
Definition: TrackBase.h:139
double pt() const
track transverse momentum
Definition: TrackBase.h:129
#define LogTrace(id)
bool MuonIdProducer::isGoodTrackerMuon ( const reco::Muon muon)
private

Definition at line 804 of file MuonIdProducer.cc.

References addExtraSoftMuons_, reco::LeafCandidate::eta(), minNumberOfMatches_, minP_, minPt_, reco::Muon::NoArbitration, reco::Muon::numberOfMatches(), reco::LeafCandidate::pt(), and reco::Muon::track().

Referenced by produce().

805 {
806  if(muon.track()->pt() < minPt_ || muon.track()->p() < minP_) return false;
807  if ( addExtraSoftMuons_ &&
808  muon.pt()<5 && fabs(muon.eta())<1.5 &&
809  muon.numberOfMatches( reco::Muon::NoArbitration ) >= 1 ) return true;
811 }
virtual float pt() const
transverse momentum
virtual TrackRef track() const
reference to a Track
Definition: Muon.h:49
virtual float eta() const
momentum pseudorapidity
int numberOfMatches(ArbitrationType type=SegmentAndTrackArbitration) const
get number of chambers with matched segments
Definition: Muon.cc:60
reco::CaloMuon MuonIdProducer::makeCaloMuon ( const reco::Muon muon)
private

Definition at line 306 of file MuonIdProducer.cc.

References reco::Muon::calEnergy(), MuonCaloCompatibility::evaluate(), fillCaloCompatibility_, reco::Muon::innerTrack(), reco::Muon::isEnergyValid(), muonCaloCompatibility_, reco::CaloMuon::setCalEnergy(), reco::CaloMuon::setCaloCompatibility(), and reco::CaloMuon::setInnerTrack().

Referenced by produce().

307 {
308  reco::CaloMuon aMuon;
309  aMuon.setInnerTrack( muon.innerTrack() );
310 
311  if (muon.isEnergyValid()) aMuon.setCalEnergy( muon.calEnergy() );
312  // get calo compatibility
314  return aMuon;
315 }
virtual TrackRef innerTrack() const
Definition: Muon.h:48
bool fillCaloCompatibility_
double evaluate(const reco::Muon &)
MuonCaloCompatibility muonCaloCompatibility_
bool isEnergyValid() const
Definition: Muon.h:109
MuonEnergy calEnergy() const
get energy deposition information
Definition: Muon.h:111
void setCaloCompatibility(float input)
Definition: CaloMuon.h:43
virtual void setInnerTrack(const TrackRef &t)
set reference to Track
Definition: CaloMuon.h:30
void setCalEnergy(const MuonEnergy &calEnergy)
set energy deposition information
Definition: CaloMuon.h:37
reco::Muon MuonIdProducer::makeMuon ( edm::Event iEvent,
const edm::EventSetup iSetup,
const reco::TrackRef track,
MuonIdProducer::TrackType  type 
)
private

Definition at line 292 of file MuonIdProducer.cc.

References edm::Ref< C, T, F >::get(), LogTrace, and reco::Muon::setMuonTrack().

Referenced by makeMuon(), and produce().

294 {
295  LogTrace("MuonIdentification") << "Creating a muon from a track " << track.get()->pt() <<
296  " Pt (GeV), eta: " << track.get()->eta();
297  reco::Muon aMuon( makeMuon( *(track.get()) ) );
298 
299  aMuon.setMuonTrack(type,track);
300  aMuon.setBestTrack(type);
301  aMuon.setTunePBestTrack(type);
302 
303  return aMuon;
304 }
type
Definition: HCALResponse.h:21
reco::Muon makeMuon(edm::Event &iEvent, const edm::EventSetup &iSetup, const reco::TrackRef &track, TrackType type)
void setMuonTrack(const MuonTrackType &, const TrackRef &)
Definition: Muon.cc:869
#define LogTrace(id)
T const * get() const
Returns C++ pointer to the item.
Definition: Ref.h:242
reco::Muon MuonIdProducer::makeMuon ( const reco::MuonTrackLinks links)
private

Definition at line 318 of file MuonIdProducer.cc.

References edm::AssociationMap< edm::OneToOne< reco::TrackCollection, reco::TrackCollection > >::const_iterator, reco::Muon::DYT, dytCollectionHandle_, edm::HandleBase::failedToGet(), fillGlobalTrackRefits_, muon::getTevRefitTrack(), reco::MuonTrackLinks::globalTrack(), edm::Ref< C, T, F >::isNull(), edm::HandleBase::isValid(), LogTrace, makeMuon(), reco::Muon::Picky, pickyCollectionHandle_, ptThresholdToFillCandidateP4WithGlobalFit_, reco::Muon::setBestTrack(), reco::Muon::setGlobalTrack(), reco::Muon::setInnerTrack(), reco::Muon::setMuonTrack(), reco::Muon::setOuterTrack(), reco::Muon::setTunePBestTrack(), muon::sigmaSwitch(), sigmaThresholdToFillCandidateP4WithGlobalFit_, reco::MuonTrackLinks::standAloneTrack(), muon::tevOptimized(), reco::Muon::TPFMS, tpfmsCollectionHandle_, and reco::MuonTrackLinks::trackerTrack().

319 {
320  LogTrace("MuonIdentification") << "Creating a muon from a link to tracks object";
321 
322  reco::Muon aMuon;
323  reco::Muon::MuonTrackTypePair chosenTrack;
324  reco::TrackRef tpfmsRef;
325  reco::TrackRef pickyRef;
326  bool useSigmaSwitch = false;
327 
330 
333 
334  if (tpfmsRef.isNull() && pickyRef.isNull()){
335  edm::LogWarning("MakeMuonWithTEV")<<"Failed to get TEV refits, fall back to sigma switch.";
336  useSigmaSwitch = true;
337  }
338  } else {
339  useSigmaSwitch = true;
340  }
341 
342  if (useSigmaSwitch){
343  chosenTrack = muon::sigmaSwitch( links.globalTrack(), links.trackerTrack(),
346  } else {
347  chosenTrack = muon::tevOptimized( links.globalTrack(), links.trackerTrack(),
348  tpfmsRef, pickyRef,
350  }
351  aMuon = makeMuon(*chosenTrack.first);
352  aMuon.setInnerTrack( links.trackerTrack() );
353  aMuon.setOuterTrack( links.standAloneTrack() );
354  aMuon.setGlobalTrack( links.globalTrack() );
355  aMuon.setBestTrack(chosenTrack.second);
356  aMuon.setTunePBestTrack(chosenTrack.second);
357 
361  if (it != tpfmsCollectionHandle_->end()) aMuon.setMuonTrack(reco::Muon::TPFMS, (it->val));
362  }
365  if (it != pickyCollectionHandle_->end()) aMuon.setMuonTrack(reco::Muon::Picky, (it->val));
366  }
369  if (it != dytCollectionHandle_->end()) aMuon.setMuonTrack(reco::Muon::DYT, (it->val));
370  }
371  }
372  return aMuon;
373 }
reco::Muon makeMuon(edm::Event &iEvent, const edm::EventSetup &iSetup, const reco::TrackRef &track, TrackType type)
virtual void setOuterTrack(const TrackRef &t)
set reference to Track
Definition: Muon.cc:845
virtual void setInnerTrack(const TrackRef &t)
set reference to Track
Definition: Muon.cc:846
virtual void setTunePBestTrack(MuonTrackType muonType)
Definition: Muon.h:93
reco::Muon::MuonTrackTypePair tevOptimized(const reco::TrackRef &combinedTrack, const reco::TrackRef &trackerTrack, const reco::TrackRef &tpfmsTrack, const reco::TrackRef &pickyTrack, const double ptThreshold=200., const double tune1=17., const double tune2=40., const double dptcut=0.25)
Definition: MuonCocktails.cc:9
bool isNull() const
Checks for null.
Definition: Ref.h:247
double ptThresholdToFillCandidateP4WithGlobalFit_
reco::Muon::MuonTrackTypePair sigmaSwitch(const reco::TrackRef &combinedTrack, const reco::TrackRef &trackerTrack, const double nSigma=2., const double ptThreshold=200.)
edm::Handle< reco::TrackToTrackMap > dytCollectionHandle_
bool isValid() const
Definition: HandleBase.h:76
void setMuonTrack(const MuonTrackType &, const TrackRef &)
Definition: Muon.cc:869
#define LogTrace(id)
bool fillGlobalTrackRefits_
bool failedToGet() const
Definition: HandleBase.h:80
reco::TrackRef getTevRefitTrack(const reco::TrackRef &combinedTrack, const reco::TrackToTrackMap &map)
virtual void setBestTrack(MuonTrackType muonType)
Definition: Muon.h:91
edm::Handle< reco::TrackToTrackMap > tpfmsCollectionHandle_
double sigmaThresholdToFillCandidateP4WithGlobalFit_
std::pair< TrackRef, Muon::MuonTrackType > MuonTrackTypePair
Definition: Muon.h:40
virtual void setGlobalTrack(const TrackRef &t)
set reference to Track
Definition: Muon.cc:849
edm::Handle< reco::TrackToTrackMap > pickyCollectionHandle_
reco::Muon MuonIdProducer::makeMuon ( const reco::Track track)
private

Definition at line 1237 of file MuonIdProducer.cc.

References reco::TrackBase::charge(), relval_parameters_module::energy, reco::TrackBase::p(), p4, reco::TrackBase::px(), reco::TrackBase::py(), reco::TrackBase::pz(), mathSSE::sqrt(), and reco::TrackBase::vertex().

1238 {
1239  //FIXME: E = sqrt(p^2 + m^2), where m == 0.105658369(9)GeV
1240  double energy = sqrt(track.p() * track.p() + 0.011163691);
1241  math::XYZTLorentzVector p4(track.px(),
1242  track.py(),
1243  track.pz(),
1244  energy);
1245  return reco::Muon( track.charge(), p4, track.vertex() );
1246 }
double p() const
momentum vector magnitude
Definition: TrackBase.h:127
double px() const
x coordinate of momentum vector
Definition: TrackBase.h:131
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
T sqrt(T t)
Definition: SSEVec.h:48
double p4[4]
Definition: TauolaWrapper.h:92
double pz() const
z coordinate of momentum vector
Definition: TrackBase.h:135
const Point & vertex() const
reference point on the track. This method is DEPRECATED, please use referencePoint() instead ...
Definition: TrackBase.h:154
int charge() const
track electric charge
Definition: TrackBase.h:111
double py() const
y coordinate of momentum vector
Definition: TrackBase.h:133
int MuonIdProducer::overlap ( const reco::Muon muon,
const reco::Track track 
)
private

Definition at line 420 of file MuonIdProducer.cc.

References chamberId(), reco::Track::extra(), reco::Muon::isMatchesValid(), edm::Ref< C, T, F >::isNull(), match(), and reco::Muon::matches().

Referenced by produce().

421 {
422  int numberOfCommonDetIds = 0;
423  if ( ! muon.isMatchesValid() ||
424  track.extra().isNull() ||
425  track.extra()->recHits().isNull() ) return numberOfCommonDetIds;
426  const std::vector<reco::MuonChamberMatch>& matches( muon.matches() );
427  for ( std::vector<reco::MuonChamberMatch>::const_iterator match = matches.begin();
428  match != matches.end(); ++match )
429  {
430  if ( match->segmentMatches.empty() ) continue;
431  bool foundCommonDetId = false;
432 
433  for ( TrackingRecHitRefVector::const_iterator hit = track.extra()->recHitsBegin();
434  hit != track.extra()->recHitsEnd(); ++hit )
435  {
436  // LogTrace("MuonIdentification") << "hit DetId: " << std::hex << hit->get()->geographicalId().rawId() <<
437  // "\t hit chamber DetId: " << getChamberId(hit->get()->geographicalId()) <<
438  // "\t segment DetId: " << match->id.rawId() << std::dec;
439 
440  if ( chamberId(hit->get()->geographicalId()) == match->id.rawId() ) {
441  foundCommonDetId = true;
442  break;
443  }
444  }
445  if ( foundCommonDetId ) {
446  numberOfCommonDetIds++;
447  break;
448  }
449  }
450  return numberOfCommonDetIds;
451 }
const TrackExtraRef & extra() const
reference to &quot;extra&quot; object
Definition: Track.h:97
bool isMatchesValid() const
Definition: Muon.h:138
bool isNull() const
Checks for null.
Definition: Ref.h:247
std::vector< MuonChamberMatch > & matches()
get muon matching information
Definition: Muon.h:140
unsigned int chamberId(const DetId &)
std::pair< typename Association::data_type::first_type, double > match(Reference key, Association association, bool bestMatchByMaxValue)
Generic matching function.
Definition: Utils.h:6
double MuonIdProducer::phiOfMuonIneteractionRegion ( const reco::Muon muon) const
private

Definition at line 1266 of file MuonIdProducer.cc.

References reco::Muon::innerTrack(), edm::Ref< C, T, F >::isAvailable(), reco::Muon::isStandAloneMuon(), reco::Muon::matches(), reco::LeafCandidate::phi(), sectorPhi(), and reco::Muon::standAloneMuon().

Referenced by produce().

1267 {
1268  if ( muon.isStandAloneMuon() ) return muon.standAloneMuon()->innerPosition().phi();
1269  // the rest is tracker muon only
1270  if ( muon.matches().empty() ){
1271  if ( muon.innerTrack().isAvailable() &&
1272  muon.innerTrack()->extra().isAvailable() )
1273  return muon.innerTrack()->outerPosition().phi();
1274  else
1275  return muon.phi(); // makes little sense, but what else can I use
1276  }
1277  return sectorPhi(muon.matches().at(0).id);
1278 }
virtual TrackRef innerTrack() const
Definition: Muon.h:48
virtual float phi() const
momentum azimuthal angle
bool isAvailable() const
Definition: Ref.h:276
bool isStandAloneMuon() const
Definition: Muon.h:220
static double sectorPhi(const DetId &id)
std::vector< MuonChamberMatch > & matches()
get muon matching information
Definition: Muon.h:140
virtual TrackRef standAloneMuon() const
reference to a stand-alone muon Track
Definition: Muon.h:52
void MuonIdProducer::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
overridevirtual

Implements edm::stream::EDProducerBase.

Definition at line 478 of file MuonIdProducer.cc.

References TrackDetectorAssociator::Any, reco::Muon::calEnergy(), reco::CaloMuon::caloCompatibility(), caloCut_, checkLinks(), funct::cos(), TrackDetectorAssociator::crossedIP(), debugWithTruthMatching_, ecalDepositName_, MuonCaloCompatibility::evaluate(), reco::Track::extra(), edm::helper::Filler< Map >::fill(), fillArbitrationInfo(), fillCaloCompatibility_, fillEnergy_, fillGlbQuality(), fillGlobalTrackQuality_, fillIsolation_, fillMatching_, fillMuonId(), fillMuonIsolation(), MuonTimingFiller::fillTiming(), fillTrackerKink(), fillTrackerKink_, edm::Ref< C, T, F >::get(), reco::Muon::GlobalMuon, reco::MuonTrackLinks::globalTrack(), hcalDepositName_, hoDepositName_, i, init(), reco::Muon::InnerTrack, reco::Muon::innerTrack(), innerTrackCollectionHandle_, edm::helper::Filler< Map >::insert(), TrackDetectorAssociator::InsideOut, edm::Ref< C, T, F >::isAvailable(), reco::CaloMuon::isCaloCompatibilityValid(), reco::Muon::isEnergyValid(), isGoodRPCMuon(), isGoodTrack(), isGoodTrackerMuon(), reco::Muon::isTimeValid(), edm::HandleBase::isValid(), j, jetDepositName_, linkCollectionHandle_, electronStore::links, LogDebug, LogTrace, makeCaloMuon(), makeMuon(), reco::Muon::matches(), minPCaloMuon_, metsig::muon, muonCaloCompatibility_, muonCollectionHandle_, reco::MuonTime::nDof, reco::MuonTimeExtra::nDof(), reco::Muon::OuterTrack, outerTrackCollectionHandle_, TrackDetectorAssociator::OutsideIn, overlap(), reco::CaloMuon::p(), phiOfMuonIneteractionRegion(), edm::Event::put(), reco::Muon::RPCMuon, reco::Muon::setType(), reco::Muon::StandAloneMuon, reco::MuonTrackLinks::standAloneTrack(), theTimingFiller_, reco::Muon::time(), reco::MuonTime::timeAtIpInOut, reco::MuonTimeExtra::timeAtIpInOut(), reco::MuonTime::timeAtIpInOutErr, reco::MuonTimeExtra::timeAtIpInOutErr(), reco::MuonTime::timeAtIpOutIn, reco::MuonTimeExtra::timeAtIpOutIn(), reco::MuonTime::timeAtIpOutInErr, reco::MuonTimeExtra::timeAtIpOutInErr(), trackDepositName_, susybsm::HSCParticleType::trackerMuon, reco::Muon::TrackerMuon, reco::MuonTrackLinks::trackerTrack(), MuonIdTruthInfo::truthMatchMuon(), validateGlobalMuonPair(), and writeIsoDeposits_.

479 {
480  // TimerStack timers;
481  // timers.push("MuonIdProducer::produce");
482 
483  std::auto_ptr<reco::MuonCollection> outputMuons(new reco::MuonCollection);
484  std::auto_ptr<reco::CaloMuonCollection> caloMuons( new reco::CaloMuonCollection );
485 
486  init(iEvent, iSetup);
487 
488  std::auto_ptr<reco::MuonTimeExtraMap> muonTimeMap(new reco::MuonTimeExtraMap());
489  reco::MuonTimeExtraMap::Filler filler(*muonTimeMap);
490  std::auto_ptr<reco::MuonTimeExtraMap> muonTimeMapDT(new reco::MuonTimeExtraMap());
491  reco::MuonTimeExtraMap::Filler fillerDT(*muonTimeMapDT);
492  std::auto_ptr<reco::MuonTimeExtraMap> muonTimeMapCSC(new reco::MuonTimeExtraMap());
493  reco::MuonTimeExtraMap::Filler fillerCSC(*muonTimeMapCSC);
494 
495  std::auto_ptr<reco::IsoDepositMap> trackDepMap(new reco::IsoDepositMap());
496  reco::IsoDepositMap::Filler trackDepFiller(*trackDepMap);
497  std::auto_ptr<reco::IsoDepositMap> ecalDepMap(new reco::IsoDepositMap());
498  reco::IsoDepositMap::Filler ecalDepFiller(*ecalDepMap);
499  std::auto_ptr<reco::IsoDepositMap> hcalDepMap(new reco::IsoDepositMap());
500  reco::IsoDepositMap::Filler hcalDepFiller(*hcalDepMap);
501  std::auto_ptr<reco::IsoDepositMap> hoDepMap(new reco::IsoDepositMap());
502  reco::IsoDepositMap::Filler hoDepFiller(*hoDepMap);
503  std::auto_ptr<reco::IsoDepositMap> jetDepMap(new reco::IsoDepositMap());
504  reco::IsoDepositMap::Filler jetDepFiller(*jetDepMap);
505 
506  // loop over input collections
507 
508  // muons first - no cleaning, take as is.
510  for ( reco::MuonCollection::const_iterator muon = muonCollectionHandle_->begin();
511  muon != muonCollectionHandle_->end(); ++muon )
512  outputMuons->push_back(*muon);
513 
514  // links second ( assume global muon type )
516  std::vector<bool> goodmuons(linkCollectionHandle_->size(),true);
517  if ( goodmuons.size()>1 ){
518  // check for shared tracker tracks
519  for ( unsigned int i=0; i<linkCollectionHandle_->size()-1; ++i ){
520  if (!checkLinks(&linkCollectionHandle_->at(i))) continue;
521  for ( unsigned int j=i+1; j<linkCollectionHandle_->size(); ++j ){
522  if (!checkLinks(&linkCollectionHandle_->at(j))) continue;
523  if ( linkCollectionHandle_->at(i).trackerTrack().isNonnull() &&
524  linkCollectionHandle_->at(i).trackerTrack() ==
525  linkCollectionHandle_->at(j).trackerTrack() )
526  {
527  // Tracker track is the essential part that dominates muon resolution
528  // so taking either muon is fine. All that is important is to preserve
529  // the muon identification information. If number of hits is small,
530  // keep the one with large number of hits, otherwise take the smalest chi2/ndof
532  goodmuons[j] = false;
533  else
534  goodmuons[i] = false;
535  }
536  }
537  }
538  // check for shared stand-alone muons.
539  for ( unsigned int i=0; i<linkCollectionHandle_->size()-1; ++i ){
540  if ( !goodmuons[i] ) continue;
541  if (!checkLinks(&linkCollectionHandle_->at(i))) continue;
542  for ( unsigned int j=i+1; j<linkCollectionHandle_->size(); ++j ){
543  if ( !goodmuons[j] ) continue;
544  if (!checkLinks(&linkCollectionHandle_->at(j))) continue;
545  if ( linkCollectionHandle_->at(i).standAloneTrack().isNonnull() &&
546  linkCollectionHandle_->at(i).standAloneTrack() ==
547  linkCollectionHandle_->at(j).standAloneTrack() )
548  {
550  goodmuons[j] = false;
551  else
552  goodmuons[i] = false;
553  }
554  }
555  }
556  }
557  for ( unsigned int i=0; i<linkCollectionHandle_->size(); ++i ){
558  if ( !goodmuons[i] ) continue;
560  if ( ! checkLinks(links)) continue;
561  // check if this muon is already in the list
562  bool newMuon = true;
563  for ( reco::MuonCollection::const_iterator muon = outputMuons->begin();
564  muon != outputMuons->end(); ++muon )
565  if ( muon->track() == links->trackerTrack() &&
566  muon->standAloneMuon() == links->standAloneTrack() &&
567  muon->combinedMuon() == links->globalTrack() )
568  newMuon = false;
569  if ( newMuon ) {
570  outputMuons->push_back( makeMuon( *links ) );
571  outputMuons->back().setType(reco::Muon::GlobalMuon | reco::Muon::StandAloneMuon);
572  }
573  }
574  }
575 
576  // tracker and calo muons are next
578  LogTrace("MuonIdentification") << "Creating tracker muons";
579  for ( unsigned int i = 0; i < innerTrackCollectionHandle_->size(); ++i )
580  {
581  const reco::Track& track = innerTrackCollectionHandle_->at(i);
582  if ( ! isGoodTrack( track ) ) continue;
583  bool splitTrack = false;
584  if ( track.extra().isAvailable() &&
585  TrackDetectorAssociator::crossedIP( track ) ) splitTrack = true;
586  std::vector<TrackDetectorAssociator::Direction> directions;
587  if ( splitTrack ) {
588  directions.push_back(TrackDetectorAssociator::InsideOut);
589  directions.push_back(TrackDetectorAssociator::OutsideIn);
590  } else {
591  directions.push_back(TrackDetectorAssociator::Any);
592  }
593  for ( std::vector<TrackDetectorAssociator::Direction>::const_iterator direction = directions.begin();
594  direction != directions.end(); ++direction )
595  {
596  // make muon
597  // timers.push("MuonIdProducer::produce::fillMuonId");
600  fillMuonId(iEvent, iSetup, trackerMuon, *direction);
601  // timers.pop();
602 
603  if ( debugWithTruthMatching_ ) {
604  // add MC hits to a list of matched segments.
605  // Since it's debugging mode - code is slow
607  }
608 
609  // check if this muon is already in the list
610  // have to check where muon hits are really located
611  // to match properly
612  bool newMuon = true;
613  bool goodTrackerMuon = isGoodTrackerMuon( trackerMuon );
614  bool goodRPCMuon = isGoodRPCMuon( trackerMuon );
615  for ( reco::MuonCollection::iterator muon = outputMuons->begin();
616  muon != outputMuons->end(); ++muon )
617  {
618  if ( muon->innerTrack().get() == trackerMuon.innerTrack().get() &&
621  {
622  newMuon = false;
623  muon->setMatches( trackerMuon.matches() );
624  if (trackerMuon.isTimeValid()) muon->setTime( trackerMuon.time() );
625  if (trackerMuon.isEnergyValid()) muon->setCalEnergy( trackerMuon.calEnergy() );
626  if (goodTrackerMuon) muon->setType( muon->type() | reco::Muon::TrackerMuon );
627  if (goodRPCMuon) muon->setType( muon->type() | reco::Muon::RPCMuon );
628  LogTrace("MuonIdentification") << "Found a corresponding global muon. Set energy, matches and move on";
629  break;
630  }
631  }
632  if ( newMuon ) {
633  if ( goodTrackerMuon ){
634  outputMuons->push_back( trackerMuon );
635  } else {
636  LogTrace("MuonIdentification") << "track failed minimal number of muon matches requirement";
637  const reco::CaloMuon& caloMuon = makeCaloMuon(trackerMuon);
638  if ( ! caloMuon.isCaloCompatibilityValid() || caloMuon.caloCompatibility() < caloCut_ || caloMuon.p() < minPCaloMuon_) continue;
639  caloMuons->push_back( caloMuon );
640  }
641  }
642  }
643  }
644  }
645 
646  // and at last the stand alone muons
648  LogTrace("MuonIdentification") << "Looking for new muons among stand alone muon tracks";
649  for ( unsigned int i = 0; i < outerTrackCollectionHandle_->size(); ++i )
650  {
651  // check if this muon is already in the list of global muons
652  bool newMuon = true;
653  for ( reco::MuonCollection::iterator muon = outputMuons->begin();
654  muon != outputMuons->end(); ++muon )
655  {
656  if ( ! muon->standAloneMuon().isNull() ) {
657  // global muon
658  if ( muon->standAloneMuon().get() == &(outerTrackCollectionHandle_->at(i)) ) {
659  newMuon = false;
660  break;
661  }
662  } else {
663  // tracker muon - no direct links to the standalone muon
664  // since we have only a few real muons in an event, matching
665  // the stand alone muon to the tracker muon by DetIds should
666  // be good enough for association. At the end it's up to a
667  // user to redefine the association and what it means. Here
668  // we would like to avoid obvious double counting and we
669  // tolerate a potential miss association
670  if ( overlap(*muon,outerTrackCollectionHandle_->at(i))>0 ) {
671  LogTrace("MuonIdentification") << "Found associated tracker muon. Set a reference and move on";
672  newMuon = false;
673  muon->setOuterTrack( reco::TrackRef( outerTrackCollectionHandle_, i ) );
674  muon->setType( muon->type() | reco::Muon::StandAloneMuon );
675  break;
676  }
677  }
678  }
679  if ( newMuon ) {
680  LogTrace("MuonIdentification") << "No associated stand alone track is found. Making a muon";
681  outputMuons->push_back( makeMuon(iEvent, iSetup,
683  outputMuons->back().setType( reco::Muon::StandAloneMuon );
684  }
685  }
686  }
687 
688  LogTrace("MuonIdentification") << "Dress up muons if it's necessary";
689 
690  int nMuons=outputMuons->size();
691 
692  std::vector<reco::MuonTimeExtra> dtTimeColl(nMuons);
693  std::vector<reco::MuonTimeExtra> cscTimeColl(nMuons);
694  std::vector<reco::MuonTimeExtra> combinedTimeColl(nMuons);
695  std::vector<reco::IsoDeposit> trackDepColl(nMuons);
696  std::vector<reco::IsoDeposit> ecalDepColl(nMuons);
697  std::vector<reco::IsoDeposit> hcalDepColl(nMuons);
698  std::vector<reco::IsoDeposit> hoDepColl(nMuons);
699  std::vector<reco::IsoDeposit> jetDepColl(nMuons);
700 
701  // Fill various information
702  unsigned int i=0;
703  for ( reco::MuonCollection::iterator muon = outputMuons->begin(); muon != outputMuons->end(); ++muon )
704  {
705  // Fill muonID
706  // timers.push("MuonIdProducer::produce::fillMuonId");
707  if ( ( fillMatching_ && ! muon->isMatchesValid() ) ||
708  ( fillEnergy_ && !muon->isEnergyValid() ) )
709  {
710  // predict direction based on the muon interaction region location
711  // if it's available
712  if ( muon->isStandAloneMuon() ) {
713  if ( cos(phiOfMuonIneteractionRegion(*muon) - muon->phi()) > 0 )
715  else
717  } else {
718  LogTrace("MuonIdentification") << "THIS SHOULD NEVER HAPPEN";
719  fillMuonId(iEvent, iSetup, *muon);
720  }
721  }
722 
724  // Fill global quality information
725  fillGlbQuality(iEvent, iSetup, *muon);
726  }
727  LogDebug("MuonIdentification");
728 
729  if (fillTrackerKink_) {
731  }
732 
733  // timers.push("MuonIdProducer::produce::fillCaloCompatibility");
734  if ( fillCaloCompatibility_ ) muon->setCaloCompatibility( muonCaloCompatibility_.evaluate(*muon) );
735  // timers.pop();
736 
737  // timers.push("MuonIdProducer::produce::fillIsolation");
738  if ( fillIsolation_ ) fillMuonIsolation(iEvent, iSetup, *muon,
739  trackDepColl[i], ecalDepColl[i], hcalDepColl[i], hoDepColl[i], jetDepColl[i]);
740  // timers.pop();
741 
742  // fill timing information
743  reco::MuonTime muonTime;
744  reco::MuonTimeExtra dtTime;
745  reco::MuonTimeExtra cscTime;
746  reco::MuonTimeExtra combinedTime;
747 
748  theTimingFiller_->fillTiming(*muon, dtTime, cscTime, combinedTime, iEvent, iSetup);
749 
750  muonTime.nDof=combinedTime.nDof();
751  muonTime.timeAtIpInOut=combinedTime.timeAtIpInOut();
752  muonTime.timeAtIpInOutErr=combinedTime.timeAtIpInOutErr();
753  muonTime.timeAtIpOutIn=combinedTime.timeAtIpOutIn();
754  muonTime.timeAtIpOutInErr=combinedTime.timeAtIpOutInErr();
755 
756  muon->setTime( muonTime);
757  dtTimeColl[i] = dtTime;
758  cscTimeColl[i] = cscTime;
759  combinedTimeColl[i] = combinedTime;
760 
761  i++;
762 
763  }
764 
765  LogTrace("MuonIdentification") << "number of muons produced: " << outputMuons->size();
766  // timers.push("MuonIdProducer::produce::fillArbitration");
767  if ( fillMatching_ ) fillArbitrationInfo( outputMuons.get() );
768  // timers.pop();
769  edm::OrphanHandle<reco::MuonCollection> muonHandle = iEvent.put(outputMuons);
770 
771  filler.insert(muonHandle, combinedTimeColl.begin(), combinedTimeColl.end());
772  filler.fill();
773  fillerDT.insert(muonHandle, dtTimeColl.begin(), dtTimeColl.end());
774  fillerDT.fill();
775  fillerCSC.insert(muonHandle, cscTimeColl.begin(), cscTimeColl.end());
776  fillerCSC.fill();
777 
778  iEvent.put(muonTimeMap,"combined");
779  iEvent.put(muonTimeMapDT,"dt");
780  iEvent.put(muonTimeMapCSC,"csc");
781 
783  trackDepFiller.insert(muonHandle, trackDepColl.begin(), trackDepColl.end());
784  trackDepFiller.fill();
785  iEvent.put(trackDepMap, trackDepositName_);
786  ecalDepFiller.insert(muonHandle, ecalDepColl.begin(), ecalDepColl.end());
787  ecalDepFiller.fill();
788  iEvent.put(ecalDepMap, ecalDepositName_);
789  hcalDepFiller.insert(muonHandle, hcalDepColl.begin(), hcalDepColl.end());
790  hcalDepFiller.fill();
791  iEvent.put(hcalDepMap, hcalDepositName_);
792  hoDepFiller.insert(muonHandle, hoDepColl.begin(), hoDepColl.end());
793  hoDepFiller.fill();
794  iEvent.put(hoDepMap, hoDepositName_);
795  jetDepFiller.insert(muonHandle, jetDepColl.begin(), jetDepColl.end());
796  jetDepFiller.fill();
797  iEvent.put(jetDepMap, jetDepositName_);
798  }
799 
800  iEvent.put(caloMuons);
801 }
#define LogDebug(id)
std::string hoDepositName_
std::string jetDepositName_
bool isGoodRPCMuon(const reco::Muon &muon)
int i
Definition: DBlmapReader.cc:9
reco::Muon makeMuon(edm::Event &iEvent, const edm::EventSetup &iSetup, const reco::TrackRef &track, TrackType type)
static const unsigned int GlobalMuon
Definition: Muon.h:207
void fillMuonIsolation(edm::Event &, const edm::EventSetup &, reco::Muon &aMuon, reco::IsoDeposit &trackDep, reco::IsoDeposit &ecalDep, reco::IsoDeposit &hcalDep, reco::IsoDeposit &hoDep, reco::IsoDeposit &jetDep)
static void truthMatchMuon(const edm::Event &iEvent, const edm::EventSetup &iSetup, reco::Muon &aMuon)
static bool crossedIP(const reco::Track &track)
const TrackExtraRef & extra() const
reference to &quot;extra&quot; object
Definition: Track.h:97
void fillMuonId(edm::Event &, const edm::EventSetup &, reco::Muon &, TrackDetectorAssociator::Direction direction=TrackDetectorAssociator::InsideOut)
edm::Handle< reco::MuonTrackLinksCollection > linkCollectionHandle_
int overlap(const reco::Muon &muon, const reco::Track &track)
bool fillCaloCompatibility_
std::string trackDepositName_
double phiOfMuonIneteractionRegion(const reco::Muon &muon) const
std::vector< CaloMuon > CaloMuonCollection
collection of Muon objects
Definition: MuonFwd.h:27
double evaluate(const reco::Muon &)
MuonCaloCompatibility muonCaloCompatibility_
float timeAtIpOutInErr() const
Definition: MuonTimeExtra.h:49
bool isAvailable() const
Definition: Ref.h:276
void fillGlbQuality(edm::Event &, const edm::EventSetup &, reco::Muon &aMuon)
int nDof() const
number of measurements used in timing calculation
Definition: MuonTimeExtra.h:22
float timeAtIpOutInErr
Definition: MuonTime.h:18
std::vector< Muon > MuonCollection
collection of Muon objects
Definition: MuonFwd.h:9
void init(edm::Event &, const edm::EventSetup &)
bool isCaloCompatibilityValid() const
Definition: CaloMuon.h:44
void fillArbitrationInfo(reco::MuonCollection *)
void fillTrackerKink(reco::Muon &aMuon)
double p() const
momentum vector magnitude
Definition: CaloMuon.h:51
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:116
bool isGoodTrackerMuon(const reco::Muon &muon)
bool checkLinks(const reco::MuonTrackLinks *) const
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
float timeAtIpInOutErr
Definition: MuonTime.h:15
std::string ecalDepositName_
float timeAtIpOutIn
b) particle is moving from outside in
Definition: MuonTime.h:17
int nDof
number of muon stations used
Definition: MuonTime.h:10
float timeAtIpInOutErr() const
Definition: MuonTimeExtra.h:44
int j
Definition: DBlmapReader.cc:9
bool isValid() const
Definition: HandleBase.h:76
edm::Handle< reco::TrackCollection > outerTrackCollectionHandle_
#define LogTrace(id)
reco::CaloMuon makeCaloMuon(const reco::Muon &)
static const unsigned int RPCMuon
Definition: Muon.h:212
static const unsigned int TrackerMuon
Definition: Muon.h:208
MuonTimingFiller * theTimingFiller_
float timeAtIpInOut() const
Definition: MuonTimeExtra.h:43
bool fillGlobalTrackQuality_
std::string hcalDepositName_
edm::Handle< reco::TrackCollection > innerTrackCollectionHandle_
bool isGoodTrack(const reco::Track &track)
static const unsigned int StandAloneMuon
Definition: Muon.h:209
float timeAtIpOutIn() const
b) particle is moving from outside in
Definition: MuonTimeExtra.h:48
void fillTiming(const reco::Muon &muon, reco::MuonTimeExtra &dtTime, reco::MuonTimeExtra &cscTime, reco::MuonTimeExtra &combinedTime, edm::Event &iEvent, const edm::EventSetup &iSetup)
float caloCompatibility() const
Definition: CaloMuon.h:42
bool validateGlobalMuonPair(const reco::MuonTrackLinks &goodMuon, const reco::MuonTrackLinks &badMuon)
bool debugWithTruthMatching_
float timeAtIpInOut
Definition: MuonTime.h:14
edm::Handle< reco::MuonCollection > muonCollectionHandle_
double MuonIdProducer::sectorPhi ( const DetId id)
static

Definition at line 1248 of file MuonIdProducer.cc.

References MuonSubdetId::CSC, MuonSubdetId::DT, M_PI, HWWFunctions::muonId(), phi, DTChamberId::sector(), and CSCDetId::triggerSector().

Referenced by phiOfMuonIneteractionRegion().

1249 {
1250  double phi = 0;
1251  if( id.subdetId() == MuonSubdetId::DT ) { // DT
1252  DTChamberId muonId(id.rawId());
1253  if ( muonId.sector() <= 12 )
1254  phi = (muonId.sector()-1)/6.*M_PI;
1255  if ( muonId.sector() == 13 ) phi = 3/6.*M_PI;
1256  if ( muonId.sector() == 14 ) phi = 9/6.*M_PI;
1257  }
1258  if( id.subdetId() == MuonSubdetId::CSC ) { // CSC
1259  CSCDetId muonId(id.rawId());
1260  phi = M_PI/4+(muonId.triggerSector()-1)/3.*M_PI;
1261  }
1262  if ( phi > M_PI ) phi -= 2*M_PI;
1263  return phi;
1264 }
bool muonId(HWW &, unsigned int index, SelectionType type)
static const int CSC
Definition: MuonSubdetId.h:13
#define M_PI
static const int DT
Definition: MuonSubdetId.h:12
Definition: DDAxes.h:10

Member Data Documentation

bool MuonIdProducer::addExtraSoftMuons_
private

Definition at line 132 of file MuonIdProducer.h.

Referenced by isGoodRPCMuon(), isGoodTrackerMuon(), and MuonIdProducer().

bool MuonIdProducer::arbClean_
private

Definition at line 191 of file MuonIdProducer.h.

Referenced by fillArbitrationInfo(), and MuonIdProducer().

double MuonIdProducer::caloCut_
private

Definition at line 189 of file MuonIdProducer.h.

Referenced by MuonIdProducer(), and produce().

bool MuonIdProducer::debugWithTruthMatching_
private

Definition at line 149 of file MuonIdProducer.h.

Referenced by MuonIdProducer(), and produce().

edm::Handle<reco::TrackToTrackMap> MuonIdProducer::dytCollectionHandle_
private

Definition at line 157 of file MuonIdProducer.h.

Referenced by init(), and makeMuon().

edm::EDGetTokenT<reco::TrackToTrackMap> MuonIdProducer::dytCollectionToken_
private

Definition at line 165 of file MuonIdProducer.h.

Referenced by init(), and MuonIdProducer().

std::string MuonIdProducer::ecalDepositName_
private

Definition at line 177 of file MuonIdProducer.h.

Referenced by MuonIdProducer(), and produce().

bool MuonIdProducer::fillCaloCompatibility_
private

Definition at line 141 of file MuonIdProducer.h.

Referenced by makeCaloMuon(), MuonIdProducer(), and produce().

bool MuonIdProducer::fillEnergy_
private

Definition at line 142 of file MuonIdProducer.h.

Referenced by fillMuonId(), MuonIdProducer(), and produce().

bool MuonIdProducer::fillGlobalTrackQuality_
private

Definition at line 182 of file MuonIdProducer.h.

Referenced by MuonIdProducer(), and produce().

bool MuonIdProducer::fillGlobalTrackRefits_
private

Definition at line 183 of file MuonIdProducer.h.

Referenced by init(), makeMuon(), and MuonIdProducer().

bool MuonIdProducer::fillIsolation_
private

Definition at line 144 of file MuonIdProducer.h.

Referenced by MuonIdProducer(), and produce().

bool MuonIdProducer::fillMatching_
private

Definition at line 143 of file MuonIdProducer.h.

Referenced by fillMuonId(), MuonIdProducer(), and produce().

bool MuonIdProducer::fillTrackerKink_
private

Definition at line 186 of file MuonIdProducer.h.

Referenced by init(), MuonIdProducer(), and produce().

edm::EDGetTokenT<edm::ValueMap<reco::MuonQuality> > MuonIdProducer::glbQualToken_
private

Definition at line 168 of file MuonIdProducer.h.

Referenced by fillGlbQuality(), and MuonIdProducer().

edm::InputTag MuonIdProducer::globalTrackQualityInputTag_
private

Definition at line 184 of file MuonIdProducer.h.

Referenced by MuonIdProducer().

std::string MuonIdProducer::hcalDepositName_
private

Definition at line 178 of file MuonIdProducer.h.

Referenced by MuonIdProducer(), and produce().

std::string MuonIdProducer::hoDepositName_
private

Definition at line 179 of file MuonIdProducer.h.

Referenced by MuonIdProducer(), and produce().

edm::Handle<reco::TrackCollection> MuonIdProducer::innerTrackCollectionHandle_
private

Definition at line 151 of file MuonIdProducer.h.

Referenced by init(), and produce().

edm::EDGetTokenT<reco::TrackCollection> MuonIdProducer::innerTrackCollectionToken_
private

Definition at line 159 of file MuonIdProducer.h.

Referenced by init(), and MuonIdProducer().

std::vector<edm::InputTag> MuonIdProducer::inputCollectionLabels_
private

Definition at line 121 of file MuonIdProducer.h.

Referenced by init(), and MuonIdProducer().

std::vector<std::string> MuonIdProducer::inputCollectionTypes_
private

Definition at line 122 of file MuonIdProducer.h.

Referenced by init(), and MuonIdProducer().

std::string MuonIdProducer::jetDepositName_
private

Definition at line 180 of file MuonIdProducer.h.

Referenced by MuonIdProducer(), and produce().

edm::Handle<reco::MuonTrackLinksCollection> MuonIdProducer::linkCollectionHandle_
private

Definition at line 154 of file MuonIdProducer.h.

Referenced by init(), and produce().

edm::EDGetTokenT<reco::MuonTrackLinksCollection> MuonIdProducer::linkCollectionToken_
private

Definition at line 162 of file MuonIdProducer.h.

Referenced by init(), and MuonIdProducer().

double MuonIdProducer::maxAbsDx_
private

Definition at line 135 of file MuonIdProducer.h.

Referenced by fillMuonId(), and MuonIdProducer().

double MuonIdProducer::maxAbsDy_
private

Definition at line 137 of file MuonIdProducer.h.

Referenced by fillMuonId(), and MuonIdProducer().

double MuonIdProducer::maxAbsEta_
private

Definition at line 131 of file MuonIdProducer.h.

Referenced by isGoodTrack(), and MuonIdProducer().

double MuonIdProducer::maxAbsPullX_
private

Definition at line 136 of file MuonIdProducer.h.

Referenced by fillMuonId(), and MuonIdProducer().

double MuonIdProducer::maxAbsPullY_
private

Definition at line 138 of file MuonIdProducer.h.

Referenced by fillMuonId(), and MuonIdProducer().

MuonMesh* MuonIdProducer::meshAlgo_
private

Definition at line 192 of file MuonIdProducer.h.

Referenced by beginRun(), fillArbitrationInfo(), MuonIdProducer(), and ~MuonIdProducer().

int MuonIdProducer::minNumberOfMatches_
private

Definition at line 130 of file MuonIdProducer.h.

Referenced by isGoodRPCMuon(), isGoodTrackerMuon(), and MuonIdProducer().

double MuonIdProducer::minP_
private

Definition at line 128 of file MuonIdProducer.h.

Referenced by isGoodRPCMuon(), isGoodTrack(), isGoodTrackerMuon(), and MuonIdProducer().

double MuonIdProducer::minPCaloMuon_
private

Definition at line 129 of file MuonIdProducer.h.

Referenced by isGoodTrack(), MuonIdProducer(), and produce().

double MuonIdProducer::minPt_
private

Definition at line 127 of file MuonIdProducer.h.

Referenced by isGoodRPCMuon(), isGoodTrack(), isGoodTrackerMuon(), and MuonIdProducer().

reco::isodeposit::IsoDepositExtractor* MuonIdProducer::muIsoExtractorCalo_
private

Definition at line 173 of file MuonIdProducer.h.

Referenced by fillMuonIsolation(), MuonIdProducer(), and ~MuonIdProducer().

reco::isodeposit::IsoDepositExtractor* MuonIdProducer::muIsoExtractorJet_
private

Definition at line 175 of file MuonIdProducer.h.

Referenced by fillMuonIsolation(), MuonIdProducer(), and ~MuonIdProducer().

reco::isodeposit::IsoDepositExtractor* MuonIdProducer::muIsoExtractorTrack_
private

Definition at line 174 of file MuonIdProducer.h.

Referenced by fillMuonIsolation(), MuonIdProducer(), and ~MuonIdProducer().

MuonCaloCompatibility MuonIdProducer::muonCaloCompatibility_
private

Definition at line 172 of file MuonIdProducer.h.

Referenced by makeCaloMuon(), MuonIdProducer(), and produce().

edm::Handle<reco::MuonCollection> MuonIdProducer::muonCollectionHandle_
private

Definition at line 153 of file MuonIdProducer.h.

Referenced by init(), and produce().

edm::EDGetTokenT<reco::MuonCollection> MuonIdProducer::muonCollectionToken_
private

Definition at line 161 of file MuonIdProducer.h.

Referenced by init(), and MuonIdProducer().

edm::Handle<reco::TrackCollection> MuonIdProducer::outerTrackCollectionHandle_
private

Definition at line 152 of file MuonIdProducer.h.

Referenced by init(), and produce().

edm::EDGetTokenT<reco::TrackCollection> MuonIdProducer::outerTrackCollectionToken_
private

Definition at line 160 of file MuonIdProducer.h.

Referenced by init(), and MuonIdProducer().

TrackAssociatorParameters MuonIdProducer::parameters_
private
edm::Handle<reco::TrackToTrackMap> MuonIdProducer::pickyCollectionHandle_
private

Definition at line 156 of file MuonIdProducer.h.

Referenced by init(), and makeMuon().

edm::EDGetTokenT<reco::TrackToTrackMap> MuonIdProducer::pickyCollectionToken_
private

Definition at line 164 of file MuonIdProducer.h.

Referenced by init(), and MuonIdProducer().

double MuonIdProducer::ptThresholdToFillCandidateP4WithGlobalFit_
private

Definition at line 146 of file MuonIdProducer.h.

Referenced by makeMuon(), and MuonIdProducer().

edm::EDGetTokenT<RPCRecHitCollection> MuonIdProducer::rpcHitToken_
private

Definition at line 167 of file MuonIdProducer.h.

Referenced by fillMuonId(), and MuonIdProducer().

double MuonIdProducer::sigmaThresholdToFillCandidateP4WithGlobalFit_
private

Definition at line 147 of file MuonIdProducer.h.

Referenced by makeMuon(), and MuonIdProducer().

MuonTimingFiller* MuonIdProducer::theTimingFiller_
private

Definition at line 124 of file MuonIdProducer.h.

Referenced by MuonIdProducer(), produce(), and ~MuonIdProducer().

edm::Handle<reco::TrackToTrackMap> MuonIdProducer::tpfmsCollectionHandle_
private

Definition at line 155 of file MuonIdProducer.h.

Referenced by init(), and makeMuon().

edm::EDGetTokenT<reco::TrackToTrackMap> MuonIdProducer::tpfmsCollectionToken_
private

Definition at line 163 of file MuonIdProducer.h.

Referenced by init(), and MuonIdProducer().

TrackDetectorAssociator MuonIdProducer::trackAssociator_
private

Definition at line 118 of file MuonIdProducer.h.

Referenced by fillMuonId(), and init().

std::string MuonIdProducer::trackDepositName_
private

Definition at line 176 of file MuonIdProducer.h.

Referenced by MuonIdProducer(), and produce().

std::auto_ptr<MuonKinkFinder> MuonIdProducer::trackerKinkFinder_
private

Definition at line 187 of file MuonIdProducer.h.

Referenced by fillTrackerKink(), init(), and MuonIdProducer().

bool MuonIdProducer::writeIsoDeposits_
private

Definition at line 145 of file MuonIdProducer.h.

Referenced by MuonIdProducer(), and produce().