10 #include <Math/VectorUtil.h>
77 jetPtCut_(params.getParameter<double>(
"jetPtCut")),
78 jetEtaCut_(params.getParameter<double>(
"jetEtaCut")),
79 maxDeltaR_(params.getParameter<double>(
"maxDeltaR")),
80 minPt_(params.getParameter<double>(
"minPt")),
81 minPixelHits_(params.getParameter<unsigned int>(
"minPixelHits")),
82 minTotalHits_(params.getParameter<unsigned int>(
"minTotalHits")),
83 nThTrack_(params.getParameter<unsigned int>(
"nThTrack")) {
94 flavours_ = fs->
make<TH1F>(
"flavours",
"jet flavours", 5, 0, 5);
103 flavour =
"all jets";
107 flavour =
"light flavour jets";
111 flavour =
"charm jets";
115 flavour =
"bottom jets";
119 flavour =
"unidentified jets";
125 fs->
make<TH1F>(Form(
"allIP_%s", name), Form(
"signed IP for all tracks in %s", flavour), 100, -0.1, 0.2);
127 Form(
"allIPErr_%s", name), Form(
"error of signed IP for all tracks in %s", flavour), 100, 0, 0.05);
129 Form(
"allIPSig_%s", name), Form(
"signed IP significance for all tracks in %s", flavour), 100, -10, 20);
132 Form(
"trackIP_%s", name), Form(
"signed IP for selected positive track in %s", flavour), 100, -0.1, 0.2);
134 Form(
"error of signed IP for selected positive track in %s", flavour),
139 Form(
"signed IP significance for selected positive track in %s", flavour),
145 Form(
"negativeIP_%s", name), Form(
"signed IP for selected negative track in %s", flavour), 100, -0.2, 0.1);
147 Form(
"error of signed IP for selected negative track in %s", flavour),
152 Form(
"signed IP significance for selected negative track in %s", flavour),
157 plots.
nTracks = fs->
make<TH1F>(Form(
"nTracks_%s", name), Form(
"number of usable tracks in %s", flavour), 30, 0, 30);
159 fs->
make<TH1F>(Form(
"allDeltaR_%s", name), Form(
"\\DeltaR between track and %s", flavour), 100, 0, 1);
187 if (pvHandle->empty())
194 for (pat::JetCollection::const_iterator
jet = jetsHandle->begin();
jet != jetsHandle->end(); ++
jet) {
223 std::vector<Measurement1D> ipValErr;
233 for (reco::TrackCollection::const_iterator
track = tracksHandle->begin();
track != tracksHandle->end(); ++
track) {
268 double ipError =
track->dxyError();
280 closestPoint.SetZ(0.);
281 double sign = closestPoint.Dot(
jet->momentum());
297 for (std::vector<Measurement1D>::const_iterator iter = ipValErr.begin(); iter != ipValErr.end(); ++iter) {
332 trk = &ipValErr[ipValErr.size() -
nThTrack_];
static const std::string kSharedResource
edm::EDGetTokenT< reco::TrackCollection > tracksToken_
edm::EDGetTokenT< reco::VertexCollection > primaryVerticesToken_
~PatBJetTrackAnalyzer() override
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
T * make(const Args &...args) const
make new ROOT object
PatBJetTrackAnalyzer(const edm::ParameterSet ¶ms)
constructor and destructor
std::vector< Vertex > VertexCollection
unsigned int minTotalHits_
Abs< T >::type abs(const T &t)
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_
void analyze(const edm::Event &event, const edm::EventSetup &es) override
unsigned int minPixelHits_