115 : pvsTag_(iConfig.getParameter<
edm::
InputTag>(
"vtxCollection")),
117 tracksTag_(iConfig.getParameter<
edm::
InputTag>(
"trackCollection")),
119 triggerTag_(iConfig.getParameter<
edm::
InputTag>(
"triggerResults")),
121 printTriggerTable_(iConfig.getUntrackedParameter<
int>(
"printTriggerTable")),
122 minVtxNdf_(iConfig.getUntrackedParameter<double>(
"minVertexNdf")),
123 minVtxWgt_(iConfig.getUntrackedParameter<double>(
"minVertexMeanWeight")),
124 profilePtBorders_(iConfig.getUntrackedParameter<
std::
vector<double>>(
"profilePtBorders")),
125 iovList_(iConfig.getUntrackedParameter<
std::
vector<
int>>(
"iovList")) {
143 const double cmToum = 10000;
172 std::cout << hltName <<
" " << decision << std::endl;
177 for (reco::VertexCollection::const_iterator pvIt = pvtx.begin(); pvIt != pvtx.end(); pvIt++) {
193 if (trki->isNonnull()) {
204 for (
uint tracksIt = 0; tracksIt < ntrks; tracksIt++) {
207 double dxyRes = tk.dxy(pos_) *
cmToum;
208 double dzRes = tk.dz(pos_) *
cmToum;
210 double dxy_err = tk.dxyError() *
cmToum;
211 double dz_err = tk.dzError() *
cmToum;
213 float trackphi = tk.phi();
214 float tracketa = tk.eta();
215 float trackpt = tk.pt();
300 h_ntrks =
outfile_->
make<TH1F>(
"h_ntrks",
"n. trks;n. of tracks/vertex;n. vertices", 100, 0, 100);
301 h_probePt =
outfile_->
make<TH1F>(
"h_probePt",
"p_{T} of probe track;track p_{T} (GeV); tracks", 100, 0., 500.);
302 h_probeEta =
outfile_->
make<TH1F>(
"h_probeEta",
"#eta of the probe track;track #eta;tracks", 54, -2.8, 2.8);
303 h_probePhi =
outfile_->
make<TH1F>(
"h_probePhi",
"#phi of probe track;track #phi (rad);tracks", 100, -3.15, 3.15);
306 outfile_->
make<TH1F>(
"h_probeDxy",
"d_{xy}(PV) of the probe track;track d_{xy}(PV);tracks", 200, -100, 100);
307 h_probeDz =
outfile_->
make<TH1F>(
"h_probeDz",
"d_{z}(PV) of the probe track;track d_{z}(PV);tracks", 200, -100, 100);
309 "h_probeDxyErr",
"error on d_{xy}(PV) of the probe track;track error on d_{xy}(PV);tracks", 100, 0., 100);
311 "h_probeDzErr",
"error on d_{z}(PV) of the probe track;track error on d_{z}(PV);tracks", 100, 0., 100);
316 mon.
addHistogram(
new TH1F(
"dxyerr",
";d_{xy} error;tracks", 100, 0., 200));
317 mon.
addHistogram(
new TH1F(
"dzerr",
";d_{z} error;tracks", 100, 0., 200));
318 mon.
addHistogram(
new TProfile(
"dxyErrVsPt",
";track p_{T};d_{xy} error", 100, 0., 200, 0., 100.));
319 mon.
addHistogram(
new TProfile(
"dzErrVsPt",
";track p_{T};d_{z} error", 100, 0., 200, 0., 100.));
321 new TProfile(
"dxyErrVsPhi",
";track #varphi;d_{xy} error", 100, -
TMath::Pi(),
TMath::Pi(), 0., 100.));
323 mon.
addHistogram(
new TProfile(
"dxyErrVsEta",
";track #eta;d_{xy} error", 100, -2.5, 2.5, 0., 100.));
324 mon.
addHistogram(
new TProfile(
"dzErrVsEta",
";track #eta;d_{z} error", 100, -2.5, 2.5, 0., 100.));
329 new TProfile(
"dxyErrVsPtWide",
";track p_{T} wide bin;d_{xy} error",
nBins, -0.5,
nBins - 0.5, 0.0, 100.0));
331 new TProfile(
"dzErrVsPtWide",
";track p_{T} wide bin;d_{z} error",
nBins, -0.5,
nBins - 0.5, 0.0, 100.0));
340 desc.setComment(
"JetHT validation analyzer plugin.");
344 descriptions.
add(
"JetHTAnalyzer",
desc);
static const std::string kSharedResource
static bool mysorter(reco::Track i, reco::Track j)
bool fillHisto(std::string name, std::string tag, double valx, double weight, bool useBinWidth=false)
double z() const
z coordinate
std::vector< int > iovList_
JetHTAnalyzer(const edm::ParameterSet &)
std::vector< Track > TrackCollection
collection of Tracks
std::vector< double > profilePtBorders_
std::vector< Vertex > VertexCollection
collection of Vertex objects
std::vector< Vertex > VertexCollection
trackRef_iterator tracks_end() const
last iterator over tracks
SmartSelectionMonitor mon
size_t tracksSize() const
number of tracks
edm::InputTag triggerTag_
TH1 * addHistogram(TH1 *h, std::string tag)
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
edm::Service< TFileService > outfile_
double y() const
y coordinate
void analyze(const edm::Event &, const edm::EventSetup &) override
auto const & tracks
cannot be loose
XYZPointD XYZPoint
point in space with cartesian internal representation
void add(std::string const &label, ParameterSetDescription const &psetDescription)
~JetHTAnalyzer() override
T * make(const Args &...args) const
make new ROOT object
edm::EDGetTokenT< reco::TrackCollection > tracksToken_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
static constexpr float cmToum
edm::EDGetTokenT< reco::VertexCollection > pvsToken_
std::vector< TrackBaseRef >::const_iterator trackRef_iterator
The iteratator for the vector<TrackRef>
edm::EDGetTokenT< edm::TriggerResults > triggerToken_