ATLAS Offline Software
Public Member Functions | Public Attributes | List of all members
MissingEtHandle::Imp Class Reference
Collaboration diagram for MissingEtHandle::Imp:

Public Member Functions

QString name () const
 
double mpx () const
 
double mpy () const
 
double met () const
 
double phi () const
 
double sumet () const
 
void createShapeFromJetParameters ()
 
void updateConeHeightParameters (SoCone *, SoTranslation *, const double &energy) const
 
void updateConeHeightParameters () const
 

Public Attributes

MissingEtHandletheclass = nullptr
 
const MissingEtCollHandletheCollHandle = nullptr
 
const MissingEtCollectionSettingsButtontheCollSettingsButton = nullptr
 
const xAOD::MissingETm_met = nullptr
 
SoSeparator * sep = nullptr
 
SoGroup * base = nullptr
 
SoCone * cone = nullptr
 
double scale = 10.0
 
double length = 1.0
 
double thickness = 1.0
 
bool shape = true
 
double maxR = 0.0
 

Detailed Description

Definition at line 56 of file MissingEtHandle.cxx.

Member Function Documentation

◆ createShapeFromJetParameters()

void MissingEtHandle::Imp::createShapeFromJetParameters ( )

Definition at line 236 of file MissingEtHandle.cxx.

237 {
238  VP1Msg::messageVerbose("MissingEtHandle::Imp::createShapeFromJetParameters()");
239 
240  //double length = m_met->met() * (200.0 * SYSTEM_OF_UNITS::cm /(100.0 * SYSTEM_OF_UNITS::GeV ));//Fixme: Make scale factor (and thickness) adjustable.
241 
242  // Set length of MET: 200 cm for 100 GeV
243  double length = m_met->met() * (200.0 * SYSTEM_OF_UNITS::cm /(100.0 * SYSTEM_OF_UNITS::GeV ));
244  this->length = length;
245 
246  // Set scale factor for MET length, from user's settings in the GUI
248 
249  // Set thickness for MET line, from user's settings in the GUI
251 
252 
253  sep = new SoSeparator();
254  sep->ref();
255 
256  //Dash line
257  SoGroup * dash = new SoGroup();
258 
259  SoRotationXYZ *r = new SoRotationXYZ();
260  r->axis=SoRotationXYZ::Z;
261  r->angle=-M_PI/2+ m_met->phi();
262  dash->addChild(r);
263 
264  SoTranslation *t= new SoTranslation();
265  t->translation.setValue(0, 0, 0);
266  dash->addChild(t);
267 
268  //Define line width
269  SoDrawStyle *drawStyle = new SoDrawStyle;
270  drawStyle->style.setValue(SoDrawStyle::LINES);
271  drawStyle->lineWidth.setValue(1. * thickness);
272  drawStyle->linePattern.setValue(0xFF00); // 16-bits pattern for dashed line
273  dash->addChild(drawStyle);
274 
275  //Define line connection
276  SoCoordinate3 *coords = new SoCoordinate3;
277  SbVec3f* vert = new SbVec3f[2];
278  vert[0] = SbVec3f(0.0, 0.0, 0.0);
279  vert[1] = SbVec3f(0.0, length * scale, 0.0);
280  coords->point.setValues(0, 2, vert);
281  delete [] vert;
282  dash->addChild(coords);
283 
284  SoLineSet *lineSet = new SoLineSet ;
285  lineSet->numVertices.set1Value(0, 2) ;
286  dash->addChild(lineSet);
287 
288  dash->ref();
289 
290  base = new SoGroup();
291  base->addChild(dash);
292  base->ref();
293 
294 
295  sep->addChild(base); // starts along y-axis // DO NOT MOVE THIS: ITS POSITION IS USED BY "updateConeHeightParameters(SoSeparator* sep,const double& energy)"
296 
297  //return sep;
298 }

◆ met()

double MissingEtHandle::Imp::met ( ) const
inline

Definition at line 94 of file MissingEtHandle.cxx.

94 { return m_met->met(); }

◆ mpx()

double MissingEtHandle::Imp::mpx ( ) const
inline

Definition at line 92 of file MissingEtHandle.cxx.

