324 bool isGolden =
true;
346 if (tracks->size() == 2 && originalTracks->size() == 1 && isGolden){
350 bool topGlobalMuonFlag =
false;
351 bool bottomGlobalMuonFlag =
false;
352 int topGlobalMuon = -1;
353 int bottomGlobalMuon = -1;
354 double topGlobalMuonNorchi2 = 1e10;
355 double bottomGlobalMuonNorchi2 = 1e10;
359 for (std::vector<reco::Muon>::const_iterator gmI = globalMuons->begin(); gmI != globalMuons->end(); gmI++){
361 if ( gmI->isTrackerMuon() && gmI->isStandAloneMuon() && gmI->isGlobalMuon() ){
366 if (gmI->innerTrack() == trackerTrackRef1){
367 if (gmI->globalTrack()->normalizedChi2() < topGlobalMuonNorchi2){
368 topGlobalMuonFlag =
true;
369 topGlobalMuonNorchi2 = gmI->globalTrack()->normalizedChi2();
370 topGlobalMuon = gmCtr;
373 if (gmI->innerTrack() == trackerTrackRef2){
374 if (gmI->globalTrack()->normalizedChi2() < bottomGlobalMuonNorchi2){
375 bottomGlobalMuonFlag =
true;
376 bottomGlobalMuonNorchi2 = gmI->globalTrack()->normalizedChi2();
377 bottomGlobalMuon = gmCtr;
410 int type =
hit->geographicalId().subdetId();
416 if(type==
int( kBPIX)){++nhitinBPIX1;}
417 if(type==
int( kFPIX)){++nhitinFPIX1;}
443 int type =
hit->geographicalId().subdetId();
449 if(type==
int( kBPIX)){++nhitinBPIX2;}
450 if(type==
int( kFPIX)){++nhitinFPIX2;}
463 double ddxy_Val = track1.
d0() - track2.
d0();
464 double ddz_Val = track1.
dz() - track2.
dz();
465 double dtheta_Val = track1.
theta() - track2.
theta();
466 double deta_Val = track1.
eta() - track2.
eta();
467 double dphi_Val = track1.
phi() - track2.
phi();
468 double dpt_Val = track1.
pt() - track2.
pt();
469 double dp_Val = track1.
p() - track2.
p();
470 double dqoverpt_Val = track1.
charge() / track1.
pt() - track2.
charge() / track2.
pt();
482 int nhitinBPIXorg =0;
483 int nhitinFPIXorg =0;
490 int type =
hit->geographicalId().subdetId();
496 if(type==
int( kBPIX)){++nhitinBPIXorg;}
497 if(type==
int( kFPIX)){++nhitinFPIXorg;}
584 reco::Muon muonTop = globalMuons->at( topGlobalMuon );
585 reco::Muon muonBottom = globalMuons->at( bottomGlobalMuon );
619 dp_sta_ = sta1->p() - sta2->p();
665 dp_glb_ = glb1->p() - glb2->p();
923 if ( 2 != muons.size() )
return false;
925 double mudd0=0., mudphi=0., muddsz=0., mudeta=0.;
926 for (
unsigned int bindex = 0; bindex < muons.size(); ++bindex ) {
933 mudd0+=mutrack->
d0();
934 mudphi+=mutrack->
phi();
935 muddsz+=mutrack->
dsz();
936 mudeta+=mymuon.
eta();
939 mudd0-=mutrack->
d0();
940 mudphi-=mutrack->
phi();
941 muddsz-=mutrack->
dsz();
942 mudeta-=mymuon.
eta();
945 if ((fabs(mudd0)<15.0)&&(fabs(mudphi)<0.045)&&(fabs(muddsz)<20.0)&&(fabs(mudeta)<0.060))
return true;
double p() const
momentum vector magnitude
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
edm::Service< TFileService > tfile
EventNumber_t event() const
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.
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
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_
double thetaError() const
error on theta
virtual TrackRef globalTrack() const
reference to Track reconstructed in both tracked and muon detector