CMS 3D CMS Logo

CTPPSPixelDQMSource.cc
Go to the documentation of this file.
1 /******************************************
2 *
3 * This is a part of CTPPSDQM software.
4 * Authors:
5 * F.Ferro INFN Genova
6 * Vladimir Popov (vladimir.popov@cern.ch)
7 *
8 *******************************************/
9 
16 
20 
22 
27 
28 #include <string>
29 
30 //-----------------------------------------------------------------------------
31 
33 {
34  public:
36  ~CTPPSPixelDQMSource() override;
37 
38  protected:
39  void dqmBeginRun(edm::Run const &, edm::EventSetup const &) override;
40  void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override;
41  void analyze(edm::Event const& e, edm::EventSetup const& eSetup) override;
42  void endRun(edm::Run const& run, edm::EventSetup const& eSetup) override;
43 
44  private:
45  unsigned int verbosity;
46  long int nEvents = 0;
49 
50  static constexpr int NArms=2;
51  static constexpr int NStationMAX=3; // in an arm
52  static constexpr int NRPotsMAX=6; // per station
53  static constexpr int NplaneMAX=6; // per RPot
54  static constexpr int NROCsMAX = 6; // per plane
55  static constexpr int RPn_first = 3, RPn_last = 4;
56  static constexpr int ADCMax = 256;
57  static constexpr int StationIDMAX=4; // possible range of ID
58  static constexpr int RPotsIDMAX=8; // possible range of ID
59  const int hitMultMAX = 300; // tuned
60  const int ClusMultMAX = 10; // tuned
61 
63  int pixRowMAX = 160; // defaultDetSizeInX, CMS Y-axis
64  int pixColMAX = 156; // defaultDetSizeInY, CMS X-axis
65  int ROCSizeInX = pixRowMAX/2; // ROC row size in pixels = 80
66  int ROCSizeInY = pixColMAX/3; // ROC col size in pixels = 52
67 
69  static constexpr int NPlaneBins = NplaneMAX*NRPotBinsInStation;
70 
72 
78 
79  static constexpr int RPotsTotalNumber=NArms*NStationMAX*NRPotsMAX;
80 
94  int HitsMultROC[RPotsTotalNumber*NplaneMAX][NROCsMAX];
97 
98 
99  unsigned int rpStatusWord = 0x8008; //220_fr_hr(stn2rp3)+ 210_fr_hr
100  int RPstatus[StationIDMAX][RPotsIDMAX]; // symmetric in both arms
101  int StationStatus[StationIDMAX]; // symmetric in both arms
102  const int IndexNotValid = 0;
103 
104  int getRPindex(int arm, int station, int rp) {
105  if(arm<0 || station<0 || rp<0) return(IndexNotValid);
106  if(arm>1 || station>=NStationMAX || rp>=NRPotsMAX) return(IndexNotValid);
107  int rc = (arm*NStationMAX+station)*NRPotsMAX + rp;
108  return(rc);
109  }
110 
111  int getPlaneIndex(int arm, int station, int rp, int plane) {
112  if(plane<0 || plane>=NplaneMAX) return(IndexNotValid);
113  int rc = getRPindex(arm, station, rp);
114  if(rc == IndexNotValid) return(IndexNotValid);
115  return(rc*NplaneMAX + plane);
116  }
117 
118  int getRPInStationBin(int rp) { return(rp - RPn_first +1); }
119 
120 
121  static constexpr int NRPglobalBins = 4; //2 arms w. 2 stations w. 1 RP
122  int getRPglobalBin(int arm, int stn) {
123  static constexpr int stationBinOrder[NStationMAX] = {0, 4, 1};
124  return( arm*2 + stationBinOrder[stn] +1 );
125  }
126 
127  int prIndex(int rp, int plane) // plane index in station
128  {return((rp - RPn_first)*NplaneMAX + plane);}
129  int getDet(int id)
130  { return (id>>DetId::kDetOffset)&0xF; }
131  int getPixPlane(int id)
132  { return ((id>>16)&0x7); }
133 // int getSubdet(int id) { return ((id>>kSubdetOffset)&0x7); }
134 
135  int multHitsMax, cluSizeMax; // for tuning
136 
137 };
138 
139 //----------------------------------------------------------------------------------
140 
141 using namespace std;
142 using namespace edm;
143 
144 //-------------------------------------------------------------------------------
145 
147  verbosity(ps.getUntrackedParameter<unsigned int>("verbosity", 0)),
148  rpStatusWord(ps.getUntrackedParameter<unsigned int>("RPStatusWord",0x8008))
149 {
150  tokenDigi = consumes<DetSetVector<CTPPSPixelDigi> >(ps.getParameter<edm::InputTag>("tagRPixDigi"));
151  tokenCluster=consumes<DetSetVector<CTPPSPixelCluster>>(ps.getParameter<edm::InputTag>("tagRPixCluster"));
152 
153 }
154 
155 //----------------------------------------------------------------------------------
156 
158 {
159 }
160 
161 //--------------------------------------------------------------------------
162 
164 {
165  if(verbosity) LogPrint("CTPPSPixelDQMSource") <<"RPstatusWord= "<<rpStatusWord;
166  nEvents = 0;
167 
170  ROCSizeInX = pixRowMAX/2; // ROC row size in pixels = 80
171  ROCSizeInY = pixColMAX/3;
172 
173  for(int stn=0; stn<StationIDMAX; stn++) {
174  StationStatus[stn]=0;
175  for(int rp=0; rp<RPotsIDMAX; rp++) RPstatus[stn][rp]=0;
176  }
177 
178  unsigned int rpSts = rpStatusWord<<1;
179  for(int stn=0; stn<NStationMAX; stn++) {
180  int stns = 0;
181  for(int rp=0; rp<NRPotsMAX; rp++) {
182  rpSts = (rpSts >> 1); RPstatus[stn][rp] = rpSts&1;
183  if(RPstatus[stn][rp] > 0) stns = 1;
184  }
185  StationStatus[stn]=stns;
186  }
187 
188  for(int ind=0; ind<2*3*NRPotsMAX; ind++) RPindexValid[ind] = 0;
189 
190  multHitsMax = cluSizeMax = -1;
191 }
192 
193 //-------------------------------------------------------------------------------------
194 
196 edm::EventSetup const &)
197 {
198  ibooker.cd();
199  ibooker.setCurrentFolder("CTPPS/TrackingPixel");
200  char s[50];
201  string armTitleShort, stnTitleShort;
202  hBX = ibooker.book1D("events per BX", "ctpps_pixel;Event.BX", 4002, -1.5, 4000. +0.5);
203  hBXshort = ibooker.book1D("events per BX(short)", "ctpps_pixel;Event.BX", 102, -1.5, 100. + 0.5);
204 
205  string str1st = "Pixel planes activity";
206  h2AllPlanesActive = ibooker.book2DD(str1st,str1st+";Plane #",
208  TH2D *h1st = h2AllPlanesActive->getTH2D();
209  h1st->SetOption("colz");
210  TAxis *yah1st = h1st->GetYaxis();
211 
212  for(int arm=0; arm<2; arm++) {
214  string sd, armTitle;
215  ID.armName(sd, CTPPSDetId::nPath);
216  ID.armName(armTitle, CTPPSDetId::nFull);
217  ID.armName(armTitleShort, CTPPSDetId::nShort);
218 
219  ibooker.setCurrentFolder(sd);
220 
221  for(int stn=0; stn<NStationMAX; stn++) {
222  if(StationStatus[stn]==0) continue;
223  ID.setStation(stn);
224  string stnd, stnTitle;
225 
226  CTPPSDetId(ID.getStationId()).stationName(stnd, CTPPSDetId::nPath);
227  CTPPSDetId(ID.getStationId()).stationName(stnTitle, CTPPSDetId::nFull);
228  CTPPSDetId(ID.getStationId()).stationName(stnTitleShort, CTPPSDetId::nShort);
229 
230  ibooker.setCurrentFolder(stnd);
231 
232  string st = "planes activity";
233  string st2 = ": " + stnTitle;
234 
235  h2PlaneActive[arm][stn] = ibooker.book2DD(st,st+st2+";Plane #",
237  TH2D *h = h2PlaneActive[arm][stn]->getTH2D();
238  h->SetOption("colz");
239  TAxis *yah = h->GetYaxis();
240 
241  st = "hit average multiplicity in planes";
242  int PlaneMultCut = 20;
243  hp2HitsOcc[arm][stn]= ibooker.bookProfile2D(st,st+st2+";Plane #",
244  NplaneMAX, 0, NplaneMAX, NRPotBinsInStation, RPn_first,RPn_last,-1,PlaneMultCut,"");
245  TProfile2D *h2 = hp2HitsOcc[arm][stn]->getTProfile2D();
246  h2->SetOption("textcolz");
247  TAxis *yah2 = h2->GetYaxis();
248 
249  st = "hit multiplicity in planes";
250  string st3 = ";PlaneIndex(=pixelPot*PlaneMAX + plane)";
251  h2HitsMultipl[arm][stn]= ibooker.book2DD(st,st+st2+st3+";multiplicity",
253  h2HitsMultipl[arm][stn]->getTH2D()->SetOption("colz");
254 
255  st = "cluster multiplicity in planes";
256  h2ClusMultipl[arm][stn] = ibooker.book2DD(st,st+st2+st3+";multiplicity",
258  h2ClusMultipl[arm][stn]->getTH2D()->SetOption("colz");
259 
260  st = "cluster span in planes";
261  const int nyClus = 9; //18;
262  float xCh[NPlaneBins+1];
263  float yClus[nyClus+1];
264  for(int i=0; i<=NPlaneBins; i++) xCh[i]=i;
265  double n0 = 1; //1./CluSizeMAX;
266  double lnA = log(2.);
267  yClus[0] = n0; //yClus[1] = n0;
268  for(int j=0; j<nyClus; j++) yClus[j+1] = n0*exp(j*lnA);
269 
270  h2CluSize[arm][stn] = ibooker.book2D(st,st+st2+st3+";Cluster size",
271  NPlaneBins,xCh,nyClus,yClus);
272  h2CluSize[arm][stn]->getTH2F()->SetOption("colz");
273 
274 //--------- RPots ---
275  int pixBinW = 4;
276  for(int rp=RPn_first; rp<RPn_last; rp++) { // only installed pixel pots
277  ID.setRP(rp);
278  string rpd, rpTitle;
279  CTPPSDetId(ID.getRPId()).rpName(rpTitle, CTPPSDetId::nShort);
280  yah->SetBinLabel(getRPInStationBin(rp), rpTitle.c_str()); // h
281  yah2->SetBinLabel(getRPInStationBin(rp), rpTitle.c_str()); //h2
282  string rpBinName = armTitleShort + "_" + stnTitleShort+"_"+rpTitle;
283  yah1st->SetBinLabel(getRPglobalBin(arm,stn), rpBinName.c_str());
284 
285  if(RPstatus[stn][rp]==0) continue;
286  int indexP = getRPindex(arm,stn,rp);
287  RPindexValid[indexP] = 1;
288 
289  CTPPSDetId(ID.getRPId()).rpName(rpTitle, CTPPSDetId::nFull);
290  CTPPSDetId(ID.getRPId()).rpName(rpd, CTPPSDetId::nPath);
291 
292  ibooker.setCurrentFolder(rpd);
293 
294  hRPotActivPlanes[indexP] =
295  ibooker.bookProfile("number of fired planes per event", rpTitle+";nPlanes;Probability",
296  NplaneMAX+1, -0.5, NplaneMAX+0.5, -0.5,NplaneMAX+0.5,"");
297  hRPotActivBX[indexP] =
298  ibooker.book1D("5 fired planes per BX", rpTitle+";Event.BX", 4002, -1.5, 4000.+0.5);
299 
300  h2HitsMultROC[indexP] = ibooker.bookProfile2D("ROCs hits multiplicity per event",
301  rpTitle+";plane # ;ROC #", NplaneMAX,-0.5,NplaneMAX-0.5, NROCsMAX,-0.5,NROCsMAX-0.5,
302  0.,ROCSizeInX*ROCSizeInY,"");
303  h2HitsMultROC[indexP]->getTProfile2D()->SetOption("colztext");
304  h2HitsMultROC[indexP]->getTProfile2D()->SetMinimum(1.e-10);
305 
306 
307  hp2HitsMultROC_LS[indexP]=ibooker.bookProfile2D("ROCs_hits_multiplicity_per_event vs LS",
308  rpTitle+";LumiSection;Plane#___ROC#", 1000,0.,1000.,
309  NplaneMAX*NROCsMAX,0.,double(NplaneMAX*NROCsMAX),0.,ROCSizeInX*ROCSizeInY,"");
310  hp2HitsMultROC_LS[indexP]->getTProfile2D()->SetOption("colz");
311  hp2HitsMultROC_LS[indexP]->getTProfile2D()->SetMinimum(1.0e-10);
312  hp2HitsMultROC_LS[indexP]->getTProfile2D()->SetCanExtend(TProfile2D::kXaxis);
313  TAxis *yahp2 = hp2HitsMultROC_LS[indexP]->getTProfile2D()->GetYaxis();
314  for(int p=0; p<NplaneMAX; p++) {
315  sprintf(s,"plane%d_0",p);
316  yahp2->SetBinLabel(p*NplaneMAX+1,s);
317  for(int r=1; r<NROCsMAX; r++) {
318  sprintf(s," %d_%d",p,r);
319  yahp2->SetBinLabel(p*NplaneMAX+r+1,s);
320  }
321  }
322 
323  hRPotActivROCs[indexP] = ibooker.bookProfile2D("number of fired aligned_ROCs per event",
324  rpTitle+";ROC ID;number of fired aligned ROCs", NROCsMAX,-0.5,NROCsMAX-0.5,
325  7,-0.5,6.5, 0,NROCsMAX,"");
326  hRPotActivROCs[indexP]->getTProfile2D()->SetOption("colz");
327 
328  ibooker.setCurrentFolder(rpd+"/latency");
329 
330  hRPotActivBXroc[indexP] =
331  ibooker.book1D("4 fired ROCs per BX", rpTitle+";Event.BX", 4002, -1.5, 4000.+0.5);
332 
333  hRPotActivBXall[indexP] =
334  ibooker.book1D("hits per BX", rpTitle+";Event.BX", 4002, -1.5, 4000.+0.5);
335 
336  int nbins = pixRowMAX/pixBinW;
337 
338  for(int p=0; p<NplaneMAX; p++) {
339  sprintf(s,"plane_%d",p);
340  string pd = rpd+"/"+string(s);
341  ibooker.setCurrentFolder(pd);
342  string st1 = ": "+rpTitle+"_"+string(s);
343  st = "hits position";
344  h2xyHits[indexP][p]=ibooker.book2DD(st,st1+";pix col;pix row",
345  nbins,0,pixRowMAX,nbins,0,pixRowMAX);
346  h2xyHits[indexP][p]->getTH2D()->SetOption("colz");
347 
348  st = "adc average value";
349  hp2xyADC[indexP][p]=ibooker.bookProfile2D(st,st1+";pix col;pix row",
350  nbins,0,pixRowMAX,nbins,0,pixRowMAX, 0.,512.,"");
351  hp2xyADC[indexP][p]->getTProfile2D()->SetOption("colz");
352 
353  st = "hits multiplicity";
354  hHitsMult[indexP][p]=ibooker.book1DD(st,st1+";number of hits;N / 1 hit",
355  hitMultMAX,-0.5,hitMultMAX-0.5);
356 
357  ibooker.setCurrentFolder(pd + "/ROCs");
358  int index = getPlaneIndex(arm,stn,rp,p);
359 
360  for(int roc=0; roc<NROCsMAX; roc++) {
361  sprintf(s,"ROC_%d",roc);
362  string st2 = st1 + "_" + string(s);
363  ibooker.setCurrentFolder(pd + "/ROCs/" + string(s));
364 
365  h2xyROCHits[index][roc]=ibooker.book2DD("hits",st2+";pix col;pix row",
366  ROCSizeInY,0,ROCSizeInY, ROCSizeInX,0,ROCSizeInX);
367  h2xyROCHits[index][roc]->getTH2D()->SetOption("colz");
368  hROCadc[index][roc]=ibooker.book1D("adc value",st2+";ADC;number of ROCs",
369  ADCMax, 0.,float(ADCMax));
370  }
371  } // end of for(int p=0; p<NplaneMAX;..
372 
373  } // end for(int rp=0; rp<NRPotsMAX;...
374  } // end of for(int stn=0; stn<
375  } //end of for(int arm=0; arm<2;...
376 
377  return;
378 }
379 
380 //-------------------------------------------------------------------------------
381 
383 {
384  ++nEvents;
385  int lumiId = event.getLuminosityBlock().id().luminosityBlock();
386  if(lumiId<0) lumiId=0;
387 
388  int RPactivity[RPotsTotalNumber], RPdigiSize[RPotsTotalNumber];
389 
390  for(int rp=0; rp<RPotsTotalNumber; rp++)
391  { RPactivity[rp] = RPdigiSize[rp] = 0;}
392 
393  for(int ind=0; ind<RPotsTotalNumber; ind++) {
394  for(int p=0; p<NplaneMAX; p++) {
395  HitsMultPlane[ind][p] = 0;
396  ClusMultPlane[ind][p] = 0;
397  }
398  }
399  for(int ind=0; ind<RPotsTotalNumber*NplaneMAX; ind++) {
400  for(int roc=0; roc<NROCsMAX; roc++) {
401  HitsMultROC[ind][roc] = 0;
402  }
403  }
405  event.getByToken(tokenDigi, pixDigi);
406 
408  event.getByToken(tokenCluster, pixClus);
409 
410  hBX->Fill(event.bunchCrossing());
411  hBXshort->Fill(event.bunchCrossing());
412 
413  bool valid = false;
414  valid |= pixDigi.isValid();
415 // valid |= Clus.isValid();
416 
417  if(!valid && verbosity) LogPrint("CTPPSPixelDQMSource") <<"No valid data in Event "<<nEvents;
418 
419  if(pixDigi.isValid()) {
420  for(const auto &ds_digi : *pixDigi)
421  {
422  int idet = getDet(ds_digi.id);
423  if(idet != DetId::VeryForward) {
424  if(verbosity>1) LogPrint("CTPPSPixelDQMSource") <<"not CTPPS: ds_digi.id"<<ds_digi.id;
425  continue;
426  }
427  // int subdet = getSubdet(ds_digi.id);
428 
429  int plane = getPixPlane(ds_digi.id);
430 
431  CTPPSDetId theId(ds_digi.id);
432  int arm = theId.arm()&0x1;
433  int station = theId.station()&0x3;
434  int rpot = theId.rp()&0x7;
435  int rpInd = getRPindex(arm,station,rpot);
436  RPactivity[rpInd] = 1;
437  ++RPdigiSize[rpInd];
438 
439  if(StationStatus[station] && RPstatus[station][rpot]) {
440 
441  hp2HitsOcc[arm][station]->Fill(plane,rpot,(int)ds_digi.data.size());
442  h2HitsMultipl[arm][station]->Fill(prIndex(rpot,plane),ds_digi.data.size());
443  h2PlaneActive[arm][station]->Fill(plane,getRPInStationBin(rpot));
444  h2AllPlanesActive->Fill(plane,getRPglobalBin(arm,station));
445 
446  int index = getRPindex(arm,station,rpot);
447  HitsMultPlane[index][plane] += ds_digi.data.size();
448  if(RPindexValid[index]) {
449  hHitsMult[index][plane]->Fill(ds_digi.data.size());
450  }
451  int rocHistIndex = getPlaneIndex(arm,station,rpot,plane);
452 
453  for(DetSet<CTPPSPixelDigi>::const_iterator dit = ds_digi.begin();
454  dit != ds_digi.end(); ++dit) {
455  int row = dit->row();
456  int col = dit->column();
457  int adc = dit->adc();
458 
459  if(RPindexValid[index]) {
460  h2xyHits[index][plane]->Fill(col,row);
461  hp2xyADC[index][plane]->Fill(col,row,adc);
462  int colROC, rowROC;
463  int trocId;
464  if(!thePixIndices.transformToROC(col,row, trocId, colROC, rowROC)) {
465  if(trocId>=0 && trocId<NROCsMAX) {
466  h2xyROCHits[rocHistIndex][trocId]->Fill(colROC,rowROC);
467  hROCadc[rocHistIndex][trocId]->Fill(adc);
468  ++HitsMultROC[rocHistIndex][trocId];
469  }
470  }
471  } //end if(RPindexValid[index]) {
472  }
473  if(int(ds_digi.data.size()) > multHitsMax) multHitsMax = ds_digi.data.size();
474 
475  } // end if(StationStatus[station]) {
476  } // end for(const auto &ds_digi : *pixDigi)
477  } //if(pixDigi.isValid()) {
478 
479  if(pixClus.isValid())
480  for(const auto &ds : *pixClus)
481  {
482  int idet = getDet(ds.id);
483  if(idet != DetId::VeryForward) {
484  if(verbosity>1) LogPrint("CTPPSPixelDQMSource") <<"not CTPPS: cluster.id"<<ds.id;
485  continue;
486  }
487  // int subdet = getSubdet(ds.id);
488 
489  int plane = getPixPlane(ds.id);
490 
491  CTPPSDetId theId(ds.id);
492  int arm = theId.arm()&0x1;
493  int station = theId.station()&0x3;
494  int rpot = theId.rp()&0x7;
495 
496  if((StationStatus[station]==0) || (RPstatus[station][rpot]==0)) continue;
497 
498  int index = getRPindex(arm,station,rpot);
499  ++ClusMultPlane[index][plane];
500 
501  unsigned int minRow=pixRowMAX, maxRow=0;
502  unsigned int minCol=pixColMAX, maxCol=0;
503  for (const auto &p : ds) {
504  unsigned int max= p.minPixelRow() + p.rowSpan()+1;
505  if(minRow > p.minPixelRow()) minRow = p.minPixelRow();
506  if(maxRow < max) maxRow = max;
507  max= p.minPixelCol() + p.colSpan()+1;
508  if(minCol > p.minPixelCol()) minCol = p.minPixelCol();
509  if(maxCol < max) maxCol = max;
510 
511  }
512  int drow = maxRow - minRow;
513  int dcol = maxCol - minCol;
514  float clusize= sqrt(drow*drow + dcol*dcol);
515  if(cluSizeMax < int(clusize)) cluSizeMax = clusize;
516  h2CluSize[arm][station]->Fill(prIndex(rpot,plane),clusize);
517 
518  } // end if(pixClus.isValid()) for(const auto &ds : *pixClus)
519 
520  for(int arm=0; arm<2; arm++) {
521  for(int stn=0; stn<NStationMAX; stn++) {
522  for(int rp=0; rp<NRPotsMAX; rp++) {
523  int index = getRPindex(arm,stn,rp);
524  if(RPindexValid[index]==0) continue;
525  if(RPactivity[index]==0) continue;
526 
527  for(int p=0; p<NplaneMAX; p++)
528  h2ClusMultipl[arm][stn]->Fill(prIndex(rp,p),ClusMultPlane[index][p]);
529 
530  int np = 0;
531  for(int p=0; p<NplaneMAX; p++) if(HitsMultPlane[index][p]>0) np++;
532  for(int p=0; p<=NplaneMAX; p++) {
533  if(p == np) hRPotActivPlanes[index]->Fill(p,1.);
534  else hRPotActivPlanes[index]->Fill(p,0.);
535  }
536  if(np>5) hRPotActivBX[index]->Fill(event.bunchCrossing());
537  hRPotActivBXall[index]->Fill(event.bunchCrossing(),float(RPdigiSize[index]));
538 
539  int rocf[NplaneMAX];
540  for(int r=0; r<NROCsMAX; r++) rocf[r]=0;
541  for(int p=0; p<NplaneMAX; p++) {
542  int indp = getPlaneIndex(arm,stn,rp,p);
543  for(int r=0; r<NROCsMAX; r++) if(HitsMultROC[indp][r] > 0) ++rocf[r];
544  for(int r=0; r<NROCsMAX; r++) {
545  h2HitsMultROC[index]->Fill(p,r,HitsMultROC[indp][r]);
546  hp2HitsMultROC_LS[index]->Fill(lumiId,p*NROCsMAX+r,HitsMultROC[indp][r]);
547  }
548  }
549  int max = 0;
550  for(int r=0; r<NROCsMAX; r++)
551  if(max < rocf[r]) { max = rocf[r]; }
552 
553  for(int r=0; r<NROCsMAX; r++) {
554  for(int p=0; p<=NplaneMAX; p++)
555  if(p==rocf[r]) hRPotActivROCs[index]->Fill(r,rocf[r],1.);
556  else hRPotActivROCs[index]->Fill(r,p,0);
557  }
558 
559  if(max > 4) hRPotActivBXroc[index]->Fill(event.bunchCrossing());
560  } //end for(int rp=0; rp<NRPotsMAX; rp++) {
561  }
562  } //end for(int arm=0; arm<2; arm++) {
563 
564  if((nEvents % 100)) return;
565  if(verbosity) LogPrint("CTPPSPixelDQMSource")<<"analyze event "<<nEvents;
566 }
567 
568 //-----------------------------------------------------------------------------
570 {
571  if(!verbosity) return;
572  LogPrint("CTPPSPixelDQMSource")
573  <<"end of Run "<<run.run()<<": "<<nEvents<<" events\n"
574  <<"multHitsMax= "<<multHitsMax <<" cluSizeMax= "<<cluSizeMax;
575 }
576 
577 //---------------------------------------------------------------------------
579 
int adc(sample_type sample)
get the ADC sample (12 bits)
uint32_t station() const
Definition: CTPPSDetId.h:63
int StationStatus[StationIDMAX]
T getParameter(std::string const &) const
MonitorElement * hHitsMult[RPotsTotalNumber][NplaneMAX]
int HitsMultPlane[RPotsTotalNumber][NplaneMAX]
MonitorElement * hp2xyADC[RPotsTotalNumber][NplaneMAX]
MonitorElement * hp2HitsMultROC_LS[RPotsTotalNumber]
MonitorElement * h2CluSize[NArms][NStationMAX]
RunNumber_t run() const
Definition: RunBase.h:40
edm::EDGetTokenT< edm::DetSetVector< CTPPSPixelDigi > > tokenDigi
TProfile2D * getTProfile2D() const
void dqmBeginRun(edm::Run const &, edm::EventSetup const &) override
MonitorElement * bookProfile(Args &&...args)
Definition: DQMStore.h:160
MonitorElement * hp2HitsOcc[NArms][NStationMAX]
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:17
MonitorElement * h2HitsMultROC[RPotsTotalNumber]
uint32_t ID
Definition: Definitions.h:26
void setRP(uint32_t rp)
Definition: CTPPSDetId.h:79
int bunchCrossing() const
Definition: EventBase.h:66
int getDefaultRowDetSize() const
CTPPSDetId getStationId() const
Definition: CTPPSDetId.h:92
CTPPSPixelIndices thePixIndices
#define constexpr
edm::EDGetTokenT< edm::DetSetVector< CTPPSPixelCluster > > tokenCluster
void Fill(long long x)
void analyze(edm::Event const &e, edm::EventSetup const &eSetup) override
void endRun(edm::Run const &run, edm::EventSetup const &eSetup) override
int prIndex(int rp, int plane)
int RPindexValid[RPotsTotalNumber]
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
MonitorElement * hROCadc[RPotsTotalNumber *NplaneMAX][NROCsMAX]
int np
Definition: AMPTWrapper.h:33
MonitorElement * h2ClusMultipl[NArms][NStationMAX]
int n0
Definition: AMPTWrapper.h:34
CTPPSPixelDQMSource(const edm::ParameterSet &ps)
MonitorElement * bookProfile2D(Args &&...args)
Definition: DQMStore.h:166
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
T sqrt(T t)
Definition: SSEVec.h:18
MonitorElement * hRPotActivBX[RPotsTotalNumber]
int getDefaultColDetSize() const
TH2D * getTH2D() const
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:118
CTPPSDetId getRPId() const
Definition: CTPPSDetId.h:97
uint32_t arm() const
Definition: CTPPSDetId.h:52
bool isValid() const
Definition: HandleBase.h:74
void armName(std::string &name, NameFlag flag=nFull) const
Definition: CTPPSDetId.h:115
int getRPindex(int arm, int station, int rp)
TH2F * getTH2F() const
MonitorElement * hRPotActivBXroc[RPotsTotalNumber]
MonitorElement * h2PlaneActive[NArms][NStationMAX]
iterator begin()
Definition: DetSet.h:59
MonitorElement * h2xyROCHits[RPotsTotalNumber *NplaneMAX][NROCsMAX]
void setStation(uint32_t station)
Definition: CTPPSDetId.h:68
int ClusMultPlane[RPotsTotalNumber][NplaneMAX]
MonitorElement * hRPotActivBXall[RPotsTotalNumber]
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:279
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:136
double sd
Base class for CTPPS detector IDs.
Definition: CTPPSDetId.h:32
int transformToROC(const int col, const int row, int &rocId, int &colROC, int &rowROC) const
HLT enums.
static const int kDetOffset
Definition: DetId.h:20
MonitorElement * hRPotActivROCs[RPotsTotalNumber]
col
Definition: cuy.py:1008
MonitorElement * h2AllPlanesActive
MonitorElement * book2DD(Args &&...args)
Definition: DQMStore.h:148
int getRPglobalBin(int arm, int stn)
int HitsMultROC[RPotsTotalNumber *NplaneMAX][NROCsMAX]
int getPlaneIndex(int arm, int station, int rp, int plane)
MonitorElement * h2xyHits[RPotsTotalNumber][NplaneMAX]
MonitorElement * hRPotActivPlanes[RPotsTotalNumber]
MonitorElement * book1DD(Args &&...args)
Definition: DQMStore.h:130
int RPstatus[StationIDMAX][RPotsIDMAX]
MonitorElement * hBXshort
MonitorElement * h2HitsMultipl[NArms][NStationMAX]
Definition: event.py:1
Definition: Run.h:43
uint32_t rp() const
Definition: CTPPSDetId.h:74