34 : metname_(
"TTrigDBValidation"),
35 labelDBRef_(pset.getParameter<
string>(
"labelDBRef")),
36 labelDB_(pset.getParameter<
string>(
"labelDB")),
37 lowerLimit_(pset.getUntrackedParameter<
int>(
"lowerLimit", 1)),
38 higherLimit_(pset.getUntrackedParameter<
int>(
"higherLimit", 3)) {
50 const DTTtrig *DTTtrigRefMap = &*tTrig_Ref;
55 const DTTtrig *DTTtrigMap = &*tTrig;
69 DTSuperLayerId slId((*it).first.wheelId, (*it).first.stationId, (*it).first.sectorId, (*it).first.slId);
74 float tTrigCorr = tTrigMean + kFactor * tTrigRms;
76 <<
" Ttrig mean (ns): " << tTrigMean <<
" Ttrig rms (ns): " << tTrigRms
77 <<
" Ttrig k-Factor: " << kFactor <<
" Ttrig value (ns): " << tTrigCorr;
80 tTrigRefMap_[slId] = pair<float, float>(tTrigCorr, tTrigRms);
85 DTSuperLayerId slId((*it).first.wheelId, (*it).first.stationId, (*it).first.sectorId, (*it).first.slId);
90 float tTrigCorr = tTrigMean + kFactor * tTrigRms;
92 <<
" Ttrig mean (ns): " << tTrigMean <<
" Ttrig rms (ns): " << tTrigRms
93 <<
" Ttrig k-Factor: " << kFactor <<
" Ttrig value (ns): " << tTrigCorr;
96 tTrigMap_[slId] = pair<float, float>(tTrigCorr, tTrigRms);
105 float difference =
tTrigMap_[(*it).first].first - (*it).second.first;
108 int wheel = (*it).first.chamberId().wheel();
109 int sector = (*it).first.chamberId().sector();
113 LogTrace(
metname_) <<
"Filling histos for super-layer: " << (*it).first <<
" difference: " << difference;
117 int station = (*it).first.chamberId().station();
127 int slBin = entry + (*it).first.superLayer();
131 tTrigDiffHistos_[make_pair(wheel, sector)]->setBinContent(slBin, difference);
144 LogTrace(
metname_) <<
" Booking histos for Wheel, Sector: " << wheel <<
", " << sector;
147 stringstream str_wheel;
149 stringstream str_sector;
150 str_sector << sector;
152 string lHistoName =
"_W" + str_wheel.str() +
"_Sec" + str_sector.str();
154 iBooker.
setCurrentFolder(
"DT/DtCalib/TTrigDBValidation/Wheel" + str_wheel.str());
158 hDifference = iBooker.
book1D(
"TTrigDifference" + lHistoName,
"difference between the two tTrig values", 11, 0, 11);
160 pair<int, int> mypair(wheel, sector);
183 "TTrigDifference_W" + wh.str(),
"W" + wh.str() +
": summary of tTrig differences", 11, 1, 12, 14, 1, 15);
201 if (ret == 0 || bin == 11)
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
Operations.
void analyze(const edm::Event &, const edm::EventSetup &) override
const std::string & version() const
access version
def setup(process, global_tag, zero_tesla=False)
int slFromBin(int bin) const
std::map< std::pair< int, int >, MonitorElement * > tTrigDiffHistos_
std::vector< std::pair< DTTtrigId, DTTtrigData > >::const_iterator const_iterator
Access methods to data.
std::map< DTSuperLayerId, std::pair< float, float > > tTrigRefMap_
void setCurrentFolder(std::string const &fullpath)
edm::ESHandle< DTGeometry > dtGeom_
MonitorElement * book1D(Args &&...args)
Abs< T >::type abs(const T &t)
int stationFromBin(int bin) const
bin
set the eta bin as selection string.
DTtTrigDBValidation(const edm::ParameterSet &pset)
Constructor.
~DTtTrigDBValidation() override
Destructor.
int get(int wheelId, int stationId, int sectorId, int slId, float &tTrig, float &tTrms, float &kFact, DTTimeUnits::type unit) const
get content
MonitorElement * book2D(Args &&...args)
std::map< int, MonitorElement * > tTrigDiffWheel_
void bookHistos(DQMStore::IBooker &, int, int)
std::map< DTSuperLayerId, std::pair< float, float > > tTrigMap_
const_iterator begin() const
const_iterator end() const