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);
107 flavour =
"light flavour jets";
125 fs->make<TH1F>(Form(
"allIP_%s",
name), Form(
"signed IP for all tracks in %s",
flavour), 100, -0.1, 0.2);
126 plots.allIPErr =
fs->make<TH1F>(
127 Form(
"allIPErr_%s",
name), Form(
"error of signed IP for all tracks in %s",
flavour), 100, 0, 0.05);
128 plots.allIPSig =
fs->make<TH1F>(
129 Form(
"allIPSig_%s",
name), Form(
"signed IP significance for all tracks in %s",
flavour), 100, -10, 20);
131 plots.trackIP =
fs->make<TH1F>(
132 Form(
"trackIP_%s",
name), Form(
"signed IP for selected positive track in %s",
flavour), 100, -0.1, 0.2);
133 plots.trackIPErr =
fs->make<TH1F>(Form(
"trackIPErr_%s",
name),
134 Form(
"error of signed IP for selected positive track in %s",
flavour),
138 plots.trackIPSig =
fs->make<TH1F>(Form(
"trackIPSig_%s",
name),
139 Form(
"signed IP significance for selected positive track in %s",
flavour),
144 plots.negativeIP =
fs->make<TH1F>(
145 Form(
"negativeIP_%s",
name), Form(
"signed IP for selected negative track in %s",
flavour), 100, -0.2, 0.1);
146 plots.negativeIPErr =
fs->make<TH1F>(Form(
"negativeIPErr_%s",
name),
147 Form(
"error of signed IP for selected negative track in %s",
flavour),
151 plots.negativeIPSig =
fs->make<TH1F>(Form(
"negativeIPSig_%s",
name),
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
PatBJetTrackAnalyzer(const edm::ParameterSet ¶ms)
constructor and destructor
std::vector< Vertex > VertexCollection
unsigned int minTotalHits_
Abs< T >::type abs(const T &t)
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
double significance() const
unsigned int minPixelHits_