|
|
Go to the documentation of this file.
140 return (arm * 2 + stationBinOrder[stn] + 1);
149 int getPixPlane(
int id) {
return ((
id >> 16) & 0x7); }
163 :
verbosity(ps.getUntrackedParameter<unsigned
int>(
"verbosity", 0)),
164 rpStatusWord(ps.getUntrackedParameter<unsigned
int>(
"RPStatusWord", 0x8008)) {
171 vector<string> disabledPlanePlotsVec =
176 for (
auto s : disabledPlanePlotsVec) {
178 if (
count(
s.begin(),
s.end(),
'_') != 3)
179 throw cms::Exception(
"RPixPlaneCombinatoryTracking") <<
"Invalid string in turnOffPlanePlots: " <<
s;
181 vector<string> armStationRpPlane;
183 while ((
pos =
s.find(
'_')) != string::npos) {
184 armStationRpPlane.push_back(
s.substr(0,
pos));
187 armStationRpPlane.push_back(
s);
189 int arm = stoi(armStationRpPlane.at(0));
190 int station = stoi(armStationRpPlane.at(1));
191 int rp = stoi(armStationRpPlane.at(2));
192 int plane = stoi(armStationRpPlane.at(3));
197 <<
"Shutting off plots for: Arm " << arm <<
" Station " <<
station <<
" Rp " << rp <<
" Plane " << plane;
200 throw cms::Exception(
"RPixPlaneCombinatoryTracking") <<
"Invalid string in turnOffPlanePlots: " <<
s;
230 rpSts = (rpSts >> 1);
238 for (
int ind = 0; ind < 2 * 3 *
NRPotsMAX; ind++)
251 string armTitleShort, stnTitleShort;
253 TAxis *yah1st =
nullptr;
254 TAxis *xaRPact =
nullptr;
255 TAxis *xah1trk =
nullptr;
257 hBX = ibooker.
book1D(
"events per BX",
"ctpps_pixel;Event.BX", 4002, -1.5, 4000. + 0.5);
258 hBXshort = ibooker.
book1D(
"events per BX(short)",
"ctpps_pixel;Event.BX", 102, -1.5, 100. + 0.5);
260 string str1st =
"Pixel planes activity";
264 h1st->SetOption(
"colz");
265 yah1st = h1st->GetYaxis();
267 string str2 =
"Pixel RP active";
275 str2 =
"Pixel Local Tracks";
284 for (
int arm = 0; arm < 2; arm++) {
297 string stnd, stnTitle;
310 string rpBinName = armTitleShort +
"_" + stnTitleShort +
"_" + rpTitle;
313 xah1trk->SetBinLabel(
getRPglobalBin(arm, stn), rpBinName.c_str());
314 xaRPact->SetBinLabel(
getRPglobalBin(arm, stn), rpBinName.c_str());
326 const float x0Maximum = 70.;
327 const float y0Maximum = 15.;
328 string st =
"track intercept point";
329 string st2 =
": " + stnTitle;
331 st, st + st2 +
";x0;y0",
int(x0Maximum) * 2, 0., x0Maximum,
int(y0Maximum) * 4, -y0Maximum, y0Maximum);
334 st =
"number of tracks per event";
336 rpTitle +
";number of tracks",
346 rpTitle +
";nPlanes;Probability",
356 rpTitle +
";LumiSection;Plane#___ROC#",
364 ROCSizeInX *ROCSizeInY,
371 sprintf(
s,
"plane%d_0",
p);
374 sprintf(
s,
" %d_%d",
p,
r);
380 string st3 =
";PlaneIndex(=pixelPot*PlaneMAX + plane)";
382 st =
"hit multiplicity in planes";
387 st =
"cluster size in planes";
389 st + st2 + st3 +
";Cluster size",
398 st =
"number of hits per track";
399 htrackHits[indexP] = ibooker.
bookProfile(st, rpTitle +
";number of hits", 5, 1.5, 6.5, -0.1, 1.1,
"");
403 rpTitle +
";plane # ;ROC #",
411 ROCSizeInX * ROCSizeInY,
418 ibooker.
book1D(
"5 fired planes per BX", rpTitle +
";Event.BX", 4002, -1.5, 4000. + 0.5);
421 ibooker.
book1D(
"4 fired ROCs per BX", rpTitle +
";Event.BX", 4002, -1.5, 4000. + 0.5);
423 hRPotActivBXall[indexP] = ibooker.
book1D(
"hits per BX", rpTitle +
";Event.BX", 4002, -1.5, 4000. + 0.5);
425 int nbins = defaultDetSizeInX / pixBinW;
430 sprintf(
s,
"plane_%d",
p);
431 string pd = rpd +
"/" +
string(
s);
433 string st1 =
": " + rpTitle +
"_" +
string(
s);
435 st =
"adc average value";
437 st, st1 +
";pix col;pix row",
nbins, 0, defaultDetSizeInX,
nbins, 0, defaultDetSizeInX, 0., 512.,
"");
441 st =
"hits position";
443 st1 +
";pix col;pix row",
452 st =
"hits multiplicity";
458 st =
"plane efficiency";
460 st, st1 +
";x0;y0",
mapXbins,
mapXmin,
mapXmax,
mapYbins,
mapYmin,
mapYmax, 0, 1,
"");
476 int lumiId =
event.getLuminosityBlock().id().luminosityBlock();
484 RPactivity[rp] = RPdigiSize[rp] = pixRPTracks[rp] = 0;
512 for (
const auto &ds_tr : *pixTrack) {
513 int idet =
getDet(ds_tr.id);
516 LogPrint(
"CTPPSPixelDQMSource") <<
"not CTPPS: ds_tr.id" << ds_tr.id;
520 int arm = theId.
arm() & 0x1;
522 int rpot = theId.
rp() & 0x7;
526 ++pixRPTracks[rpInd];
536 float x0 = dit->x0();
537 float y0 = dit->y0();
552 std::map<int, int> numberOfPointPerPlaneEff;
553 for (
const auto &ds_frh : fittedHits) {
558 if (frh_it != ds_frh.begin())
560 LogPrint(
"CTPPSPixelDQMSource") <<
"More than one FittedRecHit found in plane " << plane;
561 if (frh_it->isRealHit())
564 numberOfPointPerPlaneEff[
p]++;
570 for (
auto planeAndHitsOnOthers : numberOfPointPerPlaneEff) {
572 <<
"For plane " << planeAndHitsOnOthers.first <<
", " << planeAndHitsOnOthers.second
573 <<
" hits on other planes were found" << endl;
576 for (
const auto &ds_frh : fittedHits) {
582 float frhX0 = frh_it->globalCoordinates().x() + frh_it->xResidual();
583 float frhY0 = frh_it->globalCoordinates().y() + frh_it->yResidual();
584 if (numberOfPointPerPlaneEff[plane] >= 3) {
585 if (frh_it->isRealHit())
602 LogPrint(
"CTPPSPixelDQMSource") <<
"No valid data in Event " <<
nEvents;
605 for (
const auto &ds_digi : *pixDigi) {
606 int idet =
getDet(ds_digi.id);
609 LogPrint(
"CTPPSPixelDQMSource") <<
"not CTPPS: ds_digi.id" << ds_digi.id;
617 int arm = theId.
arm() & 0x1;
619 int rpot = theId.
rp() & 0x7;
621 RPactivity[rpInd] = 1;
632 int nh = ds_digi.data.size();
642 int row = dit->row();
643 int col = dit->column();
644 int adc = dit->adc();
655 if (trocId >= 0 && trocId <
NROCsMAX) {
666 for (
const auto &ds : *pixClus) {
669 LogPrint(
"CTPPSPixelDQMSource") <<
"not CTPPS: cluster.id" << ds.id;
675 int arm = theId.
arm() & 0x1;
677 int rpot = theId.
rp() & 0x7;
682 for (
const auto &
p : ds) {
683 int clusize =
p.size();
692 bool allRPactivity =
false;
694 if (RPactivity[rp] > 0)
695 allRPactivity =
true;
696 for (
int arm = 0; arm < 2; arm++) {
710 int ntr = pixRPTracks[
index];
edm::EDGetTokenT< edm::DetSetVector< CTPPSPixelCluster > > tokenCluster
int getRPInStationBin(int rp)
static constexpr int NRPotsMAX
MonitorElement * hpRPactive
static constexpr float mapYmin
static constexpr int NLocalTracksMAX
static constexpr int RPn_last
static constexpr int mapYbins
int StationStatus[StationIDMAX]
static constexpr int NPlaneBins
static constexpr float mapYmax
static constexpr int ADCMax
MonitorElement * h2trackXY0[RPotsTotalNumber]
void dqmBeginRun(edm::Run const &, edm::EventSetup const &) override
static constexpr int RPotsIDMAX
MonitorElement * bookProfile2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, double lowZ, double highZ, char const *option="s", FUNC onbooking=NOOP())
void analyze(edm::Event const &e, edm::EventSetup const &eSetup) override
static constexpr int hitMultMAX
static constexpr int dimension
Log< level::Warning, true > LogPrint
MonitorElement * hpixLTrack
virtual void setCurrentFolder(std::string const &fullpath)
MonitorElement * hHitsMult[RPotsTotalNumber][NplaneMAX]
int getRPglobalBin(int arm, int stn)
T getUntrackedParameter(std::string const &, T const &) const
MonitorElement * h2AllPlanesActive
static constexpr int mapXbins
static constexpr int NROCsMAX
int getPlaneIndex(int arm, int station, int rp, int plane)
MonitorElement * h2xyHits[RPotsTotalNumber][NplaneMAX]
constexpr int adc(sample_type sample)
get the ADC sample (12 bits)
static constexpr int ClusterSizeMax
bool isPlanePlotsTurnedOff[NArms][NStationMAX][NRPotsMAX][NplaneMAX]
#define DEFINE_FWK_MODULE(type)
virtual TProfile2D * getTProfile2D() const
static constexpr int NRPglobalBins
static constexpr int NStationMAX
int transformToROC(const int col, const int row, int &rocId, int &colROC, int &rowROC) const
MonitorElement * bookProfile(TString const &name, TString const &title, int nchX, double lowX, double highX, int, double lowY, double highY, char const *option="s", FUNC onbooking=NOOP())
edm::EDGetTokenT< edm::DetSetVector< CTPPSPixelLocalTrack > > tokenTrack
MonitorElement * hROCadc[RPotsTotalNumber *NplaneMAX][NROCsMAX]
virtual TProfile * getTProfile() const
MonitorElement * hRPotActivBXall[RPotsTotalNumber]
int HitsMultROC[RPotsTotalNumber *NplaneMAX][NROCsMAX]
MonitorElement * book1DD(TString const &name, TString const &title, int nchX, double lowX, double highX, FUNC onbooking=NOOP())
MonitorElement * hRPotActivBX[RPotsTotalNumber]
int HitsMultPlane[RPotsTotalNumber][NplaneMAX]
MonitorElement * book2DD(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
int RPindexValid[RPotsTotalNumber]
virtual TH2D * getTH2D() const
MonitorElement * hRPotActivPlanes[RPotsTotalNumber]
edm::EDGetTokenT< edm::DetSetVector< CTPPSPixelDigi > > tokenDigi
MonitorElement * h2xyROCHits[RPotsTotalNumber *NplaneMAX][NROCsMAX]
Base class for CTPPS detector IDs.
int getRPindex(int arm, int station, int rp)
static constexpr int RPotsTotalNumber
MonitorElement * htrackMult[RPotsTotalNumber]
static constexpr int NRPotBinsInStation
CTPPSPixelIndices thePixIndices
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
MonitorElement * hp2xyADC[RPotsTotalNumber][NplaneMAX]
MonitorElement * h2HitsMultipl[NArms][NStationMAX]
static constexpr int NArms
MonitorElement * hBXshort
static constexpr int NplaneMAX
static const int kDetOffset
int RPstatus[StationIDMAX][RPotsIDMAX]
int prIndex(int rp, int plane)
static constexpr int RPn_first
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
static constexpr int ClusMultMAX
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
T getParameter(std::string const &) const
MonitorElement * hRPotActivBXroc[RPotsTotalNumber]
~CTPPSPixelDQMSource() override
MonitorElement * h2CluSize[NArms][NStationMAX]
unsigned int rpStatusWord
MonitorElement * h2Efficiency[RPotsTotalNumber][NplaneMAX]
static constexpr int StationIDMAX
MonitorElement * h2HitsMultROC[RPotsTotalNumber]
CTPPSPixelDQMSource(const edm::ParameterSet &ps)
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
MonitorElement * htrackHits[RPotsTotalNumber]
MonitorElement * hp2HitsMultROC_LS[RPotsTotalNumber]
virtual TH2F * getTH2F() const
collection_type::const_iterator const_iterator