35 theSeedCollectionLabel =
39 if (theDataType !=
"RealData" && theDataType !=
"SimData")
40 edm::LogInfo(
"PhysicsObjectsMonitor") <<
"Error in Data Type!!" << endl;
42 if (theDataType ==
"SimData") {
44 <<
"Sorry! Running this package on simulation is no longer supported! ";
48 theSTAMuonToken_ = consumes<reco::TrackCollection>(
60 hPres = iBooker.
book1D(
"pTRes",
"pT Resolution", 100, -2, 2);
61 h1_Pres = iBooker.
book1D(
"invPTRes",
"1/pT Resolution", 100, -2, 2);
63 charge = iBooker.
book1D(
"charge",
"track charge", 5, -2.5, 2.5);
64 ptot = iBooker.
book1D(
"ptot",
"track momentum", 50, 0, 50);
65 pt = iBooker.
book1D(
"pt",
"track pT", 100, 0, 50);
66 px = iBooker.
book1D(
"px ",
"track px", 100, -50, 50);
67 py = iBooker.
book1D(
"py",
"track py", 100, -50, 50);
68 pz = iBooker.
book1D(
"pz",
"track pz", 100, -50, 50);
69 Nmuon = iBooker.
book1D(
"Nmuon",
"Number of muon tracks", 11, -.5, 10.5);
70 Nrechits = iBooker.
book1D(
"Nrechits",
"Number of RecHits/Segments on track",
72 NDThits = iBooker.
book1D(
"NDThits",
"Number of DT Hits/Segments on track", 31,
74 NCSChits = iBooker.
book1D(
"NCSChits",
"Number of CSC Hits/Segments on track",
77 iBooker.
book1D(
"NRPChits",
"Number of RPC hits on track", 11, -.5, 11.5);
79 DTvsCSC = iBooker.
book2D(
"DTvsCSC",
"Number of DT vs CSC hits on track", 29,
80 -.5, 28.5, 29, -.5, 28.5);
81 TH2F* root_ob = DTvsCSC->
getTH2F();
82 root_ob->SetXTitle(
"Number of DT hits");
83 root_ob->SetYTitle(
"Number of CSC hits");
88 edm::LogInfo(
"PhysicsObjectsMonitor") <<
"Run: " <<
event.id().run()
89 <<
" Event: " <<
event.id().event();
94 event.getByToken(theSTAMuonToken_, staTracks);
102 reco::TrackCollection::const_iterator staTrack;
105 <<
"Reconstructed tracks: " << staTracks->size() << endl;
106 Nmuon->Fill(staTracks->size());
107 for (staTrack = staTracks->begin(); staTrack != staTracks->end();
118 if ((*it)->isValid()) {
120 <<
"Analyzer: Aha this looks like a Rechit!" << std::endl;
128 edm::LogInfo(
"PhysicsObjectsMonitor") <<
"This is an UNKNOWN hit !! " 135 Nrechits->Fill(nrechits);
136 NDThits->Fill(nDThits);
137 NCSChits->Fill(nCSChits);
138 DTvsCSC->Fill(nDThits, nCSChits);
139 NRPChits->Fill(nRPChits);
146 <<
" pT: " << recPt << endl;
155 if (recPt && theDataType ==
"SimData") {
156 hPres->Fill((recPt - simPt) / simPt);
157 h1_Pres->Fill((1 / recPt - 1 / simPt) / (1 / simPt));
T getUntrackedParameter(std::string const &, T const &) const
TrajectoryStateClosestToPoint impactPointTSCP() const
const FreeTrajectoryState & theState() const
#define DEFINE_FWK_MODULE(type)
PhysicsObjectsMonitor(const edm::ParameterSet &pset)
Constructor.
TrackCharge charge() const
std::string dumpFTS(const FreeTrajectoryState &fts) const
void analyze(const edm::Event &event, const edm::EventSetup &eventSetup) override
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
MonitorElement * book1D(Args &&...args)
trackingRecHit_iterator recHitsEnd() const
last iterator to RecHits
void setCurrentFolder(const std::string &fullpath)
MonitorElement * book2D(Args &&...args)
~PhysicsObjectsMonitor() override
Destructor.
trackingRecHit_iterator recHitsBegin() const
first iterator to RecHits
GlobalVector momentum() const