85 std::pair<reco::RecoChargedCandidate,reco::RecoChargedCandidate> ivtxMuPair;
86 std::vector<std::pair<reco::RecoChargedCandidate,reco::RecoChargedCandidate> > vtxMuPair;
92 for(
auto &dispvtx : *displacedvertexCollection){
93 if ( !dispvtx.isValid() )
continue ;
95 if( (dispvtx.chi2()>=0.0) && (dispvtx.ndof()>0) ) vtxProb = TMath::Prob(dispvtx.chi2(), dispvtx.ndof() );
99 auto trackIt = dispvtx.tracks_begin();
106 for (
auto const &
cand : *ChargedCandidateCollection) {
108 if(tkRef == vertextkRef1) {ivtxMuPair.first=
cand; iFoundRefs++ ;}
109 if(tkRef == vertextkRef2) {ivtxMuPair.second=
cand; iFoundRefs++ ;}
111 if (iFoundRefs<2)
continue;
112 vtxMuPair.push_back(ivtxMuPair);
114 dispVertices->emplace_back(
115 dispvtx.x(), dispvtx.y(), dispvtx.z(),
116 dispvtx.zError(), dispvtx.xError(),
117 dispvtx.yError(), dispvtx.tracksSize(),
118 dispvtx.chi2(), dispvtx.ndof(), dispvtx.isValid()
125 std::vector<int> vtxInd;
128 for (
auto &
muon : *ChargedCandidateCollection) {
143 double ecalisopf=-1.0;
144 if ( EcalPFClusterIsoMap.
isValid()) { ecalisopf = (*EcalPFClusterIsoMap)[muonRef]; }
146 double hcalisopf=-1.0;
147 if ( HcalPFClusterIsoMap.
isValid()) { hcalisopf = (*HcalPFClusterIsoMap)[muonRef]; }
149 for (
unsigned int i=0;
i<vtxMuPair.size();
i++) {
152 if ( (dr2_1<minDR2) || (dr2_2<minDR2) ) vtxInd.push_back(
i) ;
156 ecalisopf, hcalisopf,
157 (*TrackIsoMap)[muonRef], track->chi2(), track->ndof(),
158 track->charge(), track->dxy(), track->dz(),
159 track->hitPattern().numberOfValidMuonHits(),
160 track->hitPattern().numberOfValidPixelHits(),
162 track->hitPattern().trackerLayersWithMeasurement(),
164 track->hitPattern().numberOfValidStripHits(),
172 track->qoverpError(),
173 track->lambdaError(),
helper::MatcherGetRef< C >::ref_type getRef(const Handle< C > &c, size_t k)
const double minVtxProbCut
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
std::vector< Track > TrackCollection
collection of Tracks
const edm::EDGetTokenT< RecoChargedCandMap > EcalPFClusterIsoMap_
const edm::EDGetTokenT< reco::TrackCollection > TrackCollection_
const edm::EDGetTokenT< RecoChargedCandMap > HcalPFClusterIsoMap_
U second(std::pair< T, U > const &p)
std::vector< ScoutingVertex > ScoutingVertexCollection
const edm::EDGetTokenT< edm::ValueMap< double > > TrackIsoMap_
std::vector< ScoutingMuon > ScoutingMuonCollection
const edm::EDGetTokenT< reco::VertexCollection > displacedvertexCollection_
bool isNull() const
Checks for null.
const edm::EDGetTokenT< reco::RecoChargedCandidateCollection > ChargedCandidateCollection_
T1 deltaR2(T1 eta1, T2 phi1, T3 eta2, T4 phi2)