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;
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();
560 if (
hit->isValid()) {
563 int type =
hit->geographicalId().subdetId();
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();
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
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
edm::Service< TFileService > tfile
static constexpr auto TEC
int goldenPlusTwoTracksCtr
edm::EDGetTokenT< reco::MuonCollection > STAMuonsToken_
edm::EDGetTokenT< reco::MuonCollection > splitGlobalMuonsToken_
double ptError() const
error on Pt (set to 1000 TeV if charge==0 for safety)
virtual TrackRef globalTrack() const
reference to Track reconstructed in both tracked and muon detector
CosmicSplitterValidation(const edm::ParameterSet &)
void analyze(const edm::Event &iEvent, const edm::EventSetup &iSetup) override
double p() const
momentum vector magnitude
T const * product() const
double thetaError() const
error on theta
const Point & referencePoint() const
Reference point on the track.
virtual TrackRef outerTrack() const
reference to Track reconstructed in the muon detector only
edm::InputTag splitTracks_
std::vector< Muon > MuonCollection
collection of Muon objects
double dsz() const
dsz parameter (THIS IS NOT the SZ impact parameter to (0,0,0) if refPoint is far from (0...
edm::EDGetTokenT< std::vector< reco::Track > > splitTracksToken_
double pt() const
track transverse momentum
auto recHits() const
Access to reconstructed hits on the track.
int charge() const
track electric charge
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
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
double phi() const
azimuthal angle of momentum vector
#define DEFINE_FWK_MODULE(type)
edm::EDGetTokenT< reco::MuonCollection > originalGlobalMuonsToken_
edm::InputTag splitGlobalMuons_
static constexpr auto TOB
const int compressionSettings_
Log< level::Info, false > LogInfo
double eta() const
pseudorapidity of momentum vector
static constexpr auto TIB
auto const & tracks
cannot be loose
double d0() const
dxy parameter in perigee convention (d0 = -dxy)
int totalTracksToAnalyzer_
XYZPointD XYZPoint
point in space with cartesian internal representation
double normalizedChi2() const
chi-squared divided by n.d.o.f. (or chi-squared * 1e6 if n.d.o.f. is zero)
double theta() const
polar angle
edm::InputTag originalGlobalMuons_
~CosmicSplitterValidation() override
T const * get() const
Returns C++ pointer to the item.
int _passesTracksPlusMuonsCuts
bool is_gold_muon(const edm::Event &e)
edm::EDGetTokenT< std::vector< reco::Track > > originalTracksToken_
edm::InputTag originalTracks_
double d0Error() const
error on d0
double phiError() const
error on phi
static constexpr auto TID
double etaError() const
error on eta
double eta() const final
momentum pseudorapidity