60 produces<edm::ValueMap<reco::MuonMETCorrectionData> > (
"muCorrData");
162 std::vector<reco::MuonMETCorrectionData> v_muCorrData;
164 unsigned int nMuons =
muon_h->size();
166 for (
unsigned int iMu = 0; iMu < nMuons; iMu++) {
178 v_muCorrData.push_back( muMETCorrData );
185 if( mu_track->pt() <
minpt_ )
194 deltax = response * mu_track->p() *
sin( outerTrkPosition.Theta() ) *
cos( outerTrkPosition.Phi() );
195 deltay = response * mu_track->p() *
sin( outerTrkPosition.Theta() ) *
sin( outerTrkPosition.Phi() );
208 else v_muCorrData.push_back( muMETCorrData );
213 dataFiller.
insert(
muon_h, v_muCorrData.begin(), v_muCorrData.end());
216 iEvent.
put(vm_muCorrData,
"muCorrData");
240 bool haveBeamSpot =
true;
250 if( siTrack.
isNonnull() ) nhits = siTrack->numberOfValidHits();
252 d0 = -1 * globalTrack->dxy( bspot );
253 chi2 = globalTrack->normalizedChi2();
256 if( fabs( d0 ) >
muond0_ )
return false;
265 if( siTrack->ptError() / siTrack->pt() >
muon_dptrel_ )
return false;
273 if( muon->
pt() < 10 )
return false;
278 if( !inputSiliconTrack.
isNonnull() )
return false;
281 unsigned int nMuons =
muon_h->size();
282 for (
unsigned int iMu = 0; iMu < nMuons; iMu++) {
284 if( iMu == index )
continue;
289 if( !testSiliconTrack.
isNonnull() )
continue;
291 double deltaEta = inputSiliconTrack.
get()->eta() - testSiliconTrack.
get()->eta();
292 double deltaPhi = acos(
cos( inputSiliconTrack.
get()->phi() - testSiliconTrack.
get()->phi() ) );
293 double deltaR = TMath::Sqrt( deltaEta * deltaEta + deltaPhi * deltaPhi );
316 d0 = -1 * siTrack->dxy( pvtx );
318 double dz = siTrack->dz( pvtx );
323 d0 = -1 * siTrack->dxy( pvtx );
328 bool haveBeamSpot =
true;
332 d0 = -1 * siTrack->dxy( bspot );
338 bool haveBeamSpot =
true;
342 d0 = -1 * siTrack->dxy( bspot );
351 if( fabs( d0 ) > d0cut )
return false;
359 if( (siTrack->ptError() / siTrack->pt()) >
maxPtErr_tight_ )
return false;
363 if( siTrack->numberOfValidHits() <
minhits_ )
return false;
364 if( siTrack->normalizedChi2() >
maxchi2_ )
return false;
365 if( fabs( siTrack->eta() ) >
maxeta_ )
return false;
366 if( siTrack->pt() >
maxpt_ )
return false;
367 if( (siTrack->ptError() / siTrack->pt()) >
maxPtErr_ )
return false;
368 if( fabs( siTrack->eta() ) > 2.5 && siTrack->pt() >
maxpt_eta25_ )
return false;
369 if( fabs( siTrack->eta() ) > 2.0 && siTrack->pt() >
maxpt_eta20_ )
return false;
377 if( !( (siTrack->qualityMask() &
cut) == cut ) )
return false;
379 bool isGoodAlgo =
false;
380 if(
trkAlgos_.size() == 0 ) isGoodAlgo =
true;
383 if( siTrack->algo() ==
trkAlgos_.at(
i) ) isGoodAlgo =
true;
386 if( !isGoodAlgo )
return false;
394 TVector3 outerTrkPosition;
396 outerTrkPosition.SetPtEtaPhi( 999., -10., 2 *
TMath::Pi() );
401 return outerTrkPosition;
404 GlobalPoint tpVertex ( track->vx(), track->vy(), track->vz() );
406 int tpCharge ( track->charge() );
410 const double zdist = 314.;
412 const double radius = 130.;
414 const double corner = 1.479;
425 if( track.
get()->eta() < -corner ) {
426 tsos = myAP.propagate( fts, *lendcap);
428 else if( fabs(track.
get()->eta()) < corner ) {
429 tsos = myAP.propagate( fts, *barrel);
431 else if( track.
get()->eta() > corner ) {
432 tsos = myAP.propagate( fts, *rendcap);
439 outerTrkPosition.SetPtEtaPhi( 999., -10., 2 *
TMath::Pi() );
441 return outerTrkPosition;
455 if(
vertexColl->begin()->isFake() )
return false;
class TVector3 propagateTrack(const reco::Muon *)
TkRotation< Scalar > RotationType
T getParameter(std::string const &) const
MuonTCMETValueMapProducer(const edm::ParameterSet &)
const reco::VertexCollection * vertexColl
virtual TrackRef innerTrack() const
bool isTrackerMuon() const
class TH2D * response_function
Sin< T >::type sin(const T &t)
void insert(const H &h, I begin, I end)
bool isGlobalMuon() const
GlobalPoint globalPosition() const
edm::InputTag muonInputTag_
std::vector< int > trkAlgos_
edm::InputTag vertexInputTag_
bool isGoodMuon(const reco::Muon *)
bool isGoodCaloMuon(const reco::Muon *, const unsigned int)
int nLayers(const reco::TrackRef)
edm::Handle< reco::VertexCollection > VertexHandle
Point3DBase< Scalar, GlobalTag > PositionType
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
bool isNonnull() const
Checks for non-null.
~MuonTCMETValueMapProducer()
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
int trackerLayersWithMeasurement() const
static PlanePointer build(Args &&...args)
Cos< T >::type cos(const T &t)
edm::Handle< reco::MuonCollection > muon_h
virtual void produce(edm::Event &, const edm::EventSetup &)
class MagneticField * bField
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
virtual float eta() const GCC11_FINAL
momentum pseudorapidity
double deltaR(double eta1, double eta2, double phi1, double phi2)
edm::Handle< reco::BeamSpot > beamSpot_h
XYZPointD XYZPoint
point in space with cartesian internal representation
T const * product() const
T const * product() const
std::vector< int > trkQuality_
edm::InputTag beamSpotInputTag_
T const * get() const
Returns C++ pointer to the item.
virtual float pt() const GCC11_FINAL
transverse momentum
Power< A, B >::type pow(const A &a, const B &b)
bool isGoodTrack(const reco::Muon *)
tuple AnalyticalPropagator
math::PtEtaPhiELorentzVectorF LorentzVector
virtual TrackRef globalTrack() const
reference to Track reconstructed in both tracked and muon detector