62 srcTracksToken_(mayConsume<edm::
View<
reco::Track> >(params.getParameter<edm::InputTag>(
"src"))),
63 srcMuonsToken_(mayConsume<pat::
MuonCollection>(params.getParameter<edm::InputTag>(
"src"))),
64 beamSpotToken_(consumes<
reco::
BeamSpot>(params.getParameter<edm::InputTag>(
"beamSpot"))),
65 qualities_(params.getParameter< std::vector<std::
string> >(
"qualities"))
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();
206 plots.
eta->Fill(track.
eta());
207 plots.
phi->Fill(track.
phi());
209 plots.
pt->Fill(track.
pt());
218 plots.
d0->Fill(track.
dxy(beamSpot->position()));
double qoverp() const
q / p
bool isNonnull() const
Checks for non-null.
virtual void beginJob() 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
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
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
PatTrackAnalyzer(const edm::ParameterSet ¶ms)
constructor and destructor
edm::EDGetTokenT< reco::BeamSpot > beamSpotToken_
double qoverpError() const
error on signed transverse curvature
virtual 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...