46 #include "TProfile2D.h"
136 m_rhm(consumesCollector()),
137 m_maxLS(100),m_LSfrac(16),
138 m_2dhistos(iConfig.getUntrackedParameter<bool>(
"wanted2DHistos",
false)),
139 m_runHisto(iConfig.getUntrackedParameter<bool>(
"runHisto",
false)),
140 m_dump(iConfig.getUntrackedParameter<bool>(
"dumpTracks",
false)),
143 m_nptbin(iConfig.getUntrackedParameter<unsigned int>(
"numberPtBins",200)),
144 m_ptmin(iConfig.getUntrackedParameter<double>(
"ptMin",0.)),
145 m_ptmax(iConfig.getUntrackedParameter<double>(
"ptMax",20.))
167 m_ntrk = tfserv->
make<TH1F>(
"ntrk",
"Number of Tracks",2500,-0.5,2499.5);
168 m_ntrk->GetXaxis()->SetTitle(
"Tracks");
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}]");
m_ntrkvslumi->GetYaxis()->SetTitle(
"Ntracks");
171 m_ntrkvslumi2D = tfserv->
make<TH2D>(
"ntrkvslumi2D",
"Number of Tracks vs Luminosity",80,0.,10.,125,-0.5,2499.5);
174 m_nhptrk = tfserv->
make<TH1F>(
"nhptrk",
"Number of High Purity Tracks",2500,-0.5,2499.5);
175 m_nhptrk->GetXaxis()->SetTitle(
"Tracks");
m_nhptrk->GetYaxis()->SetTitle(
"Events");
176 m_hhpfrac = tfserv->
make<TH1F>(
"hhpfrac",
"Fraction of High Purity Tracks",51,0.,1.02);
178 m_hsqsumptsq = tfserv->
make<TH1F>(
"hsqsumptsq",
"Sqrt(Sum pt**2)",1000,0.,200.);
182 m_hphi->GetXaxis()->SetTitle(
"#phi (rad)");
m_hphi->GetYaxis()->SetTitle(
"Tracks");
183 m_heta = tfserv->
make<TH1F>(
"eta",
"Track pseudorapidity",netabin1d,etamin,etamax);
184 m_heta->GetXaxis()->SetTitle(
"#eta");
m_heta->GetYaxis()->SetTitle(
"Tracks");
185 m_hcos = tfserv->
make<TH1F>(
"cos",
"Track polar angle",50,-1.,1.);
186 m_hcos->GetXaxis()->SetTitle(
"cos(#theta)");
m_hcos->GetYaxis()->SetTitle(
"Tracks");
188 m_hpt->GetXaxis()->SetTitle(
"pt (GeV)");
m_hpt->GetYaxis()->SetTitle(
"Tracks");
190 m_chisq = tfserv->
make<TH1F>(
"chisq",
"Track Chi2",nchisqbin1d,0.,100.);
191 m_chisq->GetXaxis()->SetTitle(
"chi2");
m_chisq->GetYaxis()->SetTitle(
"Tracks");
192 m_chisqnorm = tfserv->
make<TH1F>(
"chisqnorm",
"Track normalized Chi2",nchisqbin1d,0.,10.);
194 m_ndof = tfserv->
make<TH1F>(
"ndof",
"Track ndof",nndofbin1d,0.,100.);
195 m_ndof->GetXaxis()->SetTitle(
"ndof");
m_ndof->GetYaxis()->SetTitle(
"Tracks");
197 m_chisqvseta = tfserv->
make<TH2F>(
"chisqvseta",
"Track Chi2 vs #eta",netabin2d,etamin,etamax,nchisqbin2d,0.,100.);
199 m_chisqnormvseta = tfserv->
make<TH2F>(
"chisqnormvseta",
"Track normalized Chi2 vs #eta",netabin2d,etamin,etamax,nchisqbin2d,0.,10.);
201 m_ndofvseta = tfserv->
make<TH2F>(
"ndofvseta",
"Track ndof vs #eta",netabin2d,etamin,etamax,nndofbin2d,0.,100.);
205 m_hptphieta = tfserv->
make<TProfile2D>(
"ptphivseta",
"Average pt vs #phi vs #eta",netabin2d,etamin,etamax,40,-
M_PI,
M_PI);
210 m_hnlosthits = tfserv->
make<TH1D>(
"nlosthits",
"Number of Lost Hits",10,-0.5,9.5);
213 m_hnrhits = tfserv->
make<TH1D>(
"nrhits",
"Number of Valid Hits",55,-0.5,54.5);
215 m_hnpixelrhits = tfserv->
make<TH1D>(
"npixelrhits",
"Number of Valid Pixel Hits",20,-0.5,19.5);
217 m_hnstriprhits = tfserv->
make<TH1D>(
"nstriprhits",
"Number of Valid Strip Hits",45,-0.5,44.5);
220 m_hnlostlayers = tfserv->
make<TH1D>(
"nlostlayers",
"Number of Layers w/o measurement",10,-0.5,9.5);
223 m_hnlayers = tfserv->
make<TH1D>(
"nlayers",
"Number of Layers",20,-0.5,19.5);
227 m_hnstriplayers = tfserv->
make<TH1D>(
"nstriplayers",
"Number of Strip Layers",20,-0.5,19.5);
230 m_hnhitphieta = tfserv->
make<TProfile2D>(
"nhitphivseta",
"N valid hits vs #phi vs #eta",netabin2d,etamin,etamax,40,-
M_PI,
M_PI);
236 m_halgo->GetXaxis()->SetTitle(
"algorithm");
m_halgo->GetYaxis()->SetTitle(
"Tracks");
291 unsigned int nhptrk = 0;
296 if(
m_dump)
edm::LogInfo(
"TrackDump") <<
" isHP algo pt eta phi chi2N chi2 ndof nlay npxl n3dl nlost ";
298 for(reco::TrackCollection::const_iterator it =
tracks->begin();it!=
tracks->end();it++) {
306 << it->normalizedChi2() <<
" "
309 << it->hitPattern().trackerLayersWithMeasurement() <<
" "
310 << it->hitPattern().pixelLayersWithMeasurement() <<
" "
311 << it->hitPattern().numberOfValidStripLayersWithMonoAndStereo() <<
" "
318 m_hnrhits->Fill(it->hitPattern().numberOfValidTrackerHits());
321 m_hnhitphieta->Fill(it->eta(),it->phi(),it->hitPattern().numberOfValidTrackerHits());
325 m_hnlayers->Fill(it->hitPattern().trackerLayersWithMeasurement());
328 m_hnlayerphieta->Fill(it->eta(),it->phi(),it->hitPattern().trackerLayersWithMeasurement());
336 double pt = it->pt();
348 if(it->p())
m_hcos->Fill(it->pz()/it->p());
349 if(it->quality(
quality)) nhptrk++;
354 const double hpfrac =
tracks->size() > 0 ? double(nhptrk)/double(
tracks->size()) : 0.;
366 (*m_ntrkvsorbrun)->GetXaxis()->SetTitle(
"time [orbit#]"); (*m_ntrkvsorbrun)->GetYaxis()->SetTitle(
"Ntracks");
367 (*m_ntrkvsorbrun)->SetCanExtend(TH1::kXaxis);
T getParameter(std::string const &) const
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
std::vector< Track > TrackCollection
collection of Tracks
int bunchCrossing() const
T * make(const Args &...args) const
make new ROOT object
virtual void analyze(const edm::Event &, const edm::EventSetup &) override
edm::EDGetTokenT< reco::TrackCollection > m_trkcollToken
virtual void beginRun(const edm::Run &, const edm::EventSetup &) override
tuple quality
[pTError/pT]*max(1,normChi2) <= ptErrorCut
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
static TrackQuality qualityByName(const std::string &name)
TrackCount(const edm::ParameterSet &)
void beginRun(const edm::Run &iRun)
const unsigned int m_LSfrac
volatile std::atomic< bool > shutdown_flag false
edm::EDGetTokenT< LumiDetails > m_lumiProducerToken
const unsigned int m_nptbin