96 virtual void endJob()
override ;
180 firstOrbit = lastOrbit = thisOrbit = 0;
185 theHistogramFile->cd();
187 nWires =
new TH1F(
"nWires",
"number of wire digis", 121, -0.5, 120.5);
188 nStrips =
new TH1F(
"nStrips",
"number of strip digis", 201, -0.5, 200.5);
189 nWiresH =
new TH1F(
"nWiresH",
"number of wire digis HIGH", 121, -0.5, 120.5);
190 nStripsH =
new TH1F(
"nStripsH",
"number of strip digis HIGH", 201, -0.5, 200.5);
191 nDTDigis =
new TH1F(
"nDTDigis",
"number of DT digis",201,-0.5,200.5);
192 nDTDigisH =
new TH1F(
"nDTDigisH",
"number of DT digis HIGH",201,-0.5,200.5);
193 nDTDigisIn =
new TH1F(
"nDTDigisIn",
"N DT digis in window",75,0.,150.);
194 nDTDigisInH =
new TH1F(
"nDTDigisInH",
"N DT digis in window HIGH",75,0.,150.);
195 nDTDigisOut =
new TH1F(
"nDTDigisOut",
"N DT digis out window",75,0.,150.);
196 nDTDigisOutH =
new TH1F(
"nDTDigisOutH",
"N DT digis out window HIGH",75,0.,150.);
197 fDTDigisOut =
new TH1F(
"fDTDigisOut",
"fraction DT digis outside window",55,0.,1.1);
198 fDTDigisOutH =
new TH1F(
"fDTDigisOutH",
"fraction DT digis outside window HIGH",55,0.,1.1);
200 t0All =
new TH1F(
"t0All",
"t0",700,0.,7000.);
201 t0AllH =
new TH1F(
"t0AllH",
"t0 HIGH",700,0.,7000.);
202 RPCBX =
new TH1F(
"RPCBX",
"RPC BX",21,-10.5,10.5);
203 RPCBXH =
new TH1F(
"RPCBXH",
"RPC BX HIGH",21,-10.5,10.5);
204 RPCClSize =
new TH1F(
"RPCClSize",
"RPC cluster size",61,-0.5,60.5);
205 RPCClSizeH =
new TH1F(
"RPCClSizeH",
"RPC cluster size HIGH",61,-0.5,60.5);
207 nRPCRecHits =
new TH1F(
"nRPCRecHits",
"number of RPC RecHits",101,-0.5,100.5);
208 nRPCRecHitsLong =
new TH1F(
"nRPCRecHitsLong",
"number of RPC RecHits",601,-0.5,600.5);
209 hitsVsSerial =
new TProfile(
"hitsVsSerial",
"mean RPC hits vs serial event number",4000,0.,40000.,0.,1000.);
210 orbitVsSerial =
new TProfile(
"orbitVsSerial",
"relative orbit number vs serial event number",4000,0.,40000.,0.,1.e10);
211 hitsVsOrbit =
new TProfile(
"hitsVsOrbit",
"mean RPC hits vs orbit number",3000,0.,1200000.,0.,1000.);
212 dOrbit =
new TH1F(
"dOrbit",
"difference in orbit number",121,-0.5,120.5);
214 rpcStation =
new TH1F(
"rpcStation",
"RPC station", 6,-0.5,5.5);
215 rpcStationH =
new TH1F(
"rpcStationH",
"RPC station HIGH", 6,-0.5,5.5);
216 rpcRing =
new TH1F(
"rpcRing",
"RPC ring", 9,-4.5,4.5);
217 rpcRingH =
new TH1F(
"rpcRingH",
"RPC ring HIGH", 9,-4.5,4.5);
218 rpcSector =
new TH1F(
"rpcSector",
"RPC sector", 15,-0.5,14.5);
219 rpcSectorH =
new TH1F(
"rpcSectorH",
"RPC sector HIGH", 15,-0.5,14.5);
220 rpcLayer =
new TH1F(
"rpcLayer",
"RPC layer", 4,-0.5,3.5);
221 rpcLayerH =
new TH1F(
"rpcLayerH",
"RPC layer HIGH", 4,-0.5,3.5);
222 rpcStationVsOrbit =
new TProfile(
"rpcStationVsOrbit",
"mean RPC station vs. Orbit",3000,0.,1200000.,0.,20.);
223 rpcSectorVsOrbit =
new TProfile(
"rpcSectorVsOrbit",
"mean RPC sector vs. Orbit", 3000,0.,1200000.,0.,20.);
224 rpcRingVsOrbit =
new TProfile(
"rpcRingVsOrbit",
"mean RPC ring vs. Orbit", 3000,0.,1200000.,-20.,20.);
225 rpcCorner =
new TH1F(
"rpcCorner",
"special corner designation", 4,-0.5,3.5);
226 rpcCornerH =
new TH1F(
"rpcCornerH",
"special corner designation HIGH", 4,-0.5,3.5);
227 rpcCornerVsOrbit =
new TProfile(
"rpcCornerVsOrbit",
"special corner vs. Orbit",3000,0.,1200000.,-20.,20.);
235 std::cout <<
"\n\t===============================================================\n"
236 <<
"\tnumber of events analyzed = " << nEventsAnalyzed << std::endl
237 <<
"\tnumber of events selected = " << nEventsSelected << std::endl
238 <<
"\tfirst and last orbit number : " << firstOrbit <<
", " << lastOrbit <<
", " << lastOrbit-firstOrbit << std::endl
239 <<
"\t===============================================================\n\n";
244 printf(
"\n\n======= write out my histograms ====\n\n");
245 theHistogramFile->cd();
253 nDTDigisInH->Write();
254 nDTDigisOut->Write();
255 nDTDigisOutH->Write();
256 fDTDigisOut->Write();
257 fDTDigisOutH->Write();
258 nRPCRecHits->Write();
259 nRPCRecHitsLong->Write();
260 hitsVsSerial->Write();
261 hitsVsOrbit->Write();
262 orbitVsSerial->Write();
270 rpcStationH->Write();
278 rpcStationVsOrbit->Write();
279 rpcSectorVsOrbit->Write();
280 rpcRingVsOrbit->Write();
283 rpcCornerVsOrbit->Write();
284 theHistogramFile->Close();
294 bool selectThisEvent =
false;
299 iRun =
event.id().run();
300 iEvent =
event.id().event();
302 bool printThisLine = (nEventsAnalyzed%100 == 0);
304 std::cout <<
"======================================"
305 <<
" analyzed= " << nEventsAnalyzed
306 <<
", selected= " << nEventsSelected
307 <<
"\trun,event: " << iRun <<
", " <<
iEvent << std::endl;
322 int bx =
event.bunchCrossing();
323 int thisOrbit =
event.orbitNumber();
324 long mTime = 3564*thisOrbit + bx;
325 if (firstOrbit == 0) {
326 firstOrbit = thisOrbit;
327 lastOrbit = thisOrbit;
329 int deltaOrbit = thisOrbit - lastOrbit;
330 lastOrbit = thisOrbit;
331 int relativeOrbit = thisOrbit - firstOrbit;
335 if (nEventsAnalyzed < 200) {
340 <<
"\torbit,bx,mTime: " << thisOrbit <<
"," << bx <<
"," << mTime
341 <<
"\tdelta= " << deltaOrbit
350 event.getByLabel(
"rpcRecHits",
"",rpcRecHits);
355 for (rpcIt = rpcRecHits->begin(); rpcIt != rpcRecHits->end(); rpcIt++) {
362 for (rpcIt = rpcRecHits->begin(); rpcIt != rpcRecHits->end(); rpcIt++) {
364 int kRegion =
id.
region();
365 int kStation =
id.station();
366 int kRing =
id.ring();
367 int kSector =
id.sector();
369 int bx = (*rpcIt).BunchX();
370 int clSize = (*rpcIt).clusterSize();
372 if ( (kStation>3) && (kSector<3) ) {
374 if (kRing < 0) cornerFlag = 2;
376 if (nEventsAnalyzed < 100) {
377 std::cout <<
"Region/Station/Ring/Sector/Layer: "
383 <<
"\tbx,clSize: " << bx <<
", " << clSize
388 RPCClSize->Fill(
min((
float)clSize,(
float)60.));
389 rpcStation->Fill(kStation);
390 rpcRing->Fill(kRing);
391 rpcSector->Fill(kSector);
392 rpcLayer->Fill(kLayer);
393 rpcStationVsOrbit->Fill(relativeOrbit,kStation);
394 rpcSectorVsOrbit->Fill(relativeOrbit,kSector);
395 rpcRingVsOrbit->Fill(relativeOrbit,kRing);
396 rpcCorner->Fill(cornerFlag);
397 rpcCornerVsOrbit->Fill(relativeOrbit,cornerFlag);
400 RPCClSizeH->Fill(
min((
float)clSize,(
float)60.));
401 rpcStationH->Fill(kStation);
402 rpcRingH->Fill(kRing);
403 rpcSectorH->Fill(kSector);
404 rpcLayerH->Fill(kLayer);
405 rpcCornerH->Fill(cornerFlag);
417 event.getByLabel(
"muonCSCDigis",
"MuonCSCWireDigi",wires);
418 event.getByLabel(
"muonCSCDigis",
"MuonCSCStripDigi",strips);
423 std::vector<CSCWireDigi>::const_iterator wireIterA = (*jW).second.first;
424 std::vector<CSCWireDigi>::const_iterator lWireA = (*jW).second.second;
425 for( ; wireIterA != lWireA; ++wireIterA) {
435 std::vector<CSCStripDigi>::const_iterator stripItA = (*jS).second.first;
436 std::vector<CSCStripDigi>::const_iterator lastStripA = (*jS).second.second;
437 for( ; stripItA != lastStripA; ++stripItA) {
438 std::vector<int> myADCVals = stripItA->getADCCounts();
439 int iDiff = myADCVals[4]+myADCVals[5]-myADCVals[0]-myADCVals[1];
452 event.getByLabel(
"muonDTDigis",dtDIGIs);
461 digi != digiRange.second;
463 double t0 = (*digi).countsTDC();
465 if ((t0>3050) && (t0<3700)) {
481 if (nEventsAnalyzed < 1000) {
std::cout <<
"\tnumber of CSC DIGIS = " << nW <<
", " << nS
482 <<
"\tDT DIGIS = " << nDT
483 <<
"\tRPC Rechits = " << nRPC << std::endl;}
487 nWires->Fill(
min((
float)nW,(
float)120.));
488 nStrips->Fill(
min((
float)nS,(
float)200.));
490 nDTDigis->Fill(
min((
float)nDT,(
float)200.));
491 nDTDigisIn->Fill(
min((
float)nDTin,(
float)200.));
492 nDTDigisOut->Fill(
min((
float)nDTout,(
float)200.));
494 float fracOut = float(nDTout)/float(nDT);
495 fDTDigisOut->Fill(fracOut);
497 nRPCRecHits->Fill(
min((
float)nRPC,(
float)100.));
498 nRPCRecHitsLong->Fill(
min((
float)nRPC,(
float)1000.));
499 hitsVsSerial->Fill(nEventsAnalyzed,nRPC);
500 hitsVsOrbit->Fill(relativeOrbit,nRPC);
501 orbitVsSerial->Fill(nEventsAnalyzed,relativeOrbit);
504 nWiresH->Fill(
min((
float)nW,(
float)120.));
505 nStripsH->Fill(
min((
float)nS,(
float)200.));
506 nDTDigisH->Fill(
min((
float)nDT,(
float)200.));
507 nDTDigisInH->Fill(
min((
float)nDTin,(
float)200.));
508 nDTDigisOutH->Fill(
min((
float)nDTout,(
float)200.));
510 float fracOut = float(nDTout)/float(nDT);
511 fDTDigisOutH->Fill(fracOut);
519 if (selectThisEvent) {nEventsSelected++;}
521 return selectThisEvent;
T getUntrackedParameter(std::string const &, T const &) const
virtual void beginJob() override
TProfile * rpcStationVsOrbit
#define DEFINE_FWK_MODULE(type)
TProfile * rpcSectorVsOrbit
static const std::string kLayer("layer")
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
TProfile * rpcCornerVsOrbit
std::vector< DTDigi >::const_iterator const_iterator
virtual bool filter(edm::Event &, const edm::EventSetup &) override
std::string histogramFileName
RPCNoise(const edm::ParameterSet &)
std::pair< const_iterator, const_iterator > Range
TProfile * rpcRingVsOrbit
virtual void endJob() override
int region() const
Region id: 0 for Barrel, +/-1 For +/- Endcap.