45 #include "TProfile2D.h"
133 :
m_rhm(consumesCollector()),
136 m_2dhistos(iConfig.getUntrackedParameter<bool>(
"wanted2DHistos",
false)),
137 m_runHisto(iConfig.getUntrackedParameter<bool>(
"runHisto",
false)),
138 m_dump(iConfig.getUntrackedParameter<bool>(
"dumpTracks",
false)),
141 m_nptbin(iConfig.getUntrackedParameter<unsigned int>(
"numberPtBins", 200)),
142 m_ptmin(iConfig.getUntrackedParameter<double>(
"ptMin", 0.)),
143 m_ptmax(iConfig.getUntrackedParameter<double>(
"ptMax", 20.))
164 m_ntrk = tfserv->
make<TH1F>(
"ntrk",
"Number of Tracks", 2500, -0.5, 2499.5);
165 m_ntrk->GetXaxis()->SetTitle(
"Tracks");
166 m_ntrk->GetYaxis()->SetTitle(
"Events");
167 m_ntrkvslumi = tfserv->
make<TProfile>(
"ntrkvslumi",
"Number of Tracks vs Luminosity", 250, 0., 10.);
168 m_ntrkvslumi->GetXaxis()->SetTitle(
"BX lumi [10^{30}cm^{-2}s^{-1}]");
170 m_ntrkvslumi2D = tfserv->
make<TH2D>(
"ntrkvslumi2D",
"Number of Tracks vs Luminosity", 80, 0., 10., 125, -0.5, 2499.5);
171 m_ntrkvslumi2D->GetXaxis()->SetTitle(
"BX lumi [10^{30}cm^{-2}s^{-1}]");
174 m_nhptrk = tfserv->
make<TH1F>(
"nhptrk",
"Number of High Purity Tracks", 2500, -0.5, 2499.5);
175 m_nhptrk->GetXaxis()->SetTitle(
"Tracks");
176 m_nhptrk->GetYaxis()->SetTitle(
"Events");
177 m_hhpfrac = tfserv->
make<TH1F>(
"hhpfrac",
"Fraction of High Purity Tracks", 51, 0., 1.02);
178 m_hhpfrac->GetXaxis()->SetTitle(
"hp/all");
179 m_hhpfrac->GetYaxis()->SetTitle(
"Events");
180 m_hsqsumptsq = tfserv->
make<TH1F>(
"hsqsumptsq",
"Sqrt(Sum pt**2)", 1000, 0., 200.);
181 m_hsqsumptsq->GetXaxis()->SetTitle(
"#sqrt(#Sigma pt^2) (GeV)");
185 m_hphi->GetXaxis()->SetTitle(
"#phi (rad)");
186 m_hphi->GetYaxis()->SetTitle(
"Tracks");
187 m_heta = tfserv->
make<TH1F>(
"eta",
"Track pseudorapidity", netabin1d, etamin, etamax);
188 m_heta->GetXaxis()->SetTitle(
"#eta");
189 m_heta->GetYaxis()->SetTitle(
"Tracks");
190 m_hcos = tfserv->
make<TH1F>(
"cos",
"Track polar angle", 50, -1., 1.);
191 m_hcos->GetXaxis()->SetTitle(
"cos(#theta)");
192 m_hcos->GetYaxis()->SetTitle(
"Tracks");
194 m_hpt->GetXaxis()->SetTitle(
"pt (GeV)");
195 m_hpt->GetYaxis()->SetTitle(
"Tracks");
197 m_chisq = tfserv->
make<TH1F>(
"chisq",
"Track Chi2", nchisqbin1d, 0., 100.);
198 m_chisq->GetXaxis()->SetTitle(
"chi2");
199 m_chisq->GetYaxis()->SetTitle(
"Tracks");
200 m_chisqnorm = tfserv->
make<TH1F>(
"chisqnorm",
"Track normalized Chi2", nchisqbin1d, 0., 10.);
201 m_chisqnorm->GetXaxis()->SetTitle(
"normalized chi2");
203 m_ndof = tfserv->
make<TH1F>(
"ndof",
"Track ndof", nndofbin1d, 0., 100.);
204 m_ndof->GetXaxis()->SetTitle(
"ndof");
205 m_ndof->GetYaxis()->SetTitle(
"Tracks");
208 tfserv->
make<TH2F>(
"chisqvseta",
"Track Chi2 vs #eta", netabin2d, etamin, etamax, nchisqbin2d, 0., 100.);
212 "chisqnormvseta",
"Track normalized Chi2 vs #eta", netabin2d, etamin, etamax, nchisqbin2d, 0., 10.);
216 tfserv->
make<TH2F>(
"ndofvseta",
"Track ndof vs #eta", netabin2d, etamin, etamax, nndofbin2d, 0., 100.);
222 tfserv->
make<TProfile2D>(
"ptphivseta",
"Average pt vs #phi vs #eta", netabin2d, etamin, etamax, 40, -
M_PI,
M_PI);
226 m_hnlosthits = tfserv->
make<TH1D>(
"nlosthits",
"Number of Lost Hits", 10, -0.5, 9.5);
230 m_hnrhits = tfserv->
make<TH1D>(
"nrhits",
"Number of Valid Hits", 55, -0.5, 54.5);
231 m_hnrhits->GetXaxis()->SetTitle(
"Nvalid");
232 m_hnrhits->GetYaxis()->SetTitle(
"Tracks");
233 m_hnpixelrhits = tfserv->
make<TH1D>(
"npixelrhits",
"Number of Valid Pixel Hits", 20, -0.5, 19.5);
236 m_hnstriprhits = tfserv->
make<TH1D>(
"nstriprhits",
"Number of Valid Strip Hits", 45, -0.5, 44.5);
240 m_hnlostlayers = tfserv->
make<TH1D>(
"nlostlayers",
"Number of Layers w/o measurement", 10, -0.5, 9.5);
244 m_hnlayers = tfserv->
make<TH1D>(
"nlayers",
"Number of Layers", 20, -0.5, 19.5);
247 m_hnpixellayers = tfserv->
make<TH1D>(
"npixellayers",
"Number of Pixel Layers", 10, -0.5, 9.5);
250 m_hnstriplayers = tfserv->
make<TH1D>(
"nstriplayers",
"Number of Strip Layers", 20, -0.5, 19.5);
255 "nhitphivseta",
"N valid hits vs #phi vs #eta", netabin2d, etamin, etamax, 40, -
M_PI,
M_PI);
259 "nlayerphivseta",
"N layers vs #phi vs #eta", netabin2d, etamin, etamax, 40, -
M_PI,
M_PI);
265 m_halgo->GetXaxis()->SetTitle(
"algorithm");
266 m_halgo->GetYaxis()->SetTitle(
"Tracks");
267 m_hphieta = tfserv->
make<TH2D>(
"phivseta",
"#phi vs #eta", netabin2d, etamin, etamax, 40, -
M_PI,
M_PI);
316 unsigned int nhptrk = 0;
322 edm::LogInfo(
"TrackDump") <<
" isHP algo pt eta phi chi2N chi2 ndof nlay npxl n3dl nlost ";
324 for (reco::TrackCollection::const_iterator it =
tracks->begin(); it !=
tracks->end(); it++) {
326 edm::LogVerbatim(
"TrackDump") << it->quality(
quality) <<
" " << it->algo() <<
" " << it->pt() <<
" " << it->eta()
327 <<
" " << it->phi() <<
" " << it->normalizedChi2() <<
" " << it->chi2() <<
" "
328 << it->ndof() <<
" " << it->hitPattern().trackerLayersWithMeasurement() <<
" "
329 << it->hitPattern().pixelLayersWithMeasurement() <<
" "
330 << it->hitPattern().numberOfValidStripLayersWithMonoAndStereo() <<
" "
337 m_hnrhits->Fill(it->hitPattern().numberOfValidTrackerHits());
340 m_hnhitphieta->Fill(it->eta(), it->phi(), it->hitPattern().numberOfValidTrackerHits());
344 m_hnlayers->Fill(it->hitPattern().trackerLayersWithMeasurement());
347 m_hnlayerphieta->Fill(it->eta(), it->phi(), it->hitPattern().trackerLayersWithMeasurement());
355 double pt = it->pt();
368 m_hcos->Fill(it->pz() / it->p());
375 const double hpfrac = !
tracks->empty() ? double(nhptrk) / double(
tracks->size()) : 0.;
384 (*m_ntrkvsorbrun)->GetXaxis()->SetTitle(
"time [orbit#]");
385 (*m_ntrkvsorbrun)->GetYaxis()->SetTitle(
"Ntracks");
386 (*m_ntrkvsorbrun)->SetCanExtend(TH1::kXaxis);
Log< level::Info, true > LogVerbatim
T getUntrackedParameter(std::string const &, T const &) const
RunHistogramManager m_rhm
TProfile2D * m_hnlayerphieta
bool getByToken(EDGetToken token, Handle< PROD > &result) const
bool getByToken(EDGetToken token, Handle< PROD > &result) const
TrackQuality
track quality
#define DEFINE_FWK_MODULE(type)
TProfile2D * m_hnhitphieta
uint32_t const *__restrict__ Quality * quality
std::vector< Track > TrackCollection
collection of Tracks
int bunchCrossing() const
T * make(const Args &...args) const
make new ROOT object
auto const & tracks
cannot be loose
void analyze(const edm::Event &, const edm::EventSetup &) override
edm::EDGetTokenT< reco::TrackCollection > m_trkcollToken
void beginRun(const edm::Run &, const edm::EventSetup &) override
m_rhm(consumesCollector())
TProfile ** makeTProfile(const char *name, const char *title, const unsigned int nbinx, const double xmin, const double xmax)
TProfile ** m_ntrkvsorbrun
LuminosityBlock const & getLuminosityBlock() const
const unsigned int m_maxLS
Log< level::Info, false > LogInfo
static TrackQuality qualityByName(const std::string &name)
TrackCount(const edm::ParameterSet &)
void beginRun(const edm::Run &iRun)
T getParameter(std::string const &) const
const unsigned int m_LSfrac
edm::EDGetTokenT< LumiDetails > m_lumiProducerToken
const unsigned int m_nptbin