CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | Static Private Attributes
CTPPSPixelDQMSource Class Reference
Inheritance diagram for CTPPSPixelDQMSource:
DQMEDAnalyzer edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > > edm::stream::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

 CTPPSPixelDQMSource (const edm::ParameterSet &ps)
 
virtual ~CTPPSPixelDQMSource ()
 
- Public Member Functions inherited from DQMEDAnalyzer
virtual void beginRun (edm::Run const &, edm::EventSetup const &) final
 
virtual void beginStream (edm::StreamID id) final
 
 DQMEDAnalyzer (void)
 
virtual void endLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
virtual void endRunSummary (edm::Run const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
uint32_t streamId () const
 
- Public Member Functions inherited from edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > >
 EDAnalyzer ()=default
 
- Public Member Functions inherited from edm::stream::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDAnalyzerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
virtual ~EDConsumerBase () noexcept(false)
 

Protected Member Functions

void analyze (edm::Event const &e, edm::EventSetup const &eSetup)
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &eSetup)
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
void dqmBeginRun (edm::Run const &, edm::EventSetup const &) override
 
void endLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &eSetup)
 
void endRun (edm::Run const &run, edm::EventSetup const &eSetup)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Private Member Functions

int getDet (int id)
 
int getPixPlane (int id)
 
int getPlaneIndex (int arm, int station, int rp, int plane)
 
int getRPindex (int arm, int station, int rp)
 
int prIndex (int rp, int plane)
 

Private Attributes

const int CluSizeMAX = 25
 
int cluSizeMaxData
 
const int ClusMultMAX = 90
 
MonitorElementh2CluSize [NArms][NStationMAX]
 
MonitorElementh2ClusMultipl [NArms][NStationMAX]
 
MonitorElementh2HitsMultipl [NArms][NStationMAX]
 
MonitorElementh2HitsMultROC [RPotsTotalNumber]
 
MonitorElementh2PlaneActive [NArms][NStationMAX]
 
MonitorElementh2xyHits [RPotsTotalNumber][NplaneMAX]
 
MonitorElementh2xyROCadc [RPotsTotalNumber *NplaneMAX][NROCsMAX]
 
MonitorElementh2xyROCHits [RPotsTotalNumber *NplaneMAX][NROCsMAX]
 
MonitorElementhBX
 
MonitorElementhBXshort
 
MonitorElementhHitsMult [RPotsTotalNumber][NplaneMAX]
 
const int hitMultMAX = 300
 
int HitsMultPlane [RPotsTotalNumber][NplaneMAX]
 
int HitsMultROC [RPotsTotalNumber *NplaneMAX][NROCsMAX]
 
MonitorElementhp2HitsOcc [NArms][NStationMAX]
 
MonitorElementhp2xyADC [RPotsTotalNumber][NplaneMAX]
 
MonitorElementhRPotActivBX [RPotsTotalNumber]
 
MonitorElementhRPotActivBXroc [RPotsTotalNumber]
 
MonitorElementhRPotActivPlanes [RPotsTotalNumber]
 
MonitorElementhRPotActivROCs [RPotsTotalNumber]
 
MonitorElementhRPotActivROCsMax [RPotsTotalNumber]
 
const int IndexNotValid = 0
 
int multClus
 
int multHits
 
long int nEvents = 0
 
int pixColMAX = 156
 
int pixRowMAX = 160
 
int ROCSizeInX = pixRowMAX/2
 
int ROCSizeInY = pixColMAX/3
 
int RPindexValid [RPotsTotalNumber]
 
const int RPn_first = 3
 
const int RPn_last = 4
 
int RPstatus [NStationMAX][NRPotsMAX]
 
unsigned int rpStatusWord = 0x8000
 
int StationStatus [NStationMAX]
 
CTPPSPixelIndices thePixIndices
 
edm::EDGetTokenT< edm::DetSetVector< CTPPSPixelDigi > > tokenDigi
 
unsigned int verbosity
 

Static Private Attributes

static int NArms =2
 
static int NplaneMAX =6
 
static int NROCsMAX = 6
 
static int NRPotsMAX =6
 
static int NStationMAX =3
 
static int RPotsTotalNumber =NArms*NStationMAX*NRPotsMAX
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > >
typedef CacheContexts< T... > CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T... > HasAbility
 
typedef CacheTypes::LuminosityBlockCache LuminosityBlockCache
 
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 
- Public Types inherited from edm::stream::EDAnalyzerBase
typedef EDAnalyzerAdaptorBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from DQMEDAnalyzer
static std::shared_ptr< dqmDetails::NoCacheglobalBeginLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *)
 
static std::shared_ptr< dqmDetails::NoCacheglobalBeginRunSummary (edm::Run const &, edm::EventSetup const &, RunContext const *)
 
static void globalEndLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *, dqmDetails::NoCache *)
 
static void globalEndRunSummary (edm::Run const &, edm::EventSetup const &, RunContext const *, dqmDetails::NoCache *)
 
- Static Public Member Functions inherited from edm::stream::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

Detailed Description

Definition at line 31 of file CTPPSPixelDQMSource.cc.

Constructor & Destructor Documentation

CTPPSPixelDQMSource::CTPPSPixelDQMSource ( const edm::ParameterSet ps)