92 { return m_met->mpx(); }

◆ mpy()

double MissingEtHandle::Imp::mpy ( ) const
inline

Definition at line 93 of file MissingEtHandle.cxx.

93 { return m_met->mpy(); }

◆ name()

QString MissingEtHandle::Imp::name ( ) const
inline

Definition at line 91 of file MissingEtHandle.cxx.

91 { return QString::fromStdString( m_met->name() ); }

◆ phi()

double MissingEtHandle::Imp::phi ( ) const
inline

Definition at line 95 of file MissingEtHandle.cxx.

95 { /*VP1Msg::messageVerbose("phi: " + QString::number(m_met->phi()) );*/ return m_met->phi(); }

◆ sumet()

double MissingEtHandle::Imp::sumet ( ) const
inline

Definition at line 96 of file MissingEtHandle.cxx.

96 { return m_met->sumet(); }

◆ updateConeHeightParameters() [1/2]

void MissingEtHandle::Imp::updateConeHeightParameters ( ) const

Definition at line 334 of file MissingEtHandle.cxx.

334  {
335 
336 
337  if (!sep) {
338  VP1Msg::messageVerbose("sep not defined. Returning.");
339  return;
340  }
341 
342  //NB: The translation is the SIXTH child and the cone is the LAST child.
343  if (sep->getNumChildren()<6) {
344  VP1Msg::messageVerbose("getNumChildren() < 6!!!");
345  return;
346  }
347 
348  // const double energyJet = energyForLengthAndCuts();
349  //
350  // SoNode * sixthChild = sep->getChild(5);
351  // if (sixthChild->getTypeId()!=SoTranslation::getClassTypeId()) {
352  // return;
353  // }
354  // SoNode * lastChild = sep->getChild(sep->getNumChildren()-1);
355  // if (lastChild->getTypeId()!=SoCone::getClassTypeId()) {
356  // return;
357  // }
358  // updateConeHeightParameters(static_cast<SoCone*>(lastChild),static_cast<SoTranslation*>(sixthChild), energyJet);
359 }

◆ updateConeHeightParameters() [2/2]

void MissingEtHandle::Imp::updateConeHeightParameters ( SoCone *  cone,
SoTranslation *  trans,
const double &  energy 
) const

Definition at line 301 of file MissingEtHandle.cxx.

302 {
303  VP1Msg::messageVerbose("MissingEtHandle::Imp::updateConeHeightParameters()");
304 
305  // double h(scale * energy);
306  double h(scale);
307 
308  if (maxR > 0.0001) { // maxR > 0. is not univocally defined, because maxR is a floating point number
309  VP1Msg::messageVerbose("maxR > 0.0001 ==> setting h = min(h,maxR)");
310  h = std::min(h,maxR);
311  }
312 
313  //h = 1500.0; // only for debug
314 
315  cone->height = h;
316  cone->bottomRadius = 50.; //tan(coneR()) * h;
317  trans->translation = SbVec3f(0,-0.5*h,0);
318 
319  //debug
320  SbString strHeight, strRadius;
321  (cone->height).get(strHeight);
322  (cone->bottomRadius).get(strRadius);
323  std::cout << "input - energy: " << energy << " - scale: " << scale << " - maxR: " << maxR << " - h: " << h << " --- updated cone - height: " << strHeight.getString() << " - bottom radius: " << strRadius.getString() << std::endl;
324 
325  // you can also use the 'writeField()' method, direct to std output
326  //SoDebug::writeField(&(cone->height));
327 
328  // QString text = "updated cone - height: " + QString::number(cone->height) + " - bottom radius: " + QString::number(cone->bottomRadius) " - translation: " + trans->translation;
329  // VP1Msg::messageVerbose(text);
330 }

Member Data Documentation

◆ base

SoGroup* MissingEtHandle::Imp::base = nullptr

Definition at line 69 of file MissingEtHandle.cxx.

◆ cone

SoCone* MissingEtHandle::Imp::cone = nullptr

Definition at line 70 of file MissingEtHandle.cxx.

◆ length

double MissingEtHandle::Imp::length = 1.0

Definition at line 80 of file MissingEtHandle.cxx.

◆ m_met

