35 setConfig(ps,
"DTLocalTriggerEfficiency");
53 vector<string>::const_iterator iTr =
trigSources.begin();
54 vector<string>::const_iterator trEnd =
trigSources.end();
55 vector<string>::const_iterator iHw =
hwSources.begin();
56 vector<string>::const_iterator hwEnd =
hwSources.end();
59 if (
parameters.getUntrackedParameter<
bool>(
"staticBooking",
true)) {
60 for (; iTr != trEnd; ++iTr) {
62 for (; iHw != hwEnd; ++iHw) {
65 for (
int wh = -2; wh <= 2; ++wh) {
66 for (
int sect = 1; sect <= 12; ++sect) {
108 for (vector<string>::const_iterator iHw =
hwSources.begin(); iHw !=
hwSources.end(); ++iHw) {
112 for (
int wh = -2; wh <= 2; ++wh) {
113 for (
int sect = 1; sect <= 12; ++sect) {
116 uint32_t indexCh = chId.
rawId();
118 TH2F* TrackPosvsAngle = getHisto<TH2F>(igetter.
get(
getMEName(
"TrackPosvsAngle",
"Segment", chId)));
119 TH2F* TrackPosvsAngleandTrig =
120 getHisto<TH2F>(igetter.
get(
getMEName(
"TrackPosvsAngleandTrig",
"Segment", chId)));
121 TH2F* TrackPosvsAngleandTrigHHHL =
122 getHisto<TH2F>(igetter.
get(
getMEName(
"TrackPosvsAngleandTrigHHHL",
"Segment", chId)));
124 if (TrackPosvsAngle && TrackPosvsAngleandTrig && TrackPosvsAngleandTrigHHHL &&
125 TrackPosvsAngle->GetEntries() > 1) {
142 std::map<std::string, MonitorElement*>* innerME = &(
secME[sector_id]);
143 TH1D* TrackPos = TrackPosvsAngle->ProjectionY();
144 TH1D* TrackAngle = TrackPosvsAngle->ProjectionX();
145 TH1D* TrackPosandTrig = TrackPosvsAngleandTrig->ProjectionY();
146 TH1D* TrackAngleandTrig = TrackPosvsAngleandTrig->ProjectionX();
147 TH1D* TrackPosandTrigHHHL = TrackPosvsAngleandTrigHHHL->ProjectionY();
148 TH1D* TrackAngleandTrigHHHL = TrackPosvsAngleandTrigHHHL->ProjectionX();
149 float binEff =
float(TrackPosandTrig->GetEntries()) / TrackPos->GetEntries();
150 float binEffHHHL =
float(TrackPosandTrigHHHL->GetEntries()) / TrackPos->GetEntries();
151 float binErr =
sqrt(binEff * (1 - binEff) / TrackPos->GetEntries());
152 float binErrHHHL =
sqrt(binEffHHHL * (1 - binEffHHHL) / TrackPos->GetEntries());
156 globalEff->setBinError(
stat, binErr);
158 innerME = &(
whME[wh]);
159 globalEff = innerME->find(
fullName(
"TrigEffPhi"))->second;
160 globalEff->setBinContent(sect,
stat, binEff);
161 globalEff->setBinError(sect,
stat, binErr);
162 globalEff = innerME->find(
fullName(
"TrigEffHHHLPhi"))->second;
163 globalEff->setBinContent(sect,
stat, binEffHHHL);
164 globalEff->setBinError(sect,
stat, binErrHHHL);
171 TrackAngleandTrigHHHL, TrackAngle, innerME->find(
fullName(
"TrigEffAngleHHHLPhi"))->second);
173 TrackPosvsAngleandTrig, TrackPosvsAngle, innerME->find(
fullName(
"TrigEffPosvsAnglePhi"))->second);
176 innerME->find(
fullName(
"TrigEffPosvsAngleHHHLPhi"))->second);
180 TH2F* TrackThetaPosvsAngle =
181 getHisto<TH2F>(igetter.
get(
getMEName(
"TrackThetaPosvsAngle",
"Segment", chId)));
182 TH2F* TrackThetaPosvsAngleandTrig =
183 getHisto<TH2F>(igetter.
get(
getMEName(
"TrackThetaPosvsAngleandTrig",
"Segment", chId)));
184 TH2F* TrackThetaPosvsAngleandTrigH =
185 getHisto<TH2F>(igetter.
get(
getMEName(
"TrackThetaPosvsAngleandTrigH",
"Segment", chId)));
187 if (TrackThetaPosvsAngle && TrackThetaPosvsAngleandTrig && TrackThetaPosvsAngleandTrigH &&
188 TrackThetaPosvsAngle->GetEntries() > 1) {
205 std::map<std::string, MonitorElement*>* innerME = &(
secME[sector_id]);
206 TH1D* TrackThetaPos = TrackThetaPosvsAngle->ProjectionY();
207 TH1D* TrackThetaAngle = TrackThetaPosvsAngle->ProjectionX();
208 TH1D* TrackThetaPosandTrig = TrackThetaPosvsAngleandTrig->ProjectionY();
209 TH1D* TrackThetaAngleandTrig = TrackThetaPosvsAngleandTrig->ProjectionX();
210 TH1D* TrackThetaPosandTrigH = TrackThetaPosvsAngleandTrigH->ProjectionY();
211 TH1D* TrackThetaAngleandTrigH = TrackThetaPosvsAngleandTrigH->ProjectionX();
212 float binEff =
float(TrackThetaPosandTrig->GetEntries()) / TrackThetaPos->GetEntries();
213 float binErr =
sqrt(binEff * (1 - binEff) / TrackThetaPos->GetEntries());
214 float binEffH =
float(TrackThetaPosandTrigH->GetEntries()) / TrackThetaPos->GetEntries();
215 float binErrH =
sqrt(binEffH * (1 - binEffH) / TrackThetaPos->GetEntries());
219 globalEff->setBinError(
stat, binErr);
221 innerME = &(
whME[wh]);
222 globalEff = innerME->find(
fullName(
"TrigEffTheta"))->second;
223 globalEff->setBinContent(sect,
stat, binEff);
224 globalEff->setBinError(sect,
stat, binErr);
225 globalEff = innerME->find(
fullName(
"TrigEffHTheta"))->second;
226 globalEff->setBinContent(sect,
stat, binEffH);
227 globalEff->setBinError(sect,
stat, binErrH);
232 TrackThetaPosandTrigH, TrackThetaPos, innerME->find(
fullName(
"TrigEffPosHTheta"))->second);
234 TrackThetaAngleandTrig, TrackThetaAngle, innerME->find(
fullName(
"TrigEffAngleTheta"))->second);
236 TrackThetaAngleandTrigH, TrackThetaAngle, innerME->find(
fullName(
"TrigEffAngleHTheta"))->second);
238 TrackThetaPosvsAngle,
239 innerME->find(
fullName(
"TrigEffPosvsAngleTheta"))->second);
241 TrackThetaPosvsAngle,
242 innerME->find(
fullName(
"TrigEffPosvsAngleHTheta"))->second);
277 for (
int binx = 1; binx <= nbinsx; ++binx) {
278 for (
int biny = 1; biny <= nbinsy; ++biny) {
280 float bineff =
efficiency->GetBinContent(binx, biny);
300 sector << chambId.
sector();
311 uint32_t indexChId = chambId.
rawId();
312 if (htype.find(
"TrigEffAnglePhi") == 0) {
314 ibooker.
book1D(
HistoName.c_str(),
"Trigger efficiency vs angle of incidence (Phi)", 16, -40., 40.);
315 }
else if (htype.find(
"TrigEffAngleHHHLPhi") == 0) {
317 ibooker.
book1D(
HistoName.c_str(),
"Trigger efficiency (HH/HL) vs angle of incidence (Phi)", 16, -40., 40.);
318 }
else if (htype.find(
"TrigEffAngleTheta") == 0) {
320 ibooker.
book1D(
HistoName.c_str(),
"Trigger efficiency vs angle of incidence (Theta)", 16, -40., 40.);
321 }
else if (htype.find(
"TrigEffAngleHTheta") == 0) {
323 ibooker.
book1D(
HistoName.c_str(),
"Trigger efficiency (H) vs angle of incidence (Theta)", 16, -40., 40.);
324 }
else if (htype.find(
"TrigEffPosPhi") == 0) {
330 }
else if (htype.find(
"TrigEffPosvsAnglePhi") == 0) {
336 }
else if (htype.find(
"TrigEffPosvsAngleHHHLPhi") == 0) {
341 HistoName.c_str(),
"Trigger efficiency (HH/HL) pos vs angle (Phi)", 16, -40., 40.,
nbins,
min,
max);
342 }
else if (htype.find(
"TrigEffPosHHHLPhi") == 0) {
348 }
else if (htype.find(
"TrigEffPosTheta") == 0) {
354 }
else if (htype.find(
"TrigEffPosHTheta") == 0) {
360 }
else if (htype.find(
"TrigEffPosvsAngleTheta") == 0) {
366 }
else if (htype.find(
"TrigEffPosvsAngleHTheta") == 0) {
371 HistoName.c_str(),
"Trigger efficiency (H) pos vs angle (Theta)", 16, -40., 40.,
nbins,
min,
max);