437 bool isGolden =
true;
459 if (tracks->size() == 2)
461 if (tracks->size() == 2 && originalTracks->size() == 1 && isGolden) {
465 bool topGlobalMuonFlag =
false;
466 bool bottomGlobalMuonFlag =
false;
467 int topGlobalMuon = -1;
468 int bottomGlobalMuon = -1;
469 double topGlobalMuonNorchi2 = 1e10;
470 double bottomGlobalMuonNorchi2 = 1e10;
474 for (std::vector<reco::Muon>::const_iterator gmI = globalMuons->begin(); gmI != globalMuons->end(); gmI++) {
475 if (gmI->isTrackerMuon() && gmI->isStandAloneMuon() && gmI->isGlobalMuon()) {
479 if (gmI->innerTrack() == trackerTrackRef1) {
480 if (gmI->globalTrack()->normalizedChi2() < topGlobalMuonNorchi2) {
481 topGlobalMuonFlag =
true;
482 topGlobalMuonNorchi2 = gmI->globalTrack()->normalizedChi2();
483 topGlobalMuon = gmCtr;
486 if (gmI->innerTrack() == trackerTrackRef2) {
487 if (gmI->globalTrack()->normalizedChi2() < bottomGlobalMuonNorchi2) {
488 bottomGlobalMuonFlag =
true;
489 bottomGlobalMuonNorchi2 = gmI->globalTrack()->normalizedChi2();
490 bottomGlobalMuon = gmCtr;
517 if (
hit->isValid()) {
520 int type =
hit->geographicalId().subdetId();
534 if (type ==
int(kBPIX)) {
537 if (type ==
int(kFPIX)) {
559 if (
hit->isValid()) {
562 int type =
hit->geographicalId().subdetId();
576 if (type ==
int(kBPIX)) {
579 if (type ==
int(kFPIX)) {
592 double ddxy_Val = track1.
d0() - track2.
d0();
593 double ddz_Val = track1.
dz() - track2.
dz();
594 double dtheta_Val = track1.
theta() - track2.
theta();
595 double deta_Val = track1.
eta() - track2.
eta();
596 double dphi_Val = track1.
phi() - track2.
phi();
597 double dpt_Val = track1.
pt() - track2.
pt();
598 double dp_Val = track1.
p() - track2.
p();
599 double dqoverpt_Val = track1.
charge() / track1.
pt() - track2.
charge() / track2.
pt();
607 int nhitinTIBorg = 0;
608 int nhitinTOBorg = 0;
609 int nhitinTIDorg = 0;
610 int nhitinTECorg = 0;
611 int nhitinBPIXorg = 0;
612 int nhitinFPIXorg = 0;
614 if (
hit->isValid()) {
617 int type =
hit->geographicalId().subdetId();
631 if (type ==
int(kBPIX)) {
634 if (type ==
int(kFPIX)) {
721 reco::Muon muonTop = globalMuons->at(topGlobalMuon);
722 reco::Muon muonBottom = globalMuons->at(bottomGlobalMuon);
756 dp_sta_ = sta1->p() - sta2->p();
802 dp_glb_ = glb1->p() - glb2->p();
1048 if (2 != muons.size())
1051 double mudd0 = 0., mudphi = 0., muddsz = 0., mudeta = 0.;
1052 for (
unsigned int bindex = 0; bindex < muons.size(); ++bindex) {
1059 mudd0 += mutrack->
d0();
1060 mudphi += mutrack->
phi();
1061 muddsz += mutrack->
dsz();
1062 mudeta += mymuon.
eta();
1065 mudd0 -= mutrack->
d0();
1066 mudphi -= mutrack->
phi();
1067 muddsz -= mutrack->
dsz();
1068 mudeta -= mymuon.
eta();
1071 if ((fabs(mudd0) < 15.0) && (fabs(mudphi) < 0.045) && (fabs(muddsz) < 20.0) && (fabs(mudeta) < 0.060))
double p() const
momentum vector magnitude
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
edm::Service< TFileService > tfile
EventNumber_t event() const
static constexpr auto TEC
const Point & referencePoint() const
Reference point on the track.
double d0Error() const
error on d0
double eta() const final
momentum pseudorapidity
int goldenPlusTwoTracksCtr
edm::EDGetTokenT< reco::MuonCollection > STAMuonsToken_
edm::EDGetTokenT< reco::MuonCollection > splitGlobalMuonsToken_
double d0() const
dxy parameter in perigee convention (d0 = -dxy)
double normalizedChi2() const
chi-squared divided by n.d.o.f. (or chi-squared * 1e6 if n.d.o.f. is zero)
CosmicSplitterValidation(const edm::ParameterSet &)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
void analyze(const edm::Event &iEvent, const edm::EventSetup &iSetup) override
double theta() const
polar angle
double etaError() const
error on eta
double phi() const
azimuthal angle of momentum vector
LuminosityBlockNumber_t luminosityBlock() const
double dsz() const
dsz parameter (THIS IS NOT the SZ impact parameter to (0,0,0) if refPoint is far from (0...
edm::InputTag splitTracks_
std::vector< Muon > MuonCollection
collection of Muon objects
edm::EDGetTokenT< std::vector< reco::Track > > splitTracksToken_
#define DEFINE_FWK_MODULE(type)
double eta() const
pseudorapidity of momentum vector
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
double pt() const
track transverse momentum
double ptError() const
error on Pt (set to 1000 TeV if charge==0 for safety)
double phiError() const
error on phi
auto recHits() const
Access to reconstructed hits on the track.
edm::EDGetTokenT< reco::MuonCollection > originalGlobalMuonsToken_
edm::InputTag splitGlobalMuons_
T const * get() const
Returns C++ pointer to the item.
static constexpr auto TOB
virtual TrackRef outerTrack() const
reference to Track reconstructed in the muon detector only
double dz() const
dz parameter (= dsz/cos(lambda)). This is the track z0 w.r.t (0,0,0) only if the refPoint is close to...
double dzError() const
error on dz
static constexpr auto TIB
T const * product() const
int totalTracksToAnalyzer_
XYZPointD XYZPoint
point in space with cartesian internal representation
edm::InputTag originalGlobalMuons_
~CosmicSplitterValidation() override
int _passesTracksPlusMuonsCuts
bool is_gold_muon(const edm::Event &e)
int charge() const
track electric charge
edm::EDGetTokenT< std::vector< reco::Track > > originalTracksToken_
edm::InputTag originalTracks_
static constexpr auto TID
double thetaError() const
error on theta
virtual TrackRef globalTrack() const
reference to Track reconstructed in both tracked and muon detector