const xAOD::MissingET* MissingEtHandle::Imp::m_met = nullptr

Definition at line 66 of file MissingEtHandle.cxx.

◆ maxR

double MissingEtHandle::Imp::maxR = 0.0

Definition at line 83 of file MissingEtHandle.cxx.

◆ scale

double MissingEtHandle::Imp::scale = 10.0

Definition at line 79 of file MissingEtHandle.cxx.

◆ sep

SoSeparator* MissingEtHandle::Imp::sep = nullptr

Definition at line 68 of file MissingEtHandle.cxx.

◆ shape

bool MissingEtHandle::Imp::shape = true

Definition at line 82 of file MissingEtHandle.cxx.

◆ theclass

MissingEtHandle* MissingEtHandle::Imp::theclass = nullptr

Definition at line 62 of file MissingEtHandle.cxx.

◆ theCollHandle

const MissingEtCollHandle* MissingEtHandle::Imp::theCollHandle = nullptr

Definition at line 63 of file MissingEtHandle.cxx.

◆ theCollSettingsButton

const MissingEtCollectionSettingsButton* MissingEtHandle::Imp::theCollSettingsButton = nullptr

Definition at line 64 of file MissingEtHandle.cxx.

◆ thickness

double MissingEtHandle::Imp::thickness = 1.0

Definition at line 81 of file MissingEtHandle.cxx.


The documentation for this class was generated from the following file:
beamspotman.r
def r
Definition: beamspotman.py:676
MissingEtHandle::Imp::m_met
const xAOD::MissingET * m_met
Definition: MissingEtHandle.cxx:66
GeV
#define GeV
Definition: PhysicsAnalysis/TauID/TauAnalysisTools/Root/HelperFunctions.cxx:17
xAOD::MissingET_v1::sumet
float sumet() const
Returns.
Monitored::Z
@ Z
Definition: HistogramFillerUtils.h:24
xAOD::MissingET_v1::phi
float phi() const
Returns .
M_PI
#define M_PI
Definition: ActiveFraction.h:11
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
MissingEtCollectionSettingsButton::metLength
float metLength() const
Definition: MissingEtCollectionSettingsButton.cxx:248
LINES
bool LINES
Definition: computils.cxx:39
MissingEtHandle::Imp::sep
SoSeparator * sep
Definition: MissingEtHandle.cxx:68
cm
const double cm
Definition: Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/tools/FCAL_ChannelMap.cxx:25
ParticleGun_FastCalo_ChargeFlip_Config.energy
energy
Definition: ParticleGun_FastCalo_ChargeFlip_Config.py:78
extractSporadic.h
list h
Definition: extractSporadic.py:97
xAOD::MissingET_v1::mpx
float mpx() const
Returns .
MissingEtHandle::Imp::maxR
double maxR
Definition: MissingEtHandle.cxx:83
xAOD::MissingET_v1::name
const std::string & name() const
Identifier getters.
MissingEtHandle::Imp::theCollSettingsButton
const MissingEtCollectionSettingsButton * theCollSettingsButton
Definition: MissingEtHandle.cxx:64
min
#define min(a, b)
Definition: cfImp.cxx:40
MissingEtHandle::Imp::thickness
double thickness
Definition: MissingEtHandle.cxx:81
MissingEtHandle::Imp::scale
double scale
Definition: MissingEtHandle.cxx:79
VP1Msg::messageVerbose
static void messageVerbose(const QString &)
Definition: VP1Msg.cxx:84
h
MissingEtHandle::Imp::cone
SoCone * cone
Definition: MissingEtHandle.cxx:70
get
T * get(TKey *tobj)
get a TObject* from a TKey* (why can't a TObject be a TKey?)
Definition: hcg.cxx:127
MissingEtHandle::Imp::base
SoGroup * base
Definition: MissingEtHandle.cxx:69
xAOD::MissingET_v1::mpy
float mpy() const
Returns .
MissingEtCollectionSettingsButton::metThickness
float metThickness() const
Definition: MissingEtCollectionSettingsButton.cxx:253
xAOD::MissingET_v1::met
float met() const
Returns .
MissingEtHandle::Imp::length
double length
Definition: MissingEtHandle.cxx:80