10 #include <Math/VectorUtil.h>
80 jetsToken_(consumes<pat::
JetCollection>(params.getParameter<edm::InputTag>(
"jets"))),
81 tracksToken_(consumes<
reco::
TrackCollection>(params.getParameter<edm::InputTag>(
"tracks"))),
82 beamSpotToken_(consumes<
reco::
BeamSpot>(params.getParameter<edm::InputTag>(
"beamSpot"))),
83 primaryVerticesToken_(consumes<
reco::
VertexCollection>(params.getParameter<edm::InputTag>(
"primaryVertices"))),
84 jetPtCut_(params.getParameter<double>(
"jetPtCut")),
85 jetEtaCut_(params.getParameter<double>(
"jetEtaCut")),
86 maxDeltaR_(params.getParameter<double>(
"maxDeltaR")),
87 minPt_(params.getParameter<double>(
"minPt")),
88 minPixelHits_(params.getParameter<unsigned int>(
"minPixelHits")),
89 minTotalHits_(params.getParameter<unsigned int>(
"minTotalHits")),
90 nThTrack_(params.getParameter<unsigned int>(
"nThTrack"))
104 flavours_ = fs->
make<TH1F>(
"flavours",
"jet flavours", 5, 0, 5);
113 flavour =
"all jets";
117 flavour =
"light flavour jets";
121 flavour =
"charm jets";
125 flavour =
"bottom jets";
129 flavour =
"unidentified jets";
134 plots.
allIP = fs->
make<TH1F>(Form(
"allIP_%s", name),
135 Form(
"signed IP for all tracks in %s", flavour),
137 plots.
allIPErr = fs->
make<TH1F>(Form(
"allIPErr_%s", name),
138 Form(
"error of signed IP for all tracks in %s", flavour),
140 plots.
allIPSig = fs->
make<TH1F>(Form(
"allIPSig_%s", name),
141 Form(
"signed IP significance for all tracks in %s", flavour),
144 plots.
trackIP = fs->
make<TH1F>(Form(
"trackIP_%s", name),
145 Form(
"signed IP for selected positive track in %s", flavour),
148 Form(
"error of signed IP for selected positive track in %s", flavour),
151 Form(
"signed IP significance for selected positive track in %s", flavour),
155 Form(
"signed IP for selected negative track in %s", flavour),
158 Form(
"error of signed IP for selected negative track in %s", flavour),
161 Form(
"signed IP significance for selected negative track in %s", flavour),
164 plots.
nTracks = fs->
make<TH1F>(Form(
"nTracks_%s", name),
165 Form(
"number of usable tracks in %s", flavour),
168 Form(
"\\DeltaR between track and %s", flavour),
198 if (pvHandle->empty())
205 for(pat::JetCollection::const_iterator
jet = jetsHandle->begin();
206 jet != jetsHandle->end(); ++
jet) {
237 std::vector<Measurement1D> ipValErr;
247 for(reco::TrackCollection::const_iterator track = tracksHandle->begin();
248 track != tracksHandle->end(); ++track) {
251 if (track->pt() <
minPt_ ||
252 track->hitPattern().numberOfValidHits() < (int)
minTotalHits_ ||
253 track->hitPattern().numberOfValidPixelHits() < (int)
minPixelHits_)
258 double deltaR = ROOT::Math::VectorUtil::DeltaR(
259 jet->momentum(), track->momentum());
286 double ipError = track->dxyError();
287 double ipValue =
std::abs(track->dxy(pv));
296 math::XYZVector closestPoint = track->referencePoint() - beamSpot->position();
298 closestPoint.SetZ(0.);
299 double sign = closestPoint.Dot(
jet->momentum());
315 for(std::vector<Measurement1D>::const_iterator iter = ipValErr.begin();
316 iter != ipValErr.end(); ++iter) {
351 trk = &ipValErr[ipValErr.size() -
nThTrack_];
edm::EDGetTokenT< reco::TrackCollection > tracksToken_
edm::EDGetTokenT< reco::VertexCollection > primaryVerticesToken_
std::vector< Jet > JetCollection
static bool significanceHigher(const Measurement1D &meas1, const Measurement1D &meas2)
edm::EDGetTokenT< pat::JetCollection > jetsToken_
#define DEFINE_FWK_MODULE(type)
std::vector< Track > TrackCollection
collection of Tracks
std::vector< Vertex > VertexCollection
collection of Vertex objects
T * make(const Args &...args) const
make new ROOT object
PatBJetTrackAnalyzer(const edm::ParameterSet ¶ms)
constructor and destructor
unsigned int minTotalHits_
virtual void beginJob() override
Abs< T >::type abs(const T &t)
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
double deltaR(double eta1, double eta2, double phi1, double phi2)
double significance() const
XYZVectorD XYZVector
spatial vector with cartesian internal representation
XYZPointD XYZPoint
point in space with cartesian internal representation
struct PatBJetTrackAnalyzer::Plots plots_[N_JET_TYPES]
edm::EDGetTokenT< reco::BeamSpot > beamSpotToken_
virtual void analyze(const edm::Event &event, const edm::EventSetup &es) override
unsigned int minPixelHits_
int flavour(const Candidate &part)