59 QWidget* controller =
new QWidget(0);
60 Ui::frmCaloHitLegoController ui;
61 ui.setupUi(controller);
65 controller->setEnabled(
false);
69 m_clockwork->checkBoxNamesMap.insert(ui.chbxEMB0,
"EMB0");
70 m_clockwork->checkBoxNamesMap.insert(ui.chbxEMB1,
"EMB1");
71 m_clockwork->checkBoxNamesMap.insert(ui.chbxEMB2,
"EMB2");
72 m_clockwork->checkBoxNamesMap.insert(ui.chbxEMB3,
"EMB3");
73 m_clockwork->checkBoxNamesMap.insert(ui.chbxEMEC0,
"EMEC0");
74 m_clockwork->checkBoxNamesMap.insert(ui.chbxEMEC1,
"EMEC1");
75 m_clockwork->checkBoxNamesMap.insert(ui.chbxEMEC2,
"EMEC2");
76 m_clockwork->checkBoxNamesMap.insert(ui.chbxEMEC3,
"EMEC3");
77 m_clockwork->checkBoxNamesMap.insert(ui.chbxHEC0,
"HEC0");
78 m_clockwork->checkBoxNamesMap.insert(ui.chbxHEC1,
"HEC1");
79 m_clockwork->checkBoxNamesMap.insert(ui.chbxHEC2,
"HEC2");
80 m_clockwork->checkBoxNamesMap.insert(ui.chbxHEC3,
"HEC3");
83 for(QCheckBox* cb :
m_clockwork->checkBoxNamesMap.keys())
177 QString key =
"AllCalo";
181 double energy = (*i_cell)->energy();
185 bool overThresh=(energy>=
m_clockwork->lowThresholdEnergy) && (energy<=m_clockwork->highThresholdEnergy);
189 double phiMin = cellPtr->getPhiLocalLower();
190 double phiMax = cellPtr->getPhiLocalUpper();
191 double etaMin = cellPtr->getEtaMin();
192 double etaMax = cellPtr->getEtaMax();
194 if (cellPtr->getEndcapIndex()==0) {
195 phiMin =
M_PI-phiMin;
196 phiMax =
M_PI-phiMax;
200 double height = energy*fabs(1.0/cosh((etaMin+etaMax)/2.0))*
m_clockwork->larEnergyScale;
201 SoCube *cube =
new SoCube();
202 SoTranslation *translation =
new SoTranslation();
203 translation->translation.setValue((etaMax+etaMin)/2.0, (phiMax+phiMin)/2.0, height/2.0);
204 cube->width=(fabs(etaMax-etaMin));
205 cube->height=(fabs(phiMax-phiMin));
207 SoSeparator *sep =
new SoSeparator();
208 sep->addChild(translation);
210 m_clockwork->embSwitch[cellPtr->getSamplingIndex()]->addChild(sep);
216 bool overThresh=(energy>=
m_clockwork->lowThresholdEnergy) && (energy<=m_clockwork->highThresholdEnergy);
220 double phiMin = cellPtr->getPhiLocalLower();
221 double phiMax = cellPtr->getPhiLocalUpper();
222 double etaMin = cellPtr->getEtaMin();
223 double etaMax = cellPtr->getEtaMax();
225 if (cellPtr->getEndcapIndex()==0) {
226 phiMin =
M_PI-phiMin;
227 phiMax =
M_PI-phiMax;
231 double height = energy*fabs(1.0/cosh((etaMin+etaMax)/2.0))*
m_clockwork->larEnergyScale;
232 SoCube *cube =
new SoCube();
233 SoTranslation *translation =
new SoTranslation();
234 translation->translation.setValue((etaMax+etaMin)/2.0, (phiMax+phiMin)/2.0, height/2);
235 cube->width=(fabs(etaMax-etaMin));
236 cube->height=(fabs(phiMax-phiMin));
238 SoSeparator *sep =
new SoSeparator();
239 sep->addChild(translation);
241 m_clockwork->emecSwitch[cellPtr->getSamplingIndex()]->addChild(sep);
247 bool overThresh=(energy>=
m_clockwork->lowThresholdEnergy) && (energy<=m_clockwork->highThresholdEnergy);
251 double phiMin = cellPtr->getPhiLocalLower();
252 double phiMax = cellPtr->getPhiLocalUpper();
253 double etaMin = cellPtr->getEtaMinNominal();
254 double etaMax = cellPtr->getEtaMaxNominal();
256 if (cellPtr->getEndcapIndex()==0) {
257 phiMin =
M_PI-phiMin;
258 phiMax =
M_PI-phiMax;
262 double height = energy*fabs(1.0/cosh((etaMin+etaMax)/2.0))*
m_clockwork->larEnergyScale;
263 SoCube *cube =
new SoCube();
264 SoTranslation *translation =
new SoTranslation();
265 translation->translation.setValue((etaMax+etaMin)/2.0, (phiMax+phiMin)/2.0, height/2);
266 cube->width=(fabs(etaMax-etaMin));
267 cube->height=(fabs(phiMax-phiMin));
269 SoSeparator *sep =
new SoSeparator();
270 sep->addChild(translation);
272 m_clockwork->hecSwitch[cellPtr->getSamplingIndex()]->addChild(sep);
280 for (
int i=0;i<3;i++)
282 for (
int i=0;i<4;i++) {
342 if (
state.version()!=0) {
343 message(
"Warning: State data in .vp1 file is in wrong format - ignoring!");
350 QMap<QString,bool> checkboxstate(
state.restore<QMap<QString,bool> >());
351 QMapIterator<QString,QCheckBox*> it(
m_clockwork->checkBoxMap);
352 while (it.hasNext()) {
354 state.widgetHandled(it.value());
355 if (checkboxstate.contains(it.key())) {
356 bool checked = checkboxstate.value(it.key());
357 if (it.value()->isChecked()!=checked)
358 it.value()->setChecked(checked);