ATLAS Offline Software
Loading...
Searching...
No Matches
IParticleHandle_CaloCluster::Imp Class Reference
Collaboration diagram for IParticleHandle_CaloCluster::Imp:

Public Member Functions

const xAOD::CaloClustercluster () const
SoGenericBoxgenericBox ()
double phi () const
double eta () const
double et () const
double e () const
double energyForLengthAndCuts (const IParticleCollHandle_CaloCluster *coll_handle)
double energyForLengthAndCuts ()
void createShapeFromParameters (const IParticleCollHandle_CaloCluster *coll_handle)
void updateShapePars (const IParticleCollHandle_CaloCluster *coll_handle)

Public Attributes

IParticleHandle_CaloClustertheclass = nullptr
const IParticleCollHandle_CaloClustertheCollHandle = nullptr
const xAOD::CaloClusterm_cluster = nullptr
SoSeparator * sep = nullptr
SoGenericBoxm_genericBox = nullptr
bool considerTransverseEnergies = true

Detailed Description

Definition at line 48 of file IParticleHandle_CaloCluster.cxx.

Member Function Documentation

◆ cluster()

const xAOD::CaloCluster * IParticleHandle_CaloCluster::Imp::cluster ( ) const
inline

Definition at line 63 of file IParticleHandle_CaloCluster.cxx.

63{ return m_cluster; }

◆ createShapeFromParameters()

void IParticleHandle_CaloCluster::Imp::createShapeFromParameters ( const IParticleCollHandle_CaloCluster * coll_handle)

Definition at line 236 of file IParticleHandle_CaloCluster.cxx.

237{
238 VP1Msg::messageVerbose("IParticleHandle_CaloCluster::Imp::createShapeFromParameters()");
239
240 if (!m_genericBox) {
242 m_genericBox = new SoGenericBox();
243 m_genericBox->drawEdgeLines = coll_handle->showOutlines();
244 m_genericBox->forceEdgeLinesInBaseColour = true;
245 m_genericBox->ref();
246 }
247
248 // m_attached = true;
249 updateShapePars(coll_handle);
250 // m_d->sephelper->addNode(m_genericBox);
251
252
253 //std::cout << "Using material: " << coll_handle->material() << std::endl; // ^^ FIXME - should rearrange so we don't need to reset material
254
255 sep->addChild(coll_handle->material());
256 sep->addChild(m_genericBox);
257
258
259
260
261
262
263 // sep = new SoSeparator();
264 // sep->ref();
265
266
267 // cone = new SoCone();
268 // cone->ref();
269
270 // // coneR IS the opening half-angle of the jet, in delta phi (easy) and in
271 // // delta eta (trickier)
272 // // to try to get the jet extent right in eta, find theta corresponding
273 // // to eta+R, eta-R, and take half of the difference:
274 // double thetaMax = 2.*atan(exp(-(eta+inputconeR)));
275 // double thetaMin = 2.*atan(exp(-(eta-inputconeR)));
276 // double deltaTheta = fabs(thetaMax-thetaMin);
277 // double etaScale = deltaTheta/(2.*inputconeR);
278 //
279 // // Translate by half cone height and flip 180 deg so point is at IP:
280 // SoTranslation *translate = new SoTranslation();
281 //
282 // SoRotationXYZ *flip = new SoRotationXYZ();
283 // flip->axis=SoRotationXYZ::Z;
284 // flip->angle=M_PI;
285 //
286 // SoRotationXYZ *ytoz = new SoRotationXYZ();
287 // ytoz->axis=SoRotationXYZ::X;
288 // ytoz->angle=M_PI/2.;
289 //
290 // // Cones should now be along Z-axis,point at IP.
291 // SoRotationXYZ *rotationPhi = new SoRotationXYZ();
292 // rotationPhi->axis=SoRotationXYZ::Z;
293 // rotationPhi->angle = phi+M_PI/2.; // starts from -y-axis in x-y plane
294 // // phi is measured from x-axis, so +M_PI/2
295 //
296 // SoRotationXYZ *rotationEta = new SoRotationXYZ();
297 // double signEta = fabs(eta)/eta;
298 // double theta = 2.*atan(signEta*exp(-fabs(eta)));
299 // if (theta<0.)theta+=M_PI;
300 // rotationEta->axis=SoRotationXYZ::X;
301 // rotationEta->angle=theta;
302 //
303 // //message("Eta: "+QString::number(eta)+" theta: "+QString::number(theta)+" phi: "+QString::number(phi));
304 //
305 // updateConeHeightParameters(cone, translate, energy);
306 //
307 // // play with Scale:
308 // SoScale* myScale = new SoScale();
309 // //message("Eta scaling factor is "+QString::number(etaScale));
310 // // maybe we need to squish along both axes...
311 // myScale->scaleFactor.setValue(etaScale,1.,etaScale);
312 //
313 // // translate to origin vertex rather than (0,0,0)
314 // SoTranslation *transvertex = new SoTranslation();
315 // transvertex->translation = origin;
316 //
317 // sep->addChild(transvertex);
318 // sep->addChild(rotationPhi);
319 // sep->addChild(rotationEta);//theta rotation done around x-axis
320 // sep->addChild(ytoz); // now it's along the z-axis
321 // sep->addChild(flip); // flip so tip at origin
322 // sep->addChild(translate); // back it up so base at origin // DO NOT MOVE THIS: ITS POSITION IS USED BY "updateConeHeightParameters(SoSeparator* sep,const double& energy)"
323 // sep->addChild(myScale); // squeeze jet according to eta
324 // //This is the point in the child sequence where we MAY add a random colour when appropriate.
325 // //Thus: The translation is the SIXTH child and the cone is the LAST child.
326 //
327 // // sep->addChild(collHandle->collSettingsButton().defaultParameterMaterial());
328 //
329 // std::cout<<"About to add material: "<<collHandle->material()<<std::endl;
330 // sep->addChild(collHandle->material());
331 // // ^^ FIXME - should rearrange so we don't need to reset material
332 //
333 // sep->addChild(cone); // starts along y-axis // DO NOT MOVE THIS: ITS POSITION IS USED BY "updateConeHeightParameters(SoSeparator* sep,const double& energy)"
334
335}
void updateShapePars(const IParticleCollHandle_CaloCluster *coll_handle)
static void initClass()
static void messageVerbose(const QString &)
Definition VP1Msg.cxx:84
SoMaterial * material() const

