147 std::vector<edm::ParameterSet> seedCollectionConfigs =
148 iConfig.
getParameter<std::vector<edm::ParameterSet> >(
"seedCollections");
150 for(std::vector<edm::ParameterSet>::const_iterator scps=seedCollectionConfigs.begin();scps!=seedCollectionConfigs.end();++scps) {
153 _seedbins.push_back(scps->getUntrackedParameter<
unsigned int>(
"nBins",1000));
154 _seedmax.push_back(scps->getUntrackedParameter<
double>(
"maxValue",100000.));
156 if(scps->exists(
"trackFilter")) {
164 std::vector<edm::ParameterSet> correlationConfigs =
165 iConfig.
getParameter<std::vector<edm::ParameterSet> >(
"multiplicityCorrelations");
167 for(std::vector<edm::ParameterSet>::const_iterator ps=correlationConfigs.begin();ps!=correlationConfigs.end();++ps) {
171 _selections.push_back(ps->getParameter<
unsigned int>(
"detSelection"));
172 _binsmult.push_back(ps->getParameter<
unsigned int>(
"nBins"));
173 _binseta.push_back(ps->getParameter<
unsigned int>(
"nBinsEta"));
174 _maxs.push_back(ps->getParameter<
double>(
"maxValue"));
182 std::vector<unsigned int>::const_iterator nseedbins =
_seedbins.begin();
183 std::vector<double>::const_iterator seedmax =
_seedmax.begin();
186 for(std::vector<edm::ParameterSet>::const_iterator scps=seedCollectionConfigs.begin();scps!=seedCollectionConfigs.end();++scps,++nseedbins,++seedmax,++
filter) {
191 std::string htitle = extendedlabel +
std::string(
" seed multiplicity");
192 _hseedmult.push_back(tfserv->
make<TH1F>(hname.c_str(),htitle.c_str(),*nseedbins+1,0.5-*seedmax/(*nseedbins),*seedmax+0.5));
196 htitle = extendedlabel +
std::string(
" seed pseudorapidity");
197 _hseedeta.push_back(tfserv->
make<TH1F>(hname.c_str(),htitle.c_str(),80,-4.,4.));
201 htitle = extendedlabel +
std::string(
" seed phi vs pseudorapidity");
210 htitle = extendedlabel +
std::string(
" seed SiPixelRecHit multiplicity");
211 _hpixelrhmult.push_back(tfserv->
make<TH1F>(hname.c_str(),htitle.c_str(),5,-.5,4.5));
214 hname = extendedlabel +
std::string(
"_bpixleneta");
215 htitle = extendedlabel +
std::string(
" seed BPIX cluster length vs pseudorapidity");
216 _hbpixclusleneta.push_back(tfserv->
make<TH2F>(hname.c_str(),htitle.c_str(),80,-4.,4.,40,-0.5,39.5));
219 hname = extendedlabel +
std::string(
"_fpixleneta");
220 htitle = extendedlabel +
std::string(
" seed FPIX cluster length vs pseudorapidity");
221 _hfpixclusleneta.push_back(tfserv->
make<TH2F>(hname.c_str(),htitle.c_str(),80,-4.,4.,40,-0.5,39.5));
224 hname = extendedlabel +
std::string(
"_bpixlenangle");
225 htitle = extendedlabel +
std::string(
" seed BPIX cluster length vs track projection");
229 hname = extendedlabel +
std::string(
"_fpixlenangle");
230 htitle = extendedlabel +
std::string(
" seed FPIX cluster length vs track projection");
238 std::string hname2D = extendedlabel +
_labels[
i];
240 std::string htitle2D = extendedlabel +
" seeds multiplicity";
242 htitle2D += _labels[
i];
245 *nseedbins+1,0.5-*seedmax/(*nseedbins),*seedmax+0.5));
249 hname2D = extendedlabel + _labels[
i];
251 htitle2D = extendedlabel +
" seeds pseudorapidity";
253 htitle2D += _labels[
i];
296 std::map<unsigned int, int>::const_iterator mult = mults->find(
_selections[i]);
298 if(mult!=mults->end()) {
299 tmpmult[
i]=mult->second;
321 std::vector<TH1F*>::iterator histomult=
_hseedmult.begin();
322 std::vector<std::vector<TH2F*> >::iterator histomult2D=
_hseedmult2D.begin();
323 std::vector<TH1F*>::iterator histoeta=
_hseedeta.begin();
324 std::vector<TH2F*>::iterator histophieta=
_hseedphieta.begin();
325 std::vector<std::vector<TH2F*> >::iterator histoeta2D=
_hseedeta2D.begin();
326 std::vector<TH1F*>::iterator hpixelrhmult=
_hpixelrhmult.begin();
343 ++
coll,++histomult,++histomult2D,++histoeta,++histophieta,++histoeta2D,++hpixelrhmult,
344 ++histobpixleneta,++histofpixleneta,++histobpixlenangle,++histofpixlenangle,++
filter) {
346 filter->prepareEvent(iEvent);
361 unsigned int nseeds=0;
362 unsigned int iseed=0;
363 for(TrajectorySeedCollection::const_iterator
seed= seeds->begin();
seed!=seeds->end(); ++
seed,++
iseed) {
365 if(filter->isSelected(iseed)) {
376 (*histoeta)->Fill(eta);
377 (*histophieta)->Fill(eta,phi);
380 if(tmpmult[
i]>=0) (*histoeta2D)[
i]->Fill(tmpmult[
i],eta);
397 (*histobpixleneta)->Fill(eta,sphit->
cluster()->sizeY());
402 (*histobpixlenangle)->Fill(normdx,sphit->
cluster()->sizeY());
406 (*histofpixleneta)->Fill(eta,sphit->
cluster()->sizeX());
411 (*histofpixlenangle)->Fill(normdy,sphit->
cluster()->sizeX());
419 (*hpixelrhmult)->Fill(npixelrh);
422 (*histomult)->Fill(nseeds);
425 if(tmpmult[
i]>=0) (*histomult2D)[
i]->Fill(tmpmult[
i],nseeds);
435 m_suffix(
""),m_passthrough(
true),
436 m_trackcollToken(),m_seltrackrefcollToken(),m_tracks(),m_seltrackrefs() { }
470 if(trkref==*seltrkref)
return true;
T getParameter(std::string const &) const
SeedMultiplicityAnalyzer(const edm::ParameterSet &)
bool isSelected(const unsigned int iseed) const
std::vector< FromTrackRefSeedFilter > _seedfilters
std::vector< unsigned int > _binseta
void prepareEvent(const edm::Event &iEvent)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
std::vector< unsigned int > _selections
~SeedMultiplicityAnalyzer() override
Geom::Phi< T > phi() const
std::vector< double > _maxs
std::vector< std::string > _labels
std::vector< Track > TrackCollection
collection of Tracks
std::vector< TH2F * > _hfpixcluslenangle
T * make(const Args &...args) const
make new ROOT object
std::vector< std::vector< TH2F * > > _hseedeta2D
std::vector< TH2F * > _hfpixclusleneta
void analyze(const edm::Event &, const edm::EventSetup &) override
std::vector< unsigned int > _binsmult
const_iterator end() const
Termination of iteration.
edm::RefVector< TrackCollection > TrackRefVector
vector of reference to Track in the same collection
std::vector< edm::EDGetTokenT< std::map< unsigned int, int > > > _multiplicityMapTokens
const_iterator begin() const
Initialize an iterator over the RefVector.
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
std::vector< edm::EDGetTokenT< TrajectorySeedCollection > > _seedcollTokens
uint32_t rawId() const
get the raw id
LocalVector localMomentum() const
std::vector< unsigned int > _seedbins
recHitContainer::const_iterator const_iterator
edm::EDGetTokenT< reco::TrackRefVector > m_seltrackrefcollToken
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
edm::EDGetTokenT< reco::TrackCollection > m_trackcollToken
std::pair< const_iterator, const_iterator > range
std::vector< TH1F * > _hseedeta
int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
std::shared_ptr< TrackingRecHit const > RecHitPointer
virtual RecHitPointer build(const TrackingRecHit *p) const =0
build a tracking rechit from an existing rechit
std::vector< TH1F * > _hseedmult
std::vector< TH2F * > _hseedphieta
std::vector< TH1F * > _hpixelrhmult
std::vector< TH2F * > _hbpixcluslenangle
ClusterRef cluster() const
std::vector< std::vector< TH2F * > > _hseedmult2D
GlobalVector globalMomentum() const
DetId geographicalId() const
Detector det() const
get the detector field from this detid
T const * product() const
std::vector< double > _seedmax
const std::string & suffix() const
edm::Handle< reco::TrackCollection > m_tracks
std::vector< TH2F * > _hbpixclusleneta
edm::Handle< reco::TrackRefVector > m_seltrackrefs