35 muIsoExtractorCalo_(0),muIsoExtractorTrack_(0),muIsoExtractorJet_(0)
37 produces<reco::MuonCollection>();
38 produces<reco::CaloMuonCollection>();
39 produces<reco::MuonTimeExtraMap>(
"combined");
40 produces<reco::MuonTimeExtraMap>(
"dt");
41 produces<reco::MuonTimeExtraMap>(
"csc");
62 if (fillGlobalTrackQuality_) fillTrackerKink_ = iConfig.
getParameter<
bool>(
"fillTrackerKink");
79 if (fillCaloCompatibility_){
99 if (fillIsolation_ && writeIsoDeposits_){
115 throw cms::Exception(
"ConfigurationError") <<
"Number of input collection labels is different from number of types. " <<
116 "For each collection label there should be exactly one collection type specified.";
118 throw cms::Exception(
"ConfigurationError") <<
"Number of input collections should be from 1 to 7.";
122 <<
"========================================================================\n"
123 <<
"Debugging mode with truth matching is turned on!!! Make sure you understand what you are doing!\n"
124 <<
"========================================================================\n";
125 if (fillGlobalTrackQuality_){
127 glbQualToken_ = consumes<edm::ValueMap<reco::MuonQuality> >(glbQualTag);
130 if (fillTrackerKink_) {
139 rpcHitToken_ = consumes<RPCRecHitCollection>(rpcHitTag);
260 LogTrace(
"MuonIdentification") <<
"Creating a muon from a track " << track.
get()->pt() <<
261 " Pt (GeV), eta: " << track.
get()->eta();
265 aMuon.setBestTrack(type);
266 aMuon.setTunePBestTrack(type);
285 LogTrace(
"MuonIdentification") <<
"Creating a muon from a link to tracks object";
292 bool useSigmaSwitch =
false;
301 if (tpfmsRef.
isNull() && pickyRef.isNull() && dytRef.isNull()){
302 edm::LogWarning(
"MakeMuonWithTEV")<<
"Failed to get TEV refits, fall back to sigma switch.";
303 useSigmaSwitch =
true;
306 useSigmaSwitch =
true;
315 tpfmsRef, pickyRef, dytRef,
318 aMuon =
makeMuon(*chosenTrack.first);
346 const double p = track.
p();
347 const double pt = track.
pt();
349 LogTrace(
"MuonIdentification") <<
"Skipped low momentum track (Pt,P): " << pt
350 <<
", " << track.
p() <<
" GeV";
355 const double eta = track.
eta();
356 const double absEta =
std::abs(eta);
358 LogTrace(
"MuonIdentification") <<
"Skipped track with large pseudo rapidity (Eta: " << track.
eta() <<
" )";
369 const auto subdetId =
id.subdetId();
374 return CSCDetId(
id.rawId()).chamberId().rawId();
385 track.
extra()->recHitsSize()==0 )
return 0;
387 int numberOfCommonDetIds = 0;
388 const std::vector<reco::MuonChamberMatch>&
matches( muon.
matches() );
391 if (
match.segmentMatches.empty() )
continue;
393 bool foundCommonDetId =
false;
394 for (
auto hit = track.
extra()->recHitsBegin();
402 foundCommonDetId =
true;
406 if ( foundCommonDetId ) {
407 ++numberOfCommonDetIds;
411 return numberOfCommonDetIds;
426 const int nHitsGood = goodMuon.
globalTrack()->hitPattern().numberOfValidMuonHits();
427 const int nHitsBad = badMuon.
globalTrack()->hitPattern().numberOfValidMuonHits();
428 if (
std::min(nHitsGood, nHitsBad) > 10 ) {
429 const double chi2Good = goodMuon.
globalTrack()->normalizedChi2();
430 const double chi2Bad = badMuon.
globalTrack()->normalizedChi2();
431 return ( chi2Good <= chi2Bad );
434 return (nHitsGood >= nHitsBad);
443 init(iEvent, iSetup);
468 outputMuons->push_back(
muon);
475 std::vector<bool> goodmuons(nLink,
true);
478 for (
unsigned int i=0;
i<nLink-1; ++
i ) {
480 if ( iLink.trackerTrack().isNull() || !
checkLinks(&iLink) )
continue;
481 for (
unsigned int j=
i+1;
j<nLink; ++
j ){
484 if ( iLink.trackerTrack() == jLink.trackerTrack() ) {
490 else goodmuons[
i] =
false;
495 for (
unsigned int i=0;
i<nLink-1; ++
i ) {
496 if ( !goodmuons[
i] )
continue;
498 if ( iLink.standAloneTrack().isNull() || !
checkLinks(&iLink))
continue;
499 for (
unsigned int j=i+1;
j<nLink; ++
j ) {
500 if ( !goodmuons[
j] )
continue;
503 if ( iLink.standAloneTrack() == jLink.standAloneTrack() ) {
505 else goodmuons[
i] =
false;
510 for (
unsigned int i=0;
i<nLink; ++
i ) {
511 if ( !goodmuons[
i] )
continue;
516 for (
auto muon : *outputMuons ) {
517 if (
muon.track() == iLink.trackerTrack() &&
518 muon.standAloneMuon() == iLink.standAloneTrack() &&
519 muon.combinedMuon() == iLink.globalTrack() ) {
525 outputMuons->push_back(
makeMuon(iLink) );
533 LogTrace(
"MuonIdentification") <<
"Creating tracker muons";
534 std::vector<TrackDetectorAssociator::Direction> directions1, directions2;
544 bool splitTrack =
false;
547 const auto&
directions = splitTrack ? directions1 : directions2;
551 fillMuonId(iEvent, iSetup, trackerMuon, direction);
567 for (
auto&
muon : *outputMuons )
578 LogTrace(
"MuonIdentification") <<
"Found a corresponding global muon. Set energy, matches and move on";
583 if ( goodTrackerMuon || goodRPCMuon ){
584 outputMuons->push_back( trackerMuon );
586 LogTrace(
"MuonIdentification") <<
"track failed minimal number of muon matches requirement";
589 caloMuons->push_back( caloMuon );
598 LogTrace(
"MuonIdentification") <<
"Looking for new muons among stand alone muon tracks";
605 for (
auto&
muon : *outputMuons )
607 if ( !
muon.standAloneMuon().isNull() ) {
609 if (
muon.standAloneMuon().get() == &outerTrack ) {
622 LogTrace(
"MuonIdentification") <<
"Found associated tracker muon. Set a reference and move on";
631 LogTrace(
"MuonIdentification") <<
"No associated stand alone track is found. Making a muon";
632 outputMuons->push_back(
makeMuon(iEvent, iSetup,
639 LogTrace(
"MuonIdentification") <<
"Dress up muons if it's necessary";
641 const int nMuons=outputMuons->size();
643 std::vector<reco::MuonTimeExtra> dtTimeColl(nMuons);
644 std::vector<reco::MuonTimeExtra> cscTimeColl(nMuons);
645 std::vector<reco::MuonTimeExtra> combinedTimeColl(nMuons);
646 std::vector<reco::IsoDeposit> trackDepColl(nMuons);
647 std::vector<reco::IsoDeposit> ecalDepColl(nMuons);
648 std::vector<reco::IsoDeposit> hcalDepColl(nMuons);
649 std::vector<reco::IsoDeposit> hoDepColl(nMuons);
650 std::vector<reco::IsoDeposit> jetDepColl(nMuons);
653 for (
unsigned int i=0;
i<outputMuons->size(); ++
i )
655 auto&
muon = outputMuons->at(
i);
663 if (
muon.isStandAloneMuon() ) {
670 LogTrace(
"MuonIdentification") <<
"THIS SHOULD NEVER HAPPEN";
689 trackDepColl[
i], ecalDepColl[i], hcalDepColl[i], hoDepColl[i], jetDepColl[i]);
706 muon.setTime( muonTime);
707 dtTimeColl[
i] = dtTime;
708 cscTimeColl[
i] = cscTime;
709 combinedTimeColl[
i] = combinedTime;
712 LogTrace(
"MuonIdentification") <<
"number of muons produced: " << outputMuons->size();
716 filler.
insert(muonHandle, combinedTimeColl.begin(), combinedTimeColl.end());
718 fillerDT.
insert(muonHandle, dtTimeColl.begin(), dtTimeColl.end());
720 fillerCSC.
insert(muonHandle, cscTimeColl.begin(), cscTimeColl.end());
723 iEvent.
put(muonTimeMap,
"combined");
724 iEvent.
put(muonTimeMapDT,
"dt");
725 iEvent.
put(muonTimeMapCSC,
"csc");
728 trackDepFiller.
insert(muonHandle, trackDepColl.begin(), trackDepColl.end());
729 trackDepFiller.
fill();
731 ecalDepFiller.
insert(muonHandle, ecalDepColl.begin(), ecalDepColl.end());
732 ecalDepFiller.
fill();
734 hcalDepFiller.
insert(muonHandle, hcalDepColl.begin(), hcalDepColl.end());
735 hcalDepFiller.
fill();
737 hoDepFiller.
insert(muonHandle, hoDepColl.begin(), hoDepColl.end());
740 jetDepFiller.
insert(muonHandle, jetDepColl.begin(), jetDepColl.end());
745 iEvent.
put(caloMuons);
775 else throw cms::Exception(
"FatalError") <<
"Failed to fill muon id information for a muon with undefined references to tracks";
797 if (
hit->
id() != emMaxId)
continue;
803 if (
hit->
id() != hadMaxId)
continue;
812 std::vector<reco::MuonChamberMatch> muonChamberMatches;
813 unsigned int nubmerOfMatchesAccordingToTrackAssociator = 0;
814 for (
const auto& chamber : info.
chambers )
819 const auto& lErr = chamber.tState.localError();
820 const auto& lPos = chamber.tState.localPosition();
821 const auto& lDir = chamber.tState.localDirection();
823 const auto& localError = lErr.positionError();
824 matchedChamber.
x = lPos.x();
825 matchedChamber.
y = lPos.y();
826 matchedChamber.
xErr =
sqrt( localError.xx() );
827 matchedChamber.
yErr =
sqrt( localError.yy() );
829 matchedChamber.
dXdZ = lDir.z()!=0?lDir.x()/lDir.z():9999;
830 matchedChamber.
dYdZ = lDir.z()!=0?lDir.y()/lDir.z():9999;
833 matchedChamber.
dXdZErr = trajectoryCovMatrix(1,1)>0?
sqrt(trajectoryCovMatrix(1,1)):0;
834 matchedChamber.
dYdZErr = trajectoryCovMatrix(2,2)>0?
sqrt(trajectoryCovMatrix(2,2)):0;
836 matchedChamber.
edgeX = chamber.localDistanceX;
837 matchedChamber.
edgeY = chamber.localDistanceY;
839 matchedChamber.
id = chamber.id;
840 if ( ! chamber.segments.empty() ) ++nubmerOfMatchesAccordingToTrackAssociator;
843 for (
const auto& segment : chamber.segments )
846 matchedSegment.
x = segment.segmentLocalPosition.x();
847 matchedSegment.
y = segment.segmentLocalPosition.y();
848 matchedSegment.
dXdZ = segment.segmentLocalDirection.z()?segment.segmentLocalDirection.x()/segment.segmentLocalDirection.z():0;
849 matchedSegment.
dYdZ = segment.segmentLocalDirection.z()?segment.segmentLocalDirection.y()/segment.segmentLocalDirection.z():0;
850 matchedSegment.
xErr = segment.segmentLocalErrorXX>0?
sqrt(segment.segmentLocalErrorXX):0;
851 matchedSegment.
yErr = segment.segmentLocalErrorYY>0?
sqrt(segment.segmentLocalErrorYY):0;
852 matchedSegment.
dXdZErr = segment.segmentLocalErrorDxDz>0?
sqrt(segment.segmentLocalErrorDxDz):0;
853 matchedSegment.
dYdZErr = segment.segmentLocalErrorDyDz>0?
sqrt(segment.segmentLocalErrorDyDz):0;
854 matchedSegment.
t0 = segment.t0;
855 matchedSegment.
mask = 0;
858 matchedSegment.
hasZed_ = segment.hasZed;
859 matchedSegment.
hasPhi_ = segment.hasPhi;
861 bool matchedX =
false;
862 bool matchedY =
false;
863 LogTrace(
"MuonIdentification") <<
" matching local x, segment x: " << matchedSegment.
x <<
864 ", chamber x: " << matchedChamber.
x <<
", max: " <<
maxAbsDx_;
865 LogTrace(
"MuonIdentification") <<
" matching local y, segment y: " << matchedSegment.
y <<
866 ", chamber y: " << matchedChamber.
y <<
", max: " <<
maxAbsDy_;
867 const double matchedSegChDx =
std::abs(matchedSegment.
x - matchedChamber.
x);
868 const double matchedSegChDy =
std::abs(matchedSegment.
y - matchedChamber.
y);
869 const double matchedSegChPullX = matchedSegChDx/std::hypot(matchedSegment.
xErr, matchedChamber.
xErr);
870 const double matchedSegChPullY = matchedSegChDy/std::hypot(matchedSegment.
yErr, matchedChamber.
yErr);
871 if (matchedSegment.
xErr>0 && matchedChamber.
xErr>0 )
872 LogTrace(
"MuonIdentification") <<
" xpull: " << matchedSegChPullX;
873 if (matchedSegment.
yErr>0 && matchedChamber.
yErr>0 )
874 LogTrace(
"MuonIdentification") <<
" ypull: " << matchedSegChPullY;
876 if (matchedSegChDx <
maxAbsDx_) matchedX =
true;
877 if (matchedSegChDy <
maxAbsDy_) matchedY =
true;
878 if (matchedSegment.
xErr>0 && matchedChamber.
xErr>0 && matchedSegChPullX <
maxAbsPullX_) matchedX =
true;
879 if (matchedSegment.
yErr>0 && matchedChamber.
yErr>0 && matchedSegChPullY <
maxAbsPullY_) matchedY =
true;
880 if (matchedX && matchedY) matchedChamber.
segmentMatches.push_back(matchedSegment);
882 muonChamberMatches.push_back(matchedChamber);
888 for (
const auto& chamber : info.
chambers )
890 if ( chamber.id.subdetId() != 3 )
continue;
891 const auto& lErr = chamber.tState.localError();
892 const auto& lPos = chamber.tState.localPosition();
893 const auto& lDir = chamber.tState.localDirection();
898 matchedChamber.
x = lPos.x();
899 matchedChamber.
y = lPos.y();
900 matchedChamber.
xErr =
sqrt( localError.
xx() );
901 matchedChamber.
yErr =
sqrt( localError.
yy() );
903 matchedChamber.
dXdZ = lDir.z()!=0?lDir.x()/lDir.z():9999;
904 matchedChamber.
dYdZ = lDir.z()!=0?lDir.y()/lDir.z():9999;
907 matchedChamber.
dXdZErr = trajectoryCovMatrix(1,1)>0?
sqrt(trajectoryCovMatrix(1,1)):0;
908 matchedChamber.
dYdZErr = trajectoryCovMatrix(2,2)>0?
sqrt(trajectoryCovMatrix(2,2)):0;
910 matchedChamber.
edgeX = chamber.localDistanceX;
911 matchedChamber.
edgeY = chamber.localDistanceY;
913 matchedChamber.
id = chamber.id;
919 if ( rpcRecHit.rawId() != chamber.id.rawId() )
continue;
921 rpcHitMatch.
x = rpcRecHit.localPosition().x();
922 rpcHitMatch.
mask = 0;
923 rpcHitMatch.
bx = rpcRecHit.BunchX();
925 const double absDx =
std::abs(rpcRecHit.localPosition().x()-chamber.tState.localPosition().x());
926 if( absDx <= 20
or absDx/
sqrt(localError.
xx()) <= 4 ) matchedChamber.
rpcMatches.push_back(rpcHitMatch);
929 muonChamberMatches.push_back(matchedChamber);
935 LogTrace(
"MuonIdentification") <<
"number of muon chambers: " << aMuon.
matches().size() <<
"\n"
936 <<
"number of chambers with segments according to the associator requirements: " <<
937 nubmerOfMatchesAccordingToTrackAssociator;
938 LogTrace(
"MuonIdentification") <<
"number of segment matches with the producer requirements: " <<
949 std::vector<std::pair<reco::MuonChamberMatch*,reco::MuonSegmentMatch*> > chamberPairs;
950 std::vector<std::pair<reco::MuonChamberMatch*,reco::MuonSegmentMatch*> > stationPairs;
951 std::vector<std::pair<reco::MuonChamberMatch*,reco::MuonSegmentMatch*> > arbitrationPairs;
954 for(
unsigned int muonIndex1 = 0; muonIndex1 < pOutputMuons->size(); ++muonIndex1 )
956 auto& muon1 = pOutputMuons->at(muonIndex1);
958 for (
auto& chamber1 : muon1.matches() )
960 if(chamber1.segmentMatches.empty())
continue;
961 chamberPairs.clear();
964 for (
auto& segment1 : chamber1.segmentMatches )
966 chamberPairs.push_back(std::make_pair(&chamber1, &segment1));
967 if(!segment1.isMask())
969 arbitrationPairs.clear();
970 arbitrationPairs.push_back(std::make_pair(&chamber1, &segment1));
974 if (muon1.isTrackerMuon()) {
976 for(
unsigned int muonIndex2 = muonIndex1+1; muonIndex2 < pOutputMuons->size(); ++muonIndex2 )
978 auto& muon2 = pOutputMuons->at(muonIndex2);
980 if ( !muon2.isTrackerMuon() )
continue;
982 for (
auto& chamber2 : muon2.matches() )
985 for (
auto& segment2 : chamber2.segmentMatches )
987 if(segment2.isMask())
continue;
997 arbitrationPairs.push_back(std::make_pair(&chamber2, &segment2));
1005 if(arbitrationPairs.empty())
continue;
1006 if(arbitrationPairs.size()==1) {
1021 for (
auto& ap : arbitrationPairs ) {
1029 CSCDetId(chamber1.id).ring() == 4) {
1030 for (
auto& segment2 : chamber1.segmentMatches ) {
1031 if( segment1.cscSegmentRef.isNull() || segment2.cscSegmentRef.isNull() )
continue;
1033 (segment2.mask & 0x1e0000) &&
1034 (segment1.mask & 0x1e0000) ) {
1044 if(chamberPairs.empty())
continue;
1045 if(chamberPairs.size()==1) {
1065 for(
int detectorIndex = 1; detectorIndex < 4; ++detectorIndex )
1067 stationPairs.clear();
1070 for (
auto& chamber : muon1.matches() )
1072 if(!(chamber.station()==
stationIndex && chamber.detector()==detectorIndex))
continue;
1073 if(chamber.segmentMatches.empty())
continue;
1075 for (
auto& segment : chamber.segmentMatches ) {
1076 stationPairs.push_back(std::make_pair(&chamber, &segment));
1080 if(stationPairs.empty())
continue;
1081 if(stationPairs.size()==1) {
1115 else throw cms::Exception(
"FatalError") <<
"Failed to compute muon isolation information for a muon with undefined references to tracks";
1124 if(caloDeps.size()!=3) {
1125 LogTrace(
"MuonIdentification") <<
"Failed to fill vector of calorimeter isolation deposits!";
1168 const double energy = hypot(track.
p(), 0.105658369);
1178 if ( muonId.
sector() <= 12 )
1180 if ( muonId.
sector() == 13 ) phi = 3/6.*
M_PI;
1181 if ( muonId.
sector() == 14 ) phi = 9/6.*
M_PI;
1195 if ( muon.
matches().empty() ) {
1198 return muon.
innerTrack()->outerPosition().phi();
1230 if (trackBAD || staBAD || glbBAD )
1232 edm::LogWarning(
"muonIDbadLinks") <<
"Global muon links to constituent tracks are invalid: trkBad "
1233 <<trackBAD <<
" standaloneBad "<<staBAD<<
" globalBad "<<glbBAD
1234 <<
". There should be no such object. Muon is skipped.";
std::string hoDepositName_
double p() const
momentum vector magnitude
T getParameter(std::string const &) const
static const unsigned int BelongsToTrackByME1aClean
std::string jetDepositName_
double candEnergy() const
Get energy or pT attached to cand trajectory.
bool isGoodRPCMuon(const reco::Muon &muon)
int numberOfMatchedRPCLayers(ArbitrationType type=RPCHitAndTrackArbitration) const
edm::EDGetTokenT< reco::TrackCollection > innerTrackCollectionToken_
reco::Muon makeMuon(edm::Event &iEvent, const edm::EventSetup &iSetup, const reco::TrackRef &track, TrackType type)
static const unsigned int GlobalMuon
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)
edm::EDGetTokenT< edm::ValueMap< reco::MuonQuality > > glbQualToken_
static void truthMatchMuon(const edm::Event &iEvent, const edm::EventSetup &iSetup, reco::Muon &aMuon)
DTRecSegment4DRef dtSegmentRef
bool isNonnull() const
Checks for non-null.
reco::TrackRef trackerTrack() const
get the tracker's track which match with the stand alone muon tracks
void runMesh(std::vector< reco::Muon > *p)
static bool crossedIP(const reco::Track &track)
float sumPt
sum-pt of tracks
void setType(unsigned int type)
TrackDetectorAssociator trackAssociator_
CSCSegmentRef cscSegmentRef
const TrackExtraRef & extra() const
reference to "extra" object
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
static const unsigned int Arbitrated
segment mask flags
void fillMuonId(edm::Event &, const edm::EventSetup &, reco::Muon &, TrackDetectorAssociator::Direction direction=TrackDetectorAssociator::InsideOut)
friend struct const_iterator
reco::isodeposit::IsoDepositExtractor * muIsoExtractorCalo_
virtual TrackRef innerTrack() const
bool getByToken(EDGetToken token, Handle< PROD > &result) const
edm::Handle< reco::MuonTrackLinksCollection > linkCollectionHandle_
edm::EDGetTokenT< RPCRecHitCollection > rpcHitToken_
bool isTrackerMuon() const
int overlap(const reco::Muon &muon, const reco::Track &track)
reco::TrackRef standAloneTrack() const
get the track built with the muon spectrometer alone
bool fillCaloCompatibility_
std::vector< const EcalRecHit * > ecalRecHits
hits in the cone
std::vector< DetId > crossedEcalIds
std::string trackDepositName_
void insert(const H &h, I begin, I end)
double phiOfMuonIneteractionRegion(const reco::Muon &muon) const
std::vector< CaloMuon > CaloMuonCollection
collection of Muon objects
void loadParameters(const edm::ParameterSet &, edm::ConsumesCollector &)
DetId findMaxDeposition(EnergyType)
Find detector elements with highest energy deposition.
virtual void produce(edm::Event &, const edm::EventSetup &) override
float hadVetoEt
hcal sum-et in the veto region in r-phi
virtual TrackRef track() const
reference to a Track
bool isGlobalMuon() const
float emS9
energy deposited in 3x3 ECAL crystal shape around central crystal
double evaluate(const reco::Muon &)
MuonCaloCompatibility muonCaloCompatibility_
static const unsigned int BestInStationByDRSlope
bool isMatchesValid() const
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
edm::EDGetTokenT< reco::TrackToTrackMap > pickyCollectionToken_
static std::string toStr(const ICTypeKey k)
double px() const
x coordinate of momentum vector
static const unsigned int BelongsToTrackByDXSlope
bool isStandAloneMuon() const
void setCalEnergy(const MuonEnergy &calEnergy)
set energy deposition information
void fillGlbQuality(edm::Event &, const edm::EventSetup &, reco::Muon &aMuon)
std::vector< DetId > crossedHcalIds
float trkRelChi2
chi2 value for the inner track stub with respect to the global track
std::auto_ptr< MuonKinkFinder > trackerKinkFinder_
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
static const unsigned int BestInStationByDR
virtual double eta() const
momentum pseudorapidity
virtual double pt() const
transverse momentum
MuonTime time() const
get timing information
std::vector< Muon > MuonCollection
collection of Muon objects
math::XYZPoint trkGlobPosAtHcal
float ecal_time
Calorimeter timing.
float ho
energy deposited in crossed HO towers
virtual void setTunePBestTrack(MuonTrackType muonType)
double depositWithin(double coneSize, const Vetos &vetos=Vetos(), bool skipDepositVeto=false) const
Get deposit.
bool approxEqual(const double a, const double b, const double tol=1E-3) const
void setCSCGeometry(const CSCGeometry *pg)
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
void init(edm::Event &, const edm::EventSetup &)
virtual void setInnerTrack(const TrackRef &t)
set reference to Track
DetId hcal_id
DetId of the central HCAL tower with smallest depth.
edm::EDGetTokenT< reco::TrackToTrackMap > tpfmsCollectionToken_
const Point & vertex() const
reference point on the track. This method is DEPRECATED, please use referencePoint() instead ...
double ptThresholdToFillCandidateP4WithGlobalFit_
double eta() const
pseudorapidity of momentum vector
reco::Muon::MuonTrackTypePair sigmaSwitch(const reco::TrackRef &combinedTrack, const reco::TrackRef &trackerTrack, const double nSigma=2., const double ptThreshold=200.)
TrackAssociatorParameters parameters_
bool isCaloCompatibilityValid() const
void fillArbitrationInfo(reco::MuonCollection *)
reco::Muon::MuonTrackTypePair tevOptimized(const reco::TrackRef &combinedTrack, const reco::TrackRef &trackerTrack, const reco::TrackRef &tpfmsTrack, const reco::TrackRef &pickyTrack, const reco::TrackRef &dytTrack, const double ptThreshold=200., const double tune1=17., const double tune2=40., const double dptcut=0.25)
void fillTrackerKink(reco::Muon &aMuon)
void setPropagator(const Propagator *)
use a user configured propagator
float emS25
energy deposited in 5x5 ECAL crystal shape around central crystal
double p() const
momentum vector magnitude
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
bool isGoodTrackerMuon(const reco::Muon &muon)
double pt() const
track transverse momentum
bool checkLinks(const reco::MuonTrackLinks *) const
Cos< T >::type cos(const T &t)
std::vector< TAMuonChamberMatch > chambers
int nJets
number of jets in the cone
std::vector< const HBHERecHit * > hcalRecHits
static const unsigned int BestInChamberByDX
std::string ecalDepositName_
MuonQuality combinedQuality() const
get energy deposition information
float timeAtIpOutIn
b) particle is moving from outside in
int nDof
number of muon stations used
Abs< T >::type abs(const T &t)
edm::EDGetTokenT< reco::MuonCollection > muonCollectionToken_
tuple inputCollectionTypes
edm::EDGetTokenT< reco::TrackCollection > outerTrackCollectionToken_
edm::Handle< RPCRecHitCollection > rpcHitHandle_
float hoS9
energy deposited in 3x3 HO tower shape around central tower
std::vector< reco::MuonRPCHitMatch > rpcMatches
static const unsigned int BestInChamberByDR
T const * get() const
Returns C++ pointer to the item.
bool isQualityValid() const
edm::Handle< reco::TrackToTrackMap > dytCollectionHandle_
edm::Handle< reco::TrackCollection > outerTrackCollectionHandle_
edm::EDGetTokenT< reco::MuonTrackLinksCollection > linkCollectionToken_
double crossedEnergy(EnergyType)
energy in detector elements crossed by the track by types
bool isNull() const
Checks for null.
static const unsigned int BestInStationByDXSlope
math::XYZPointF hcal_position
bool fillGlobalTrackRefits_
static double sectorPhi(const DetId &id)
void setMuonTrack(const MuonTrackType &, const TrackRef &)
bool isEnergyValid() const
float hoVetoEt
ho sum-et in the veto region in r-phi
double pz() const
z coordinate of momentum vector
MuonEnergy calEnergy() const
get energy deposition information
reco::CaloMuon makeCaloMuon(const reco::Muon &)
virtual ~MuonIdProducer()
int nTracks
number of tracks in the cone (excluding veto region)
static const unsigned int BestInChamberByDXSlope
float emMax
maximal energy of ECAL crystal in the 5x5 shape
reco::isodeposit::IsoDepositExtractor * muIsoExtractorTrack_
void setCaloCompatibility(float input)
static const unsigned int RPCMuon
static ICTypeKey toKey(const std::string &s)
virtual TrackRef combinedMuon() const
reference to a stand-alone muon Track
static const unsigned int TrackerMuon
float emVetoEt
ecal sum-et in the veto region in r-phi
void configure(const edm::ParameterSet &)
reco::isodeposit::IsoDepositExtractor * muIsoExtractorJet_
bool isDuplicateOf(const CSCSegmentRef &lhs, const CSCSegmentRef &rhs) const
MuonTimingFiller * theTimingFiller_
std::vector< ICTypes::ICTypeKey > inputCollectionTypes_
float hadMax
maximal energy of HCAL tower in the 3x3 shape
static const unsigned int BelongsToTrackByDRSlope
virtual void setInnerTrack(const TrackRef &t)
set reference to Track
edm::Ref< TrackCollection > TrackRef
persistent reference to a Track
T const * product() const
void setCombinedQuality(const MuonQuality &combinedQuality)
set energy deposition information
std::vector< edm::InputTag > inputCollectionLabels_
std::vector< MuonChamberMatch > & matches()
get muon matching information
void setCalEnergy(const MuonEnergy &calEnergy)
set energy deposition information
int triggerSector() const
MuonIdProducer(const edm::ParameterSet &)
std::vector< reco::MuonSegmentMatch > segmentMatches
bool fillGlobalTrackQuality_
int numberOfMatches(ArbitrationType type=SegmentAndTrackArbitration) const
get number of chambers with matched segments
DetId ecal_id
DetId of the central ECAL crystal.
virtual void setOuterTrack(const TrackRef &t)
set reference to Track
static const unsigned int BelongsToTrackByDR
std::string hcalDepositName_
unsigned int chamberId(const DetId &)
reco::TrackRef getTevRefitTrack(const reco::TrackRef &combinedTrack, const reco::TrackToTrackMap &map)
static const unsigned int BelongsToTrackByDX
void setIsolation(const MuonIsolation &isoR03, const MuonIsolation &isoR05)
virtual void setBestTrack(MuonTrackType muonType)
functor predicate for standard library sort algorithm
std::pair< double, int > depositAndCountWithin(double coneSize, const Vetos &vetos=Vetos(), double threshold=-1e+36, bool skipDepositVeto=false) const
Get deposit.
edm::Handle< reco::TrackToTrackMap > tpfmsCollectionHandle_
static const unsigned int BestInStationByDX
TrackDetMatchInfo associate(const edm::Event &, const edm::EventSetup &, const FreeTrajectoryState &, const AssociatorParameters &)
edm::Handle< reco::TrackCollection > innerTrackCollectionHandle_
unsigned int type() const
math::XYZPoint trkGlobPosAtEcal
Track position at different parts of the calorimeter.
int charge() const
track electric charge
bool isGoodTrack(const reco::Track &track)
std::pair< typename Association::data_type::first_type, double > match(Reference key, Association association, bool bestMatchByMaxValue)
Generic matching function.
MuonTrackType
map for Global Muon refitters
double sigmaThresholdToFillCandidateP4WithGlobalFit_
static const unsigned int StandAloneMuon
std::pair< TrackRef, Muon::MuonTrackType > MuonTrackTypePair
void setMatches(const std::vector< MuonChamberMatch > &matches)
set muon matching information
void fillTiming(const reco::Muon &muon, reco::MuonTimeExtra &dtTime, reco::MuonTimeExtra &cscTime, reco::MuonTimeExtra &combinedTime, edm::Event &iEvent, const edm::EventSetup &iSetup)
math::XYZPointF ecal_position
Trajectory position at the calorimeter.
virtual double phi() const
momentum azimuthal angle
static const unsigned int BestInChamberByDRSlope
float caloCompatibility() const
bool validateGlobalMuonPair(const reco::MuonTrackLinks &goodMuon, const reco::MuonTrackLinks &badMuon)
bool debugWithTruthMatching_
virtual void setGlobalTrack(const TrackRef &t)
set reference to Track
float trackerVetoPt
(sum-)pt inside the veto region in r-phi
float hadS9
energy deposited in 3x3 HCAL tower shape around central tower
T get(const Candidate &c)
edm::Handle< reco::MuonCollection > muonCollectionHandle_
double py() const
y coordinate of momentum vector
edm::Handle< edm::ValueMap< reco::MuonQuality > > glbQualHandle_
virtual void beginRun(const edm::Run &, const edm::EventSetup &) override
reco::TrackRef globalTrack() const
get the combined track
edm::Handle< reco::TrackToTrackMap > pickyCollectionHandle_
edm::EDGetTokenT< reco::TrackToTrackMap > dytCollectionToken_
virtual TrackRef standAloneMuon() const
reference to a stand-alone muon Track