200 : compressionSettings_(iConfig.getUntrackedParameter<int>(
"compressionSettings", -1)),
201 splitTracks_(iConfig.getParameter<edm::
InputTag>(
"splitTracks")),
202 splitGlobalMuons_(iConfig.getParameter<edm::
InputTag>(
"splitGlobalMuons")),
203 originalTracks_(iConfig.getParameter<edm::
InputTag>(
"originalTracks")),
204 originalGlobalMuons_(iConfig.getParameter<edm::
InputTag>(
"originalGlobalMuons")),
205 checkIfGolden_(iConfig.getParameter<bool>(
"checkIfGolden")),
206 splitMuons_(iConfig.getParameter<bool>(
"ifSplitMuons")),
207 totalTracksToAnalyzer_(0),
210 goldenPlusTwoTracksCtr(0),
211 _passesTracksPlusMuonsCuts(0),
212 splitterTree_(nullptr),
438 bool isGolden =
true;
460 if (tracks->size() == 2)
462 if (tracks->size() == 2 && originalTracks->size() == 1 && isGolden) {
466 bool topGlobalMuonFlag =
false;
467 bool bottomGlobalMuonFlag =
false;
468 int topGlobalMuon = -1;
469 int bottomGlobalMuon = -1;
470 double topGlobalMuonNorchi2 = 1e10;
471 double bottomGlobalMuonNorchi2 = 1e10;
475 for (std::vector<reco::Muon>::const_iterator gmI = globalMuons->begin(); gmI != globalMuons->end(); gmI++) {
476 if (gmI->isTrackerMuon() && gmI->isStandAloneMuon() && gmI->isGlobalMuon()) {
480 if (gmI->innerTrack() == trackerTrackRef1) {
481 if (gmI->globalTrack()->normalizedChi2() < topGlobalMuonNorchi2) {
482 topGlobalMuonFlag =
true;
483 topGlobalMuonNorchi2 = gmI->globalTrack()->normalizedChi2();
484 topGlobalMuon = gmCtr;
487 if (gmI->innerTrack() == trackerTrackRef2) {
488 if (gmI->globalTrack()->normalizedChi2() < bottomGlobalMuonNorchi2) {
489 bottomGlobalMuonFlag =
true;
490 bottomGlobalMuonNorchi2 = gmI->globalTrack()->normalizedChi2();
491 bottomGlobalMuon = gmCtr;
518 if (
hit->isValid()) {
521 int type =
hit->geographicalId().subdetId();
535 if (type ==
int(kBPIX)) {
538 if (type ==
int(kFPIX)) {
560 if (
hit->isValid()) {
563 int type =
hit->geographicalId().subdetId();
577 if (type ==
int(kBPIX)) {
580 if (type ==
int(kFPIX)) {
593 double ddxy_Val = track1.
d0() - track2.
d0();
594 double ddz_Val = track1.
dz() - track2.
dz();
595 double dtheta_Val = track1.
theta() - track2.
theta();
596 double deta_Val = track1.
eta() - track2.
eta();
597 double dphi_Val = track1.
phi() - track2.
phi();
598 double dpt_Val = track1.
pt() - track2.
pt();
599 double dp_Val = track1.
p() - track2.
p();
600 double dqoverpt_Val = track1.
charge() / track1.
pt() - track2.
charge() / track2.
pt();
608 int nhitinTIBorg = 0;
609 int nhitinTOBorg = 0;
610 int nhitinTIDorg = 0;
611 int nhitinTECorg = 0;
612 int nhitinBPIXorg = 0;
613 int nhitinFPIXorg = 0;
615 if (
hit->isValid()) {
618 int type =
hit->geographicalId().subdetId();
632 if (type ==
int(kBPIX)) {
635 if (type ==
int(kFPIX)) {
722 reco::Muon muonTop = globalMuons->at(topGlobalMuon);
723 reco::Muon muonBottom = globalMuons->at(bottomGlobalMuon);
757 dp_sta_ = sta1->p() - sta2->p();
803 dp_glb_ = glb1->p() - glb2->p();
1053 if (2 != muons.size())
1056 double mudd0 = 0., mudphi = 0., muddsz = 0., mudeta = 0.;
1057 for (
unsigned int bindex = 0; bindex < muons.size(); ++bindex) {
1064 mudd0 += mutrack->
d0();
1065 mudphi += mutrack->
phi();
1066 muddsz += mutrack->
dsz();
1067 mudeta += mymuon.
eta();
1070 mudd0 -= mutrack->
d0();
1071 mudphi -= mutrack->
phi();
1072 muddsz -= mutrack->
dsz();
1073 mudeta -= mymuon.
eta();
1076 if ((fabs(mudd0) < 15.0) && (fabs(mudphi) < 0.045) && (fabs(muddsz) < 20.0) && (fabs(mudeta) < 0.060))
static const char runNumber_[]
static const std::string kSharedResource
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
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
#define DEFINE_FWK_MODULE(type)
double etaError() const
error on eta
double phi() const
azimuthal angle of momentum vector
T * make(const Args &...args) const
make new ROOT object
auto const & tracks
cannot be loose
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_
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
const int compressionSettings_
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
Log< level::Info, false > LogInfo
TFile & file() const
return opened TFile
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
double eta() const final
momentum pseudorapidity