124 for (vector<string>::const_iterator iHw =
hwSources.begin(); iHw !=
hwSources.end(); ++iHw){
126 vector<const DTChamber*>::const_iterator chIt =
muonGeom->
chambers().begin();
127 vector<const DTChamber*>::const_iterator chEnd =
muonGeom->
chambers().end();
128 for (; chIt != chEnd; ++chIt) {
130 int wh = chId.
wheel();
131 int sect = chId.sector();
132 int stat = chId.station();
138 TH2F * TrackPhitkvsPhitrig = getHisto<TH2F>(igetter.
get(
getMEName(
"PhitkvsPhitrig",
"Segment", chId)));
140 if (TrackPhitkvsPhitrig && TrackPhitkvsPhitrig->GetEntries()>10) {
150 TProfile* PhitkvsPhitrigProf = TrackPhitkvsPhitrig->ProfileX();
155 TF1 ffPhi(
"mypol1",
"pol1");
156 PhitkvsPhitrigProf->Fit(&ffPhi,
"CQO");
157 phiInt = ffPhi.GetParameter(0);
158 phiSlope = ffPhi.GetParameter(1);
159 phiCorr = TrackPhitkvsPhitrig->GetCorrelationFactor();
162 <<
" Sector " << sect <<
" Station " <<
stat;
165 std::map<std::string,MonitorElement*> &innerME =
whME[wh];
173 TH2F * TrackPhibtkvsPhibtrig = getHisto<TH2F>(igetter.
get(
getMEName(
"PhibtkvsPhibtrig",
"Segment", chId)));
175 if (stat != 3 && TrackPhibtkvsPhibtrig && TrackPhibtkvsPhibtrig->GetEntries()>10) {
184 TProfile* PhibtkvsPhibtrigProf = TrackPhibtkvsPhibtrig->ProfileX();
186 double phibSlope = 0;
189 TF1 ffPhib(
"ffPhib",
"pol1");
190 PhibtkvsPhibtrigProf->Fit(&ffPhib,
"CQO");
191 phibInt = ffPhib.GetParameter(0);
192 phibSlope = ffPhib.GetParameter(1);
193 phibCorr = TrackPhibtkvsPhibtrig->GetCorrelationFactor();
196 <<
" Sector " << sect <<
" Station " <<
stat;
199 std::map<std::string,MonitorElement*> &innerME =
whME[wh];
210 TH1F * PhiResidual = getHisto<TH1F>(igetter.
get(
getMEName(
"PhiResidual",
"Segment", chId)));
213 if (PhiResidual && PhiResidual->GetEffectiveEntries()>10) {
221 double peak = PhiResidual->GetBinCenter(PhiResidual->GetMaximumBin());
225 TF1 ffPhi(
"ffPhi",
"gaus");
226 PhiResidual->Fit(&ffPhi,
"CQO",
"",peak-5,peak+5);
227 phiMean = ffPhi.GetParameter(1);
228 phiRMS = ffPhi.GetParameter(2);
231 <<
" Sector " << sect <<
" Station " <<
stat;
234 std::map<std::string,MonitorElement*> &innerME =
whME[wh];
244 TH1F * PhibResidual = getHisto<TH1F>(igetter.
get(
getMEName(
"PhibResidual",
"Segment", chId)));
245 int phibSummary = stat==3 ? 0 : 1;
247 if (stat != 3 && PhibResidual && PhibResidual->GetEffectiveEntries()>10) {
255 double peak = PhibResidual->GetBinCenter(PhibResidual->GetMaximumBin());
259 TF1 ffPhib(
"ffPhib",
"gaus");
260 PhibResidual->Fit(&ffPhib,
"CQO",
"",peak-5,peak+5);
261 phibMean = ffPhib.GetParameter(1);
262 phibRMS = ffPhib.GetParameter(2);
265 <<
" Sector " << sect <<
" Station " <<
stat;
268 std::map<std::string,MonitorElement*> &innerME =
whME[wh];
284 for (vector<string>::const_iterator iHw =
hwSources.begin(); iHw !=
hwSources.end(); ++iHw){
286 for (
int wh=-2; wh<=2; ++wh){
287 std::map<std::string,MonitorElement*> *innerME = &(
whME[wh]);
289 TH2F* phiWhSummary = getHisto<TH2F>(innerME->find(
fullName(
"PhiLutSummary"))->second);
290 TH2F* phibWhSummary = getHisto<TH2F>(innerME->find(
fullName(
"PhibLutSummary"))->second);
291 for (
int sect=1; sect<=12; ++sect){
296 for (
int stat=1; stat<=4; ++
stat){
297 switch (static_cast<int>(phiWhSummary->GetBinContent(sect,stat))) {
304 switch (static_cast<int>(phibWhSummary->GetBinContent(sect,stat))) {
312 if (phiNoData == 4) phiErr = 5;
313 if (phibNoData == 3) phibErr = 5;
std::vector< std::string > trigSources
const std::vector< const DTChamber * > & chambers() const
Return a vector of all Chamber.
std::map< int, std::map< std::string, MonitorElement * > > whME
MonitorElement * get(const std::string &path)
int performLutTest(double mean, double RMS, double thresholdMean, double thresholdRMS)
Perform Lut Test logical operations.
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
edm::ESHandle< DTGeometry > muonGeom
void fillWhPlot(MonitorElement *plot, int sect, int stat, float value, bool lessIsBest=true)
Fill summary plots managing double MB4 chambers.
U second(std::pair< T, U > const &p)
const int wheelArrayShift
std::string category()
Get message logger name.
void Bookings(DQMStore::IBooker &, DQMStore::IGetter &)
std::string getMEName(std::string histoTag, std::string subfolder, const DTChamberId &chambid)
Get the ME name (by chamber)
std::map< std::string, MonitorElement * > cmsME
std::vector< std::string > hwSources
int wheel() const
Return the wheel number.
void bookWheelHistos(DQMStore::IBooker &, int wheel, std::string hTag, std::string folder="")
Book the new MEs (for each wheel)
std::string fullName(std::string htype)
Create fullname from histo partial name.