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))
54 const DTTtrig* DTTtrigRefMap = &*tTrig_Ref;
55 LogVerbatim(
metname_) <<
"[DTtTrigDBValidation] reference Ttrig version: " << tTrig_Ref->version();
59 const DTTtrig* DTTtrigMap = &*tTrig;
60 LogVerbatim(
metname_) <<
"[DTtTrigDBValidation] Ttrig to validate version: " << tTrig->version();
63 for(
int wheel=-2; wheel<=2; wheel++){
73 it != DTTtrigRefMap->
end(); ++it) {
75 (*it).first.stationId,
82 float tTrigCorr = tTrigMean + kFactor*tTrigRms;
84 <<
" Ttrig mean (ns): " << tTrigMean
85 <<
" Ttrig rms (ns): " << tTrigRms
86 <<
" Ttrig k-Factor: " << kFactor
87 <<
" Ttrig value (ns): " << tTrigCorr;
90 tTrigRefMap_[slId] = pair<float,float>(tTrigCorr,tTrigRms);
95 it != DTTtrigMap->
end(); ++it) {
97 (*it).first.stationId,
104 float tTrigCorr = tTrigMean + kFactor*tTrigRms;
106 <<
" Ttrig mean (ns): " << tTrigMean
107 <<
" Ttrig rms (ns): " << tTrigRms
108 <<
" Ttrig k-Factor: " << kFactor
109 <<
" Ttrig value (ns): " << tTrigCorr;
112 tTrigMap_[slId] = pair<float,float>(tTrigCorr,tTrigRms);
120 float difference =
tTrigMap_[(*it).first].first - (*it).second.first;
123 int wheel = (*it).first.chamberId().wheel();
124 int sector = (*it).first.chamberId().sector();
127 LogTrace(
metname_) <<
"Filling histos for super-layer: " << (*it).first <<
" difference: " << difference;
131 int station = (*it).first.chamberId().station();
132 if(station == 1) entry=0;
133 if(station == 2) entry=3;
134 if(station == 3) entry=6;
135 if(station == 4) entry=9;
137 int slBin = entry + (*it).first.superLayer();
138 if(slBin == 12) slBin=11;
140 tTrigDiffHistos_[make_pair(wheel,sector)]->setBinContent(slBin, difference);
156 LogTrace(
metname_) <<
" Booking histos for Wheel, Sector: " << wheel <<
", " << sector;
159 stringstream str_wheel; str_wheel << wheel;
160 stringstream str_sector; str_sector << sector;
162 string lHistoName =
"_W" + str_wheel.str() +
"_Sec" + str_sector.str();
164 iBooker.
setCurrentFolder(
"DT/DtCalib/TTrigDBValidation/Wheel" + str_wheel.str());
168 hDifference = iBooker.
book1D(
"TTrigDifference"+lHistoName,
"difference between the two tTrig values",11,0,11);
170 pair<int,int> mypair(wheel,sector);
190 stringstream wh; wh << wheel;
193 tTrigDiffWheel_[wheel] = iBooker.
book2D(
"TTrigDifference_W"+wh.str(),
"W"+wh.str()+
": summary of tTrig differences",11,1,12,14,1,15);
210 return (
int) (bin /3.1)+1;
215 if(ret == 0 || bin == 11) ret = 3;
tuple ret
prodAgent to be discontinued
virtual void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
Operations.
virtual void analyze(const edm::Event &, const edm::EventSetup &) override
std::map< int, MonitorElement * > tTrigDiffWheel_
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.
edm::ESHandle< DTGeometry > dtGeom_
MonitorElement * book1D(Args &&...args)
Abs< T >::type abs(const T &t)
int stationFromBin(int bin) const
virtual ~DTtTrigDBValidation()
Destructor.
std::map< DTSuperLayerId, std::pair< float, float > > tTrigRefMap_
DTtTrigDBValidation(const edm::ParameterSet &pset)
Constructor.
std::map< DTSuperLayerId, std::pair< float, float > > tTrigMap_
int get(int wheelId, int stationId, int sectorId, int slId, float &tTrig, float &tTrms, float &kFact, DTTimeUnits::type unit) const
get content
void setCurrentFolder(const std::string &fullpath)
MonitorElement * book2D(Args &&...args)
void bookHistos(DQMStore::IBooker &, int, int)
const_iterator begin() const
const_iterator end() const
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")