118 unique_ptr<vector<pat::Muon> > muonColl(
new vector<pat::Muon> (*muons) );
119 for (
unsigned int i = 0;
i< muonColl->size();++
i){
138 float zDaudxyFromBS = -1;
139 float zDaudzFromBS = -1;
140 float zDaudxyFromPV = -1;
141 float zDaudzFromPV = -1;
146 float zDauTrkChi2 = -1;
147 float zDauSaChi2 = -1;
148 float zDauNofMuonHits = -1;
149 float zDauSaNofMuonHits = -1;
150 float zDauNofStripHits = -1;
151 float zDauTrkNofStripHits = -1;
152 float zDauNofPixelHits = -1;
153 float zDauTrkNofPixelHits = -1;
159 zDaudxyFromBS = muGlbRef->dxy(beamSpotHandle->
position());
160 zDaudzFromBS = muGlbRef->dz(beamSpotHandle->
position());
161 zDaudxyFromPV = muGlbRef->dxy(primaryVertices->begin()->position() );
162 zDaudzFromPV = muGlbRef->dz(primaryVertices->begin()->position() );
163 zDauChi2 = muGlbRef->normalizedChi2();
164 zDauTrkChi2 = muTrkRef->normalizedChi2();
165 zDauSaChi2 = muSaRef->normalizedChi2();
166 zDauNofMuonHits = muGlbRef->hitPattern().numberOfValidMuonHits();
167 zDauSaNofMuonHits = muSaRef->hitPattern().numberOfValidMuonHits();
168 zDauNofStripHits = muGlbRef->hitPattern().numberOfValidStripHits();
169 zDauTrkNofStripHits = muTrkRef->hitPattern().numberOfValidStripHits();
170 zDauNofPixelHits = muGlbRef->hitPattern().numberOfValidPixelHits();
171 zDauTrkNofPixelHits = muTrkRef->hitPattern().numberOfValidPixelHits();
174 zDaudxyFromBS = muSaRef->dxy(beamSpotHandle->
position());
175 zDaudzFromBS = muSaRef->dz(beamSpotHandle->
position());
176 zDaudxyFromPV = muSaRef->dxy(primaryVertices->begin()->position() );
177 zDaudzFromPV = muSaRef->dz(primaryVertices->begin()->position() );
178 zDauSaChi2 = muSaRef->normalizedChi2();
179 zDauSaNofMuonHits = muSaRef->hitPattern().numberOfValidMuonHits();
183 zDaudxyFromBS = muTrkRef->dxy(beamSpotHandle->
position());
184 zDaudzFromBS = muTrkRef->dz(beamSpotHandle->
position());
185 zDaudxyFromPV = muTrkRef->dxy(primaryVertices->begin()->position() );
186 zDaudzFromPV = muTrkRef->dz(primaryVertices->begin()->position() );
187 zDauTrkChi2 = muTrkRef->normalizedChi2();
188 zDauTrkNofStripHits = muTrkRef->hitPattern().numberOfValidStripHits();
189 zDauTrkNofPixelHits = muTrkRef->hitPattern().numberOfValidPixelHits();
195 int dimTrig = muHLTMatches.size();
211 m.
addUserFloat(
"zDau_SaNofMuonHits" , zDauSaNofMuonHits );
212 m.
addUserFloat(
"zDau_NofStripHits" , zDauNofStripHits );
213 m.
addUserFloat(
"zDau_TrkNofStripHits" , zDauTrkNofStripHits );
214 m.
addUserFloat(
"zDau_NofPixelHits" , zDauNofPixelHits );
215 m.
addUserFloat(
"zDau_TrkNofPixelHits" , zDauTrkNofPixelHits );
216 m.
addUserFloat(
"zDau_NofMuChambers" , zDauNofMuChambers );
217 m.
addUserFloat(
"zDau_NofMuMatches" , zDauNofMuMatches );
EDGetTokenT< VertexCollection > primaryVerticesToken_
reco::TrackRef innerTrack() const
reference to Track reconstructed in the tracker only (reimplemented from reco::Muon) ...
vector< double > isolation(const T &t, double ptThreshold, double etEcalThreshold, double etHcalThreshold, double dRVetoTrk, double dRTrk, double dREcal, double dRHcal, double alpha, double beta)
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
bool isNonnull() const
Checks for non-null.
void setIsolation(IsolationKeys key, float value)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
bool isTrackerMuon() const
bool isGlobalMuon() const
void addUserFloat(const std::string &label, float data, const bool overwrite=false)
Set user-defined float.
std::vector< TriggerObjectStandAlone > TriggerObjectStandAloneCollection
Collection of TriggerObjectStandAlone.
bool isStandAloneMuon() const
reco::TrackRef outerTrack() const
reference to Track reconstructed in the muon detector only (reimplemented from reco::Muon) ...
EDGetTokenT< vector< pat::Muon > > srcToken_
EDGetTokenT< BeamSpot > beamSpotToken_
const TriggerObjectStandAloneCollection triggerObjectMatchesByPath(const std::string &namePath, const bool pathLastFilterAccepted=false, const bool pathL3FilterAccepted=true) const
reco::TrackRef globalTrack() const
reference to Track reconstructed in both tracked and muon detector (reimplemented from reco::Muon) ...
MuonEnergy calEnergy() const
get energy deposition information
int numberOfChambers() const
int numberOfMatches(ArbitrationType type=SegmentAndTrackArbitration) const
get number of chambers with matched segments
const Point & position() const
position
Analysis-level muon class.