108 for (vector<string>::const_iterator iHw =
hwSources.begin(); iHw !=
hwSources.end(); ++iHw) {
110 vector<const DTChamber*>::const_iterator chIt =
muonGeom->
chambers().begin();
111 vector<const DTChamber*>::const_iterator chEnd =
muonGeom->
chambers().end();
112 for (; chIt != chEnd; ++chIt) {
114 int wh = chId.
wheel();
115 int sect = chId.sector();
116 int stat = chId.station();
121 TH2F* TrackPhitkvsPhitrig = getHisto<TH2F>(igetter.get(
getMEName(
"PhitkvsPhitrig",
"Segment", chId)));
123 if (TrackPhitkvsPhitrig && TrackPhitkvsPhitrig->GetEntries() > 10) {
131 TProfile* PhitkvsPhitrigProf = TrackPhitkvsPhitrig->ProfileX();
136 TF1 ffPhi(
"mypol1",
"pol1");
137 PhitkvsPhitrigProf->Fit(&ffPhi,
"CQO");
138 phiInt = ffPhi.GetParameter(0);
139 phiSlope = ffPhi.GetParameter(1);
140 phiCorr = TrackPhitkvsPhitrig->GetCorrelationFactor();
143 <<
" Sector " << sect <<
" Station " <<
stat;
146 std::map<std::string, MonitorElement*>& innerME =
whME[wh];
153 TH2F* TrackPhibtkvsPhibtrig = getHisto<TH2F>(igetter.get(
getMEName(
"PhibtkvsPhibtrig",
"Segment", chId)));
155 if (stat != 3 && TrackPhibtkvsPhibtrig &&
156 TrackPhibtkvsPhibtrig->GetEntries() > 10) {
165 TProfile* PhibtkvsPhibtrigProf = TrackPhibtkvsPhibtrig->ProfileX();
167 double phibSlope = 0;
170 TF1 ffPhib(
"ffPhib",
"pol1");
171 PhibtkvsPhibtrigProf->Fit(&ffPhib,
"CQO");
172 phibInt = ffPhib.GetParameter(0);
173 phibSlope = ffPhib.GetParameter(1);
174 phibCorr = TrackPhibtkvsPhibtrig->GetCorrelationFactor();
177 <<
" Sector " << sect <<
" Station " <<
stat;
180 std::map<std::string, MonitorElement*>& innerME =
whME[wh];
189 TH1F* PhiResidual = getHisto<TH1F>(igetter.get(
getMEName(
"PhiResidual",
"Segment", chId)));
192 if (PhiResidual && PhiResidual->GetEffectiveEntries() > 10) {
199 double peak = PhiResidual->GetBinCenter(PhiResidual->GetMaximumBin());
203 TF1 ffPhi(
"ffPhi",
"gaus");
204 PhiResidual->Fit(&ffPhi,
"CQO",
"", peak - 5, peak + 5);
205 phiMean = ffPhi.GetParameter(1);
206 phiRMS = ffPhi.GetParameter(2);
209 <<
" Sector " << sect <<
" Station " <<
stat;
212 std::map<std::string, MonitorElement*>& innerME =
whME[wh];
221 TH1F* PhibResidual = getHisto<TH1F>(igetter.get(
getMEName(
"PhibResidual",
"Segment", chId)));
222 int phibSummary = stat == 3 ? 0 : 1;
224 if (stat != 3 && PhibResidual &&
225 PhibResidual->GetEffectiveEntries() > 10) {
233 double peak = PhibResidual->GetBinCenter(PhibResidual->GetMaximumBin());
237 TF1 ffPhib(
"ffPhib",
"gaus");
238 PhibResidual->Fit(&ffPhib,
"CQO",
"", peak - 5, peak + 5);
239 phibMean = ffPhib.GetParameter(1);
240 phibRMS = ffPhib.GetParameter(2);
243 <<
" Sector " << sect <<
" Station " <<
stat;
246 std::map<std::string, MonitorElement*>& innerME =
whME[wh];
260 for (vector<string>::const_iterator iHw =
hwSources.begin(); iHw !=
hwSources.end(); ++iHw) {
262 for (
int wh = -2; wh <= 2; ++wh) {
263 std::map<std::string, MonitorElement*>* innerME = &(
whME[wh]);
265 TH2F* phiWhSummary = getHisto<TH2F>(innerME->find(
fullName(
"PhiLutSummary"))->second);
266 TH2F* phibWhSummary = getHisto<TH2F>(innerME->find(
fullName(
"PhibLutSummary"))->second);
267 for (
int sect = 1; sect <= 12; ++sect) {
272 for (
int stat = 1; stat <= 4; ++
stat) {
273 switch (static_cast<int>(phiWhSummary->GetBinContent(sect, stat))) {
281 switch (static_cast<int>(phibWhSummary->GetBinContent(sect, stat))) {
std::vector< std::string > trigSources
const std::vector< const DTChamber * > & chambers() const
Return a vector of all Chamber.
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::map< int, std::map< std::string, MonitorElement * > > whME
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.