114 m_ptp = tfserv->
make<TH1F>(
"tpmomentum",
"Tracking Particle momentum",100,0.,200.);
115 m_etatp = tfserv->
make<TH1F>(
"tpeta",
"Tracking Particle pseudorapidity",100,-4.,4.);
116 m_nhits = tfserv->
make<TH1F>(
"nhits",
"Tracking Particle associated hits",100,-0.5,99.5);
117 m_nrechits = tfserv->
make<TH1F>(
"nrechits",
"Tracking Particle associated rec hits",100,-0.5,99.5);
118 m_nrecvssimhits = tfserv->
make<TH2F>(
"nrecvssimhits",
"Tracking Particle associated rec hits vs sim hits",
119 100,-0.5,99.5,100,-0.5,99.5);
120 m_nassotk = tfserv->
make<TH1F>(
"nassotk",
"Number of assocated reco tracks",10,-0.5,9.5);
122 m_pdgid = tfserv->
make<TH1F>(
"pdgid",
"Tracking Particle PDG id",1000,-500.5,499.5);
123 m_llbit = tfserv->
make<TH1F>(
"llbit",
"Tracking Particle LongLived bit",2,-0.5,1.5);
124 m_statustp = tfserv->
make<TH1F>(
"statustp",
"Tracking Particle status",2000,-1000.5,999.5);
131 sprintf(name,
"simytecr_%d",
ring+1);
132 sprintf(title,
"SimHit local Y TEC ring %d",
ring+1);
136 sprintf(name,
"assosimytecr_%d",
ring+1);
137 sprintf(title,
"SimHit local Y TEC ring %d with associated RecHit",
ring+1);
189 if(
std::abs(tp->pdgId())!=13)
continue;
197 m_ptp->Fill(tp->p());
202 m_nhits->Fill(tp->numberOfTrackerHits());
206 m_llbit->Fill(tp->longLived());
215 if(srcoll.
find(tp) != srcoll.
end()) {
220 for(reco::SimToRecoCollection::result_type::const_iterator trk = trks.begin();trk!=trks.end();++trk) {
222 rechits.push_back((*rh)->geographicalId());
230 edm::LogInfo(
"NoAssociatedRecoTrack") <<
"No associated reco track for TP with p = " << tp->p()
231 <<
" and eta = " << tp->eta() ;
238 LogDebug(
"RecHitDetId") <<
"List of " << rechits.size() <<
" rechits detid from muon with p = " << tp->p()
239 <<
"and eta = " << tp->eta();
240 for(
unsigned int i=0;
i<rechits.size();++
i) {
241 LogTrace(
"RecHitDetId") << rechits[
i].rawId();
248 LogDebug(
"SimHitDetId") <<
"List of " << tp->numberOfTrackerHits() <<
" simhits detid from muon with p = " << tp->p()
249 <<
"and eta = " << tp->eta();
reco::SimToRecoCollection associateSimToReco(const edm::Handle< edm::View< reco::Track >> &tCH, const edm::Handle< TrackingParticleCollection > &tPCH) const
void endRun(const edm::Run &, const edm::EventSetup &) override
~OverlapProblemTPAnalyzer() override
void analyze(const edm::Event &, const edm::EventSetup &) override
std::vector< TrackingParticle > TrackingParticleCollection
const_iterator end() const
last iterator over the map (read only)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
const_iterator find(const key_type &k) const
find element with specified reference key
T * make(const Args &...args) const
make new ROOT object
void beginRun(const edm::Run &, const edm::EventSetup &) override
value_type::value_type result_type
type return by operator[]
edm::EDGetTokenT< TrackingParticleCollection > m_tpcollToken
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
edm::EDGetTokenT< edm::View< reco::Track > > m_trkcollToken
#define DEFINE_FWK_MODULE(type)
OverlapProblemTPAnalyzer(const edm::ParameterSet &)
Abs< T >::type abs(const T &t)
std::vector< TH1F * > m_simhitytecr
edm::EDGetTokenT< reco::TrackToTrackingParticleAssociator > m_associatorToken
std::vector< TH1F * > m_assosimhitytecr