61 : srcTracksToken_(mayConsume<edm::
View<
reco::Track> >(params.getParameter<edm::
InputTag>(
"src"))),
64 qualities_(params.getParameter<std::
vector<std::
string> >(
"qualities")) {
80 for (
unsigned int i = 0;
i < nQualities; ++
i) {
87 plots.
eta = fs->
make<TH1F>(Form(
"eta_%s", quality), Form(
"track \\eta (%s)", quality), 100, -3, 3);
88 plots.
phi = fs->
make<TH1F>(Form(
"phi_%s", quality), Form(
"track \\phi (%s)", quality), 100, -
M_PI, +
M_PI);
89 plots.
pt = fs->
make<TH1F>(Form(
"pt_%s", quality), Form(
"track p_{T} (%s)", quality), 100, 0, 10);
90 plots.
ptErr = fs->
make<TH1F>(Form(
"ptErr_%s", quality), Form(
"track p_{T} error (%s)", quality), 100, 0, 1);
91 plots.
invPt = fs->
make<TH1F>(Form(
"invPt_%s", quality), Form(
"track 1/p_{T} (%s)", quality), 100, -5, 5);
93 fs->
make<TH1F>(Form(
"invPtErr_%s", quality), Form(
"track 1/p_{T} error (%s)", quality), 100, 0, 0.1);
94 plots.
d0 = fs->
make<TH1F>(Form(
"d0_%s", quality), Form(
"track d0 (%s)", quality), 100, 0, 0.1);
95 plots.
d0Err = fs->
make<TH1F>(Form(
"d0Err_%s", quality), Form(
"track d0 error (%s)", quality), 100, 0, 0.1);
97 fs->
make<TH1F>(Form(
"nHits_%s", quality), Form(
"track number of total hits (%s)", quality), 60, 0, 60);
100 fs->
make<TProfile>(Form(
"pxbHitsEta_%s", quality), Form(
"#hits in Pixel Barrel (%s)", quality), 100, 0, 3);
102 fs->
make<TProfile>(Form(
"pxeHitsEta_%s", quality), Form(
"#hits in Pixel Endcap (%s)", quality), 100, 0, 3);
104 Form(
"tibHitsEta_%s", quality), Form(
"#hits in Tracker Inner Barrel (%s)", quality), 100, 0, 3);
106 Form(
"tobHitsEta_%s", quality), Form(
"#hits in Tracker Outer Barrel (%s)", quality), 100, 0, 3);
108 Form(
"tidHitsEta_%s", quality), Form(
"#hits in Tracker Inner Disk (%s)", quality), 100, 0, 3);
110 fs->
make<TProfile>(Form(
"tecHitsEta_%s", quality), Form(
"#hits in Tracker Endcap (%s)", quality), 100, 0, 3);
127 std::vector<const reco::Track *>
tracks;
134 tracks.push_back(&*iter);
145 for (pat::MuonCollection::const_iterator iter = muonsHandle->begin(); iter != muonsHandle->end(); ++iter) {
149 tracks.push_back(&*track);
157 for (
unsigned int i = 0;
i < nQualities; ++
i) {
167 for (std::vector<const reco::Track *>::const_iterator iter = tracks.begin(); iter != tracks.end(); ++iter) {
176 plots.
eta->Fill(track.
eta());
177 plots.
phi->Fill(track.
phi());
179 plots.
pt->Fill(track.
pt());
188 plots.
d0->Fill(track.
dxy(beamSpot->position()));
double qoverp() const
q / p
static const std::string kSharedResource
bool isNonnull() const
Checks for non-null.
~PatTrackAnalyzer() override
TrackQuality
track quality
double dxyError() const
error on dxy
#define DEFINE_FWK_MODULE(type)
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...