61 src_(params.getParameter<edm::InputTag>(
"src")),
62 beamSpot_(params.getParameter<edm::InputTag>(
"beamSpot")),
63 qualities_(params.getParameter< std::vector<std::string> >(
"qualities"))
82 for(
unsigned int i = 0;
i < nQualities; ++
i) {
89 plots.
eta = fs->
make<TH1F>(Form(
"eta_%s", quality),
90 Form(
"track \\eta (%s)", quality),
92 plots.
phi = fs->
make<TH1F>(Form(
"phi_%s", quality),
93 Form(
"track \\phi (%s)", quality),
95 plots.
pt = fs->
make<TH1F>(Form(
"pt_%s", quality),
96 Form(
"track p_{T} (%s)", quality),
98 plots.
ptErr = fs->
make<TH1F>(Form(
"ptErr_%s", quality),
99 Form(
"track p_{T} error (%s)", quality),
101 plots.
invPt = fs->
make<TH1F>(Form(
"invPt_%s", quality),
102 Form(
"track 1/p_{T} (%s)", quality),
104 plots.
invPtErr = fs->
make<TH1F>(Form(
"invPtErr_%s", quality),
105 Form(
"track 1/p_{T} error (%s)", quality),
107 plots.
d0 = fs->
make<TH1F>(Form(
"d0_%s", quality),
108 Form(
"track d0 (%s)", quality),
110 plots.
d0Err = fs->
make<TH1F>(Form(
"d0Err_%s", quality),
111 Form(
"track d0 error (%s)", quality),
113 plots.
nHits = fs->
make<TH1F>(Form(
"nHits_%s", quality),
114 Form(
"track number of total hits (%s)", quality),
117 plots.
pxbHitsEta = fs->
make<TProfile>(Form(
"pxbHitsEta_%s", quality),
118 Form(
"#hits in Pixel Barrel (%s)", quality),
120 plots.
pxeHitsEta = fs->
make<TProfile>(Form(
"pxeHitsEta_%s", quality),
121 Form(
"#hits in Pixel Endcap (%s)", quality),
123 plots.
tibHitsEta = fs->
make<TProfile>(Form(
"tibHitsEta_%s", quality),
124 Form(
"#hits in Tracker Inner Barrel (%s)", quality),
126 plots.
tobHitsEta = fs->
make<TProfile>(Form(
"tobHitsEta_%s", quality),
127 Form(
"#hits in Tracker Outer Barrel (%s)", quality),
129 plots.
tidHitsEta = fs->
make<TProfile>(Form(
"tidHitsEta_%s", quality),
130 Form(
"#hits in Tracker Inner Disk (%s)", quality),
132 plots.
tecHitsEta = fs->
make<TProfile>(Form(
"tecHitsEta_%s", quality),
133 Form(
"#hits in Tracker Endcap (%s)", quality),
152 std::vector<const reco::Track*>
tracks;
154 event.getByLabel(
src_, tracksHandle);
159 iter != tracksHandle->end(); ++iter)
160 tracks.push_back(&*iter);
164 event.getByLabel(
src_, muonsHandle);
171 for(pat::MuonCollection::const_iterator iter = muonsHandle->begin();
172 iter != muonsHandle->end(); ++iter) {
176 tracks.push_back(&*track);
184 for(
unsigned int i = 0;
i < nQualities; ++
i) {
194 for(std::vector<const reco::Track*>::const_iterator iter = tracks.begin();
195 iter != tracks.end(); ++iter) {
204 plots.
eta->Fill(track.
eta());
205 plots.
phi->Fill(track.
phi());
207 plots.
pt->Fill(track.
pt());
216 plots.
d0->Fill(track.
dxy(beamSpot->position()));
double qoverp() const
q/p
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
TrackQuality
track quality
double dxyError() const
error on dxy
#define DEFINE_FWK_MODULE(type)
std::vector< Plots > plots_
std::vector< std::string > qualities_
double phi() const
azimuthal angle of momentum vector
int numberOfValidStripTIDHits() const
bool isNonnull() const
Checks for non-null.
double eta() const
pseudorapidity of momentum vector
int numberOfValidPixelEndcapHits() const
double pt() const
track transverse momentum
double ptError() const
error on Pt (set to 1000 TeV if charge==0 for safety)
int numberOfValidStripTECHits() const
unsigned short numberOfValidHits() const
number of valid hits found
const HitPattern & hitPattern() const
Access the hit pattern, indicating in which Tracker layers the track has hits.
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
int numberOfValidStripTIBHits() const
double qoverpError() const
error on signed transverse curvature
virtual void analyze(const edm::Event &event, const edm::EventSetup &es)
static TrackQuality qualityByName(const std::string &name)
bool quality(const TrackQuality) const
Track quality.
int numberOfValidStripTOBHits() const
T * make() const
make new ROOT object
int numberOfValidPixelBarrelHits() const
double dxy() const
dxy parameter. (This is the transverse impact parameter w.r.t. to (0,0,0) ONLY if refPoint is close t...