86 std::pair<reco::RecoChargedCandidate,reco::RecoChargedCandidate> ivtxMuPair;
87 std::vector<std::pair<reco::RecoChargedCandidate,reco::RecoChargedCandidate> > vtxMuPair;
93 for(
auto &dispvtx : *displacedvertexCollection){
94 if ( !dispvtx.isValid() )
continue ;
96 if( (dispvtx.chi2()>=0.0) && (dispvtx.ndof()>0) ) vtxProb = TMath::Prob(dispvtx.chi2(), dispvtx.ndof() );
107 for (reco::RecoChargedCandidateCollection::const_iterator
cand=ChargedCandidateCollection->begin();
cand!=ChargedCandidateCollection->end();
cand++) {
109 if(tkRef == vertextkRef1) {ivtxMuPair.first= (*cand); iFoundRefs++ ;}
110 if(tkRef == vertextkRef2) {ivtxMuPair.second= (*cand); iFoundRefs++ ;}
112 if (iFoundRefs<2)
continue;
113 vtxMuPair.push_back(ivtxMuPair);
115 dispVertices->emplace_back(
116 dispvtx.x(), dispvtx.y(), dispvtx.z(),
117 dispvtx.zError(), dispvtx.xError(),
118 dispvtx.yError(), dispvtx.tracksSize(),
119 dispvtx.chi2(), dispvtx.ndof(), dispvtx.isValid()
126 std::vector<int> vtxInd;
129 for (
auto &
muon : *ChargedCandidateCollection) {
144 double ecalisopf=-1.0;
145 if ( EcalPFClusterIsoMap.
isValid()) { ecalisopf = (*EcalPFClusterIsoMap)[muonRef]; }
147 double hcalisopf=-1.0;
148 if ( HcalPFClusterIsoMap.
isValid()) { hcalisopf = (*HcalPFClusterIsoMap)[muonRef]; }
150 for (
unsigned int i=0;
i<vtxMuPair.size();
i++) {
153 if ( (dr2_1<minDR2) || (dr2_2<minDR2) ) vtxInd.push_back(
i) ;
157 ecalisopf, hcalisopf,
158 (*TrackIsoMap)[muonRef], track->chi2(), track->ndof(),
159 track->charge(), track->dxy(), track->dz(),
160 track->hitPattern().numberOfValidMuonHits(),
161 track->hitPattern().numberOfValidPixelHits(),
163 track->hitPattern().trackerLayersWithMeasurement(),
165 track->hitPattern().numberOfValidStripHits(),
173 track->qoverpError(),
174 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)
std::vector< TrackBaseRef >::const_iterator trackRef_iterator
The iteratator for the vector<TrackRef>