45 #include "TProfile2D.h" 134 : m_rhm(consumesCollector()),
137 m_2dhistos(iConfig.getUntrackedParameter<
bool>(
"wanted2DHistos",
false)),
138 m_runHisto(iConfig.getUntrackedParameter<
bool>(
"runHisto",
false)),
139 m_dump(iConfig.getUntrackedParameter<
bool>(
"dumpTracks",
false)),
142 m_nptbin(iConfig.getUntrackedParameter<unsigned
int>(
"numberPtBins", 200)),
143 m_ptmin(iConfig.getUntrackedParameter<double>(
"ptMin", 0.)),
144 m_ptmax(iConfig.getUntrackedParameter<double>(
"ptMax", 20.))
166 m_ntrk = tfserv->
make<TH1F>(
"ntrk",
"Number of Tracks", 2500, -0.5, 2499.5);
167 m_ntrk->GetXaxis()->SetTitle(
"Tracks");
168 m_ntrk->GetYaxis()->SetTitle(
"Events");
169 m_ntrkvslumi = tfserv->
make<TProfile>(
"ntrkvslumi",
"Number of Tracks vs Luminosity", 250, 0., 10.);
170 m_ntrkvslumi->GetXaxis()->SetTitle(
"BX lumi [10^{30}cm^{-2}s^{-1}]");
172 m_ntrkvslumi2D = tfserv->
make<TH2D>(
"ntrkvslumi2D",
"Number of Tracks vs Luminosity", 80, 0., 10., 125, -0.5, 2499.5);
173 m_ntrkvslumi2D->GetXaxis()->SetTitle(
"BX lumi [10^{30}cm^{-2}s^{-1}]");
176 m_nhptrk = tfserv->
make<TH1F>(
"nhptrk",
"Number of High Purity Tracks", 2500, -0.5, 2499.5);
177 m_nhptrk->GetXaxis()->SetTitle(
"Tracks");
178 m_nhptrk->GetYaxis()->SetTitle(
"Events");
179 m_hhpfrac = tfserv->
make<TH1F>(
"hhpfrac",
"Fraction of High Purity Tracks", 51, 0., 1.02);
180 m_hhpfrac->GetXaxis()->SetTitle(
"hp/all");
181 m_hhpfrac->GetYaxis()->SetTitle(
"Events");
182 m_hsqsumptsq = tfserv->
make<TH1F>(
"hsqsumptsq",
"Sqrt(Sum pt**2)", 1000, 0., 200.);
183 m_hsqsumptsq->GetXaxis()->SetTitle(
"#sqrt(#Sigma pt^2) (GeV)");
187 m_hphi->GetXaxis()->SetTitle(
"#phi (rad)");
188 m_hphi->GetYaxis()->SetTitle(
"Tracks");
190 m_heta->GetXaxis()->SetTitle(
"#eta");
191 m_heta->GetYaxis()->SetTitle(
"Tracks");
192 m_hcos = tfserv->
make<TH1F>(
"cos",
"Track polar angle", 50, -1., 1.);
193 m_hcos->GetXaxis()->SetTitle(
"cos(#theta)");
194 m_hcos->GetYaxis()->SetTitle(
"Tracks");
196 m_hpt->GetXaxis()->SetTitle(
"pt (GeV)");
197 m_hpt->GetYaxis()->SetTitle(
"Tracks");
199 m_chisq = tfserv->
make<TH1F>(
"chisq",
"Track Chi2", nchisqbin1d, 0., 100.);
200 m_chisq->GetXaxis()->SetTitle(
"chi2");
201 m_chisq->GetYaxis()->SetTitle(
"Tracks");
202 m_chisqnorm = tfserv->
make<TH1F>(
"chisqnorm",
"Track normalized Chi2", nchisqbin1d, 0., 10.);
203 m_chisqnorm->GetXaxis()->SetTitle(
"normalized chi2");
205 m_ndof = tfserv->
make<TH1F>(
"ndof",
"Track ndof", nndofbin1d, 0., 100.);
206 m_ndof->GetXaxis()->SetTitle(
"ndof");
207 m_ndof->GetYaxis()->SetTitle(
"Tracks");
210 tfserv->
make<TH2F>(
"chisqvseta",
"Track Chi2 vs #eta", netabin2d,
etamin,
etamax, nchisqbin2d, 0., 100.);
214 "chisqnormvseta",
"Track normalized Chi2 vs #eta", netabin2d,
etamin,
etamax, nchisqbin2d, 0., 10.);
218 tfserv->
make<TH2F>(
"ndofvseta",
"Track ndof vs #eta", netabin2d,
etamin,
etamax, nndofbin2d, 0., 100.);
228 m_hnlosthits = tfserv->
make<TH1D>(
"nlosthits",
"Number of Lost Hits", 10, -0.5, 9.5);
232 m_hnrhits = tfserv->
make<TH1D>(
"nrhits",
"Number of Valid Hits", 55, -0.5, 54.5);
233 m_hnrhits->GetXaxis()->SetTitle(
"Nvalid");
234 m_hnrhits->GetYaxis()->SetTitle(
"Tracks");
235 m_hnpixelrhits = tfserv->
make<TH1D>(
"npixelrhits",
"Number of Valid Pixel Hits", 20, -0.5, 19.5);
238 m_hnstriprhits = tfserv->
make<TH1D>(
"nstriprhits",
"Number of Valid Strip Hits", 45, -0.5, 44.5);
242 m_hnlostlayers = tfserv->
make<TH1D>(
"nlostlayers",
"Number of Layers w/o measurement", 10, -0.5, 9.5);
246 m_hnlayers = tfserv->
make<TH1D>(
"nlayers",
"Number of Layers", 20, -0.5, 19.5);
249 m_hnpixellayers = tfserv->
make<TH1D>(
"npixellayers",
"Number of Pixel Layers", 10, -0.5, 9.5);
252 m_hnstriplayers = tfserv->
make<TH1D>(
"nstriplayers",
"Number of Strip Layers", 20, -0.5, 19.5);
267 m_halgo->GetXaxis()->SetTitle(
"algorithm");
268 m_halgo->GetYaxis()->SetTitle(
"Tracks");
315 (*m_ntrkvsorbrun)->Fill(
iEvent.orbitNumber(),
tracks->size());
318 unsigned int nhptrk = 0;
324 edm::LogInfo(
"TrackDump") <<
" isHP algo pt eta phi chi2N chi2 ndof nlay npxl n3dl nlost ";
326 for (reco::TrackCollection::const_iterator it =
tracks->begin(); it !=
tracks->end(); it++) {
328 edm::LogVerbatim(
"TrackDump") << it->quality(
quality) <<
" " << it->algo() <<
" " << it->pt() <<
" " << it->eta()
329 <<
" " << it->phi() <<
" " << it->normalizedChi2() <<
" " << it->chi2() <<
" " 330 << it->ndof() <<
" " << it->hitPattern().trackerLayersWithMeasurement() <<
" " 331 << it->hitPattern().pixelLayersWithMeasurement() <<
" " 332 << it->hitPattern().numberOfValidStripLayersWithMonoAndStereo() <<
" " 339 m_hnrhits->Fill(it->hitPattern().numberOfValidTrackerHits());
342 m_hnhitphieta->Fill(it->eta(), it->phi(), it->hitPattern().numberOfValidTrackerHits());
346 m_hnlayers->Fill(it->hitPattern().trackerLayersWithMeasurement());
349 m_hnlayerphieta->Fill(it->eta(), it->phi(), it->hitPattern().trackerLayersWithMeasurement());
357 double pt = it->pt();
370 m_hcos->Fill(it->pz() / it->p());
377 const double hpfrac = !
tracks->empty() ? double(nhptrk) / double(
tracks->size()) : 0.;
386 (*m_ntrkvsorbrun)->GetXaxis()->SetTitle(
"time [orbit#]");
387 (*m_ntrkvsorbrun)->GetYaxis()->SetTitle(
"Ntracks");
388 (*m_ntrkvsorbrun)->SetCanExtend(TH1::kXaxis);
static const std::string kSharedResource
Log< level::Info, true > LogVerbatim
T getParameter(std::string const &) const
RunHistogramManager m_rhm
TProfile2D * m_hnlayerphieta
TrackQuality
track quality
TProfile2D * m_hnhitphieta
std::vector< Track > TrackCollection
collection of Tracks
void analyze(const edm::Event &, const edm::EventSetup &) override
edm::EDGetTokenT< reco::TrackCollection > m_trkcollToken
T getUntrackedParameter(std::string const &, T const &) const
void beginRun(const edm::Run &, const edm::EventSetup &) override
void endRun(const edm::Run &, const edm::EventSetup &) override
TProfile ** makeTProfile(const char *name, const char *title, const unsigned int nbinx, const double xmin, const double xmax)
TProfile ** m_ntrkvsorbrun
#define DEFINE_FWK_MODULE(type)
float lumiValue(AlgoType algo, unsigned int bx) const
const unsigned int m_maxLS
Log< level::Info, false > LogInfo
static TrackQuality qualityByName(const std::string &name)
auto const & tracks
cannot be loose
TrackCount(const edm::ParameterSet &)
void beginRun(const edm::Run &iRun)
T * make(const Args &...args) const
make new ROOT object
const unsigned int m_LSfrac
edm::EDGetTokenT< LumiDetails > m_lumiProducerToken
const unsigned int m_nptbin