10 #include <Math/VectorUtil.h> 84 jetPtCut_(params.getParameter<double>(
"jetPtCut")),
85 jetEtaCut_(params.getParameter<double>(
"jetEtaCut")),
86 maxDeltaR_(params.getParameter<double>(
"maxDeltaR")),
87 minPt_(params.getParameter<double>(
"minPt")),
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();
259 jet->momentum(),
track->momentum());
286 double ipError =
track->dxyError();
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
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
unsigned int minTotalHits_
virtual void beginJob() override
Abs< T >::type abs(const T &t)
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_
const Point & position() const
position