60 std::pair<reco::RecoChargedCandidate, reco::RecoChargedCandidate> ivtxMuPair;
61 std::vector<std::pair<reco::RecoChargedCandidate, reco::RecoChargedCandidate>> vtxMuPair;
67 if (!dispvtx.isValid())
70 if ((dispvtx.chi2() >= 0.0) && (dispvtx.ndof() > 0))
71 vtxProb = TMath::Prob(dispvtx.chi2(), dispvtx.ndof());
76 auto trackIt = dispvtx.tracks_begin();
83 for (
auto const&
cand : *ChargedCandidateCollection) {
85 if (tkRef == vertextkRef1) {
86 ivtxMuPair.first =
cand;
89 if (tkRef == vertextkRef2) {
90 ivtxMuPair.second =
cand;
96 vtxMuPair.push_back(ivtxMuPair);
98 dispVertices->emplace_back(dispvtx.x(),
104 dispvtx.tracksSize(),
108 dispvtx.covariance(0, 1),
109 dispvtx.covariance(0, 2),
110 dispvtx.covariance(1, 2));
144 float minDR2 = 1
e-06;
147 for (
auto&
muon : *ChargedCandidateCollection) {
157 int validStandAloneMuonHits = 0;
158 int matchedStandAloneMuonStations = 0;
159 for (
auto const& link : *
links) {
160 const reco::Track& trackerTrack = *link.trackerTrack();
163 if (
track->pt() != 0)
164 dPt = dPt /
track->pt();
166 if (
dR2 < 0.02 * 0.02 and dPt < 0.001) {
167 if (link.standAloneTrack().isNonnull()) {
168 validStandAloneMuonHits = link.standAloneTrack()->hitPattern().numberOfValidMuonHits();
169 matchedStandAloneMuonStations = link.standAloneTrack()->hitPattern().muonStationsWithValidHits();
174 unsigned int recoMuonType = 2;
176 int nRecoMuonValidMuonHits = 0;
189 dPt = dPt /
muon.pt();
191 if (
dR2 < 0.02 * 0.02 and dPt < 0.001) {
192 if (recoMu.globalTrack().isNonnull()) {
194 nRecoMuonValidMuonHits = recoMu.globalTrack()->hitPattern().numberOfValidMuonHits();
196 recoMuonType = recoMu.type();
213 double ecalisopf = -1.0;
215 ecalisopf = (*EcalPFClusterIsoMap)[muonRef];
218 double hcalisopf = -1.0;
220 hcalisopf = (*HcalPFClusterIsoMap)[muonRef];
223 double trackiso = -1.0;
225 trackiso = (*TrackIsoMap)[muonRef];
228 vtxInd.reserve(vtxMuPair.size());
229 for (
unsigned int i = 0;
i < vtxMuPair.size();
i++) {
232 if ((dr2_1 < minDR2) || (dr2_2 < minDR2))
236 outMuons->emplace_back(
muon.pt(),
246 validStandAloneMuonHits,
247 matchedStandAloneMuonStations,
248 nRecoMuonValidMuonHits,
257 track->hitPattern().numberOfValidPixelHits(),
258 track->hitPattern().numberOfValidStripHits(),
259 track->hitPattern().pixelLayersWithMeasurement(),
260 track->hitPattern().trackerLayersWithMeasurement(),
272 track->qoverpError(),
273 track->lambdaError(),
277 track->covariance(0, 1),
278 track->covariance(0, 2),
279 track->covariance(0, 3),
280 track->covariance(0, 4),
281 track->covariance(1, 2),
282 track->covariance(1, 3),
283 track->covariance(1, 4),
284 track->covariance(2, 3),
285 track->covariance(2, 4),
286 track->covariance(3, 4),
291 track->hitPattern().run3ScoutingHitPatternPOD());
helper::MatcherGetRef< C >::ref_type getRef(const Handle< C > &c, size_t k)
const double minVtxProbCut
std::vector< Run3ScoutingVertex > Run3ScoutingVertexCollection
const edm::EDGetTokenT< reco::MuonCollection > MuonCollection_
const edm::EDGetTokenT< RecoChargedCandMap > EcalPFClusterIsoMap_
nRecoMuonExpectedMatchedStations
const edm::EDGetTokenT< RecoChargedCandMap > HcalPFClusterIsoMap_
nRecoMuonMatchedRPCLayers
std::vector< Muon > MuonCollection
collection of Muon objects
U second(std::pair< T, U > const &p)
double pt() const
track transverse momentum
const edm::EDGetTokenT< edm::ValueMap< double > > TrackIsoMap_
ALPAKA_FN_ACC static ALPAKA_FN_INLINE float dR2(Position4 pos1, Position4 pos2)
Abs< T >::type abs(const T &t)
double phi() const
azimuthal angle of momentum vector
const edm::EDGetTokenT< reco::VertexCollection > displacedvertexCollection_
bool isNull() const
Checks for null.
double eta() const
pseudorapidity of momentum vector
constexpr auto deltaR2(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
const edm::EDGetTokenT< reco::RecoChargedCandidateCollection > ChargedCandidateCollection_
std::vector< Run3ScoutingMuon > Run3ScoutingMuonCollection
const edm::EDGetTokenT< reco::MuonTrackLinksCollection > linkToken_
displacedvertexCollection