32 theSTAMuonLabel =
pset.getUntrackedParameter<
string>(
"StandAloneTrackCollectionLabel");
33 theSeedCollectionLabel =
pset.getUntrackedParameter<
string>(
"MuonSeedCollectionLabel");
34 theDataType =
pset.getUntrackedParameter<
string>(
"DataType");
36 if (theDataType !=
"RealData" && theDataType !=
"SimData")
37 edm::LogInfo(
"PhysicsObjectsMonitor") <<
"Error in Data Type!!" << endl;
39 if (theDataType ==
"SimData") {
40 edm::LogInfo(
"PhysicsObjectsMonitor") <<
"Sorry! Running this package on simulation is no longer supported! ";
45 consumes<reco::TrackCollection>(
pset.getUntrackedParameter<
string>(
"StandAloneTrackCollectionLabel"));
54 hPres = iBooker.
book1D(
"pTRes",
"pT Resolution", 100, -2, 2);
55 h1_Pres = iBooker.
book1D(
"invPTRes",
"1/pT Resolution", 100, -2, 2);
57 charge = iBooker.
book1D(
"charge",
"track charge", 5, -2.5, 2.5);
58 ptot = iBooker.
book1D(
"ptot",
"track momentum", 50, 0, 50);
59 pt = iBooker.
book1D(
"pt",
"track pT", 100, 0, 50);
60 px = iBooker.
book1D(
"px ",
"track px", 100, -50, 50);
61 py = iBooker.
book1D(
"py",
"track py", 100, -50, 50);
62 pz = iBooker.
book1D(
"pz",
"track pz", 100, -50, 50);
63 Nmuon = iBooker.
book1D(
"Nmuon",
"Number of muon tracks", 11, -.5, 10.5);
64 Nrechits = iBooker.
book1D(
"Nrechits",
"Number of RecHits/Segments on track", 21, -.5, 21.5);
65 NDThits = iBooker.
book1D(
"NDThits",
"Number of DT Hits/Segments on track", 31, -.5, 31.5);
66 NCSChits = iBooker.
book1D(
"NCSChits",
"Number of CSC Hits/Segments on track", 31, -.5, 31.5);
67 NRPChits = iBooker.
book1D(
"NRPChits",
"Number of RPC hits on track", 11, -.5, 11.5);
69 DTvsCSC = iBooker.
book2D(
"DTvsCSC",
"Number of DT vs CSC hits on track", 29, -.5, 28.5, 29, -.5, 28.5);
70 TH2F *root_ob = DTvsCSC->
getTH2F();
71 root_ob->SetXTitle(
"Number of DT hits");
72 root_ob->SetYTitle(
"Number of CSC hits");
76 edm::LogInfo(
"PhysicsObjectsMonitor") <<
"Run: " <<
event.id().run() <<
" Event: " <<
event.id().event();
81 event.getByToken(theSTAMuonToken_,
staTracks);
89 reco::TrackCollection::const_iterator staTrack;
102 if ((*it)->isValid()) {
103 edm::LogInfo(
"PhysicsObjectsMonitor") <<
"Analyzer: Aha this looks like a Rechit!" << std::endl;
111 edm::LogInfo(
"PhysicsObjectsMonitor") <<
"This is an UNKNOWN hit !! " << std::endl;
117 Nrechits->Fill(nrechits);
118 NDThits->Fill(nDThits);
119 NCSChits->Fill(nCSChits);
120 DTvsCSC->Fill(nDThits, nCSChits);
121 NRPChits->Fill(nRPChits);
123 debug.dumpFTS(
track.impactPointTSCP().theState());
125 recPt =
track.impactPointTSCP().momentum().perp();
127 <<
" p: " <<
track.impactPointTSCP().momentum().mag() <<
" pT: " <<
recPt << endl;
129 ptot->Fill(
track.impactPointTSCP().momentum().mag());
131 px->Fill(
track.impactPointTSCP().momentum().x());
132 py->Fill(
track.impactPointTSCP().momentum().y());
133 pz->Fill(
track.impactPointTSCP().momentum().z());
136 if (
recPt && theDataType ==
"SimData") {
137 hPres->Fill((
recPt - simPt) / simPt);
138 h1_Pres->Fill((1 /
recPt - 1 / simPt) / (1 / simPt));