◆ e()

double IParticleHandle_CaloCluster::Imp::e ( ) const
inline

Definition at line 68 of file IParticleHandle_CaloCluster.cxx.

68{ VP1Msg::messageDebug("e()");return m_cluster->e(); }
static void messageDebug(const QString &)
Definition VP1Msg.cxx:39

◆ energyForLengthAndCuts() [1/2]

double IParticleHandle_CaloCluster::Imp::energyForLengthAndCuts ( )
inline

Definition at line 71 of file IParticleHandle_CaloCluster.cxx.

71{ VP1Msg::messageDebug("energyForLengthAndCuts()"); return theclass->isConsiderTransverseEnergies() ? et() : e(); }

◆ energyForLengthAndCuts() [2/2]

double IParticleHandle_CaloCluster::Imp::energyForLengthAndCuts ( const IParticleCollHandle_CaloCluster * coll_handle)
inline

Definition at line 70 of file IParticleHandle_CaloCluster.cxx.

70{ return coll_handle->isConsiderTransverseEnergy() ? et() : e(); } // TODO: is this used at all??

◆ et()

double IParticleHandle_CaloCluster::Imp::et ( ) const
inline

Definition at line 67 of file IParticleHandle_CaloCluster.cxx.

67{ VP1Msg::messageDebug("et()");return m_cluster->et(); }

◆ eta()

double IParticleHandle_CaloCluster::Imp::eta ( ) const
inline

Definition at line 66 of file IParticleHandle_CaloCluster.cxx.

66{ /*VP1Msg::messageVerbose("eta: " + QString::number(m_cluster->eta()) );*/ return m_cluster->eta(); }

◆ genericBox()

SoGenericBox * IParticleHandle_CaloCluster::Imp::genericBox ( )
inline

Definition at line 64 of file IParticleHandle_CaloCluster.cxx.

64{ return m_genericBox; }

◆ phi()

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

Definition at line 65 of file IParticleHandle_CaloCluster.cxx.

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

◆ updateShapePars()

void IParticleHandle_CaloCluster::Imp::updateShapePars ( const IParticleCollHandle_CaloCluster * coll_handle)

Definition at line 213 of file IParticleHandle_CaloCluster.cxx.

214{
215 VP1Msg::messageDebug("IParticleHandle_CaloCluster::Imp::updateShapePars()");
216
217
218 const double dEta = 0.05;//FIXME
219 const double dPhi = 0.05;//FIXME
220 const double theEta = eta();
221 const double thePhi = phi();
222 const double cellDepth = coll_handle->energyToLength( energyForLengthAndCuts(coll_handle) );
224 m_genericBox->setParametersForBarrelEtaPhiCell( theEta-0.5*dEta, theEta+0.5*dEta,thePhi-0.5*dPhi, thePhi+0.5*dPhi,
226 } else {
227 m_genericBox->setParametersForEndCapEtaPhiCell( theEta-0.5*dEta, theEta+0.5*dEta,thePhi-0.5*dPhi, thePhi+0.5*dPhi,
229 }
230}
double energyToLength(const double &energy) const
bool dPhi(const xAOD::TauJet &tau, const xAOD::CaloVertexedTopoCluster &cluster, float &out)
bool dEta(const xAOD::TauJet &tau, const xAOD::CaloVertexedTopoCluster &cluster, float &out)

Member Data Documentation

◆ considerTransverseEnergies

bool IParticleHandle_CaloCluster::Imp::considerTransverseEnergies = true

Definition at line 60 of file IParticleHandle_CaloCluster.cxx.

◆ m_cluster

const xAOD::CaloCluster* IParticleHandle_CaloCluster::Imp::m_cluster = nullptr

Definition at line 54 of file IParticleHandle_CaloCluster.cxx.

◆ m_genericBox

SoGenericBox* IParticleHandle_CaloCluster::Imp::m_genericBox = nullptr

Definition at line 57 of file IParticleHandle_CaloCluster.cxx.

◆ sep

SoSeparator* IParticleHandle_CaloCluster::Imp::sep = nullptr

Definition at line 56 of file IParticleHandle_CaloCluster.cxx.

◆ theclass

IParticleHandle_CaloCluster* IParticleHandle_CaloCluster::Imp::theclass = nullptr

Definition at line 51 of file IParticleHandle_CaloCluster.cxx.

◆ theCollHandle

const IParticleCollHandle_CaloCluster* IParticleHandle_CaloCluster::Imp::theCollHandle = nullptr

Definition at line 52 of file IParticleHandle_CaloCluster.cxx.


The documentation for this class was generated from the following file: