106 : pvsTag_(iConfig.getParameter<
edm::
InputTag>(
"vtxCollection")),
108 tracksTag_(iConfig.getParameter<
edm::
InputTag>(
"trackCollection")),
110 triggerTag_(iConfig.getParameter<
edm::
InputTag>(
"triggerResults")),
112 printTriggerTable_(iConfig.getUntrackedParameter<
int>(
"printTriggerTable")),
113 minVtxNdf_(iConfig.getUntrackedParameter<double>(
"minVertexNdf")),
114 minVtxWgt_(iConfig.getUntrackedParameter<double>(
"minVertexMeanWeight")),
115 profilePtBorders_(iConfig.getUntrackedParameter<
std::
vector<double>>(
"profilePtBorders")),
116 iovList_(iConfig.getUntrackedParameter<
std::
vector<
int>>(
"iovList")) {
156 std::cout << hltName <<
" " << decision << std::endl;
161 for (reco::VertexCollection::const_iterator pvIt = pvtx.begin(); pvIt != pvtx.end(); pvIt++) {
177 if (trki->isNonnull()) {
188 for (
uint tracksIt = 0; tracksIt < ntrks; tracksIt++) {
191 double dxyRes = tk.dxy(pos_) *
cmToum;
192 double dzRes = tk.dz(pos_) *
cmToum;
194 double dxy_err = tk.dxyError() *
cmToum;
195 double dz_err = tk.dzError() *
cmToum;
197 float trackphi = tk.phi();
198 float tracketa = tk.eta();
199 float trackpt = tk.pt();
284 h_ntrks =
outfile_->
make<TH1F>(
"h_ntrks",
"n. trks;n. of tracks/vertex;n. vertices", 100, 0, 100);
285 h_probePt =
outfile_->
make<TH1F>(
"h_probePt",
"p_{T} of probe track;track p_{T} (GeV); tracks", 100, 0., 500.);
286 h_probeEta =
outfile_->
make<TH1F>(
"h_probeEta",
"#eta of the probe track;track #eta;tracks", 54, -2.8, 2.8);
287 h_probePhi =
outfile_->
make<TH1F>(
"h_probePhi",
"#phi of probe track;track #phi (rad);tracks", 100, -3.15, 3.15);
290 outfile_->
make<TH1F>(
"h_probeDxy",
"d_{xy}(PV) of the probe track;track d_{xy}(PV);tracks", 200, -100, 100);
291 h_probeDz =
outfile_->
make<TH1F>(
"h_probeDz",
"d_{z}(PV) of the probe track;track d_{z}(PV);tracks", 200, -100, 100);
293 "h_probeDxyErr",
"error on d_{xy}(PV) of the probe track;track error on d_{xy}(PV);tracks", 100, 0., 100);
295 "h_probeDzErr",
"error on d_{z}(PV) of the probe track;track error on d_{z}(PV);tracks", 100, 0., 100);
300 mon.
addHistogram(
new TH1F(
"dxyerr",
";d_{xy} error;tracks", 100, 0., 200));
301 mon.
addHistogram(
new TH1F(
"dzerr",
";d_{z} error;tracks", 100, 0., 200));
302 mon.
addHistogram(
new TProfile(
"dxyErrVsPt",
";track p_{T};d_{xy} error", 100, 0., 200, 0., 100.));
303 mon.
addHistogram(
new TProfile(
"dzErrVsPt",
";track p_{T};d_{z} error", 100, 0., 200, 0., 100.));
306 mon.
addHistogram(
new TProfile(
"dxyErrVsEta",
";track #eta;d_{xy} error", 100, -2.5, 2.5, 0., 100.));
307 mon.
addHistogram(
new TProfile(
"dzErrVsEta",
";track #eta;d_{z} error", 100, -2.5, 2.5, 0., 100.));
312 new TProfile(
"dxyErrVsPtWide",
";track p_{T} wide bin;d_{xy} error",
nBins, -0.5,
nBins - 0.5, 0.0, 100.0));
314 new TProfile(
"dzErrVsPtWide",
";track p_{T} wide bin;d_{z} error",
nBins, -0.5,
nBins - 0.5, 0.0, 100.0));
323 desc.setComment(
"JetHT validation analyzer plugin.");
327 desc.addUntracked<
int>(
"printTriggerTable",
false);
328 desc.addUntracked<
double>(
"minVertexNdf", 10.);
329 desc.addUntracked<
double>(
"minVertexMeanWeight", 0.5);
330 desc.addUntracked<std::vector<double>>(
"profilePtBorders", {3, 5, 10, 20, 50, 100});
331 desc.addUntracked<std::vector<int>>(
"iovList", {0, 500000});
static const std::string kSharedResource
static bool mysorter(reco::Track i, reco::Track j)
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)
bool fillHisto(std::string name, std::string tag, double valx, double weight, bool useBinWidth=false)
const edm::EDGetTokenT< edm::TriggerResults > triggerToken_
const std::vector< int > iovList_
double z() const
z coordinate
JetHTAnalyzer(const edm::ParameterSet &)
std::vector< Track > TrackCollection
collection of Tracks
const int printTriggerTable_
std::vector< Vertex > VertexCollection
collection of Vertex objects
const edm::EDGetTokenT< reco::TrackCollection > tracksToken_
std::vector< Vertex > VertexCollection
const edm::InputTag pvsTag_
trackRef_iterator tracks_end() const
last iterator over tracks
const edm::InputTag tracksTag_
SmartSelectionMonitor mon
size_t tracksSize() const
number of tracks
TH1 * addHistogram(TH1 *h, std::string tag)
const edm::InputTag triggerTag_
static constexpr double cmToum
~JetHTAnalyzer() override=default
bool fillProfile(std::string name, std::string tag, double valx, double valy, double weight)
Abs< T >::type abs(const T &t)
trackRef_iterator tracks_begin() const
first iterator over tracks
#define DEFINE_FWK_MODULE(type)
double x() const
x coordinate
static std::string const triggerResults
const std::vector< double > profilePtBorders_
edm::Service< TFileService > outfile_
double y() const
y coordinate
void analyze(const edm::Event &, const edm::EventSetup &) override
XYZPointD XYZPoint
point in space with cartesian internal representation
const edm::EDGetTokenT< reco::VertexCollection > pvsToken_
T * make(const Args &...args) const
make new ROOT object
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
std::vector< TrackBaseRef >::const_iterator trackRef_iterator
The iteratator for the vector<TrackRef>