202 : compressionSettings_(iConfig.getUntrackedParameter<
int>(
"compressionSettings", -1)),
203 splitTracks_(iConfig.getParameter<
edm::
InputTag>(
"splitTracks")),
204 splitGlobalMuons_(iConfig.getParameter<
edm::
InputTag>(
"splitGlobalMuons")),
205 originalTracks_(iConfig.getParameter<
edm::
InputTag>(
"originalTracks")),
206 originalGlobalMuons_(iConfig.getParameter<
edm::
InputTag>(
"originalGlobalMuons")),
207 checkIfGolden_(iConfig.getParameter<
bool>(
"checkIfGolden")),
208 splitMuons_(iConfig.getParameter<
bool>(
"ifSplitMuons")),
209 totalTracksToAnalyzer_(0),
212 goldenPlusTwoTracksCtr(0),
213 _passesTracksPlusMuonsCuts(0),
214 splitterTree_(nullptr),
433 desc.setComment(
"Validates alignment payloads by comparing split cosmic tracks parameters");
434 desc.addUntracked<
int>(
"compressionSettings", -1);
439 desc.add<
bool>(
"checkIfGolden",
false);
440 desc.add<
bool>(
"ifSplitMuons",
false);
451 bool isGolden =
true;
479 bool topGlobalMuonFlag =
false;
480 bool bottomGlobalMuonFlag =
false;
481 int topGlobalMuon = -1;
482 int bottomGlobalMuon = -1;
483 double topGlobalMuonNorchi2 = 1e10;
484 double bottomGlobalMuonNorchi2 = 1e10;
488 for (std::vector<reco::Muon>::const_iterator gmI =
globalMuons->begin(); gmI !=
globalMuons->end(); gmI++) {
489 if (gmI->isTrackerMuon() && gmI->isStandAloneMuon() && gmI->isGlobalMuon()) {
493 if (gmI->innerTrack() == trackerTrackRef1) {
494 if (gmI->globalTrack()->normalizedChi2() < topGlobalMuonNorchi2) {
495 topGlobalMuonFlag =
true;
496 topGlobalMuonNorchi2 = gmI->globalTrack()->normalizedChi2();
497 topGlobalMuon = gmCtr;
500 if (gmI->innerTrack() == trackerTrackRef2) {
501 if (gmI->globalTrack()->normalizedChi2() < bottomGlobalMuonNorchi2) {
502 bottomGlobalMuonFlag =
true;
503 bottomGlobalMuonNorchi2 = gmI->globalTrack()->normalizedChi2();
504 bottomGlobalMuon = gmCtr;
531 if (
hit->isValid()) {
534 int type =
hit->geographicalId().subdetId();
573 if (
hit->isValid()) {
576 int type =
hit->geographicalId().subdetId();
606 double ddxy_Val = track1.
d0() - track2.
d0();
607 double ddz_Val = track1.
dz() - track2.
dz();
608 double dtheta_Val = track1.
theta() - track2.
theta();
609 double deta_Val = track1.
eta() - track2.
eta();
610 double dphi_Val = track1.
phi() - track2.
phi();
611 double dpt_Val = track1.
pt() - track2.
pt();
612 double dp_Val = track1.
p() - track2.
p();
613 double dqoverpt_Val = track1.
charge() / track1.
pt() - track2.
charge() / track2.
pt();
621 int nhitinTIBorg = 0;
622 int nhitinTOBorg = 0;
623 int nhitinTIDorg = 0;
624 int nhitinTECorg = 0;
625 int nhitinBPIXorg = 0;
626 int nhitinFPIXorg = 0;
628 if (
hit->isValid()) {
631 int type =
hit->geographicalId().subdetId();
770 dp_sta_ = sta1->p() - sta2->p();
816 dp_glb_ = glb1->p() - glb2->p();
1066 if (2 !=
muons.size())
1069 double mudd0 = 0., mudphi = 0., muddsz = 0., mudeta = 0.;
1070 for (
unsigned int bindex = 0; bindex <
muons.size(); ++bindex) {
1077 mudd0 += mutrack->
d0();
1078 mudphi += mutrack->
phi();
1079 muddsz += mutrack->
dsz();
1080 mudeta += mymuon.
eta();
1083 mudd0 -= mutrack->
d0();
1084 mudphi -= mutrack->
phi();
1085 muddsz -= mutrack->
dsz();
1086 mudeta -= mymuon.
eta();
1089 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
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)
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
~CosmicSplitterValidation() override=default
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
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_
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
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
double eta() const final
momentum pseudorapidity