CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
RPCRecHitValid.cc
Go to the documentation of this file.
3 
6 
19 
20 #include <algorithm>
21 
22 using namespace std;
23 
25 
27 {
28  simHitToken_ = consumes<SimHits>(pset.getParameter<edm::InputTag>("simHit"));
29  recHitToken_ = consumes<RecHits>(pset.getParameter<edm::InputTag>("recHit"));
30  simParticleToken_ = consumes<SimParticles>(pset.getParameter<edm::InputTag>("simTrack"));
31  simHitAssocToken_ = consumes<SimHitAssoc>(pset.getParameter<edm::InputTag>("simHitAssoc"));
32  muonToken_ = consumes<reco::MuonCollection>(pset.getParameter<edm::InputTag>("muon"));
34  if ( !dbe_ )
35  {
36  edm::LogError("RPCRecHitValid") << "No DQMStore instance\n";
37  return;
38  }
39 
40  // Book MonitorElements
41  subDir_ = pset.getParameter<std::string>("subDir");
42  h_.bookHistograms(dbe_, subDir_);
43 
44  // SimHit plots, not compatible to RPCPoint-RPCRecHit comparison
45  dbe_->setCurrentFolder(subDir_+"/HitProperty");
46  h_simParticleType = dbe_->book1D("SimHitPType", "SimHit particle type", 11, 0, 11);
47  h_simParticleType->getTH1()->SetMinimum(0);
48  if ( TH1* h = h_simParticleType->getTH1() )
49  {
50  h->GetXaxis()->SetBinLabel(1 , "#mu^{-}");
51  h->GetXaxis()->SetBinLabel(2 , "#mu^{+}");
52  h->GetXaxis()->SetBinLabel(3 , "e^{-}" );
53  h->GetXaxis()->SetBinLabel(4 , "e^{+}" );
54  h->GetXaxis()->SetBinLabel(5 , "#pi^{+}");
55  h->GetXaxis()->SetBinLabel(6 , "#pi^{-}");
56  h->GetXaxis()->SetBinLabel(7 , "K^{+}" );
57  h->GetXaxis()->SetBinLabel(8 , "K^{-}" );
58  h->GetXaxis()->SetBinLabel(9 , "p^{+}" );
59  h->GetXaxis()->SetBinLabel(10, "p^{-}" );
60  h->GetXaxis()->SetBinLabel(11, "Other" );
61  }
62 
63  dbe_->setCurrentFolder(subDir_+"/Track");
64 
65  h_nRPCHitPerSimMuon = dbe_->book1D("NRPCHitPerSimMuon" , "Number of RPC SimHit per SimMuon", 11, -0.5, 10.5);
66  h_nRPCHitPerSimMuonBarrel = dbe_->book1D("NRPCHitPerSimMuonBarrel" , "Number of RPC SimHit per SimMuon", 11, -0.5, 10.5);
67  h_nRPCHitPerSimMuonOverlap = dbe_->book1D("NRPCHitPerSimMuonOverlap", "Number of RPC SimHit per SimMuon", 11, -0.5, 10.5);
68  h_nRPCHitPerSimMuonEndcap = dbe_->book1D("NRPCHitPerSimMuonEndcap" , "Number of RPC SimHit per SimMuon", 11, -0.5, 10.5);
69 
70  h_nRPCHitPerRecoMuon = dbe_->book1D("NRPCHitPerRecoMuon" , "Number of RPC RecHit per RecoMuon", 11, -0.5, 10.5);
71  h_nRPCHitPerRecoMuonBarrel = dbe_->book1D("NRPCHitPerRecoMuonBarrel" , "Number of RPC RecHit per RecoMuon", 11, -0.5, 10.5);
72  h_nRPCHitPerRecoMuonOverlap = dbe_->book1D("NRPCHitPerRecoMuonOverlap", "Number of RPC RecHit per RecoMuon", 11, -0.5, 10.5);
73  h_nRPCHitPerRecoMuonEndcap = dbe_->book1D("NRPCHitPerRecoMuonEndcap" , "Number of RPC RecHit per RecoMuon", 11, -0.5, 10.5);
74 
75  h_nRPCHitPerSimMuon ->getTH1()->SetMinimum(0);
76  h_nRPCHitPerSimMuonBarrel ->getTH1()->SetMinimum(0);
77  h_nRPCHitPerSimMuonOverlap ->getTH1()->SetMinimum(0);
78  h_nRPCHitPerSimMuonEndcap ->getTH1()->SetMinimum(0);
79 
80  h_nRPCHitPerRecoMuon ->getTH1()->SetMinimum(0);
81  h_nRPCHitPerRecoMuonBarrel ->getTH1()->SetMinimum(0);
82  h_nRPCHitPerRecoMuonOverlap->getTH1()->SetMinimum(0);
83  h_nRPCHitPerRecoMuonEndcap ->getTH1()->SetMinimum(0);
84 
85  float ptBins[] = {0, 1, 2, 5, 10, 20, 30, 50, 100, 200, 300, 500};
86  const int nPtBins = sizeof(ptBins)/sizeof(float)-1;
87  h_simMuonBarrel_pt = dbe_->book1D("SimMuonBarrel_pt" , "SimMuon RPCHit in Barrel p_{T};p_{T} [GeV/c^{2}]", nPtBins, ptBins);
88  h_simMuonOverlap_pt = dbe_->book1D("SimMuonOverlap_pt" , "SimMuon RPCHit in Overlap p_{T};p_{T} [GeV/c^{2}]", nPtBins, ptBins);
89  h_simMuonEndcap_pt = dbe_->book1D("SimMuonEndcap_pt" , "SimMuon RPCHit in Endcap p_{T};p_{T} [GeV/c^{2}]", nPtBins, ptBins);
90  h_simMuonNoRPC_pt = dbe_->book1D("SimMuonNoRPC_pt" , "SimMuon without RPCHit p_{T};p_{T} [GeV/c^{2}]", nPtBins, ptBins);
91  h_simMuonBarrel_eta = dbe_->book1D("SimMuonBarrel_eta" , "SimMuon RPCHit in Barrel #eta;#eta", 50, -2.5, 2.5);
92  h_simMuonOverlap_eta = dbe_->book1D("SimMuonOverlap_eta", "SimMuon RPCHit in Overlap #eta;#eta", 50, -2.5, 2.5);
93  h_simMuonEndcap_eta = dbe_->book1D("SimMuonEndcap_eta" , "SimMuon RPCHit in Endcap #eta;#eta", 50, -2.5, 2.5);
94  h_simMuonNoRPC_eta = dbe_->book1D("SimMuonNoRPC_eta", "SimMuon without RPCHit #eta;#eta", 50, -2.5, 2.5);
95  h_simMuonBarrel_phi = dbe_->book1D("SimMuonBarrel_phi" , "SimMuon RPCHit in Barrel #phi;#phi", 36, -TMath::Pi(), TMath::Pi());
96  h_simMuonOverlap_phi = dbe_->book1D("SimMuonOverlap_phi", "SimMuon RPCHit in Overlap #phi;#phi", 36, -TMath::Pi(), TMath::Pi());
97  h_simMuonEndcap_phi = dbe_->book1D("SimMuonEndcap_phi" , "SimMuon RPCHit in Endcap #phi;#phi", 36, -TMath::Pi(), TMath::Pi());
98  h_simMuonNoRPC_phi = dbe_->book1D("SimMuonNoRPC_phi", "SimMuon without RPCHit #phi;#phi", 36, -TMath::Pi(), TMath::Pi());
99 
100  h_recoMuonBarrel_pt = dbe_->book1D("RecoMuonBarrel_pt" , "RecoMuon RPCHit in Barrel p_{T};p_{T} [GeV/c^{2}]", nPtBins, ptBins);
101  h_recoMuonOverlap_pt = dbe_->book1D("RecoMuonOverlap_pt" , "RecoMuon RPCHit in Overlap p_{T};p_{T} [GeV/c^{2}]", nPtBins, ptBins);
102  h_recoMuonEndcap_pt = dbe_->book1D("RecoMuonEndcap_pt" , "RecoMuon RPCHit in Endcap p_{T};p_{T} [GeV/c^{2}]", nPtBins, ptBins);
103  h_recoMuonNoRPC_pt = dbe_->book1D("RecoMuonNoRPC_pt" , "RecoMuon without RPCHit p_{T};p_{T} [GeV/c^{2}]", nPtBins, ptBins);
104  h_recoMuonBarrel_eta = dbe_->book1D("RecoMuonBarrel_eta" , "RecoMuon RPCHit in Barrel #eta;#eta", 50, -2.5, 2.5);
105  h_recoMuonOverlap_eta = dbe_->book1D("RecoMuonOverlap_eta", "RecoMuon RPCHit in Overlap #eta;#eta", 50, -2.5, 2.5);
106  h_recoMuonEndcap_eta = dbe_->book1D("RecoMuonEndcap_eta" , "RecoMuon RPCHit in Endcap #eta;#eta", 50, -2.5, 2.5);
107  h_recoMuonNoRPC_eta = dbe_->book1D("RecoMuonNoRPC_eta", "RecoMuon without RPCHit #eta;#eta", 50, -2.5, 2.5);
108  h_recoMuonBarrel_phi = dbe_->book1D("RecoMuonBarrel_phi" , "RecoMuon RPCHit in Barrel #phi;#phi", 36, -TMath::Pi(), TMath::Pi());
109  h_recoMuonOverlap_phi = dbe_->book1D("RecoMuonOverlap_phi", "RecoMuon RPCHit in Overlap #phi;#phi", 36, -TMath::Pi(), TMath::Pi());
110  h_recoMuonEndcap_phi = dbe_->book1D("RecoMuonEndcap_phi" , "RecoMuon RPCHit in Endcap #phi;#phi", 36, -TMath::Pi(), TMath::Pi());
111  h_recoMuonNoRPC_phi = dbe_->book1D("RecoMuonNoRPC_phi", "RecoMuon without RPCHit #phi;#phi", 36, -TMath::Pi(), TMath::Pi());
112 
113  h_simMuonBarrel_pt ->getTH1()->SetMinimum(0);
114  h_simMuonOverlap_pt ->getTH1()->SetMinimum(0);
115  h_simMuonEndcap_pt ->getTH1()->SetMinimum(0);
116  h_simMuonNoRPC_pt ->getTH1()->SetMinimum(0);
117  h_simMuonBarrel_eta ->getTH1()->SetMinimum(0);
118  h_simMuonOverlap_eta ->getTH1()->SetMinimum(0);
119  h_simMuonEndcap_eta ->getTH1()->SetMinimum(0);
120  h_simMuonNoRPC_eta ->getTH1()->SetMinimum(0);
121  h_simMuonBarrel_phi ->getTH1()->SetMinimum(0);
122  h_simMuonOverlap_phi ->getTH1()->SetMinimum(0);
123  h_simMuonEndcap_phi ->getTH1()->SetMinimum(0);
124  h_simMuonNoRPC_phi ->getTH1()->SetMinimum(0);
125 
126  h_recoMuonBarrel_pt ->getTH1()->SetMinimum(0);
127  h_recoMuonOverlap_pt ->getTH1()->SetMinimum(0);
128  h_recoMuonEndcap_pt ->getTH1()->SetMinimum(0);
129  h_recoMuonNoRPC_pt ->getTH1()->SetMinimum(0);
130  h_recoMuonBarrel_eta ->getTH1()->SetMinimum(0);
131  h_recoMuonOverlap_eta->getTH1()->SetMinimum(0);
132  h_recoMuonEndcap_eta ->getTH1()->SetMinimum(0);
133  h_recoMuonNoRPC_eta ->getTH1()->SetMinimum(0);
134  h_recoMuonBarrel_phi ->getTH1()->SetMinimum(0);
135  h_recoMuonOverlap_phi->getTH1()->SetMinimum(0);
136  h_recoMuonEndcap_phi ->getTH1()->SetMinimum(0);
137  h_recoMuonNoRPC_phi ->getTH1()->SetMinimum(0);
138 
139  dbe_->setCurrentFolder(subDir_+"/Occupancy");
140 
141  h_eventCount = dbe_->book1D("EventCount", "Event count", 3, 1, 4);
142  h_eventCount->getTH1()->SetMinimum(0);
143  if ( h_eventCount )
144  {
145  TH1* h = h_eventCount->getTH1();
146  h->GetXaxis()->SetBinLabel(1, "eventBegin");
147  h->GetXaxis()->SetBinLabel(2, "eventEnd");
148  h->GetXaxis()->SetBinLabel(3, "run");
149  }
150 
151  h_refPunchOccupancyBarrel_wheel = dbe_->book1D("RefPunchOccupancyBarrel_wheel" , "RefPunchthrough occupancy", 5, -2.5, 2.5);
152  h_refPunchOccupancyEndcap_disk = dbe_->book1D("RefPunchOccupancyEndcap_disk" , "RefPunchthrough occupancy", 9, -4.5, 4.5);
153  h_refPunchOccupancyBarrel_station = dbe_->book1D("RefPunchOccupancyBarrel_station", "RefPunchthrough occupancy", 4, 0.5, 4.5);
154  h_recPunchOccupancyBarrel_wheel = dbe_->book1D("RecPunchOccupancyBarrel_wheel" , "Punchthrough recHit occupancy", 5, -2.5, 2.5);
155  h_recPunchOccupancyEndcap_disk = dbe_->book1D("RecPunchOccupancyEndcap_disk" , "Punchthrough recHit occupancy", 9, -4.5, 4.5);
156  h_recPunchOccupancyBarrel_station = dbe_->book1D("RecPunchOccupancyBarrel_station", "Punchthrough recHit occupancy", 4, 0.5, 4.5);
157 
158  h_refPunchOccupancyBarrel_wheel ->getTH1()->SetMinimum(0);
159  h_refPunchOccupancyEndcap_disk ->getTH1()->SetMinimum(0);
160  h_refPunchOccupancyBarrel_station ->getTH1()->SetMinimum(0);
161  h_recPunchOccupancyBarrel_wheel ->getTH1()->SetMinimum(0);
162  h_recPunchOccupancyEndcap_disk ->getTH1()->SetMinimum(0);
163  h_recPunchOccupancyBarrel_station ->getTH1()->SetMinimum(0);
164 
165  h_refPunchOccupancyBarrel_wheel_station = dbe_->book2D("RefPunchOccupancyBarrel_wheel_station", "RefPunchthrough occupancy", 5, -2.5, 2.5, 4, 0.5, 4.5);
166  h_refPunchOccupancyEndcap_disk_ring = dbe_->book2D("RefPunchOccupancyEndcap_disk_ring" , "RefPunchthrough occupancy", 9, -4.5, 4.5, 4, 0.5, 4.5);
167  h_recPunchOccupancyBarrel_wheel_station = dbe_->book2D("RecPunchOccupancyBarrel_wheel_station", "Punchthrough recHit occupancy", 5, -2.5, 2.5, 4, 0.5, 4.5);
168  h_recPunchOccupancyEndcap_disk_ring = dbe_->book2D("RecPunchOccupancyEndcap_disk_ring" , "Punchthrough recHit occupancy", 9, -4.5, 4.5, 4, 0.5, 4.5);
169 
170  h_refPunchOccupancyBarrel_wheel_station->getTH2F()->SetOption("COLZ");
171  h_refPunchOccupancyEndcap_disk_ring ->getTH2F()->SetOption("COLZ");
172  h_recPunchOccupancyBarrel_wheel_station->getTH2F()->SetOption("COLZ");
173  h_recPunchOccupancyEndcap_disk_ring ->getTH2F()->SetOption("COLZ");
174 
175  h_refPunchOccupancyBarrel_wheel_station->getTH2F()->SetContour(10);
176  h_refPunchOccupancyEndcap_disk_ring ->getTH2F()->SetContour(10);
177  h_recPunchOccupancyBarrel_wheel_station->getTH2F()->SetContour(10);
178  h_recPunchOccupancyEndcap_disk_ring ->getTH2F()->SetContour(10);
179 
180  h_refPunchOccupancyBarrel_wheel_station->getTH2F()->SetStats(0);
181  h_refPunchOccupancyEndcap_disk_ring ->getTH2F()->SetStats(0);
182  h_recPunchOccupancyBarrel_wheel_station->getTH2F()->SetStats(0);
183  h_recPunchOccupancyEndcap_disk_ring ->getTH2F()->SetStats(0);
184 
185  h_refPunchOccupancyBarrel_wheel_station->getTH2F()->SetMinimum(0);
186  h_refPunchOccupancyEndcap_disk_ring ->getTH2F()->SetMinimum(0);
187  h_recPunchOccupancyBarrel_wheel_station->getTH2F()->SetMinimum(0);
188  h_recPunchOccupancyEndcap_disk_ring ->getTH2F()->SetMinimum(0);
189 
190  for ( int i=1; i<=5; ++i )
191  {
192  TString binLabel = Form("Wheel %d", i-3);
193  h_refPunchOccupancyBarrel_wheel->getTH1()->GetXaxis()->SetBinLabel(i, binLabel);
194  h_refPunchOccupancyBarrel_wheel_station->getTH2F()->GetXaxis()->SetBinLabel(i, binLabel);
195  h_recPunchOccupancyBarrel_wheel->getTH1()->GetXaxis()->SetBinLabel(i, binLabel);
196  h_recPunchOccupancyBarrel_wheel_station->getTH2F()->GetXaxis()->SetBinLabel(i, binLabel);
197  }
198 
199  for ( int i=1; i<=9; ++i )
200  {
201  TString binLabel = Form("Disk %d", i-5);
202  h_refPunchOccupancyEndcap_disk ->getTH1()->GetXaxis()->SetBinLabel(i, binLabel);
203  h_refPunchOccupancyEndcap_disk_ring ->getTH2F()->GetXaxis()->SetBinLabel(i, binLabel);
204  h_recPunchOccupancyEndcap_disk ->getTH1()->GetXaxis()->SetBinLabel(i, binLabel);
205  h_recPunchOccupancyEndcap_disk_ring ->getTH2F()->GetXaxis()->SetBinLabel(i, binLabel);
206  }
207 
208  for ( int i=1; i<=4; ++i )
209  {
210  TString binLabel = Form("Station %d", i);
211  h_refPunchOccupancyBarrel_station ->getTH1()->GetXaxis()->SetBinLabel(i, binLabel);
212  h_refPunchOccupancyBarrel_wheel_station ->getTH2F()->GetYaxis()->SetBinLabel(i, binLabel);
213  h_recPunchOccupancyBarrel_station ->getTH1()->GetXaxis()->SetBinLabel(i, binLabel);
214  h_recPunchOccupancyBarrel_wheel_station ->getTH2F()->GetYaxis()->SetBinLabel(i, binLabel);
215  }
216 
217  for ( int i=1; i<=4; ++i )
218  {
219  TString binLabel = Form("Ring %d", i);
220  h_refPunchOccupancyEndcap_disk_ring ->getTH2F()->GetYaxis()->SetBinLabel(i, binLabel);
221  h_recPunchOccupancyEndcap_disk_ring ->getTH2F()->GetYaxis()->SetBinLabel(i, binLabel);
222  }
223 }
224 
226 {
227 }
228 
230 {
231 }
232 
234 {
235 }
236 
237 void RPCRecHitValid::beginRun(const edm::Run& run, const edm::EventSetup& eventSetup)
238 {
239  if ( !dbe_ ) return;
240  h_eventCount->Fill(3);
241 
242  // Book roll-by-roll histograms
244  eventSetup.get<MuonGeometryRecord>().get(rpcGeom);
245 
246  int nRPCRollBarrel = 0, nRPCRollEndcap = 0;
247 
248  TrackingGeometry::DetContainer rpcDets = rpcGeom->dets();
249  for ( auto det : rpcDets )
250  {
251  RPCChamber* rpcCh = dynamic_cast<RPCChamber*>(det);
252  if ( !rpcCh ) continue;
253 
254  std::vector<const RPCRoll*> rolls = rpcCh->rolls();
255  for ( auto roll : rolls )
256  {
257  if ( !roll ) continue;
258 
259  //RPCGeomServ rpcSrv(roll->id());
260  const int rawId = roll->geographicalId().rawId();
261  //if ( !roll->specs()->isRPC() ) { cout << "\nNoRPC : " << rpcSrv.name() << ' ' << rawId << endl; continue; }
262 
263  if ( roll->isBarrel() )
264  {
265  detIdToIndexMapBarrel_[rawId] = nRPCRollBarrel;
266  //rollIdToNameMapBarrel_[rawId] = rpcSrv.name();
267  ++nRPCRollBarrel;
268  }
269  else
270  {
271  detIdToIndexMapEndcap_[rawId] = nRPCRollEndcap;
272  //rollIdToNameMapEndcap_[rawId] = rpcSrv.name();
273  ++nRPCRollEndcap;
274  }
275  }
276  }
277 
278  dbe_->setCurrentFolder(subDir_+"/Occupancy");
279  h_matchOccupancyBarrel_detId = dbe_->book1D("MatchOccupancyBarrel_detId", "Matched hit occupancy;roll index (can be arbitrary)", nRPCRollBarrel, 0, nRPCRollBarrel);
280  h_matchOccupancyEndcap_detId = dbe_->book1D("MatchOccupancyEndcap_detId", "Matched hit occupancy;roll index (can be arbitrary)", nRPCRollEndcap, 0, nRPCRollEndcap);
281  h_refOccupancyBarrel_detId = dbe_->book1D("RefOccupancyBarrel_detId", "Reference hit occupancy;roll index (can be arbitrary)", nRPCRollBarrel, 0, nRPCRollBarrel);
282  h_refOccupancyEndcap_detId = dbe_->book1D("RefOccupancyEndcap_detId", "Reference hit occupancy;roll index (can be arbitrary)", nRPCRollEndcap, 0, nRPCRollEndcap);
283  h_noiseOccupancyBarrel_detId = dbe_->book1D("NoiseOccupancyBarrel_detId", "Noise occupancy;roll index (can be arbitrary)", nRPCRollBarrel, 0, nRPCRollBarrel);
284  h_noiseOccupancyEndcap_detId = dbe_->book1D("NoiseOccupancyEndcap_detId", "Noise occupancy;roll index (can be arbitrary)", nRPCRollEndcap, 0, nRPCRollEndcap);
285 
286  h_matchOccupancyBarrel_detId->getTH1()->SetMinimum(0);
287  h_matchOccupancyEndcap_detId->getTH1()->SetMinimum(0);
288  h_refOccupancyBarrel_detId ->getTH1()->SetMinimum(0);
289  h_refOccupancyEndcap_detId ->getTH1()->SetMinimum(0);
290  h_noiseOccupancyBarrel_detId->getTH1()->SetMinimum(0);
291  h_noiseOccupancyEndcap_detId->getTH1()->SetMinimum(0);
292 
293  h_rollAreaBarrel_detId = dbe_->bookProfile("RollAreaBarrel_detId", "Roll area;roll index;Area", nRPCRollBarrel, 0., 1.*nRPCRollBarrel, 0., 1e5);
294  h_rollAreaEndcap_detId = dbe_->bookProfile("RollAreaEndcap_detId", "Roll area;roll index;Area", nRPCRollEndcap, 0., 1.*nRPCRollEndcap, 0., 1e5);
295 
296  for ( auto detIdToIndex : detIdToIndexMapBarrel_ )
297  {
298  const int rawId = detIdToIndex.first;
299  const int index = detIdToIndex.second;
300 
301  const RPCDetId rpcDetId = static_cast<const RPCDetId>(rawId);
302  const RPCRoll* roll = dynamic_cast<const RPCRoll*>(rpcGeom->roll(rpcDetId));
303 
304  //RPCGeomServ rpcSrv(roll->id());
305  //if ( !roll->specs()->isRPC() ) { cout << "\nNoRPC : " << rpcSrv.name() << ' ' << rawId << endl; continue; }
306 
307  const StripTopology& topol = roll->specificTopology();
308  const double area = topol.stripLength()*topol.nstrips()*topol.pitch();
309 
310  h_rollAreaBarrel_detId->Fill(index, area);
311  }
312 
313  for ( auto detIdToIndex : detIdToIndexMapEndcap_ )
314  {
315  const int rawId = detIdToIndex.first;
316  const int index = detIdToIndex.second;
317 
318  const RPCDetId rpcDetId = static_cast<const RPCDetId>(rawId);
319  const RPCRoll* roll = dynamic_cast<const RPCRoll*>(rpcGeom->roll(rpcDetId));
320 
321  //RPCGeomServ rpcSrv(roll->id());
322  //if ( !roll->specs()->isRPC() ) { cout << "\nNoRPC : " << rpcSrv.name() << ' ' << rawId << endl; continue; }
323 
324  const StripTopology& topol = roll->specificTopology();
325  const double area = topol.stripLength()*topol.nstrips()*topol.pitch();
326 
327  h_rollAreaEndcap_detId->Fill(index, area);
328  }
329 }
330 
331 void RPCRecHitValid::endRun(const edm::Run& run, const edm::EventSetup& eventSetup)
332 {
333  if ( !dbe_ ) return;
334 
335 }
336 
338 {
339  if ( !dbe_ ) return;
340  h_eventCount->Fill(1);
341 
342  // Get the RPC Geometry
344  eventSetup.get<MuonGeometryRecord>().get(rpcGeom);
345 
346  // Retrieve SimHits from the event
348  if ( !event.getByToken(simHitToken_, simHitHandle) )
349  {
350  edm::LogInfo("RPCRecHitValid") << "Cannot find simHit collection\n";
351  return;
352  }
353 
354  // Retrieve RecHits from the event
356  if ( !event.getByToken(recHitToken_, recHitHandle) )
357  {
358  edm::LogInfo("RPCRecHitValid") << "Cannot find recHit collection\n";
359  return;
360  }
361 
362  // Get SimParticles
363  edm::Handle<TrackingParticleCollection> simParticleHandle;
364  if ( !event.getByToken(simParticleToken_, simParticleHandle) )
365  {
366  edm::LogInfo("RPCRecHitValid") << "Cannot find TrackingParticle collection\n";
367  return;
368  }
369 
370  // Get SimParticle to SimHit association map
372  if ( !event.getByToken(simHitAssocToken_, simHitsTPAssoc) )
373  {
374  edm::LogInfo("RPCRecHitValid") << "Cannot find TrackingParticle to SimHit association map\n";
375  return;
376  }
377 
378  // Get RecoMuons
380  if ( !event.getByToken(muonToken_, muonHandle) )
381  {
382  edm::LogInfo("RPCRecHitValid") << "Cannot find muon collection\n";
383  return;
384  }
385 
386  typedef edm::PSimHitContainer::const_iterator SimHitIter;
387  typedef RPCRecHitCollection::const_iterator RecHitIter;
388  typedef std::vector<TrackPSimHitRef> SimHitRefs;
389 
390  // TrackingParticles with (and without) RPC simHits
391  SimHitRefs muonSimHits, pthrSimHits;
392 
393  for ( int i=0, n=simParticleHandle->size(); i<n; ++i )
394  {
395  TrackingParticleRef simParticle(simParticleHandle, i);
396  if ( simParticle->pt() < 1.0 or simParticle->p() < 2.5 ) continue; // globalMuon acceptance
397 
398  // Collect SimHits from this Tracking Particle
399  SimHitRefs simHitsFromParticle;
400  auto range = std::equal_range(simHitsTPAssoc->begin(), simHitsTPAssoc->end(),
401  std::make_pair(simParticle, TrackPSimHitRef()),
403  for ( auto simParticleToHit = range.first; simParticleToHit != range.second; ++simParticleToHit )
404  {
405  auto simHit = simParticleToHit->second;
406  const DetId detId(simHit->detUnitId());
407  if ( detId.det() != DetId::Muon or detId.subdetId() != MuonSubdetId::RPC ) continue;
408 
409  simHitsFromParticle.push_back(simParticleToHit->second);
410  }
411  const int nRPCHit = simHitsFromParticle.size();
412  const bool hasRPCHit = nRPCHit > 0;
413 
414  if ( abs(simParticle->pdgId()) == 13 )
415  {
416  muonSimHits.insert(muonSimHits.end(), simHitsFromParticle.begin(), simHitsFromParticle.end());
417 
418  // Count number of Barrel hits and Endcap hits
419  int nRPCHitBarrel = 0;
420  int nRPCHitEndcap = 0;
421  for ( auto simHit : simHitsFromParticle )
422  {
423  const RPCDetId rpcDetId = static_cast<const RPCDetId>(simHit->detUnitId());
424  const RPCRoll* roll = dynamic_cast<const RPCRoll*>(rpcGeom->roll(rpcDetId));
425  if ( !roll ) continue;
426 
427  if ( rpcDetId.region() == 0 ) ++nRPCHitBarrel;
428  else ++nRPCHitEndcap;
429  }
430 
431  // Fill TrackingParticle related histograms
432  h_nRPCHitPerSimMuon->Fill(nRPCHit);
433  if ( nRPCHitBarrel and nRPCHitEndcap )
434  {
435  h_nRPCHitPerSimMuonOverlap->Fill(nRPCHit);
436  h_simMuonOverlap_pt->Fill(simParticle->pt());
437  h_simMuonOverlap_eta->Fill(simParticle->eta());
438  h_simMuonOverlap_phi->Fill(simParticle->phi());
439  }
440  else if ( nRPCHitBarrel )
441  {
442  h_nRPCHitPerSimMuonBarrel->Fill(nRPCHit);
443  h_simMuonBarrel_pt->Fill(simParticle->pt());
444  h_simMuonBarrel_eta->Fill(simParticle->eta());
445  h_simMuonBarrel_phi->Fill(simParticle->phi());
446  }
447  else if ( nRPCHitEndcap )
448  {
449  h_nRPCHitPerSimMuonEndcap->Fill(nRPCHit);
450  h_simMuonEndcap_pt->Fill(simParticle->pt());
451  h_simMuonEndcap_eta->Fill(simParticle->eta());
452  h_simMuonEndcap_phi->Fill(simParticle->phi());
453  }
454  else
455  {
456  h_simMuonNoRPC_pt->Fill(simParticle->pt());
457  h_simMuonNoRPC_eta->Fill(simParticle->eta());
458  h_simMuonNoRPC_phi->Fill(simParticle->phi());
459  }
460  }
461  else
462  {
463  pthrSimHits.insert(pthrSimHits.end(), simHitsFromParticle.begin(), simHitsFromParticle.end());
464  }
465 
466  if ( hasRPCHit )
467  {
468  switch ( simParticle->pdgId() )
469  {
470  case 13: h_simParticleType->Fill( 0); break;
471  case -13: h_simParticleType->Fill( 1); break;
472  case 11: h_simParticleType->Fill( 2); break;
473  case -11: h_simParticleType->Fill( 3); break;
474  case 211: h_simParticleType->Fill( 4); break;
475  case -211: h_simParticleType->Fill( 5); break;
476  case 321: h_simParticleType->Fill( 6); break;
477  case -321: h_simParticleType->Fill( 7); break;
478  case 2212: h_simParticleType->Fill( 8); break;
479  case -2212: h_simParticleType->Fill( 9); break;
480  default: h_simParticleType->Fill(10); break;
481  }
482  }
483  }
484 
485  // Loop over muon simHits, fill histograms which does not need associations
486  int nRefHitBarrel = 0, nRefHitEndcap = 0;
487  for ( auto simHit : muonSimHits )
488  {
489  const RPCDetId detId = static_cast<const RPCDetId>(simHit->detUnitId());
490  const RPCRoll* roll = dynamic_cast<const RPCRoll*>(rpcGeom->roll(detId));
491 
492  const int region = roll->id().region();
493  const int ring = roll->id().ring();
494  //const int sector = roll->id().sector();
495  const int station = roll->id().station();
496  //const int layer = roll->id().layer();
497  //const int subSector = roll->id().subsector();
498 
499  if ( region == 0 )
500  {
501  ++nRefHitBarrel;
502  h_.refHitOccupancyBarrel_wheel->Fill(ring);
503  h_.refHitOccupancyBarrel_station->Fill(station);
504  h_.refHitOccupancyBarrel_wheel_station->Fill(ring, station);
505 
506  h_refOccupancyBarrel_detId->Fill(detIdToIndexMapBarrel_[simHit->detUnitId()]);
507  }
508  else
509  {
510  ++nRefHitEndcap;
511  h_.refHitOccupancyEndcap_disk->Fill(region*station);
512  h_.refHitOccupancyEndcap_disk_ring->Fill(region*station, ring);
513 
514  h_refOccupancyEndcap_detId->Fill(detIdToIndexMapEndcap_[simHit->detUnitId()]);
515  }
516  }
517 
518  // Loop over punch-through simHits, fill histograms which does not need associations
519  for ( auto simHit : pthrSimHits )
520  {
521  const RPCDetId detId = static_cast<const RPCDetId>(simHit->detUnitId());
522  const RPCRoll* roll = dynamic_cast<const RPCRoll*>(rpcGeom->roll(detId()));
523 
524  const int region = roll->id().region();
525  const int ring = roll->id().ring();
526  //const int sector = roll->id().sector();
527  const int station = roll->id().station();
528  //const int layer = roll->id().layer();
529  //const int subSector = roll->id().subsector();
530 
531  if ( region == 0 )
532  {
533  ++nRefHitBarrel;
534  h_refPunchOccupancyBarrel_wheel->Fill(ring);
535  h_refPunchOccupancyBarrel_station->Fill(station);
536  h_refPunchOccupancyBarrel_wheel_station->Fill(ring, station);
537 
538  h_refOccupancyBarrel_detId->Fill(detIdToIndexMapBarrel_[simHit->detUnitId()]);
539  }
540  else
541  {
542  ++nRefHitEndcap;
543  h_refPunchOccupancyEndcap_disk->Fill(region*station);
544  h_refPunchOccupancyEndcap_disk_ring->Fill(region*station, ring);
545 
546  h_refOccupancyEndcap_detId->Fill(detIdToIndexMapEndcap_[simHit->detUnitId()]);
547  }
548  }
549  h_.nRefHitBarrel->Fill(nRefHitBarrel);
550  h_.nRefHitEndcap->Fill(nRefHitEndcap);
551 
552  // Loop over recHits, fill histograms which does not need associations
553  int sumClusterSizeBarrel = 0, sumClusterSizeEndcap = 0;
554  int nRecHitBarrel = 0, nRecHitEndcap = 0;
555  for ( RecHitIter recHitIter = recHitHandle->begin();
556  recHitIter != recHitHandle->end(); ++recHitIter )
557  {
558  const RPCDetId detId = static_cast<const RPCDetId>(recHitIter->rpcId());
559  const RPCRoll* roll = dynamic_cast<const RPCRoll*>(rpcGeom->roll(detId()));
560  if ( !roll ) continue;
561 
562  const int region = roll->id().region();
563  const int ring = roll->id().ring();
564  //const int sector = roll->id().sector();
565  const int station = roll->id().station();
566  //const int layer = roll->id().layer();
567  //const int subSector = roll->id().subsector();
568 
569  h_.clusterSize->Fill(recHitIter->clusterSize());
570 
571  if ( region == 0 )
572  {
573  ++nRecHitBarrel;
574  sumClusterSizeBarrel += recHitIter->clusterSize();
575  h_.clusterSizeBarrel->Fill(recHitIter->clusterSize());
576  h_.recHitOccupancyBarrel_wheel->Fill(ring);
577  h_.recHitOccupancyBarrel_station->Fill(station);
578  h_.recHitOccupancyBarrel_wheel_station->Fill(ring, station);
579  }
580  else
581  {
582  ++nRecHitEndcap;
583  sumClusterSizeEndcap += recHitIter->clusterSize();
584  h_.clusterSizeEndcap->Fill(recHitIter->clusterSize());
585  h_.recHitOccupancyEndcap_disk->Fill(region*station);
586  h_.recHitOccupancyEndcap_disk_ring->Fill(region*station, ring);
587  }
588 
589  }
590  const double nRecHit = nRecHitBarrel+nRecHitEndcap;
591  h_.nRecHitBarrel->Fill(nRecHitBarrel);
592  h_.nRecHitEndcap->Fill(nRecHitEndcap);
593  if ( nRecHit > 0 )
594  {
595  const int sumClusterSize = sumClusterSizeBarrel+sumClusterSizeEndcap;
596  h_.avgClusterSize->Fill(double(sumClusterSize)/nRecHit);
597 
598  if ( nRecHitBarrel > 0 )
599  {
600  h_.avgClusterSizeBarrel->Fill(double(sumClusterSizeBarrel)/nRecHitBarrel);
601  }
602  if ( nRecHitEndcap > 0 )
603  {
604  h_.avgClusterSizeEndcap->Fill(double(sumClusterSizeEndcap)/nRecHitEndcap);
605  }
606  }
607 
608  // Start matching SimHits to RecHits
609  typedef std::map<TrackPSimHitRef, RecHitIter> SimToRecHitMap;
610  SimToRecHitMap simToRecHitMap;
611 
612  for ( auto simHit : muonSimHits )
613  {
614  const RPCDetId simDetId = static_cast<const RPCDetId>(simHit->detUnitId());
615  //const RPCRoll* simRoll = dynamic_cast<const RPCRoll*>(rpcGeom->roll(simDetId));
616 
617  const double simX = simHit->localPosition().x();
618 
619  for ( RecHitIter recHitIter = recHitHandle->begin();
620  recHitIter != recHitHandle->end(); ++recHitIter )
621  {
622  const RPCDetId recDetId = static_cast<const RPCDetId>(recHitIter->rpcId());
623  const RPCRoll* recRoll = dynamic_cast<const RPCRoll*>(rpcGeom->roll(recDetId));
624  if ( !recRoll ) continue;
625 
626  if ( simDetId != recDetId ) continue;
627 
628  const double recX = recHitIter->localPosition().x();
629  const double newDx = fabs(recX - simX);
630 
631  // Associate SimHit to RecHit
632  SimToRecHitMap::const_iterator prevSimToReco = simToRecHitMap.find(simHit);
633  if ( prevSimToReco == simToRecHitMap.end() )
634  {
635  simToRecHitMap.insert(std::make_pair(simHit, recHitIter));
636  }
637  else
638  {
639  const double oldDx = fabs(prevSimToReco->second->localPosition().x() - simX);
640 
641  if ( newDx < oldDx )
642  {
643  simToRecHitMap[simHit] = recHitIter;
644  }
645  }
646  }
647  }
648 
649  // Now we have simHit-recHit mapping
650  // So we can fill up relavant histograms
651  int nMatchHitBarrel = 0, nMatchHitEndcap = 0;
652  for ( auto match : simToRecHitMap )
653  {
654  TrackPSimHitRef simHit = match.first;
655  RecHitIter recHitIter = match.second;
656 
657  const RPCDetId detId = static_cast<const RPCDetId>(simHit->detUnitId());
658  const RPCRoll* roll = dynamic_cast<const RPCRoll*>(rpcGeom->roll(detId));
659 
660  const int region = roll->id().region();
661  const int ring = roll->id().ring();
662  //const int sector = roll->id().sector();
663  const int station = roll->id().station();
664  //const int layer = roll->id().layer();
665  //const int subsector = roll->id().subsector();
666 
667  const double simX = simHit->localPosition().x();
668  const double recX = recHitIter->localPosition().x();
669  const double errX = sqrt(recHitIter->localPositionError().xx());
670  const double dX = recX - simX;
671  const double pull = errX == 0 ? -999 : dX/errX;
672 
673  //const GlobalPoint simPos = roll->toGlobal(simHitIter->localPosition());
674  //const GlobalPoint recPos = roll->toGlobal(recHitIter->localPosition());
675 
676  if ( region == 0 )
677  {
678  ++nMatchHitBarrel;
679  h_.resBarrel->Fill(dX);
680  h_.pullBarrel->Fill(pull);
681  h_.matchOccupancyBarrel_wheel->Fill(ring);
682  h_.matchOccupancyBarrel_station->Fill(station);
683  h_.matchOccupancyBarrel_wheel_station->Fill(ring, station);
684 
685  h_.res_wheel_res->Fill(ring, dX);
686  h_.res_station_res->Fill(station, dX);
687  h_.pull_wheel_pull->Fill(ring, pull);
688  h_.pull_station_pull->Fill(station, pull);
689 
690  h_matchOccupancyBarrel_detId->Fill(detIdToIndexMapBarrel_[detId.rawId()]);
691  }
692  else
693  {
694  ++nMatchHitEndcap;
695  h_.resEndcap->Fill(dX);
696  h_.pullEndcap->Fill(pull);
697  h_.matchOccupancyEndcap_disk->Fill(region*station);
698  h_.matchOccupancyEndcap_disk_ring->Fill(region*station, ring);
699 
700  h_.res_disk_res->Fill(region*station, dX);
701  h_.res_ring_res->Fill(ring, dX);
702  h_.pull_disk_pull->Fill(region*station, pull);
703  h_.pull_ring_pull->Fill(ring, pull);
704 
705  h_matchOccupancyEndcap_detId->Fill(detIdToIndexMapEndcap_[detId.rawId()]);
706  }
707 
708  }
709  h_.nMatchHitBarrel->Fill(nMatchHitBarrel);
710  h_.nMatchHitEndcap->Fill(nMatchHitEndcap);
711 
712  // Reco Muon hits
713  for ( reco::MuonCollection::const_iterator muon = muonHandle->begin();
714  muon != muonHandle->end(); ++muon )
715  {
716  if ( !muon->isGlobalMuon() ) continue;
717 
718  int nRPCHitBarrel = 0;
719  int nRPCHitEndcap = 0;
720 
721  const reco::TrackRef glbTrack = muon->globalTrack();
722  for ( trackingRecHit_iterator recHit = glbTrack->recHitsBegin();
723  recHit != glbTrack->recHitsEnd(); ++recHit )
724  {
725  if ( !(*recHit)->isValid() ) continue;
726  const DetId detId = (*recHit)->geographicalId();
727  if ( detId.det() != DetId::Muon or detId.subdetId() != MuonSubdetId::RPC ) continue;
728  const RPCDetId rpcDetId = static_cast<const RPCDetId>(detId);
729 
730  if ( rpcDetId.region() == 0 ) ++nRPCHitBarrel;
731  else ++nRPCHitEndcap;
732  }
733 
734  const int nRPCHit = nRPCHitBarrel + nRPCHitEndcap;
735  h_nRPCHitPerRecoMuon->Fill(nRPCHit);
736  if ( nRPCHitBarrel and nRPCHitEndcap )
737  {
738  h_nRPCHitPerRecoMuonOverlap->Fill(nRPCHit);
739  h_recoMuonOverlap_pt->Fill(muon->pt());
740  h_recoMuonOverlap_eta->Fill(muon->eta());
741  h_recoMuonOverlap_phi->Fill(muon->phi());
742  }
743  else if ( nRPCHitBarrel )
744  {
745  h_nRPCHitPerRecoMuonBarrel->Fill(nRPCHit);
746  h_recoMuonBarrel_pt->Fill(muon->pt());
747  h_recoMuonBarrel_eta->Fill(muon->eta());
748  h_recoMuonBarrel_phi->Fill(muon->phi());
749  }
750  else if ( nRPCHitEndcap )
751  {
752  h_nRPCHitPerRecoMuonEndcap->Fill(nRPCHit);
753  h_recoMuonEndcap_pt->Fill(muon->pt());
754  h_recoMuonEndcap_eta->Fill(muon->eta());
755  h_recoMuonEndcap_phi->Fill(muon->phi());
756  }
757  else
758  {
759  h_recoMuonNoRPC_pt->Fill(muon->pt());
760  h_recoMuonNoRPC_eta->Fill(muon->eta());
761  h_recoMuonNoRPC_phi->Fill(muon->phi());
762  }
763  }
764 
765  // Find Non-muon hits
766  for ( RecHitIter recHitIter = recHitHandle->begin();
767  recHitIter != recHitHandle->end(); ++recHitIter )
768  {
769  const RPCDetId detId = static_cast<const RPCDetId>(recHitIter->rpcId());
770  const RPCRoll* roll = dynamic_cast<const RPCRoll*>(rpcGeom->roll(detId));
771 
772  const int region = roll->id().region();
773  const int ring = roll->id().ring();
774  //const int sector = roll->id().sector();
775  const int station = roll->id().station();
776  //const int layer = roll->id().layer();
777  //const int subsector = roll->id().subsector();
778 
779  bool matched = false;
780  for ( auto match : simToRecHitMap )
781  {
782  if ( recHitIter == match.second )
783  {
784  matched = true;
785  break;
786  }
787  }
788 
789  if ( !matched )
790  {
791  // FIXME : kept for backward compatibility //
792  if ( region == 0 )
793  {
794  h_.umOccupancyBarrel_wheel->Fill(ring);
795  h_.umOccupancyBarrel_station->Fill(station);
796  h_.umOccupancyBarrel_wheel_station->Fill(ring, station);
797  }
798  else
799  {
800  h_.umOccupancyEndcap_disk->Fill(region*station);
801  h_.umOccupancyEndcap_disk_ring->Fill(region*station, ring);
802  }
803  // End of FIXME //
804 
805  int nPunchMatched = 0;
806  // Check if this recHit came from non-muon simHit
807  for ( auto simHit : pthrSimHits )
808  {
809  const int absSimHitPType = abs(simHit->particleType());
810  if ( absSimHitPType == 13 ) continue;
811 
812  const RPCDetId simDetId = static_cast<const RPCDetId>(simHit->detUnitId());
813  if ( simDetId == detId ) ++nPunchMatched;
814  }
815 
816  if ( nPunchMatched > 0 )
817  {
818  if ( region == 0 )
819  {
820  h_recPunchOccupancyBarrel_wheel->Fill(ring);
821  h_recPunchOccupancyBarrel_station->Fill(station);
822  h_recPunchOccupancyBarrel_wheel_station->Fill(ring, station);
823  }
824  else
825  {
826  h_recPunchOccupancyEndcap_disk->Fill(region*station);
827  h_recPunchOccupancyEndcap_disk_ring->Fill(region*station, ring);
828  }
829  }
830  }
831  }
832 
833  // Find noise recHits : RecHits without SimHit match
834  for ( RecHitIter recHitIter = recHitHandle->begin();
835  recHitIter != recHitHandle->end(); ++recHitIter )
836  {
837  const RPCDetId recDetId = static_cast<const RPCDetId>(recHitIter->rpcId());
838  const RPCRoll* roll = dynamic_cast<const RPCRoll*>(rpcGeom->roll(recDetId));
839 
840  const int region = roll->id().region();
841  // const int ring = roll->id().ring(); // UNUSED VARIABLE
842  //const int sector = roll->id().sector();
843  // const int station = roll->id().station(); // UNUSED VARIABLE
844  //const int layer = roll->id().layer();
845  //const int subsector = roll->id().subsector();
846 
847  const double recX = recHitIter->localPosition().x();
848  const double recErrX = sqrt(recHitIter->localPositionError().xx());
849 
850  bool matched = false;
851  for ( SimHitIter simHitIter = simHitHandle->begin();
852  simHitIter != simHitHandle->end(); ++simHitIter )
853  {
854  const RPCDetId simDetId = static_cast<const RPCDetId>(simHitIter->detUnitId());
855  const RPCRoll* simRoll = dynamic_cast<const RPCRoll*>(rpcGeom->roll(simDetId));
856  if ( !simRoll ) continue;
857 
858  if ( simDetId != recDetId ) continue;
859 
860  const double simX = simHitIter->localPosition().x();
861  const double dX = fabs(recX-simX);
862 
863  if ( dX/recErrX < 5 )
864  {
865  matched = true;
866  break;
867  }
868  }
869 
870  if ( !matched )
871  {
872  if ( region == 0 )
873  {
874  h_noiseOccupancyBarrel_detId->Fill(detIdToIndexMapBarrel_[recDetId.rawId()]);
875  }
876  else
877  {
878  h_noiseOccupancyEndcap_detId->Fill(detIdToIndexMapEndcap_[recDetId.rawId()]);
879  }
880  }
881  }
882 
883  h_eventCount->Fill(2);
884 }
885 
887 
const double Pi
T getParameter(std::string const &) const
virtual int nstrips() const =0
int i
Definition: DBlmapReader.cc:9
void beginRun(const edm::Run &run, const edm::EventSetup &eventSetup)
RPCRecHitValid(const edm::ParameterSet &pset)
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:872
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventIDconst &, edm::Timestampconst & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
static bool simHitTPAssociationListGreater(SimHitTPPair i, SimHitTPPair j)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:434
void endRun(const edm::Run &run, const edm::EventSetup &eventSetup)
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:17
std::vector< GeomDet * > DetContainer
const StripTopology & specificTopology() const
Definition: RPCRoll.cc:107
uint32_t rawId() const
get the raw id
Definition: DetId.h:43
virtual float stripLength() const =0
RPCDetId id() const
Definition: RPCRoll.cc:24
MonitorElement * MEP
int ring() const
Definition: RPCDetId.h:72
T sqrt(T t)
Definition: SSEVec.h:48
const std::vector< const RPCRoll * > & rolls() const
Return the Rolls.
Definition: RPCChamber.cc:68
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
TH1 * getTH1(void) const
MonitorElement * bookProfile(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, const char *option="s")
Definition: DQMStore.cc:1186
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:37
DQMStore * dbe_
Definition: DetId.h:18
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
const T & get() const
Definition: EventSetup.h:55
static const int RPC
Definition: MuonSubdetId.h:14
virtual float pitch() const =0
void analyze(const edm::Event &event, const edm::EventSetup &eventSetup)
edm::Ref< edm::PSimHitContainer > TrackPSimHitRef
std::pair< typename Association::data_type::first_type, double > match(Reference key, Association association, bool bestMatchByMaxValue)
Generic matching function.
Definition: Utils.h:6
TH2F * getTH2F(void) const
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
Definition: DQMStore.cc:1000
Detector det() const
get the detector field from this detid
Definition: DetId.h:35
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:584
Definition: Run.h:41
int region() const
Region id: 0 for Barrel, +/-1 For +/- Endcap.
Definition: RPCDetId.h:63
int station() const
Definition: RPCDetId.h:96