80 for (
unsigned int i = 0;
i < nQualities; ++
i) {
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);
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);
103 plots.tibHitsEta =
fs->make<TProfile>(
104 Form(
"tibHitsEta_%s",
quality), Form(
"#hits in Tracker Inner Barrel (%s)",
quality), 100, 0, 3);
105 plots.tobHitsEta =
fs->make<TProfile>(
106 Form(
"tobHitsEta_%s",
quality), Form(
"#hits in Tracker Outer Barrel (%s)",
quality), 100, 0, 3);
107 plots.tidHitsEta =
fs->make<TProfile>(
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;
145 for (pat::MuonCollection::const_iterator iter = muonsHandle->begin(); iter != muonsHandle->end(); ++iter) {
148 if (
track.isNonnull())
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) {
199 plots.pxbHitsEta->Fill(absEta,
hits.numberOfValidPixelBarrelHits());
200 plots.pxeHitsEta->Fill(absEta,
hits.numberOfValidPixelEndcapHits());
201 plots.tibHitsEta->Fill(absEta,
hits.numberOfValidStripTIBHits());
202 plots.tobHitsEta->Fill(absEta,
hits.numberOfValidStripTOBHits());
203 plots.tidHitsEta->Fill(absEta,
hits.numberOfValidStripTIDHits());
204 plots.tecHitsEta->Fill(absEta,
hits.numberOfValidStripTECHits());
static const std::string kSharedResource
~PatTrackAnalyzer() override
TrackQuality
track quality
#define DEFINE_FWK_MODULE(type)
std::vector< Plots > plots_
std::vector< std::string > qualities_
edm::EDGetTokenT< pat::MuonCollection > srcMuonsToken_
std::vector< Muon > MuonCollection
collection of Muon objects
Abs< T >::type abs(const T &t)
PatTrackAnalyzer(const edm::ParameterSet ¶ms)
constructor and destructor
edm::EDGetTokenT< reco::BeamSpot > beamSpotToken_
void analyze(const edm::Event &event, const edm::EventSetup &es) override
static TrackQuality qualityByName(const std::string &name)
auto const & tracks
cannot be loose
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
edm::EDGetTokenT< edm::View< reco::Track > > srcTracksToken_