CMS 3D CMS Logo

CTPPSDiamondDQMSource.cc
Go to the documentation of this file.
1 /****************************************************************************
2 *
3 * This is a part of CTPPS offline software.
4 * Authors:
5 * Jan Kašpar (jan.kaspar@gmail.com)
6 * Nicola Minafra
7 * Laurent Forthomme
8 *
9 ****************************************************************************/
10 
17 
21 
26 
29 
32 
33 #include <string>
34 
35 //----------------------------------------------------------------------------------------------------
36 
38 {
39  public:
41  virtual ~CTPPSDiamondDQMSource();
42 
43  protected:
44  void dqmBeginRun( const edm::Run&, const edm::EventSetup& ) override;
45  void bookHistograms( DQMStore::IBooker&, const edm::Run&, const edm::EventSetup& ) override;
46  void analyze( const edm::Event&, const edm::EventSetup& );
49  void endRun( const edm::Run&, const edm::EventSetup& );
50 
51  private:
52  // Constants
53  static const double SEC_PER_LUMI_SECTION; // Number of seconds per lumisection: used to compute hit rates in Hz
54  static const int CHANNEL_OF_VFAT_CLOCK; // Channel ID of the VFAT that contains clock data
55  static const double DISPLAY_RESOLUTION_FOR_HITS_MM; // Bin width of histograms showing hits and tracks (in mm)
56  static const double HPTDC_BIN_WIDTH_NS; // ns per HPTDC bin
57  static const int CTPPS_NUM_OF_ARMS;
58  static const int CTPPS_DIAMOND_STATION_ID;
59  static const int CTPPS_DIAMOND_RP_ID;
60  static const int CTPPS_NEAR_RP_ID;
61  static const int CTPPS_FAR_RP_ID;
62  static const int CTPPS_DIAMOND_NUM_OF_PLANES;
64  static const int CTPPS_FED_ID_45;
65  static const int CTPPS_FED_ID_56;
66 
73 
76  unsigned int verbosity_;
77 
79  struct GlobalPlots
80  {
82 
84  GlobalPlots( DQMStore::IBooker& ibooker );
85  };
86 
88 
90  struct PotPlots
91  {
92  MonitorElement* activity_per_bx = NULL, *activity_per_bx_short = NULL;
93  MonitorElement* activity_per_bx_plus1 = NULL, *activity_per_bx_short_plus1 = NULL;
94  MonitorElement* activity_per_bx_minus1 = NULL, *activity_per_bx_short_minus1 = NULL;
95  MonitorElement* activity_per_fedbx = NULL, *activity_per_fedbx_short = NULL;
96 
97  MonitorElement* hitDistribution2d = NULL;
98  MonitorElement* hitDistribution2dOOT = NULL;
99  MonitorElement* activePlanes = NULL;
100 
101  MonitorElement* trackDistribution = NULL;
102  MonitorElement* trackDistributionOOT = NULL;
103 
104  MonitorElement* stripTomographyAllFar = NULL, *stripTomographyAllNear = NULL;
105  MonitorElement* stripTomographyAllFar_plus1 = NULL, *stripTomographyAllNear_plus1 = NULL;
106  MonitorElement* stripTomographyAllFar_minus1 = NULL, *stripTomographyAllNear_minus1 = NULL;
107 
108  MonitorElement* leadingEdgeCumulativePot = NULL, *timeOverThresholdCumulativePot = NULL, *leadingTrailingCorrelationPot = NULL;
109  MonitorElement* leadingWithoutTrailingCumulativePot = NULL;
110 
111  MonitorElement* ECCheck = NULL;
112 
113  MonitorElement* HPTDCErrorFlags_cumulative = NULL;
114 
115  MonitorElement* clock_Digi1_le = NULL;
116  MonitorElement* clock_Digi1_te = NULL;
117  MonitorElement* clock_Digi3_le = NULL;
118  MonitorElement* clock_Digi3_te = NULL;
119 
120  PotPlots() {};
121  PotPlots( DQMStore::IBooker& ibooker, unsigned int id );
122  };
123 
124  std::unordered_map<unsigned int, PotPlots> potPlots_;
126 
128  struct PlanePlots
129  {
130  MonitorElement* digiProfileCumulativePerPlane = NULL;
131  MonitorElement* hitProfile = NULL;
132  MonitorElement* hit_multiplicity = NULL;
133  MonitorElement* threshold_voltage = NULL;
134 
135  MonitorElement* stripTomography_far = NULL;
136  MonitorElement* stripTomography_near = NULL;
137 
139  PlanePlots( DQMStore::IBooker& ibooker, unsigned int id );
140  };
141 
142  std::unordered_map<unsigned int, PlanePlots> planePlots_;
143 
146  {
148  MonitorElement* LeadingEdgeCumulativePerChannel = NULL;
149  MonitorElement* TimeOverThresholdCumulativePerChannel = NULL;
150  MonitorElement* LeadingTrailingCorrelationPerChannel = NULL;
151  MonitorElement* leadingWithoutTrailing = NULL;
153  MonitorElement* stripTomography_far = NULL;
154  MonitorElement* stripTomography_near = NULL;
155  MonitorElement* hit_rate = NULL;
156  MonitorElement* ECCheckPerChannel = NULL;
158 
159  ChannelPlots() : hitsCounterPerLumisection( 0 ) {}
160  ChannelPlots( DQMStore::IBooker &ibooker, unsigned int id );
161  };
162 
163  std::unordered_map<unsigned int, ChannelPlots> channelPlots_;
164 };
165 
166 //----------------------------------------------------------------------------------------------------
167 
168 // Values for all constants
172 const double CTPPSDiamondDQMSource::HPTDC_BIN_WIDTH_NS = 25./1024;
182 
183 //----------------------------------------------------------------------------------------------------
184 
186 {
187  ibooker.setCurrentFolder( "CTPPS" );
188 
189  h_trackCorr_hor = ibooker.book2D( "track correlation all hor", "rp, all, hor", 6, -0.5, 5.5, 6, -0.5, 5.5 );
190  TH2F* hist = h_trackCorr_hor->getTH2F();
191  TAxis* xa = hist->GetXaxis(), *ya = hist->GetYaxis();
192  xa->SetBinLabel( 6, "45, 210, near" ); ya->SetBinLabel( 1, "45, 210, near" );
193  xa->SetBinLabel( 5, "45, 210, far" ); ya->SetBinLabel( 2, "45, 210, far" );
194  xa->SetBinLabel( 4, "45, 220, cyl" ); ya->SetBinLabel( 3, "45, 220, cyl" );
195  xa->SetBinLabel( 3, "56, 210, near" ); ya->SetBinLabel( 4, "56, 210, near" );
196  xa->SetBinLabel( 2, "56, 210, far" ); ya->SetBinLabel( 5, "56, 210, far" );
197  xa->SetBinLabel( 1, "56, 220, cyl" ); ya->SetBinLabel( 6, "56, 220, cyl" );
198 }
199 
200 //----------------------------------------------------------------------------------------------------
201 
202 
204 {
207  ibooker.setCurrentFolder( path );
208 
210 
211  activity_per_bx = ibooker.book1D( "activity per BX", title+" activity per BX;Event.BX", 4002, -1.5, 4000. + 0.5 );
212  activity_per_bx_short = ibooker.book1D( "activity per BX (short)", title+" activity per BX (short);Event.BX", 102, -1.5, 100. + 0.5 );
213 
214  activity_per_bx_plus1 = ibooker.book1D( "activity per BX OOT +1", title+" activity per BX OOT +1;Event.BX", 4002, -1.5, 4000. + 0.5 );
215  activity_per_bx_short_plus1 = ibooker.book1D( "activity per BX OOT +1 (short)", title+" activity per BX OOT +1 (short);Event.BX", 102, -1.5, 100. + 0.5 );
216 
217  activity_per_bx_minus1 = ibooker.book1D( "activity per BX OOT -1", title+" activity per BX OOT -1;Event.BX", 4002, -1.5, 4000. + 0.5 );
218  activity_per_bx_short_minus1 = ibooker.book1D( "activity per BX OOT -1 (short)", title+" activity per BX OOT -1 (short);Event.BX", 102, -1.5, 100. + 0.5 );
219 
220  activity_per_fedbx = ibooker.book1D( "activity per FED BX", title+" activity per FED BX;Event.BX", 4002, -1.5, 4000. + 0.5 );
221  activity_per_fedbx_short = ibooker.book1D( "activity per FED BX (short)", title+" activity per FED BX (short);Event.BX", 102, -1.5, 100. + 0.5 );
222 
223  hitDistribution2d = ibooker.book2D( "hits in planes", title+" hits in planes;plane number;x (mm)", 10, -0.5, 4.5, 19./DISPLAY_RESOLUTION_FOR_HITS_MM, -1, 18 );
224  hitDistribution2dOOT= ibooker.book2D( "hits with OOT in planes", title+" hits with OOT in planes;plane number + 0.25 OOT;x (mm)", 17, -0.25, 4, 19./DISPLAY_RESOLUTION_FOR_HITS_MM, -1, 18 );
225  activePlanes = ibooker.book1D( "active planes", title+" active planes;number of active planes", 6, -0.5, 5.5 );
226 
227  trackDistribution = ibooker.book1D( "tracks", title+" tracks;x (mm)", 19./DISPLAY_RESOLUTION_FOR_HITS_MM, -1, 18 );
228  trackDistributionOOT = ibooker.book2D( "tracks with OOT", title+" tracks with OOT;plane number;x (mm)", 9, -0.5, 4, 19./DISPLAY_RESOLUTION_FOR_HITS_MM, -1, 18 );
229 
230  stripTomographyAllFar = ibooker.book2D( "tomography all far", title+" tomography with strips far (all planes);x + 50*plane(mm);y (mm)", 200, 0, 200, 100, -50, 50 );
231  stripTomographyAllNear = ibooker.book2D( "tomography all near", title+" tomography with strips near (all planes);x + 50*plane(mm);y (mm)", 200, 0, 200, 100, -50, 50 );
232 
233  stripTomographyAllFar_plus1 = ibooker.book2D( "tomography all far OOT +1", title+" tomography with strips far (all planes);x + 50*plane(mm);y (mm)", 200, 0, 200, 100, -50, 50 );
234  stripTomographyAllNear_plus1 = ibooker.book2D( "tomography all near OOT +1", title+" tomography with strips near (all planes);x + 50*plane(mm);y (mm)", 200, 0, 200, 100, -50, 50 );
235 
236  stripTomographyAllFar_minus1 = ibooker.book2D( "tomography all far OOT -1", title+" tomography with strips far (all planes);x + 50*plane(mm);y (mm)", 200, 0, 200, 100, -50, 50 );
237  stripTomographyAllNear_minus1 = ibooker.book2D( "tomography all near OOT -1", title+" tomography with strips near (all planes);x + 50*plane(mm);y (mm)", 200, 0, 200, 100, -50, 50 );
238 
239  leadingEdgeCumulativePot = ibooker.book1D( "leading edge", title+" leading edge;leading edge (ns)", 125, -25, 100 );
240  timeOverThresholdCumulativePot = ibooker.book1D( "time over threshold", title+" time over threshold;time over threshold (ns)", 100, -50, 50 );
241  leadingTrailingCorrelationPot = ibooker.book2D( "leading trailing correlation", title+" leading trailing correlation;leading edge (ns);trailing edge (ns)", 201, -100, 100, 201, -100, 100 );
242 
243  leadingWithoutTrailingCumulativePot = ibooker.book1D( "leading edges without trailing", title+" leading edges without trailing;leading edges without trailing", 4, 0.5, 4.5 );
244  leadingWithoutTrailingCumulativePot->getTH1F()->GetXaxis()->SetBinLabel( 1, "Nothing" );
245  leadingWithoutTrailingCumulativePot->getTH1F()->GetXaxis()->SetBinLabel( 2, "Leading only" );
246  leadingWithoutTrailingCumulativePot->getTH1F()->GetXaxis()->SetBinLabel( 3, "Trailing only" );
247  leadingWithoutTrailingCumulativePot->getTH1F()->GetXaxis()->SetBinLabel( 4, "Both" );
248 
249  ECCheck = ibooker.book1D( "optorxEC(8bit) - vfatEC", title+" EC Error;optorxEC-vfatEC", 512, -256, 256 );
250 
251  HPTDCErrorFlags_cumulative = ibooker.book1D( "HPTDC Errors", title+" HPTDC Errors", 16, -0.5, 16.5 );
252  for ( unsigned short error_index=1; error_index<16; ++error_index )
253  HPTDCErrorFlags_cumulative->getTH1F()->GetXaxis()->SetBinLabel( error_index, HPTDCErrorFlags::getHPTDCErrorName( error_index-1 ).c_str() );
254  HPTDCErrorFlags_cumulative->getTH1F()->GetXaxis()->SetBinLabel( 16, "MH" );
255 
256 
257  ibooker.setCurrentFolder( path+"/clock/" );
258  clock_Digi1_le = ibooker.book1D( "clock1 leading edge", title+" clock1;leading edge (ns)", 1000, 0, 100 );
259  clock_Digi1_te = ibooker.book1D( "clock1 trailing edge", title+" clock1;trailing edge (ns)", 1000, 0, 100 );
260  clock_Digi3_le = ibooker.book1D( "clock3 leading edge", title+" clock3;leading edge (ns)", 1000, 0, 100 );
261  clock_Digi3_te = ibooker.book1D( "clock3 trailing edge", title+" clock3;trailing edge (ns)", 1000, 0, 100 );
262 }
263 
264 //----------------------------------------------------------------------------------------------------
265 
267 {
270  ibooker.setCurrentFolder( path );
271 
273 
274  digiProfileCumulativePerPlane = ibooker.book1D( "digi profile", title+" digi profile; ch number", 12, -0.5, 11.5 );
275  hitProfile = ibooker.book1D( "hit profile", title+" hit profile;x (mm)", 19./DISPLAY_RESOLUTION_FOR_HITS_MM, -1, 18 );
276  hit_multiplicity = ibooker.book1D( "channels per plane", title+" channels per plane; ch per plane", 13, -0.5, 12.5 );
277 
278  threshold_voltage = ibooker.book2D( "threshold I2C", title+" threshold I2C; channel; value", 12, -0.5, 11.5, 512, 0, 512 );
279 
280  stripTomography_far = ibooker.book2D( "tomography far", title+" tomography with strips far;x + 50 OOT (mm);y (mm)", 50, 0, 50, 150, -50, 100 );
281  stripTomography_near = ibooker.book2D( "tomography near", title+" tomography with strips near;x + 50 OOT (mm);y (mm)", 50, 0, 50, 150, -50, 100 );
282 }
283 
284 //----------------------------------------------------------------------------------------------------
285 
286 CTPPSDiamondDQMSource::ChannelPlots::ChannelPlots( DQMStore::IBooker& ibooker, unsigned int id ) : hitsCounterPerLumisection(0)
287 {
290  ibooker.setCurrentFolder( path );
291 
293 
294  leadingWithoutTrailing = ibooker.book1D( "Leading Edges Without Trailing", title+" leading edges without trailing", 4, 0.5, 4.5 );
295  leadingWithoutTrailing->getTH1F()->GetXaxis()->SetBinLabel( 1, "Nothing" );
296  leadingWithoutTrailing->getTH1F()->GetXaxis()->SetBinLabel( 2, "Leading only" );
297  leadingWithoutTrailing->getTH1F()->GetXaxis()->SetBinLabel( 3, "Trailer only" );
298  leadingWithoutTrailing->getTH1F()->GetXaxis()->SetBinLabel( 4, "Full" );
299 
300  HPTDCErrorFlags = ibooker.book1D( "hptdc_Errors", title+" HPTDC Errors", 16, -0.5, 16.5 );
301  for ( unsigned short error_index=1; error_index<16; ++error_index )
302  HPTDCErrorFlags->getTH1F()->GetXaxis()->SetBinLabel( error_index, HPTDCErrorFlags::getHPTDCErrorName( error_index-1 ).c_str() );
303  HPTDCErrorFlags->getTH1F()->GetXaxis()->SetBinLabel( 16, "MH" );
304 
305  LeadingEdgeCumulativePerChannel = ibooker.book1D( "leading edge", title+" leading edge; leading edge (ns)", 200, -100, 100 );
306  TimeOverThresholdCumulativePerChannel = ibooker.book1D( "time over threshold", title+" time over threshold;time over threshold (ns)", 200, -100, 100 );
307  LeadingTrailingCorrelationPerChannel = ibooker.book2D( "leading trailing correlation", title+" leading trailing correlation;leading edge (ns);trailing edge (ns)", 200, -100, 100, 200, -100, 100 );
308 
309  ECCheckPerChannel = ibooker.book1D("optorxEC(8bit) - vfatEC vs optorxEC", title+" EC Error;optorxEC-vfatEC", 512, -256, 256 );
310 
311  stripTomography_far = ibooker.book2D( "tomography far", "tomography with strips far;x + 50 OOT (mm);y (mm)", 200, -50, 150, 150, -50, 100 );
312  stripTomography_near = ibooker.book2D( "tomography near", "tomography with strips near;x + 50 OOT (mm);y (mm)", 200, -50, 150, 150, -50, 100 );
313 
314  hit_rate = ibooker.book1D( "hit rate", title+"hit rate;rate (Hz)", 1000, 0, 100 );
315 }
316 
317 //----------------------------------------------------------------------------------------------------
318 
320  tokenStatus_ ( consumes< edm::DetSetVector<TotemVFATStatus> > ( ps.getParameter<edm::InputTag>( "tagStatus" ) ) ),
321  tokenLocalTrack_ ( consumes< edm::DetSetVector<TotemRPLocalTrack> > ( ps.getParameter<edm::InputTag>( "tagLocalTrack" ) ) ),
322  tokenDigi_ ( consumes< edm::DetSetVector<CTPPSDiamondDigi> > ( ps.getParameter<edm::InputTag>( "tagDigi" ) ) ),
323  tokenDiamondHit_ ( consumes< edm::DetSetVector<CTPPSDiamondRecHit> > ( ps.getParameter<edm::InputTag>( "tagDiamondRecHits" ) ) ),
324  tokenDiamondTrack_( consumes< edm::DetSetVector<CTPPSDiamondLocalTrack> >( ps.getParameter<edm::InputTag>( "tagDiamondLocalTracks" ) ) ),
325  tokenFEDInfo_ ( consumes< std::vector<TotemFEDInfo> > ( ps.getParameter<edm::InputTag>( "tagFEDInfo" ) ) ),
326  excludeMultipleHits_ ( ps.getParameter<bool>( "excludeMultipleHits" ) ),
327  minimumStripAngleForTomography_( ps.getParameter<double>( "minimumStripAngleForTomography" ) ),
328  verbosity_ ( ps.getUntrackedParameter<unsigned int>( "verbosity", 0 ) ),
329  EC_difference_56_( -500 ), EC_difference_45_( -500 )
330 {}
331 
332 //----------------------------------------------------------------------------------------------------
333 
335 {}
336 
337 //----------------------------------------------------------------------------------------------------
338 
339 void
341 {}
342 
343 //----------------------------------------------------------------------------------------------------
344 
345 void
347 {
348  ibooker.cd();
349  ibooker.setCurrentFolder( "CTPPS" );
350 
351  globalPlot_= GlobalPlots( ibooker );
352 
353  for ( unsigned short arm = 0; arm < CTPPS_NUM_OF_ARMS; ++arm ) {
355  potPlots_[rpId] = PotPlots( ibooker, rpId );
356  for ( unsigned short pl = 0; pl < CTPPS_DIAMOND_NUM_OF_PLANES; ++pl ) {
358  planePlots_[plId] = PlanePlots( ibooker, plId);
359  for ( unsigned short ch = 0; ch < CTPPS_DIAMOND_NUM_OF_CHANNELS; ++ch ) {
361  channelPlots_[chId] = ChannelPlots( ibooker, chId );
362  }
363  }
364  }
365 }
366 
367 
368 //----------------------------------------------------------------------------------------------------
369 
370 void
372 {
373  for ( auto& plot : channelPlots_ ) {
374  if ( plot.second.hitsCounterPerLumisection != 0 ) {
375  plot.second.hit_rate->Fill( (double) plot.second.hitsCounterPerLumisection / SEC_PER_LUMI_SECTION );
376  }
377  plot.second.hitsCounterPerLumisection = 0;
378  }
379 }
380 
381 //----------------------------------------------------------------------------------------------------
382 
383 void
385 {
386  // get event data
388  event.getByToken( tokenStatus_, diamondVFATStatus );
389 
391  event.getByToken( tokenLocalTrack_, stripTracks );
392 
394  event.getByToken( tokenDigi_, diamondDigis );
395 
397  event.getByToken( tokenFEDInfo_, fedInfo );
398 
400  event.getByToken( tokenDiamondHit_, diamondRecHits );
401 
403  event.getByToken( tokenDiamondTrack_, diamondLocalTracks );
404 
405  // check validity
406  bool valid = true;
407  valid &= diamondVFATStatus.isValid();
408  valid &= diamondDigis.isValid();
409  valid &= fedInfo.isValid();
410 
411  if ( !valid ) {
412  if ( verbosity_ ) {
413  edm::LogProblem("CTPPSDiamondDQMSource")
414  << "ERROR in TotemDQMModuleRP::analyze > some of the required inputs are not valid. Skipping this event.\n"
415  << " diamondVFATStatus.isValid = " << diamondVFATStatus.isValid() << "\n"
416  << " diamondDigis.isValid = " << diamondDigis.isValid() << "\n"
417  << " fedInfo.isValid = " << fedInfo.isValid();
418  }
419 
420  return;
421  }
422 
423  //------------------------------
424  // RP Plots
425  //------------------------------
426 
427  //------------------------------
428  // Correlation Plots
429  //------------------------------
430 
431  for ( const auto& ds1 : *stripTracks ) {
432  for ( const auto& tr1 : ds1 ) {
433  if ( ! tr1.isValid() ) continue;
434 
435  CTPPSDetId rpId1( ds1.detId() );
436  unsigned int arm1 = rpId1.arm();
437  unsigned int stNum1 = rpId1.station();
438  unsigned int rpNum1 = rpId1.rp();
439  if (stNum1 != 0 || ( rpNum1 != 2 && rpNum1 != 3 ) ) continue;
440  unsigned int idx1 = arm1*3 + rpNum1-2;
441 
442  for ( const auto& ds2 : *stripTracks ) {
443  for ( const auto& tr2 : ds2 ) {
444  if ( ! tr2.isValid() ) continue;
445 
446  CTPPSDetId rpId2(ds2.detId());
447  unsigned int arm2 = rpId2.arm();
448  unsigned int stNum2 = rpId2.station();
449  unsigned int rpNum2 = rpId2.rp();
450  if (stNum2 != 0 || ( rpNum2 != 2 && rpNum2 != 3 ) ) continue;
451  unsigned int idx2 = arm2*3 + rpNum2-2;
452 
453  if ( idx1 >= idx2 ) globalPlot_.h_trackCorr_hor->Fill( 5-idx1, idx2 ); // strips-strips
454  }
455  }
456  for ( const auto& ds2 : *diamondLocalTracks ) {
457  for ( const auto& tr2 : ds2 ) {
458  if ( ! tr2.isValid() ) continue;
459  if ( tr2.getOOTIndex() != 1 ) continue;
460  if ( excludeMultipleHits_ && tr2.getMultipleHits() > 0 ) continue;
461 
462  CTPPSDetId diamId2( ds2.detId() );
463  unsigned int arm2 = diamId2.arm();
464  if ( idx1 >= arm2*3+2 )
465  globalPlot_.h_trackCorr_hor->Fill( 5-idx1, arm2*3+2 ); // strips-diamonds
466  else
467  globalPlot_.h_trackCorr_hor->Fill( 5-(arm2*3+2 ),idx1 ); // strips-diamonds
468  }
469  }
470  }
471  }
472 
473  for ( const auto& ds1 : *diamondLocalTracks ) {
474  for ( const auto& tr1 : ds1 ) {
475  if ( ! tr1.isValid() ) continue;
476  if ( excludeMultipleHits_ && tr1.getMultipleHits() > 0 ) continue;
477  if ( tr1.getOOTIndex() != 1 ) continue;
478 
479  CTPPSDetId diamId1( ds1.detId() );
480  unsigned int arm1 = diamId1.arm();
481 
482  globalPlot_.h_trackCorr_hor->Fill( 5-(arm1*3+2), arm1*3+2 ); // diamonds-diamonds
483 
484  for ( const auto& ds2 : *diamondLocalTracks ) {
485  for ( const auto& tr2 : ds2 ) {
486  if ( ! tr2.isValid() ) continue;
487  if ( excludeMultipleHits_ && tr2.getMultipleHits() > 0 ) continue;
488  if ( tr2.getOOTIndex() != 1 ) continue;
489 
490  CTPPSDetId diamId2( ds2.detId() );
491  unsigned int arm2 = diamId2.arm();
492  if ( arm1 > arm2 ) globalPlot_.h_trackCorr_hor->Fill( 5-(arm1*3+2), arm2*3+2 ); // diamonds-diamonds
493  }
494  }
495  }
496  }
497 
498 
499  // Using CTPPSDiamondDigi
500  for ( const auto& digis : *diamondDigis ) {
501  const CTPPSDiamondDetId detId( digis.detId() );
502  CTPPSDiamondDetId detId_pot( digis.detId() );
503 
504  for ( const auto& digi : digis ) {
505  detId_pot.setPlane( 0 );
506  detId_pot.setChannel( 0 );
507  if ( potPlots_.find( detId_pot ) == potPlots_.end() ) continue;
508  //Leading without trailing investigation
509  if ( digi.getLeadingEdge() == 0 && digi.getTrailingEdge() == 0 ) potPlots_[detId_pot].leadingWithoutTrailingCumulativePot->Fill( 1 );
510  else if ( digi.getLeadingEdge() != 0 && digi.getTrailingEdge() == 0 ) potPlots_[detId_pot].leadingWithoutTrailingCumulativePot->Fill( 2 );
511  else if ( digi.getLeadingEdge() == 0 && digi.getTrailingEdge() != 0 ) potPlots_[detId_pot].leadingWithoutTrailingCumulativePot->Fill( 3 );
512  else if ( digi.getLeadingEdge() != 0 && digi.getTrailingEdge() != 0 ) potPlots_[detId_pot].leadingWithoutTrailingCumulativePot->Fill( 4 );
513 
514  if ( digi.getLeadingEdge() != 0 ) {
515  // FED BX monitoring (for MINIDAQ)
516  for ( const auto& fit : *fedInfo ) {
517  if ( ( detId.arm() == 1 && fit.getFEDId() == CTPPS_FED_ID_56 ) || ( detId.arm() == 0 && fit.getFEDId() == CTPPS_FED_ID_45 ) ) {
518  potPlots_[detId_pot].activity_per_fedbx->Fill( fit.getBX() );
519  potPlots_[detId_pot].activity_per_fedbx_short->Fill( fit.getBX() );
520  }
521  }
522  }
523 
524  // HPTDC Errors
525  const HPTDCErrorFlags hptdcErrors = digi.getHPTDCErrorFlags();
526  for ( unsigned short hptdcErrorIndex = 1; hptdcErrorIndex < 16; ++hptdcErrorIndex )
527  if ( hptdcErrors.getErrorId( hptdcErrorIndex-1 ) ) potPlots_[detId_pot].HPTDCErrorFlags_cumulative->Fill( hptdcErrorIndex );
528  if ( digi.getMultipleHit() ) potPlots_[detId_pot].HPTDCErrorFlags_cumulative->Fill( 16 );
529  }
530  }
531 
532  // EC Errors
533  for ( const auto& vfat_status : *diamondVFATStatus ) {
534  const CTPPSDiamondDetId detId( vfat_status.detId() );
535  CTPPSDiamondDetId detId_pot( vfat_status.detId() );
536  detId_pot.setPlane( 0 );
537  detId_pot.setChannel( 0 );
538  for ( const auto& status : vfat_status ) {
539  if ( !status.isOK() ) continue;
540  if ( potPlots_.find(detId_pot) == potPlots_.end() ) continue;
541 
542  // Check Event Number
543  for ( const auto& optorx : *fedInfo ) {
544  if ( detId.arm() == 1 && optorx.getFEDId() == CTPPS_FED_ID_56 ) {
545  potPlots_[detId_pot].ECCheck->Fill((int)((optorx.getLV1()& 0xFF)-((unsigned int) status.getEC() & 0xFF)) & 0xFF);
546  if ( ( static_cast<int>( ( optorx.getLV1() & 0xFF )-status.getEC() ) != EC_difference_56_ ) && ( static_cast<uint8_t>( ( optorx.getLV1() & 0xFF )-status.getEC() ) < 128 ) )
547  EC_difference_56_ = static_cast<int>( optorx.getLV1() & 0xFF )-( static_cast<unsigned int>( status.getEC() ) & 0xFF );
548  if ( EC_difference_56_ != 1 && EC_difference_56_ != -500 && EC_difference_56_ < 128 && EC_difference_56_ > -128 )
549  if (verbosity_) edm::LogProblem("CTPPSDiamondDQMSource") << "FED " << CTPPS_FED_ID_56 << ": ECError at EV: 0x"<< std::hex << optorx.getLV1()
550  << "\t\tVFAT EC: 0x"<< static_cast<unsigned int>( status.getEC() )
551  << "\twith ID: " << std::dec << detId
552  << "\tdiff: " << EC_difference_56_;
553  }
554  else if ( detId.arm() == 0 && optorx.getFEDId()== CTPPS_FED_ID_45 ) {
555  potPlots_[detId_pot].ECCheck->Fill((int)((optorx.getLV1()& 0xFF)-status.getEC()) & 0xFF);
556  if ( ( static_cast<int>( ( optorx.getLV1() & 0xFF )-status.getEC() ) != EC_difference_45_ ) && ( static_cast<uint8_t>( ( optorx.getLV1() & 0xFF )-status.getEC() ) < 128 ) )
557  EC_difference_45_ = static_cast<int>( optorx.getLV1() & 0xFF )-( static_cast<unsigned int>( status.getEC() ) & 0xFF );
558  if ( EC_difference_45_ != 1 && EC_difference_45_ != -500 && EC_difference_45_ < 128 && EC_difference_45_ > -128 )
559  if (verbosity_) edm::LogProblem("CTPPSDiamondDQMSource") << "FED " << CTPPS_FED_ID_45 << ": ECError at EV: 0x"<< std::hex << optorx.getLV1()
560  << "\t\tVFAT EC: 0x"<< static_cast<unsigned int>( status.getEC() )
561  << "\twith ID: " << std::dec << detId
562  << "\tdiff: " << EC_difference_45_;
563  }
564  }
565  }
566  }
567 
568  // Using CTPPSDiamondRecHit
569  std::unordered_map<unsigned int, std::set<unsigned int> > planes;
570 
571  for ( const auto& rechits : *diamondRecHits ) {
572  CTPPSDiamondDetId detId_pot( rechits.detId() );
573  detId_pot.setPlane( 0 );
574  detId_pot.setChannel( 0 );
575  const CTPPSDiamondDetId detId( rechits.detId() );
576 
577  for ( const auto& rechit : rechits ) {
578  if ( excludeMultipleHits_ && rechit.getMultipleHits() > 0 ) continue;
579  planes[detId_pot].insert( detId.plane() );
580 
581  if ( potPlots_.find( detId_pot ) == potPlots_.end() ) continue;
582 
583  float UFSDShift = 0.0;
584  if ( rechit.getYWidth() < 3 ) UFSDShift = 0.5; // Display trick for UFSD that have 2 pixels with same X
585 
586  TH2F *hitHistoTmp = potPlots_[detId_pot].hitDistribution2d->getTH2F();
587  TAxis *hitHistoTmpYAxis = hitHistoTmp->GetYaxis();
588  int startBin = hitHistoTmpYAxis->FindBin( rechit.getX() - 0.5*rechit.getXWidth() );
589  int numOfBins = rechit.getXWidth()/DISPLAY_RESOLUTION_FOR_HITS_MM;
590  for ( int i=0; i<numOfBins; ++i) {
591  hitHistoTmp->Fill( detId.plane(), hitHistoTmpYAxis->GetBinCenter(startBin+i) + UFSDShift );
592  }
593 
594  TH2F *hitHistoOOTTmp = potPlots_[detId_pot].hitDistribution2dOOT->getTH2F();
595  TAxis *hitHistoOOTTmpYAxis = hitHistoOOTTmp->GetYaxis();
596  startBin = hitHistoOOTTmpYAxis->FindBin( rechit.getX() - 0.5*rechit.getXWidth() );
597  numOfBins = rechit.getXWidth()/DISPLAY_RESOLUTION_FOR_HITS_MM;
598  for ( int i=0; i<numOfBins; ++i) {
599  hitHistoOOTTmp->Fill( detId.plane() + 0.25 * rechit.getOOTIndex(), hitHistoOOTTmpYAxis->GetBinCenter(startBin+i) );
600  }
601 
602  potPlots_[detId_pot].leadingEdgeCumulativePot->Fill( rechit.getT() + 25*rechit.getOOTIndex() );
603  potPlots_[detId_pot].timeOverThresholdCumulativePot->Fill( rechit.getToT() );
604  potPlots_[detId_pot].leadingTrailingCorrelationPot->Fill( rechit.getT()+ 25*rechit.getOOTIndex() , rechit.getT() + rechit.getToT() + 25*rechit.getOOTIndex() );
605 
606  switch ( rechit.getOOTIndex() ) {
607  case 0: {
608  potPlots_[detId_pot].activity_per_bx_minus1->Fill( event.bunchCrossing() );
609  potPlots_[detId_pot].activity_per_bx_short_minus1->Fill( event.bunchCrossing() );
610  } break;
611  case 1: {
612  potPlots_[detId_pot].activity_per_bx->Fill( event.bunchCrossing() );
613  potPlots_[detId_pot].activity_per_bx_short->Fill( event.bunchCrossing() );
614  } break;
615  case 2: {
616  potPlots_[detId_pot].activity_per_bx_plus1->Fill( event.bunchCrossing() );
617  potPlots_[detId_pot].activity_per_bx_short_plus1->Fill( event.bunchCrossing() );
618  } break;
619  }
620  }
621  }
622 
623  for ( const auto& plt : potPlots_ ) {
624  plt.second.activePlanes->Fill( planes[plt.first].size() );
625  }
626 
627  // Using CTPPSDiamondLocalTrack
628  for ( const auto& tracks : *diamondLocalTracks ) {
629  CTPPSDiamondDetId detId_pot( tracks.detId() );
630  detId_pot.setPlane( 0 );
631  detId_pot.setChannel( 0 );
632  const CTPPSDiamondDetId detId( tracks.detId() );
633 
634  for ( const auto& track : tracks ) {
635  if ( ! track.isValid() ) continue;
636  if ( excludeMultipleHits_ && track.getMultipleHits() > 0 ) continue;
637  if ( potPlots_.find( detId_pot ) == potPlots_.end() ) continue;
638 
639  TH2F *trackHistoOOTTmp = potPlots_[detId_pot].trackDistributionOOT->getTH2F();
640  TAxis *trackHistoOOTTmpYAxis = trackHistoOOTTmp->GetYaxis();
641  int startBin = trackHistoOOTTmpYAxis->FindBin( track.getX0() - track.getX0Sigma() );
642  int numOfBins = 2*track.getX0Sigma()/DISPLAY_RESOLUTION_FOR_HITS_MM;
643  for ( int i=0; i<numOfBins; ++i) {
644  trackHistoOOTTmp->Fill( track.getOOTIndex(), trackHistoOOTTmpYAxis->GetBinCenter(startBin+i) );
645  }
646 
647  if ( track.getOOTIndex() == 1 ) {
648  TH1F *trackHistoInTimeTmp = potPlots_[detId_pot].trackDistribution->getTH1F();
649  int startBin = trackHistoInTimeTmp->FindBin( track.getX0() - track.getX0Sigma() );
650  int numOfBins = 2*track.getX0Sigma()/DISPLAY_RESOLUTION_FOR_HITS_MM;
651  for ( int i=0; i<numOfBins; ++i) {
652  trackHistoInTimeTmp->Fill( trackHistoInTimeTmp->GetBinCenter(startBin+i) );
653  }
654  }
655  }
656  }
657 
658  // Tomography of diamonds using strips
659  for ( const auto& rechits : *diamondRecHits ) {
660  CTPPSDiamondDetId detId_pot( rechits.detId() );
661  detId_pot.setPlane( 0 );
662  detId_pot.setChannel( 0 );
663  const CTPPSDiamondDetId detId( rechits.detId() );
664 
665  for ( const auto& rechit : rechits ) {
666  if ( excludeMultipleHits_ && rechit.getMultipleHits() > 0 ) continue;
667  if ( !stripTracks.isValid() ) continue;
668  if ( potPlots_.find( detId_pot ) == potPlots_.end() ) continue;
669 
670  for ( const auto& ds : *stripTracks ) {
671  const CTPPSDetId stripId( ds.detId() );
672  for ( const auto& striplt : ds ) {
673  if ( !striplt.isValid() ) continue;
674  if ( stripId.arm() != detId_pot.arm() ) continue;
675  if ( striplt.getTx() > minimumStripAngleForTomography_ || striplt.getTy() > minimumStripAngleForTomography_) continue;
676  if ( stripId.rp() == CTPPS_FAR_RP_ID ) {
677  switch ( rechit.getOOTIndex() ) {
678  case 0: {
679  potPlots_[detId_pot].stripTomographyAllFar_minus1->Fill( striplt.getX0() + 50*detId.plane(), striplt.getY0() );
680  } break;
681  case 1: {
682  potPlots_[detId_pot].stripTomographyAllFar->Fill( striplt.getX0() + 50*detId.plane(), striplt.getY0() );
683  } break;
684  case 2: {
685  potPlots_[detId_pot].stripTomographyAllFar_plus1->Fill( striplt.getX0() + 50*detId.plane(), striplt.getY0() );
686  } break;
687  }
688  }
689  else if ( stripId.rp() == CTPPS_NEAR_RP_ID ) {
690  switch ( rechit.getOOTIndex() ) {
691  case 0: {
692  potPlots_[detId_pot].stripTomographyAllNear_minus1->Fill( striplt.getX0() + 50*detId.plane(), striplt.getY0() );
693  } break;
694  case 1: {
695  potPlots_[detId_pot].stripTomographyAllNear->Fill( striplt.getX0() + 50*detId.plane(), striplt.getY0() );
696  } break;
697  case 2: {
698  potPlots_[detId_pot].stripTomographyAllNear_plus1->Fill( striplt.getX0() + 50*detId.plane(), striplt.getY0() );
699  } break;
700  }
701  }
702  }
703  }
704  }
705  }
706 
707  //------------------------------
708  // Clock Plots
709  //------------------------------
710 
711  for ( const auto& digis : *diamondDigis ) {
712  const CTPPSDiamondDetId detId( digis.detId() );
713  CTPPSDiamondDetId detId_pot( digis.detId() );
714  if ( detId.channel() == CHANNEL_OF_VFAT_CLOCK ) {
715  detId_pot.setPlane( 0 );
716  detId_pot.setChannel( 0 );
717  for ( const auto& digi : digis ) {
718  if ( digi.getLeadingEdge() != 0 ) {
719  if ( detId.plane() == 1 ) {
720  potPlots_[detId_pot].clock_Digi1_le->Fill( HPTDC_BIN_WIDTH_NS * digi.getLeadingEdge() );
721  potPlots_[detId_pot].clock_Digi1_te->Fill( HPTDC_BIN_WIDTH_NS * digi.getTrailingEdge() );
722  }
723  if ( detId.plane() == 3 ) {
724  potPlots_[detId_pot].clock_Digi3_le->Fill( HPTDC_BIN_WIDTH_NS * digi.getLeadingEdge() );
725  potPlots_[detId_pot].clock_Digi3_te->Fill( HPTDC_BIN_WIDTH_NS * digi.getTrailingEdge() );
726  }
727  }
728  }
729  }
730  }
731 
732  //------------------------------
733  // Plane Plots
734  //------------------------------
735 
736  // Using CTPPSDiamondDigi
737  std::unordered_map<unsigned int, unsigned int> channelsPerPlane;
738  for ( const auto& digis : *diamondDigis ) {
739  const CTPPSDiamondDetId detId( digis.detId() );
740  CTPPSDiamondDetId detId_plane( digis.detId() );
741  for ( const auto& digi : digis ) {
742  detId_plane.setChannel( 0 );
743  if ( planePlots_.find( detId_plane ) == planePlots_.end() ) continue;
744 
745  planePlots_[detId_plane].threshold_voltage->Fill( detId.channel(), digi.getThresholdVoltage() );
746 
747  if ( digi.getLeadingEdge() != 0 ) {
748  planePlots_[detId_plane].digiProfileCumulativePerPlane->Fill( detId.channel() );
749  if ( channelsPerPlane.find(detId_plane) != channelsPerPlane.end() ) channelsPerPlane[detId_plane]++;
750  else channelsPerPlane[detId_plane] = 0;
751  }
752  }
753  }
754 
755  for ( const auto& plt : channelsPerPlane ) {
756  planePlots_[plt.first].hit_multiplicity->Fill( plt.second );
757  }
758 
759  // Using CTPPSDiamondRecHit
760  for ( const auto& rechits : *diamondRecHits ) {
761  CTPPSDiamondDetId detId_plane( rechits.detId() );
762  detId_plane.setChannel( 0 );
763  for ( const auto& rechit : rechits ) {
764  if ( excludeMultipleHits_ && rechit.getMultipleHits() > 0 ) continue;
765  if ( planePlots_.find( detId_plane ) != planePlots_.end() ) {
766  TH1F *hitHistoTmp = planePlots_[detId_plane].hitProfile->getTH1F();
767  int startBin = hitHistoTmp->FindBin( rechit.getX() - 0.5*rechit.getXWidth() );
768  int numOfBins = rechit.getXWidth()/DISPLAY_RESOLUTION_FOR_HITS_MM;
769  for ( int i=0; i<numOfBins; ++i) {
770  if ( rechit.getOOTIndex() == 1 ) hitHistoTmp->Fill( hitHistoTmp->GetBinCenter(startBin+i) );
771  }
772  }
773  }
774  }
775 
776  // Tomography of diamonds using strips
777  for ( const auto& rechits : *diamondRecHits ) {
778  CTPPSDiamondDetId detId_plane( rechits.detId() );
779  detId_plane.setChannel( 0 );
780  for ( const auto& rechit : rechits ) {
781  if ( excludeMultipleHits_ && rechit.getMultipleHits() > 0 ) continue;
782  if ( !stripTracks.isValid() ) continue;
783  if (planePlots_.find(detId_plane) == planePlots_.end()) continue;
784 
785  for ( const auto& ds : *stripTracks ) {
786  const CTPPSDetId stripId(ds.detId());
787  for ( const auto& striplt : ds ) {
788  if (! striplt.isValid()) continue;
789  if ( stripId.arm() != detId_plane.arm() ) continue;
790  if ( striplt.getTx() > minimumStripAngleForTomography_ || striplt.getTy() > minimumStripAngleForTomography_ ) continue;
791  if ( stripId.rp() == CTPPS_FAR_RP_ID ) {
792  planePlots_[detId_plane].stripTomography_far->Fill( striplt.getX0(), striplt.getY0() + 50*rechit.getOOTIndex() );
793  }
794  else if ( stripId.rp() == CTPPS_NEAR_RP_ID ) {
795  planePlots_[detId_plane].stripTomography_near->Fill( striplt.getX0(), striplt.getY0() + 50*rechit.getOOTIndex() );
796  }
797  }
798  }
799  }
800  }
801  //------------------------------
802  // Channel Plots
803  //------------------------------
804 
805  //Check Event Number
806  for ( const auto& vfat_status : *diamondVFATStatus ) {
807  const CTPPSDiamondDetId detId( vfat_status.detId() );
808  for ( const auto& status : vfat_status ) {
809  if ( !status.isOK() ) continue;
810  if ( channelPlots_.find(detId) != channelPlots_.end() ) {
811  for ( const auto& optorx : *fedInfo ) {
812  if ( ( detId.arm() == 1 && optorx.getFEDId() == CTPPS_FED_ID_56 ) || ( detId.arm() == 0 && optorx.getFEDId() == CTPPS_FED_ID_45 ) ) {
813  channelPlots_[detId].ECCheckPerChannel->Fill((int)((optorx.getLV1()& 0xFF)-((unsigned int) status.getEC() & 0xFF)) & 0xFF);
814  }
815  }
816  }
817  }
818  }
819 
820  // digi profile cumulative
821  for ( const auto& digis : *diamondDigis ) {
822  const CTPPSDiamondDetId detId( digis.detId() );
823  for ( const auto& digi : digis ) {
824  if ( channelPlots_.find( detId ) != channelPlots_.end() ) {
825  // HPTDC Errors
826  const HPTDCErrorFlags hptdcErrors = digi.getHPTDCErrorFlags();
827  for ( unsigned short hptdcErrorIndex = 1; hptdcErrorIndex < 16; ++hptdcErrorIndex )
828  if ( hptdcErrors.getErrorId( hptdcErrorIndex-1 ) ) channelPlots_[detId].HPTDCErrorFlags->Fill( hptdcErrorIndex );
829  if ( digi.getMultipleHit() ) channelPlots_[detId].HPTDCErrorFlags->Fill( 16 );
830 
831  // Check dropped trailing edges
832  if ( digi.getLeadingEdge() == 0 && digi.getTrailingEdge() == 0 ) channelPlots_[detId].leadingWithoutTrailing->Fill( 1 );
833  else if ( digi.getLeadingEdge() != 0 && digi.getTrailingEdge() == 0 ) channelPlots_[detId].leadingWithoutTrailing->Fill( 2 );
834  else if ( digi.getLeadingEdge() == 0 && digi.getTrailingEdge() != 0 ) channelPlots_[detId].leadingWithoutTrailing->Fill( 3 );
835  else if ( digi.getLeadingEdge() != 0 && digi.getTrailingEdge() != 0 ) channelPlots_[detId].leadingWithoutTrailing->Fill( 4 );
836  }
837  }
838  }
839 
840  // Using CTPPSDiamondRecHit
841  for ( const auto& rechits : *diamondRecHits ) {
842  CTPPSDiamondDetId detId( rechits.detId() );
843  for ( const auto& rechit : rechits ) {
844  if ( excludeMultipleHits_ && rechit.getMultipleHits() > 0 ) continue;
845  if ( channelPlots_.find( detId ) != channelPlots_.end() ) {
846  channelPlots_[detId].LeadingEdgeCumulativePerChannel->Fill( rechit.getT() + 25*rechit.getOOTIndex() );
847  channelPlots_[detId].TimeOverThresholdCumulativePerChannel->Fill( rechit.getToT() );
848  channelPlots_[detId].LeadingTrailingCorrelationPerChannel->Fill( rechit.getT() + 25*rechit.getOOTIndex(), rechit.getT() + 25*rechit.getOOTIndex() + rechit.getToT() );
849  ++(channelPlots_[detId].hitsCounterPerLumisection);
850  }
851  }
852  }
853 
854  // Tomography of diamonds using strips
855  for ( const auto& rechits : *diamondRecHits ) {
856  const CTPPSDiamondDetId detId( rechits.detId() );
857  for ( const auto& rechit : rechits ) {
858  if ( excludeMultipleHits_ && rechit.getMultipleHits() > 0 ) continue;
859  if ( stripTracks.isValid() ) {
860  if (channelPlots_.find(detId) == channelPlots_.end()) continue;
861  for ( const auto& ds : *stripTracks ) {
862  for ( const auto& striplt : ds ) {
863  CTPPSDetId stripId(ds.detId());
864  if ( !striplt.isValid() ) continue;
865  if ( stripId.arm() != detId.arm() ) continue;
866  if ( striplt.getTx() > minimumStripAngleForTomography_ || striplt.getTy() > minimumStripAngleForTomography_ ) continue;
867  if ( stripId.rp() == CTPPS_FAR_RP_ID ) {
868  channelPlots_[detId].stripTomography_far->Fill( striplt.getX0(), striplt.getY0() + 50*( rechit.getOOTIndex()-1 ) );
869  }
870  else if ( stripId.rp() == CTPPS_NEAR_RP_ID ) {
871  channelPlots_[detId].stripTomography_near->Fill( striplt.getX0(), striplt.getY0() + 50*( rechit.getOOTIndex()-1 ) );
872  }
873  }
874  }
875  }
876  }
877  }
878 
879 }
880 
881 //----------------------------------------------------------------------------------------------------
882 
883 void
885 {}
886 
887 //----------------------------------------------------------------------------------------------------
888 
889 void
891 {}
892 
893 //----------------------------------------------------------------------------------------------------
894 
static const int CTPPS_FED_ID_56
OptoRx headers and footers.
Definition: TotemFEDInfo.h:15
plots related to one Diamond plane
plots related to one Diamond detector package
static const int CHANNEL_OF_VFAT_CLOCK
static const double DISPLAY_RESOLUTION_FOR_HITS_MM
static const int CTPPS_DIAMOND_NUM_OF_PLANES
void setPlane(uint32_t channel)
void cd(void)
Definition: DQMStore.cc:269
Reconstructed hit in diamond detectors.
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:17
void setChannel(uint32_t channel)
void channelName(std::string &name, NameFlag flag=nFull) const
void dqmBeginRun(const edm::Run &, const edm::EventSetup &) override
edm::EDGetTokenT< edm::DetSetVector< CTPPSDiamondDigi > > tokenDigi_
CTPPSDiamondDQMSource(const edm::ParameterSet &)
bool getErrorId(unsigned short id) const
static const int CTPPS_NUM_OF_ARMS
plots related to the whole system
int bunchCrossing() const
Definition: EventBase.h:66
#define NULL
Definition: scimark2.h:8
static const int CTPPS_DIAMOND_NUM_OF_CHANNELS
edm::EDGetTokenT< edm::DetSetVector< TotemRPLocalTrack > > tokenLocalTrack_
void endRun(const edm::Run &, const edm::EventSetup &)
void endLuminosityBlock(const edm::LuminosityBlock &, const edm::EventSetup &)
A track fit through a single RP.
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
void Fill(long long x)
static const int CTPPS_DIAMOND_STATION_ID
void analyze(const edm::Event &, const edm::EventSetup &)
void beginLuminosityBlock(const edm::LuminosityBlock &, const edm::EventSetup &)
void bookHistograms(DQMStore::IBooker &, const edm::Run &, const edm::EventSetup &) override
static const int CTPPS_NEAR_RP_ID
std::unordered_map< unsigned int, ChannelPlots > channelPlots_
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:115
void rpName(std::string &name, NameFlag flag=nFull) const
Definition: CTPPSDetId.h:139
plots related to one Diamond channel
uint32_t arm() const
Definition: CTPPSDetId.h:52
bool isValid() const
Definition: HandleBase.h:74
edm::EDGetTokenT< edm::DetSetVector< CTPPSDiamondLocalTrack > > tokenDiamondTrack_
static const double HPTDC_BIN_WIDTH_NS
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:277
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:133
TH1F * getTH1F(void) const
void planeName(std::string &name, NameFlag flag=nFull) const
Base class for CTPPS detector IDs.
Definition: CTPPSDetId.h:32
std::unordered_map< unsigned int, PotPlots > potPlots_
edm::EDGetTokenT< edm::DetSetVector< CTPPSDiamondRecHit > > tokenDiamondHit_
HLT enums.
static const int CTPPS_FAR_RP_ID
static const double SEC_PER_LUMI_SECTION
Detector ID class for CTPPS Timing Diamond detectors. Bits [19:31] : Assigend in CTPPSDetId Calss Bit...
std::unordered_map< unsigned int, PlanePlots > planePlots_
TH2F * getTH2F(void) const
static const int CTPPS_DIAMOND_RP_ID
static std::string getHPTDCErrorName(const unsigned short id)
edm::EDGetTokenT< std::vector< TotemFEDInfo > > tokenFEDInfo_
static const int CTPPS_FED_ID_45
edm::EDGetTokenT< edm::DetSetVector< TotemVFATStatus > > tokenStatus_
Definition: event.py:1
Definition: Run.h:42