61 : srcTracksToken_(mayConsume<edm::
View<
reco::Track> >(params.getParameter<edm::
InputTag>(
"src"))),
64 qualities_(params.getParameter<std::
vector<std::
string> >(
"qualities")) {}
78 for (
unsigned int i = 0;
i < nQualities; ++
i) {
85 plots.
eta = fs->
make<TH1F>(Form(
"eta_%s", quality), Form(
"track \\eta (%s)", quality), 100, -3, 3);
86 plots.
phi = fs->
make<TH1F>(Form(
"phi_%s", quality), Form(
"track \\phi (%s)", quality), 100, -
M_PI, +
M_PI);
87 plots.
pt = fs->
make<TH1F>(Form(
"pt_%s", quality), Form(
"track p_{T} (%s)", quality), 100, 0, 10);
88 plots.
ptErr = fs->
make<TH1F>(Form(
"ptErr_%s", quality), Form(
"track p_{T} error (%s)", quality), 100, 0, 1);
89 plots.
invPt = fs->
make<TH1F>(Form(
"invPt_%s", quality), Form(
"track 1/p_{T} (%s)", quality), 100, -5, 5);
91 fs->
make<TH1F>(Form(
"invPtErr_%s", quality), Form(
"track 1/p_{T} error (%s)", quality), 100, 0, 0.1);
92 plots.
d0 = fs->
make<TH1F>(Form(
"d0_%s", quality), Form(
"track d0 (%s)", quality), 100, 0, 0.1);
93 plots.
d0Err = fs->
make<TH1F>(Form(
"d0Err_%s", quality), Form(
"track d0 error (%s)", quality), 100, 0, 0.1);
95 fs->
make<TH1F>(Form(
"nHits_%s", quality), Form(
"track number of total hits (%s)", quality), 60, 0, 60);
98 fs->
make<TProfile>(Form(
"pxbHitsEta_%s", quality), Form(
"#hits in Pixel Barrel (%s)", quality), 100, 0, 3);
100 fs->
make<TProfile>(Form(
"pxeHitsEta_%s", quality), Form(
"#hits in Pixel Endcap (%s)", quality), 100, 0, 3);
102 Form(
"tibHitsEta_%s", quality), Form(
"#hits in Tracker Inner Barrel (%s)", quality), 100, 0, 3);
104 Form(
"tobHitsEta_%s", quality), Form(
"#hits in Tracker Outer Barrel (%s)", quality), 100, 0, 3);
106 Form(
"tidHitsEta_%s", quality), Form(
"#hits in Tracker Inner Disk (%s)", quality), 100, 0, 3);
108 fs->
make<TProfile>(Form(
"tecHitsEta_%s", quality), Form(
"#hits in Tracker Endcap (%s)", quality), 100, 0, 3);
125 std::vector<const reco::Track *>
tracks;
132 tracks.push_back(&*iter);
143 for (pat::MuonCollection::const_iterator iter = muonsHandle->begin(); iter != muonsHandle->end(); ++iter) {
147 tracks.push_back(&*track);
155 for (
unsigned int i = 0;
i < nQualities; ++
i) {
165 for (std::vector<const reco::Track *>::const_iterator iter = tracks.begin(); iter != tracks.end(); ++iter) {
174 plots.
eta->Fill(track.
eta());
175 plots.
phi->Fill(track.
phi());
177 plots.
pt->Fill(track.
pt());
186 plots.
d0->Fill(track.
dxy(beamSpot->position()));
double qoverp() const
q / p
bool isNonnull() const
Checks for non-null.
~PatTrackAnalyzer() override
TrackQuality
track quality
double dxyError() const
error on dxy
#define DEFINE_FWK_MODULE(type)
uint32_t const *__restrict__ Quality * quality
std::vector< Plots > plots_
std::vector< std::string > qualities_
edm::EDGetTokenT< pat::MuonCollection > srcMuonsToken_
double phi() const
azimuthal angle of momentum vector
T * make(const Args &...args) const
make new ROOT object
auto const & tracks
cannot be loose
int numberOfValidStripTOBHits() const
std::vector< Muon > MuonCollection
collection of Muon objects
double eta() const
pseudorapidity of momentum vector
int numberOfValidPixelBarrelHits() const
double pt() const
track transverse momentum
double ptError() const
error on Pt (set to 1000 TeV if charge==0 for safety)
Abs< T >::type abs(const T &t)
int numberOfValidStripTIDHits() const
unsigned short numberOfValidHits() const
number of valid hits found
int numberOfValidStripTECHits() const
PatTrackAnalyzer(const edm::ParameterSet ¶ms)
constructor and destructor
edm::EDGetTokenT< reco::BeamSpot > beamSpotToken_
double qoverpError() const
error on signed transverse curvature
void analyze(const edm::Event &event, const edm::EventSetup &es) override
static TrackQuality qualityByName(const std::string &name)
const HitPattern & hitPattern() const
Access the hit pattern, indicating in which Tracker layers the track has hits.
int numberOfValidStripTIBHits() const
bool quality(const TrackQuality) const
Track quality.
int numberOfValidPixelEndcapHits() const
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
edm::EDGetTokenT< edm::View< reco::Track > > srcTracksToken_
double dxy() const
dxy parameter. (This is the transverse impact parameter w.r.t. to (0,0,0) ONLY if refPoint is close t...