Definition at line 132 of file CTPPSPixelDQMSource.cc.

References edm::ParameterSet::getParameter(), and tokenDigi.

132  :
133  verbosity(ps.getUntrackedParameter<unsigned int>("verbosity", 0)),
134  rpStatusWord(ps.getUntrackedParameter<unsigned int>("RPStatusWord",0x8000))
135 {
136  tokenDigi = consumes<DetSetVector<CTPPSPixelDigi> >(ps.getParameter<edm::InputTag>("tagRPixDigi"));
137 // tokenCluster=consumes<DetSetVector<CTPPSPixelCluster>>(ps.getParameter<edm::InputTag>("tagRPixCluster"));
138 
139 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
edm::EDGetTokenT< edm::DetSetVector< CTPPSPixelDigi > > tokenDigi
CTPPSPixelDQMSource::~CTPPSPixelDQMSource ( )
virtual

Definition at line 143 of file CTPPSPixelDQMSource.cc.

144 {
145 }

Member Function Documentation

void CTPPSPixelDQMSource::analyze ( edm::Event const &  e,
edm::EventSetup const &  eSetup 
)
protectedvirtual

Implements edm::stream::EDAnalyzerBase.

Definition at line 334 of file CTPPSPixelDQMSource.cc.

References ecalMGPA::adc(), CTPPSDetId::arm(), edm::DetSet< T >::begin(), edm::EventBase::bunchCrossing(), cuy::col, MonitorElement::Fill(), HcalObjRepresent::Fill(), getDet(), getPixPlane(), getPlaneIndex(), getRPindex(), h2HitsMultipl, h2HitsMultROC, h2PlaneActive, h2xyHits, h2xyROCadc, h2xyROCHits, hBX, hBXshort, hHitsMult, HitsMultPlane, HitsMultROC, hp2HitsOcc, hp2xyADC, hRPotActivBX, hRPotActivBXroc, hRPotActivPlanes, hRPotActivROCs, hRPotActivROCsMax, diffTreeTool::index, edm::HandleBase::isValid(), hpstanc_transforms::max, multHits, nEvents, np, NplaneMAX, NROCsMAX, NRPotsMAX, NStationMAX, AlCaHLTBitMon_ParallelJobs::p, prIndex(), alignCSCRings::r, CTPPSDetId::rp(), RPindexValid, RPstatus, CTPPSDetId::station(), relativeConstraints::station, StationStatus, thePixIndices, tokenDigi, CTPPSPixelIndices::transformToROC(), verbosity, and DetId::VeryForward.

335 {
336  ++nEvents;
337  int RPactivity[2][NRPotsMAX];
338  for(int arm = 0; arm <2; arm++) for(int rp=0; rp<NRPotsMAX; rp++)
339  RPactivity[arm][rp] = 0;
340  for(int ind=0; ind<2*3*NRPotsMAX; ind++)
341  for(int p=0; p<NplaneMAX; p++) HitsMultPlane[ind][p] = 0;
342 
343  for(int ind=0; ind<2*3*NRPotsMAX*NplaneMAX; ind++)
344  for(int rp=0; rp<NROCsMAX; rp++) HitsMultROC[ind][rp] = 0;
345 
347  event.getByToken(tokenDigi, pixDigi);
348 
349  hBX->Fill(event.bunchCrossing());
350  hBXshort->Fill(event.bunchCrossing());
351 
352  bool valid = false;
353  valid |= pixDigi.isValid();
354 // valid |= Clus.isValid();
355 
356  if(!valid && verbosity) LogPrint("CTPPSPixelDQMSource") <<"No valid data in Event "<<nEvents;
357 
358 if(pixDigi.isValid())
359  for(const auto &ds_digi : *pixDigi)
360  {
361  int idet = getDet(ds_digi.id);
362  if(idet != DetId::VeryForward) {
363  if(verbosity>1) LogPrint("CTPPSPixelDQMSource") <<"not CTPPS: ds_digi.id"<<ds_digi.id;
364  continue;
365  }
366 // int subdet = getSubdet(ds_digi.id);
367 
368  int plane = getPixPlane(ds_digi.id);
369 
370  CTPPSDetId theId(ds_digi.id);
371  int arm = theId.arm()&0x1;
372  int station = theId.station()&0x3;
373  int rpot = theId.rp()&0x7;
374  RPactivity[arm][rpot] = 1;
375 
376  if(StationStatus[station] && RPstatus[station][rpot]) {
377 
378  hp2HitsOcc[arm][station]->Fill(plane,rpot,(int)ds_digi.data.size());
379  h2HitsMultipl[arm][station]->Fill(prIndex(rpot,plane),ds_digi.data.size());
380  h2PlaneActive[arm][station]->Fill(plane,rpot);
381 
382  int index = getRPindex(arm,station,rpot);
383  HitsMultPlane[index][plane] += ds_digi.data.size();
384  if(RPindexValid[index])
385  hHitsMult[index][plane]->Fill(ds_digi.data.size());
386  int rocHistIndex = getPlaneIndex(arm,station,rpot,plane);
387 
388  for(DetSet<CTPPSPixelDigi>::const_iterator dit = ds_digi.begin();
389  dit != ds_digi.end(); ++dit) {
390  int row = dit->row();
391  int col = dit->column();
392  int adc = dit->adc();
393 
394  if(RPindexValid[index]) {
395  h2xyHits[index][plane]->Fill(col,row);
396  hp2xyADC[index][plane]->Fill(col,row,adc);
397  int colROC, rowROC;
398  int trocId;
399  if(!thePixIndices.transformToROC(col,row, trocId, colROC, rowROC)) {
400  if(trocId>=0 && trocId<NROCsMAX) {
401  h2xyROCHits[rocHistIndex][trocId]->Fill(rowROC,colROC);
402  h2xyROCadc[rocHistIndex][trocId]->Fill(rowROC,colROC,adc);
403  ++HitsMultROC[rocHistIndex][trocId];
404  }
405  }
406  } //end if(RPindexValid[index]) {
407  }
408 
409  if(int(ds_digi.data.size()) > multHits) multHits = ds_digi.data.size();
410  } // end if(StationStatus[station]) {
411  } // end for(const auto &ds_digi : *pixDigi)
412 
413  for(int arm=0; arm<2; arm++) for(int stn=0; stn<NStationMAX; stn++)
414  for(int rp=0; rp<NRPotsMAX; rp++) {
415  int index = getRPindex(arm,stn,rp);
416  if(RPindexValid[index]==0) continue;
417  if(RPactivity[arm][rp]==0) continue;
418 
419  int np = 0;
420  for(int p=0; p<NplaneMAX; p++) if(HitsMultPlane[index][p]>0) np++;
422  if(np>5) hRPotActivBX[index]->Fill(event.bunchCrossing());
423 
424  int rocf[NplaneMAX];
425  for(int r=0; r<NROCsMAX; r++) rocf[r]=0;
426  for(int p=0; p<NplaneMAX; p++) {
427  int indp = getPlaneIndex(arm,stn,rp,p);
428  for(int r=0; r<NROCsMAX; r++) if(HitsMultROC[indp][r] > 0) ++rocf[r];
429  for(int r=0; r<NROCsMAX; r++) h2HitsMultROC[index]->Fill(p,r,HitsMultROC[indp][r]);
430  }
431  int max = 0;
432  for(int r=0; r<NROCsMAX; r++) if(max < rocf[r])
433  { max = rocf[r]; }
434 
435  for(int r=0; r<NROCsMAX; r++) hRPotActivROCs[index]->Fill(r,rocf[r]);
436  for(int r=0; r<NROCsMAX; r++) if(rocf[r] == max)
437  hRPotActivROCsMax[index]->Fill(r,max);
438 
439  if(max > 4) hRPotActivBXroc[index]->Fill(event.bunchCrossing());
440  }
441 
442  if((nEvents % 100)) return;
443  if(verbosity) LogPrint("CTPPSPixelDQMSource")<<"analyze event "<<nEvents;
444 }
int adc(sample_type sample)
get the ADC sample (12 bits)
MonitorElement * hHitsMult[RPotsTotalNumber][NplaneMAX]
int HitsMultPlane[RPotsTotalNumber][NplaneMAX]
MonitorElement * hp2xyADC[RPotsTotalNumber][NplaneMAX]
edm::EDGetTokenT< edm::DetSetVector< CTPPSPixelDigi > > tokenDigi
MonitorElement * hp2HitsOcc[NArms][NStationMAX]
MonitorElement * h2HitsMultROC[RPotsTotalNumber]
MonitorElement * hRPotActivROCsMax[RPotsTotalNumber]
CTPPSPixelIndices thePixIndices
void Fill(long long x)
int prIndex(int rp, int plane)
int RPindexValid[RPotsTotalNumber]
int RPstatus[NStationMAX][NRPotsMAX]
int np
Definition: AMPTWrapper.h:33
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
MonitorElement * hRPotActivBX[RPotsTotalNumber]
MonitorElement * h2xyROCadc[RPotsTotalNumber *NplaneMAX][NROCsMAX]
bool isValid() const
Definition: HandleBase.h:74
int getRPindex(int arm, int station, int rp)
MonitorElement * hRPotActivBXroc[RPotsTotalNumber]
MonitorElement * h2PlaneActive[NArms][NStationMAX]
iterator begin()
Definition: DetSet.h:59
MonitorElement * h2xyROCHits[RPotsTotalNumber *NplaneMAX][NROCsMAX]
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
MonitorElement * hRPotActivROCs[RPotsTotalNumber]
col
Definition: cuy.py:1008
int StationStatus[NStationMAX]
int HitsMultROC[RPotsTotalNumber *NplaneMAX][NROCsMAX]
int getPlaneIndex(int arm, int station, int rp, int plane)
MonitorElement * h2xyHits[RPotsTotalNumber][NplaneMAX]
MonitorElement * hRPotActivPlanes[RPotsTotalNumber]
MonitorElement * hBXshort
MonitorElement * h2HitsMultipl[NArms][NStationMAX]
Definition: event.py:1
void CTPPSPixelDQMSource::beginLuminosityBlock ( edm::LuminosityBlock const &  lumi,
edm::EventSetup const &  eSetup 
)
protectedvirtual

Reimplemented from edm::stream::EDAnalyzerBase.

Definition at line 328 of file CTPPSPixelDQMSource.cc.

330 {
331 }
void CTPPSPixelDQMSource::bookHistograms ( DQMStore::IBooker ibooker,
edm::Run const &  ,
edm::EventSetup const &   
)
overrideprotectedvirtual

Implements DQMEDAnalyzer.

Definition at line 176 of file CTPPSPixelDQMSource.cc.

References CTPPSDetId::armName(), DQMStore::IBooker::book1D(), DQMStore::IBooker::book1DD(), DQMStore::IBooker::book2D(), DQMStore::IBooker::book2DD(), DQMStore::IBooker::bookProfile2D(), DQMStore::IBooker::cd(), CluSizeMAX, ClusMultMAX, MillePedeFileConverter_cfg::e, getPlaneIndex(), CTPPSDetId::getRPId(), getRPindex(), CTPPSDetId::getStationId(), MonitorElement::getTH2D(), MonitorElement::getTH2F(), MonitorElement::getTProfile2D(), h2CluSize, h2ClusMultipl, h2HitsMultipl, h2HitsMultROC, h2PlaneActive, h2xyHits, h2xyROCadc, h2xyROCHits, hBX, hBXshort, hHitsMult, hitMultMAX, hp2HitsOcc, hp2xyADC, hRPotActivBX, hRPotActivBXroc, hRPotActivPlanes, hRPotActivROCs, hRPotActivROCsMax, diffTreeTool::index, pileupCalc::nbins, CTPPSDetId::nFull, CTPPSDetId::nPath, NplaneMAX, NROCsMAX, CTPPSDetId::nShort, NStationMAX, AlCaHLTBitMon_ParallelJobs::p, pixRowMAX, ROCSizeInX, ROCSizeInY, RPindexValid, RPn_first, RPn_last, RPstatus, alignCSCRings::s, sd, CTPPSDetId::sdTrackingPixel, DQMStore::IBooker::setCurrentFolder(), CTPPSDetId::setRP(), CTPPSDetId::setStation(), StationStatus, AlCaHLTBitMon_QueryRunRegistry::string, and TrackerOfflineValidation_Dqm_cff::xmax.

178 {
179  ibooker.cd();
180  ibooker.setCurrentFolder("CTPPS/TrackingPixel");
181  char s[50];
182  hBX = ibooker.book1D("events per BX", "ctpps_pixel;Event.BX", 4002, -1.5, 4000. +0.5);
183  hBXshort = ibooker.book1D("events per BX(short)", "ctpps_pixel;Event.BX", 102, -1.5, 100. + 0.5);
184 
185  for(int arm=0; arm<2; arm++) {
187  string sd, armTitle;
188  ID.armName(sd, CTPPSDetId::nPath);
189  ID.armName(armTitle, CTPPSDetId::nFull);
190 
191  ibooker.setCurrentFolder(sd);
192 
193  for(int stn=2; stn<NStationMAX; stn++) {
194  if(StationStatus[stn]==0) continue;
195  ID.setStation(stn);
196  string stnd, stnTitle;
197 
198  CTPPSDetId(ID.getStationId()).stationName(stnd, CTPPSDetId::nPath);
199  CTPPSDetId(ID.getStationId()).stationName(stnTitle, CTPPSDetId::nFull);
200 
201  ibooker.setCurrentFolder(stnd);
202 
203  string st = "planes activity";
204  string st2 = ": " + stnTitle;
205 
206  int rpnbins = RPn_last-RPn_first;
207 
208  h2PlaneActive[arm][stn] = ibooker.book2DD(st,st+st2+";Plane #",
209  NplaneMAX,0,NplaneMAX, rpnbins, RPn_first,RPn_last);
210  TH2D *h = h2PlaneActive[arm][stn]->getTH2D();
211  h->SetOption("colz");
212  TAxis *yah = h->GetYaxis();
213 
214  st = "hit average multiplicity in planes";
215 
216  hp2HitsOcc[arm][stn]= ibooker.bookProfile2D(st,st+st2+";Plane #",
217  NplaneMAX, 0, NplaneMAX, rpnbins, RPn_first,RPn_last,0,20000);
218  TProfile2D *h2 = hp2HitsOcc[arm][stn]->getTProfile2D();
219  h2->SetOption("textcolz");
220  TAxis *yah2 = h2->GetYaxis();
221 
222  int xmax = NplaneMAX*rpnbins;
223 
224  st = "hit multiplicity in planes";
225  string st3 = ";PlaneIndex(=pixelPot*PlaneMAX + plane)";
226  h2HitsMultipl[arm][stn]= ibooker.book2DD(st,st+st2+st3+";multiplicity",
227  xmax,0,xmax,hitMultMAX,0,hitMultMAX);
228  h2HitsMultipl[arm][stn]->getTH2D()->SetOption("colz");
229 
230  st = "cluster multiplicity in planes";
231  h2ClusMultipl[arm][stn] = ibooker.book2DD(st,st+st2+st3+";multiplicity",
232  xmax,0,xmax, ClusMultMAX,0,ClusMultMAX);
233  h2ClusMultipl[arm][stn]->getTH2D()->SetOption("colz");
234 
235  st = "cluster size in planes";
236  h2CluSize[arm][stn] = ibooker.book2D(st,st+st2+st3+";Cluster size",
237  xmax,0,xmax, CluSizeMAX,0,CluSizeMAX);
238  h2CluSize[arm][stn]->getTH2F()->SetOption("colz");
239 
240 //--------- Hits ---
241  int pixBinW = 4;
242  for(int rp=RPn_first; rp<RPn_last; rp++) { // only installed pixel pots
243  ID.setRP(rp);
244  string rpd, rpTitle;
245  CTPPSDetId(ID.getRPId()).rpName(rpTitle, CTPPSDetId::nShort);
246  yah->SetBinLabel(rp - RPn_first +1, rpTitle.c_str()); // h
247  yah2->SetBinLabel(rp - RPn_first +1, rpTitle.c_str()); //h2
248 
249  if(RPstatus[stn][rp]==0) continue;
250  int indexP = getRPindex(arm,stn,rp);
251  RPindexValid[indexP] = 1;
252 
253  CTPPSDetId(ID.getRPId()).rpName(rpTitle, CTPPSDetId::nFull);
254  CTPPSDetId(ID.getRPId()).rpName(rpd, CTPPSDetId::nPath);
255 
256  ibooker.setCurrentFolder(rpd);
257 
258  hRPotActivPlanes[indexP] =
259  ibooker.book1D("number of fired planes per event", rpTitle+";nPlanes",
260  NplaneMAX, -0.5, NplaneMAX+0.5);
261  hRPotActivBX[indexP] =
262  ibooker.book1D("5 fired planes per BX", rpTitle+";Event.BX", 4002, -1.5, 4000.+0.5);
263  hRPotActivBXroc[indexP] =
264  ibooker.book1D("4 fired ROCs per BX", rpTitle+";Event.BX", 4002, -1.5, 4000.+0.5);
265 
266  h2HitsMultROC[indexP] = ibooker.bookProfile2D("ROCs hits multiplicity per event",
267  rpTitle+";plane # ;ROC #", NplaneMAX,-0.5,NplaneMAX-0.5, NROCsMAX,-0.5,NROCsMAX-0.5, 100,0,1.e3);
268 
269  h2HitsMultROC[indexP]->getTProfile2D()->SetOption("colztext");
270  h2HitsMultROC[indexP]->getTProfile2D()->SetMinimum(1.e-10);
271 
272  hRPotActivROCs[indexP] = ibooker.book2D("number of fired aligned_ROCs per event",
273  rpTitle+";ROC ID;number of fired ROCs", NROCsMAX,-0.5,NROCsMAX-0.5, 7,-0.5,6.5);
274  hRPotActivROCs[indexP]->getTH2F()->SetOption("colz");
275 
276  hRPotActivROCsMax[indexP]= ibooker.book2D("max number of fired aligned_ROCs per event",
277  rpTitle+";ROC ID;number of fired ROCs", NROCsMAX,-0.5,NROCsMAX-0.5, 7,-0.5,6.5);
278  hRPotActivROCsMax[indexP]->getTH2F()->SetOption("colz");
279 
280  int nbins = pixRowMAX/pixBinW;
281 
282  for(int p=0; p<NplaneMAX; p++) {
283  sprintf(s,"plane_%d",p);
284  string pd = rpd+"/"+string(s);
285  ibooker.setCurrentFolder(pd);
286  string st1 = ": "+rpTitle+"_"+string(s);
287  st = "hits position";
288  h2xyHits[indexP][p]=ibooker.book2DD(st,st1+";pix col;pix row",
289  nbins,0,pixRowMAX,nbins,0,pixRowMAX);
290  h2xyHits[indexP][p]->getTH2D()->SetOption("colz");
291 
292  st = "adc average value";
293  hp2xyADC[indexP][p]=ibooker.bookProfile2D(st,st1+";pix col;pix row",
294  nbins,0,pixRowMAX,nbins,0,pixRowMAX,100,0,1.e10,"");
295  hp2xyADC[indexP][p]->getTProfile2D()->SetOption("colz");
296 
297  st = "hits multiplicity";
298  hHitsMult[indexP][p]=ibooker.book1DD(st,st1+";number of hits;N / 1 hit",
300 
301  ibooker.setCurrentFolder(pd + "/ROCs");
302  int index = getPlaneIndex(arm,stn,rp,p);
303 
304  for(int roc=0; roc<6; roc++) {
305  sprintf(s,"ROC_%d",roc);
306  string st2 = st1 + "_" + string(s);
307  ibooker.setCurrentFolder(pd + "/ROCs/" + string(s));
308 
309  h2xyROCHits[index][roc]=ibooker.book2DD("hits",st2+";pix row;pix col",
311  h2xyROCHits[index][roc]->getTH2D()->SetOption("colz");
312 
313  string st = "adc average value";
314  h2xyROCadc[index][roc]=ibooker.bookProfile2D(st,st2+";pix row;pix col",
316  h2xyROCadc[index][roc]->getTProfile2D()->SetOption("colz");
317  }
318  } // end of for(int p=0; p<NplaneMAX;..
319 
320  } // end for(int rp=0; rp<NRPotsMAX;...
321  } // end of for(int stn=0; stn<
322  } //end of for(int arm=0; arm<2;...
323 
324  return;
325 }
MonitorElement * hHitsMult[RPotsTotalNumber][NplaneMAX]
MonitorElement * hp2xyADC[RPotsTotalNumber][NplaneMAX]
MonitorElement * h2CluSize[NArms][NStationMAX]
TProfile2D * getTProfile2D(void) const
MonitorElement * hp2HitsOcc[NArms][NStationMAX]
void cd(void)
Definition: DQMStore.cc:269
MonitorElement * h2HitsMultROC[RPotsTotalNumber]
uint32_t ID
Definition: Definitions.h:26
MonitorElement * hRPotActivROCsMax[RPotsTotalNumber]
TH2D * getTH2D(void) const
int RPindexValid[RPotsTotalNumber]
int RPstatus[NStationMAX][NRPotsMAX]
MonitorElement * h2ClusMultipl[NArms][NStationMAX]
MonitorElement * bookProfile2D(Args &&...args)
Definition: DQMStore.h:163
MonitorElement * hRPotActivBX[RPotsTotalNumber]
MonitorElement * h2xyROCadc[RPotsTotalNumber *NplaneMAX][NROCsMAX]
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:115
int getRPindex(int arm, int station, int rp)
MonitorElement * hRPotActivBXroc[RPotsTotalNumber]
MonitorElement * h2PlaneActive[NArms][NStationMAX]
MonitorElement * h2xyROCHits[RPotsTotalNumber *NplaneMAX][NROCsMAX]
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:277
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:133
double sd
Base class for CTPPS detector IDs.
Definition: CTPPSDetId.h:32
MonitorElement * hRPotActivROCs[RPotsTotalNumber]
MonitorElement * book2DD(Args &&...args)
Definition: DQMStore.h:145
int StationStatus[NStationMAX]
TH2F * getTH2F(void) const
int getPlaneIndex(int arm, int station, int rp, int plane)
MonitorElement * h2xyHits[RPotsTotalNumber][NplaneMAX]
MonitorElement * hRPotActivPlanes[RPotsTotalNumber]
MonitorElement * book1DD(Args &&...args)
Definition: DQMStore.h:127
MonitorElement * hBXshort
MonitorElement * h2HitsMultipl[NArms][NStationMAX]
void CTPPSPixelDQMSource::dqmBeginRun ( edm::Run const &  run,
edm::EventSetup const &   
)
overrideprotectedvirtual

Reimplemented from DQMEDAnalyzer.

Definition at line 149 of file CTPPSPixelDQMSource.cc.

References cluSizeMaxData, CTPPSPixelIndices::getDefaultColDetSize(), CTPPSPixelIndices::getDefaultRowDetSize(), multClus, multHits, nEvents, NRPotsMAX, pixColMAX, pixRowMAX, ROCSizeInX, ROCSizeInY, RPindexValid, RPstatus, rpStatusWord, StationStatus, thePixIndices, and verbosity.

150 {
151  if(verbosity) LogPrint("CTPPSPixelDQMSource") <<"RPstatusWord= "<<rpStatusWord;
152  nEvents = 0;
153 
156  ROCSizeInX = pixRowMAX/2; // ROC row size in pixels = 80
157  ROCSizeInY = pixColMAX/3;
158 
159  unsigned int rpSts = rpStatusWord<<1;
160  for(int stn=0; stn<3; stn++) {
161  int stns = 0;
162  for(int rp=0; rp<NRPotsMAX; rp++) {
163  rpSts = (rpSts >> 1); RPstatus[stn][rp] = rpSts&1;
164  if(RPstatus[stn][rp] > 0) stns = 1;
165  }
166  StationStatus[stn]=stns;
167  }
168 
169  for(int ind=0; ind<2*3*NRPotsMAX; ind++) RPindexValid[ind] = 0;
170 
172 }
int getDefaultRowDetSize() const
CTPPSPixelIndices thePixIndices
int RPindexValid[RPotsTotalNumber]
int RPstatus[NStationMAX][NRPotsMAX]
int getDefaultColDetSize() const
int StationStatus[NStationMAX]
void CTPPSPixelDQMSource::endLuminosityBlock ( edm::LuminosityBlock const &  lumi,
edm::EventSetup const &  eSetup 
)
protectedvirtual

Reimplemented from edm::stream::EDAnalyzerBase.

Definition at line 447 of file CTPPSPixelDQMSource.cc.

448 {
449 }
void CTPPSPixelDQMSource::endRun ( edm::Run const &  run,
edm::EventSetup const &  eSetup 
)
protectedvirtual

Reimplemented from edm::stream::EDAnalyzerBase.

Definition at line 452 of file CTPPSPixelDQMSource.cc.

References cluSizeMaxData, DEFINE_FWK_MODULE, multClus, multHits, nEvents, edm::RunBase::run(), and verbosity.

453 {
454  if(!verbosity) return;
455  LogPrint("CTPPSPixelDQMSource")
456  <<"end of Run "<<run.run()<<": "<<nEvents<<" events\n"
457  <<"mult Hits/Clus: "<<multHits<<" / "<<multClus
458  <<" cluSizeMaxData= "<<cluSizeMaxData;
459 }
int CTPPSPixelDQMSource::getDet ( int  id)
inlineprivate

Definition at line 115 of file CTPPSPixelDQMSource.cc.

References DetId::kDetOffset.

Referenced by analyze().

116  { return (id>>DetId::kDetOffset)&0xF; }
static const int kDetOffset
Definition: DetId.h:20
int CTPPSPixelDQMSource::getPixPlane ( int  id)
inlineprivate

Definition at line 117 of file CTPPSPixelDQMSource.cc.

Referenced by analyze().

118  { return ((id>>16)&0x7); }
int CTPPSPixelDQMSource::getPlaneIndex ( int  arm,
int  station,
int  rp,
int  plane 
)
inlineprivate

Definition at line 106 of file CTPPSPixelDQMSource.cc.

References getRPindex().

Referenced by analyze(), and bookHistograms().

106  {
107  if(plane<0 || plane>=NplaneMAX) return(IndexNotValid);
108  int rc = getRPindex(arm, station, rp);
109  if(rc == IndexNotValid) return(IndexNotValid);
110  return(rc*NplaneMAX + plane);
111  }
int getRPindex(int arm, int station, int rp)
int CTPPSPixelDQMSource::getRPindex ( int  arm,
int  station,
int  rp 
)
inlineprivate

Definition at line 99 of file CTPPSPixelDQMSource.cc.

References relativeConstraints::station.

Referenced by analyze(), bookHistograms(), and getPlaneIndex().

99  {
100  if(arm<0 || station<0 || rp<0) return(IndexNotValid);
101  if(arm>1 || station>=NStationMAX || rp>=NRPotsMAX) return(IndexNotValid);
102  int rc = (arm*NStationMAX+station)*NRPotsMAX + rp;
103  return(rc);
104  }
int CTPPSPixelDQMSource::prIndex ( int  rp,
int  plane 
)
inlineprivate

Definition at line 113 of file CTPPSPixelDQMSource.cc.

Referenced by analyze().

114  {return((rp - RPn_first)*NplaneMAX + plane);}

Member Data Documentation

const int CTPPSPixelDQMSource::CluSizeMAX = 25
private

Definition at line 59 of file CTPPSPixelDQMSource.cc.

Referenced by bookHistograms().

int CTPPSPixelDQMSource::cluSizeMaxData
private

Definition at line 121 of file CTPPSPixelDQMSource.cc.

Referenced by dqmBeginRun(), and endRun().

const int CTPPSPixelDQMSource::ClusMultMAX = 90
private

Definition at line 58 of file CTPPSPixelDQMSource.cc.

Referenced by bookHistograms().

MonitorElement* CTPPSPixelDQMSource::h2CluSize[NArms][NStationMAX]
private

Definition at line 74 of file CTPPSPixelDQMSource.cc.

Referenced by bookHistograms().

MonitorElement* CTPPSPixelDQMSource::h2ClusMultipl[NArms][NStationMAX]
private

Definition at line 73 of file CTPPSPixelDQMSource.cc.

Referenced by bookHistograms().

MonitorElement* CTPPSPixelDQMSource::h2HitsMultipl[NArms][NStationMAX]
private

Definition at line 71 of file CTPPSPixelDQMSource.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* CTPPSPixelDQMSource::h2HitsMultROC[RPotsTotalNumber]
private

Definition at line 82 of file CTPPSPixelDQMSource.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* CTPPSPixelDQMSource::h2PlaneActive[NArms][NStationMAX]
private

Definition at line 72 of file CTPPSPixelDQMSource.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* CTPPSPixelDQMSource::h2xyHits[RPotsTotalNumber][NplaneMAX]
private

Definition at line 86 of file CTPPSPixelDQMSource.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* CTPPSPixelDQMSource::h2xyROCadc[RPotsTotalNumber *NplaneMAX][NROCsMAX]
private

Definition at line 89 of file CTPPSPixelDQMSource.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* CTPPSPixelDQMSource::h2xyROCHits[RPotsTotalNumber *NplaneMAX][NROCsMAX]
private

Definition at line 88 of file CTPPSPixelDQMSource.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* CTPPSPixelDQMSource::hBX
private

Definition at line 68 of file CTPPSPixelDQMSource.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement * CTPPSPixelDQMSource::hBXshort
private

Definition at line 68 of file CTPPSPixelDQMSource.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* CTPPSPixelDQMSource::hHitsMult[RPotsTotalNumber][NplaneMAX]
private

Definition at line 85 of file CTPPSPixelDQMSource.cc.

Referenced by analyze(), and bookHistograms().

const int CTPPSPixelDQMSource::hitMultMAX = 300
private

Definition at line 57 of file CTPPSPixelDQMSource.cc.

Referenced by bookHistograms().

int CTPPSPixelDQMSource::HitsMultPlane[RPotsTotalNumber][NplaneMAX]
private

Definition at line 91 of file CTPPSPixelDQMSource.cc.

Referenced by analyze().

int CTPPSPixelDQMSource::HitsMultROC[RPotsTotalNumber *NplaneMAX][NROCsMAX]
private

Definition at line 90 of file CTPPSPixelDQMSource.cc.

Referenced by analyze().

MonitorElement* CTPPSPixelDQMSource::hp2HitsOcc[NArms][NStationMAX]
private

Definition at line 70 of file CTPPSPixelDQMSource.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* CTPPSPixelDQMSource::hp2xyADC[RPotsTotalNumber][NplaneMAX]
private

Definition at line 87 of file CTPPSPixelDQMSource.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* CTPPSPixelDQMSource::hRPotActivBX[RPotsTotalNumber]
private

Definition at line 80 of file CTPPSPixelDQMSource.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* CTPPSPixelDQMSource::hRPotActivBXroc[RPotsTotalNumber]
private

Definition at line 81 of file CTPPSPixelDQMSource.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* CTPPSPixelDQMSource::hRPotActivPlanes[RPotsTotalNumber]
private

Definition at line 79 of file CTPPSPixelDQMSource.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* CTPPSPixelDQMSource::hRPotActivROCs[RPotsTotalNumber]
private

Definition at line 83 of file CTPPSPixelDQMSource.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* CTPPSPixelDQMSource::hRPotActivROCsMax[RPotsTotalNumber]
private

Definition at line 84 of file CTPPSPixelDQMSource.cc.

Referenced by analyze(), and bookHistograms().

const int CTPPSPixelDQMSource::IndexNotValid = 0
private

Definition at line 97 of file CTPPSPixelDQMSource.cc.

int CTPPSPixelDQMSource::multClus
private

Definition at line 121 of file CTPPSPixelDQMSource.cc.

Referenced by dqmBeginRun(), and endRun().

int CTPPSPixelDQMSource::multHits
private

Definition at line 121 of file CTPPSPixelDQMSource.cc.

Referenced by analyze(), dqmBeginRun(), and endRun().

int CTPPSPixelDQMSource::NArms =2
staticprivate

Definition at line 51 of file CTPPSPixelDQMSource.cc.

long int CTPPSPixelDQMSource::nEvents = 0
private

Definition at line 66 of file CTPPSPixelDQMSource.cc.

Referenced by analyze(), dqmBeginRun(), endRun(), and looper.Looper::loop().

int CTPPSPixelDQMSource::NplaneMAX =6
staticprivate

Definition at line 54 of file CTPPSPixelDQMSource.cc.

Referenced by analyze(), and bookHistograms().

int CTPPSPixelDQMSource::NROCsMAX = 6
staticprivate

Definition at line 55 of file CTPPSPixelDQMSource.cc.

Referenced by analyze(), and bookHistograms().

int CTPPSPixelDQMSource::NRPotsMAX =6
staticprivate

Definition at line 53 of file CTPPSPixelDQMSource.cc.

Referenced by analyze(), and dqmBeginRun().

int CTPPSPixelDQMSource::NStationMAX =3
staticprivate

Definition at line 52 of file CTPPSPixelDQMSource.cc.

Referenced by analyze(), and bookHistograms().

int CTPPSPixelDQMSource::pixColMAX = 156
private

Definition at line 63 of file CTPPSPixelDQMSource.cc.

Referenced by dqmBeginRun().

int CTPPSPixelDQMSource::pixRowMAX = 160
private

Definition at line 62 of file CTPPSPixelDQMSource.cc.

Referenced by bookHistograms(), and dqmBeginRun().

int CTPPSPixelDQMSource::ROCSizeInX = pixRowMAX/2
private

Definition at line 64 of file CTPPSPixelDQMSource.cc.

Referenced by bookHistograms(), and dqmBeginRun().

int CTPPSPixelDQMSource::ROCSizeInY = pixColMAX/3
private

Definition at line 65 of file CTPPSPixelDQMSource.cc.

Referenced by bookHistograms(), and dqmBeginRun().

int CTPPSPixelDQMSource::RPindexValid[RPotsTotalNumber]
private

Definition at line 78 of file CTPPSPixelDQMSource.cc.

Referenced by analyze(), bookHistograms(), and dqmBeginRun().

const int CTPPSPixelDQMSource::RPn_first = 3
private

Definition at line 56 of file CTPPSPixelDQMSource.cc.

Referenced by bookHistograms().

const int CTPPSPixelDQMSource::RPn_last = 4
private

Definition at line 56 of file CTPPSPixelDQMSource.cc.

Referenced by bookHistograms().

int CTPPSPixelDQMSource::RPotsTotalNumber =NArms*NStationMAX*NRPotsMAX
staticprivate

Definition at line 76 of file CTPPSPixelDQMSource.cc.

int CTPPSPixelDQMSource::RPstatus[NStationMAX][NRPotsMAX]
private

Definition at line 95 of file CTPPSPixelDQMSource.cc.

Referenced by analyze(), bookHistograms(), and dqmBeginRun().

unsigned int CTPPSPixelDQMSource::rpStatusWord = 0x8000
private

Definition at line 94 of file CTPPSPixelDQMSource.cc.

Referenced by dqmBeginRun().

int CTPPSPixelDQMSource::StationStatus[NStationMAX]
private

Definition at line 96 of file CTPPSPixelDQMSource.cc.

Referenced by analyze(), bookHistograms(), and dqmBeginRun().

CTPPSPixelIndices CTPPSPixelDQMSource::thePixIndices
private

Definition at line 61 of file CTPPSPixelDQMSource.cc.

Referenced by analyze(), and dqmBeginRun().

edm::EDGetTokenT<edm::DetSetVector<CTPPSPixelDigi> > CTPPSPixelDQMSource::tokenDigi
private

Definition at line 48 of file CTPPSPixelDQMSource.cc.

Referenced by analyze(), and CTPPSPixelDQMSource().

unsigned int CTPPSPixelDQMSource::verbosity
private

Definition at line 46 of file CTPPSPixelDQMSource.cc.

Referenced by analyze(), dqmBeginRun(), and endRun().