84 for(
unsigned int i = 0;
i < nQualities; ++
i) {
91 plots.
eta = fs->
make<TH1F>(Form(
"eta_%s", quality),
92 Form(
"track \\eta (%s)", quality),
94 plots.
phi = fs->
make<TH1F>(Form(
"phi_%s", quality),
95 Form(
"track \\phi (%s)", quality),
97 plots.
pt = fs->
make<TH1F>(Form(
"pt_%s", quality),
98 Form(
"track p_{T} (%s)", quality),
100 plots.
ptErr = fs->
make<TH1F>(Form(
"ptErr_%s", quality),
101 Form(
"track p_{T} error (%s)", quality),
103 plots.
invPt = fs->
make<TH1F>(Form(
"invPt_%s", quality),
104 Form(
"track 1/p_{T} (%s)", quality),
106 plots.
invPtErr = fs->
make<TH1F>(Form(
"invPtErr_%s", quality),
107 Form(
"track 1/p_{T} error (%s)", quality),
109 plots.
d0 = fs->
make<TH1F>(Form(
"d0_%s", quality),
110 Form(
"track d0 (%s)", quality),
112 plots.
d0Err = fs->
make<TH1F>(Form(
"d0Err_%s", quality),
113 Form(
"track d0 error (%s)", quality),
115 plots.
nHits = fs->
make<TH1F>(Form(
"nHits_%s", quality),
116 Form(
"track number of total hits (%s)", quality),
119 plots.
pxbHitsEta = fs->
make<TProfile>(Form(
"pxbHitsEta_%s", quality),
120 Form(
"#hits in Pixel Barrel (%s)", quality),
122 plots.
pxeHitsEta = fs->
make<TProfile>(Form(
"pxeHitsEta_%s", quality),
123 Form(
"#hits in Pixel Endcap (%s)", quality),
125 plots.
tibHitsEta = fs->
make<TProfile>(Form(
"tibHitsEta_%s", quality),
126 Form(
"#hits in Tracker Inner Barrel (%s)", quality),
128 plots.
tobHitsEta = fs->
make<TProfile>(Form(
"tobHitsEta_%s", quality),
129 Form(
"#hits in Tracker Outer Barrel (%s)", quality),
131 plots.
tidHitsEta = fs->
make<TProfile>(Form(
"tidHitsEta_%s", quality),
132 Form(
"#hits in Tracker Inner Disk (%s)", quality),
134 plots.
tecHitsEta = fs->
make<TProfile>(Form(
"tecHitsEta_%s", quality),
135 Form(
"#hits in Tracker Endcap (%s)", quality),
154 std::vector<const reco::Track*>
tracks;
161 iter != tracksHandle->end(); ++iter)
162 tracks.push_back(&*iter);
173 for(pat::MuonCollection::const_iterator iter = muonsHandle->begin();
174 iter != muonsHandle->end(); ++iter) {
178 tracks.push_back(&*track);
186 for(
unsigned int i = 0;
i < nQualities; ++
i) {
196 for(std::vector<const reco::Track*>::const_iterator iter = tracks.begin();
197 iter != tracks.end(); ++iter) {
206 plots.
eta->Fill(track.
eta());
207 plots.
phi->Fill(track.
phi());
209 plots.
pt->Fill(track.
pt());
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)
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
int numberOfValidStripTOBHits() const
std::vector< Muon > MuonCollection
collection of Muon objects
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
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_
const Point & position() const
position
double dxy() const
dxy parameter. (This is the transverse impact parameter w.r.t. to (0,0,0) ONLY if refPoint is close t...
EDGetTokenT< ProductType > mayConsume(edm::InputTag const &tag)