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))
48 if( pset.
exists(
"OutputFileName") ){
62 const DTTtrig* DTTtrigRefMap = &*tTrig_Ref;
63 LogVerbatim(
metname_) <<
"[DTtTrigDBValidation] reference Ttrig version: " << tTrig_Ref->version();
67 const DTTtrig* DTTtrigMap = &*tTrig;
68 LogVerbatim(
metname_) <<
"[DTtTrigDBValidation] Ttrig to validate version: " << tTrig->version();
71 for(
int wheel=-2; wheel<=2; wheel++){
81 it != DTTtrigRefMap->
end(); ++it) {
83 (*it).first.stationId,
90 float tTrigCorr = tTrigMean + kFactor*tTrigRms;
92 <<
" Ttrig mean (ns): " << tTrigMean
93 <<
" Ttrig rms (ns): " << tTrigRms
94 <<
" Ttrig k-Factor: " << kFactor
95 <<
" Ttrig value (ns): " << tTrigCorr;
98 tTrigRefMap_[slId] = pair<float,float>(tTrigCorr,tTrigRms);
103 it != DTTtrigMap->
end(); ++it) {
105 (*it).first.stationId,
106 (*it).first.sectorId,
112 float tTrigCorr = tTrigMean + kFactor*tTrigRms;
114 <<
" Ttrig mean (ns): " << tTrigMean
115 <<
" Ttrig rms (ns): " << tTrigRms
116 <<
" Ttrig k-Factor: " << kFactor
117 <<
" Ttrig value (ns): " << tTrigCorr;
120 tTrigMap_[slId] = pair<float,float>(tTrigCorr,tTrigRms);
128 float difference =
tTrigMap_[(*it).first].first - (*it).second.first;
131 int wheel = (*it).first.chamberId().wheel();
132 int sector = (*it).first.chamberId().sector();
135 LogTrace(
metname_) <<
"Filling histos for super-layer: " << (*it).first <<
" difference: " << difference;
139 int station = (*it).first.chamberId().station();
140 if(station == 1) entry=0;
141 if(station == 2) entry=3;
142 if(station == 3) entry=6;
143 if(station == 4) entry=9;
145 int slBin = entry + (*it).first.superLayer();
146 if(slBin == 12) slBin=11;
148 tTrigDiffHistos_[make_pair(wheel,sector)]->setBinContent(slBin, difference);
174 LogTrace(
metname_) <<
" Booking histos for Wheel, Sector: " << wheel <<
", " << sector;
177 stringstream str_wheel; str_wheel << wheel;
178 stringstream str_sector; str_sector << sector;
180 string lHistoName =
"_W" + str_wheel.str() +
"_Sec" + str_sector.str();
186 hDifference =
dbe_->
book1D(
"TTrigDifference"+lHistoName,
"difference between the two tTrig values",11,0,11);
188 pair<int,int> mypair(wheel,sector);
208 stringstream wh; wh << wheel;
211 tTrigDiffWheel_[wheel] =
dbe_->
book2D(
"TTrigDifference_W"+wh.str(),
"W"+wh.str()+
": summary of tTrig differences",11,1,12,14,1,15);
228 return (
int) (bin /3.1)+1;
233 if(ret == 0 || bin == 11) ret = 3;
T getParameter(std::string const &) const
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
void endRun(edm::Run const &, edm::EventSetup const &)
void save(const std::string &filename, const std::string &path="", const std::string &pattern="", const std::string &rewrite="", SaveReferenceTag ref=SaveWithReference, int minStatus=dqm::qstatus::STATUS_OK, const std::string &fileupdate="RECREATE")
bool exists(std::string const ¶meterName) const
checks if a parameter exists
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_
std::pair< std::string, MonitorElement * > entry
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 beginRun(edm::Run const &, edm::EventSetup const &)
Operations.
void bookHistos(int, int)
bool outputMEsInRootFile_
const_iterator begin() const
std::string outputFileName_
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
const_iterator end() const
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")
void setCurrentFolder(const std::string &fullpath)