Run II Offline Electron/Photon Reconstruction
ElectronObjects Documentation

This page documents the ElectronObjects package. This package includes the container classes for electron/photon offline reconstruction. The modules that handle the reconstruction are included in ElectronMods and the algorithms used by electron/photon reconstruction modules are found in the Electron package. You will (eventually) find useful documentation in the ElectronMods and Electron packages.

The contact person for ElectronObjects is Bob Wagner at Argonne National Laboratory.
Telephone: Argonne --- 630-252-6321 Fermilab --- 630-840-8425(8436)

The main container classes of interest in ElectronObjects are

EmSeed Class Description


size_t etaAddr( void )
returns the eta index of the seed. size_t is defined in <cstddef#gt and is generally an unsigned integer and can be used as such. The eta index is numbered starting from 0 on the West to 51 on the East.

size_t phiAddr( void )
returns the phi index of the seed. size_t is defined in <cstddef> and is generally an unsigned integer and can be used as such. The phi index is numbered 0-23 for CEM and 0-47 for PEM.

double emE( void )
returns the electromagnetic calorimeter energy of the seed tower in GeV.

double emEt( void )
returns the electromagnetic calorimeter transverse energy of the seed tower in GeV. Uses the default Z vertex. This is currently always 0.0.

double emEta( void )
returns the electromagnetic calorimeter pseudorapidity of the seed tower. Uses the default Z vertex. This is currently always 0.0.

double emPhi( void )
returns the electromagnetic calorimeter azimuthal angle in radians of the seed tower.

double hadE( void )
returns the hadronic calorimeter energy of the seed tower in GeV.

double hadEt( void )
returns the hadronic calorimeter transverse energy of the seed tower in GeV. Uses the default Z vertex. This is currently always 0.0.

double hadEta( void )
returns the hadronic calorimeter pseudorapidity of the seed tower. Uses the default Z vertex. This is currently always 0.0.

double hadPhi( void )
returns the hadronic calorimeter azimuthal angle in radians of the seed tower.

bool isValid( EmClusterParam& )
returns true if the EmSeed passes the seed criteria contained in the EmClusterParam object passed as a reference. See below for for a description of seed parameters in EmClusterParam.

double vertexZ( void )
returns the Z coordinate of the primary interaction vertex assigned to the EmSeed (and EmCluster). This is currently always 0.0.

Detector region( void )
returns the a variable of type Detector indicating in which detector the EmSeed is contained. Type Detector is a global enumeration defined in CalorGeometry/CalConstants.hh. You should #include this header in any source code in which you wish to use the region() method. This allows you to use constructions such as
if (mySeed.region() == CEM) { do something }

void setVertexZ( double )
sets the Z coordinate of the primary interaction vertex assigned to the EmSeed (and EmCluster). You cannot use this method on a stored EmSeed. The function is mainly for use by the EmClusterModule.

bool operator ==( EmSeed& ) AND operator !=( EmSeed& )
Equality operator returns true if the EmSeed objects compared have identical data members. Inequality operator is defined as true for equality operator returning false.
At this time the vertex Z coordinates of the two seeds are not compared.


bool operator >,<,>=,<=( EmSeed& )
These comparison operators are defined solely in terms of the EM transverse energy comparison of the two EmSeed objects.

Top of Page

EmCluster Class Description


int nTowers( void )
returns the number of calorimeter towers included in the EmCluster.

const TowerIdList& towerIds( void )
returns an STL container of the TowerId for each tower in the EmCluster. Use towerKey( TowerId ) to obtain eta and/or phi for the tower. TowerId has the eta and phi indices packed into a single word, so don't try to use it as is.

size_t seedEtaAddr( void )
returns the eta index of the seed. size_t is defined in <cstddef> and is generally an unsigned integer and can be used as such. The eta index is numbered starting from 0 on the West to 51 on the East.

size_t seedPhiAddr( void )
returns the phi index of the seed. size_t is defined in <cstddef> and is generally an unsigned integer and can be used as such. The phi index is numbered 0-23 for CEM and 0-47 for PEM.

int side( void )
returns an integer indicating in which end of the detector the EmCluster is located. West = 0, East = 1.

double emEnergy( void )
returns the electromagnetic calorimeter energy of the EmCluster in GeV.

double emEt( void )
returns the electromagnetic calorimeter transverse energy of the EmCluster in GeV. Uses the default Z vertex. This is currently always 0.0.

double emEtaDetector( void )
returns the electromagnetic calorimeter pseudorapidity of the EmCluster determined always using Z vertex = 0.0.

double emEtaEvent( void )
returns the electromagnetic calorimeter pseudorapidity of the EmCluster determined using the primary interaction Z vertex. Currently this is always z = 0.0.

double emPhi( void )
returns the electromagnetic calorimeter azimuthal angle in radians of the EmCluster centroid.

double emEtaRMS( void )
returns the electromagnetic calorimeter energy weighted pseudorapidity RMS of the EmCluster. This is an estimate of the cluster width in eta.

double emPhiRMS( void )
returns the electromagnetic calorimeter energy weighted azimuthal angle RMS of the EmCluster. This is an estimate of the cluster width in phi(azimuth).

double hadEnergy( void )
returns the hadronic calorimeter energy of the EmCluster in GeV.

double hadEnergyTriggerTower( void )
returns the hadronic calorimeter energy of the EmCluster in GeV including only the EmSeed tower and its corresponding trigger tower. This is relevant only in the central calorimeter where one trigger tower comprises two physical towers in eta. In the plug, the trigger tower and a physical tower are identical and hadEnergyTriggerTower is equal to hadEnergy.

double hadEt( void )
returns the hadronic calorimeter transverse energy of the EmCluster in GeV. Uses the default Z vertex. This is currently always 0.0.

double hadEm( void )
returns the ratio of the hadronic calorimeter energy to the electromagnetic calorimeter energy using all towers included in the cluster.

double hadEmTriggerTower( void )
returns the ratio of the hadronic calorimeter energy to the electromagnetic calorimeter energy. The hadronic energy is only that in the trigger tower. The EM energy includes all towers in the cluster. This quantity may differ from hadEm only in the central calorimeter.

double totalEnergy( void )
returns sum of the electromagnetic calorimeter energy and the hadronic calorimeter of the EmCluster in GeV.

double totalEt( void )
returns the sum of the electromagnetic calorimeter transverse energy and the hadronic calorimeter transverse energy of the EmCluster in GeV. Uses the default Z vertex. This is currently always 0.0. Note, this is simply the arithmetic sum of emEt + hadEt and does not attempt any positional weighting.

HepLorentzVector fourMomentum( void )
returns the fourMomentum of the EmCluster in GeV. The components are calculated as follows:
      Energy = EM calorimeter energy for the EmCluster
      px = EM calorimeter transverse energy × cos(emPhi) for the EmCluster
      py = EM calorimeter transverse energy × sin(emPhi) for the EmCluster
      pz = EM calorimeter energy × cos(EM polar angle) for the EmCluster
Uses the default Z vertex. This is currently always 0.0. HepLorentzVector is found in the CLHEP package. In your source code you should include the following header:
      #include "CLHEP/Vector/LorentzVector.h"


double vertexZ( void )
returns the Z coordinate of the primary interaction vertex assigned to the EmCluster. This is currently always 0.0.

double zCentroid( void )
returns the Z coordinate of the EmCluster centroid in global CDF coordinates.

double emIsolationEt4( void )
returns the electromagnetic calorimeter excess transverse energy in GeV in a cone of Delta(R) = 0.4 centered on the EmCluster centroid. This is calculated by iterating over all PhysicsTower objects in the event and summing the EM ET for each tower that is not included in the cluster and is within 0.4 of the EmCluster centroid.

double emIsolationEt7( void )
returns the electromagnetic calorimeter excess transverse energy in GeV in a cone of Delta(R) = 0.7 centered on the EmCluster centroid. This is calculated by iterating over all PhysicsTower objects in the event and summing the EM ET for each tower that is not included in the cluster and is within 0.7 of the EmCluster centroid.

double hadIsolationEt4( void )
returns the hadronic calorimeter excess transverse energy in GeV in a cone of Delta(R) = 0.4 centered on the EmCluster centroid. This is calculated by iterating over all PhysicsTower objects in the event and summing the hadronic ET for each tower that is not included in the cluster and is within 0.4 of the EmCluster centroid.

double hadIsolationEt7( void )
returns the hadronic calorimeter excess transverse energy in GeV in a cone of Delta(R) = 0.7 centered on the EmCluster centroid. This is calculated by iterating over all PhysicsTower objects in the event and summing the hadronic ET for each tower that is not included in the cluster and is within 0.7 of the EmCluster centroid.

double totalIsolationEt4( void )
returns the total excess transverse energy in GeV in a cone of Delta(R) = 0.4 centered on the EmCluster centroid. This is the sum of emIsolationEt4 + hadIsolationEt4.

double totalIsolationEt7( void )
returns the total excess transverse energy in GeV in a cone of Delta(R) = 0.7 centered on the EmCluster centroid. This is the sum of emIsolationEt7 + hadIsolationEt7.

Detector region( void )
returns the a variable of type Detector indicating in which detector the EmCluster is contained. Type Detector is a global enumeration defined in CalorGeometry/CalConstants.hh. You should #include this header in any source code in which you wish to use the region() method. This allows you to use constructions such as
if (myCluster.region() == CEM) { do something }

bool isValid( EmClusterParam& )
returns true if the EmCluster passes the cluster criteria contained in the EmClusterParam object passed as a reference. See below for for a description of EM cluster parameters in EmClusterParam.

static TowerKey towerKey( TowerId )
returns a TowerKey object corresponding to the tower passed in the TowerId argument. TowerKey is defined in CalorGeometry.

bool operator ==( EmCluster& ) AND operator !=( EmCluster& )
Equality operator returns true if the EmCluster objects compared have identical data members. Inequality operator is defined as true for equality operator returning false.

bool operator >,<,>=,<=( EmCluster& )
These comparison operators are defined solely in terms of the EM transverse energy comparison of the two EmCluster objects.

Top of Page

CdfEmObject Class Description


void addEmClusterInfo(CdfEmClusterColl::const_handle&, CdfEmClusterColl::const_iterator& )
void addAssocCesCluster(CesClusterColl_ch&, CesClusterColl::const_iterator&, std::string )
void addAssocCprCluster(CprClusterColl_ch&, CprClusterColl::const_iterator&, std::string )
void addAssocPes2dCluster(Pes2dClusterColl::const_handle&, Pes2dClusterColl::const_iterator& )
void addAssocTrack( CdfTrackColl::const_iterator )
All of the above methods add links to the CdfEmObject for physics objects that have been associated with the CdfEmObject. They are for use by the CdfEmObjectModule that constructs the CdfEmObject collection and should not be used by other code. You cannot add any information to a CdfEmObject that has previously been attached to the event.

const EmCluster* getEmCluster(void)
EmCluster_link matchingEmCluster(void)
These two methods both allow access to the EmCluster associated with the CdfEmObject. They differ in that one returns a pointer to the EmCluster and the other returns an indexed link to the EmCluster in the CdfEmClusterColl. You should use matchingEmCluster(void) since the EmCluster associated with the CdfEmObject is now stored as an indexed link. getEmCluster(void) is included for backwards compatibility but is obsolete.

int numberTracks( void )
returns the number of tracks associated with the CdfEmObject. Currently the criteria for a track to be asociated with the CdfEmObject requires the track once extrapolated to the shower max plane to be within 50cm of the EmCluster centroid in the CEM or within Delta(R) = 0.5 in the PEM. These criteria are coded in as static consts. It is anticipated that this will be handled in the future using a parameter set that allows user setting of the criteria.

const CdfTrackView& matchingTracks(void)
Returns a reference to the CdfTrackView containing all tracks associated with the CdfEmObject. CdfTrackView is contained in the TrackingObjects package.

Track_link maxPtTrack(void)
Returns a link to the CdfTrack that has the highest transverse momentum of the tracks associated with the CdfEmObject. You may use pointer methods with a link. For example, to obtain the pT of the track use
      Track_link myTrack = myEmObject.maxPtTrack();
      double trackPt = myTrack->pt();


Hep3Vector maxPtTrackLocalCoord( void )
returns the space point (x,y,z) of the maximum transverse momentum track when extrapolated to the plane of the shower max of the EmCluster associated with the CdfEmObject. Hep3Vector is found in the CLHEP package. In your source code you should include the following header:
      #include "CLHEP/Vector/ThreeVector.h"


const Ces_CollType& matchingCesClusters(std::string="DEFAULT")
Returns a reference to the collection of CES clusters associated with the CdfEmObject. Valid arguments for the string passed to the method are
Each collection contains any CES cluster in the same wedge as the EmCluster. Of course, the TRACK seeded collection contains only those CES clusters found using an extrapolated track. In general, the TRACK collection is a subset of the UNBIASED collection and typically contains only one STRIP cluster and one WIRE cluster.


Ces_link bestMatchingCesCluster(CesCluster::CesView)
Returns a link to the CesCluster that is best matched to the highest pT track if such exists or to the highest energy CesCluster if no associated tracks. The passed argument indicates whether a STRIP or WIRE view is to be returned. The actual code you should use for the argument is either CesCluster::STRIP or CesCluster::WIRE.

const Cpr_CollType& matchingCprClusters(std::string="DEFAULT")
Returns a reference to the collection of CPR clusters associated with the CdfEmObject. Valid arguments for the string passed to the method are
Each collection contains any CPR cluster in the same wedge as the EmCluster. Of course, the TRACK seeded collection contains only those CPR clusters found using an extrapolated track. In general, the TRACK collection is a subset of the UNBIASED collection and typically contains only one WIRE cluster.


const Pes_CollType& matchingPes2dClusters(void)
Returns a reference to the collection of PES 2-D clusters associated with the CdfEmObject. The 2-D clusters contain both a U and a V PES cluster. PES 2d cluster matching is done to the highest pT track if such exists. Cluster is accepted if within Delta(R) = 0.25 of the extrapolated track. If no track, the PES 2d cluster is accepted if it is contained in any PEM tower associated with the EmCluster.

Pes_link bestMatchingPes2dCluster(double maxsep)
Returns a link to the largest energy Pes2dCluster whose separation from the PEM location of the 3x3 chi-squared fit position is within the distance specified by the passed argument, maxsep. The default value is maxsep is omitted is 6 cm.

double lshr( int nTower = 3 )
returns Lshr value. This is defined in the CEM only. Lshr indicates how well the energy sharing in the 2 or 3 tower EmCluster matches that expected for a showering electron. At this time, only 3 tower Lshr is valid. Do not call this method with nTower = 2. This calculation requires a CES cluster be associated with the EmCluster. This is not an absolute necessity. We hope to replace Lshr with a more general goodness of fit estimator.

Top of Page

CdfEmClusterColl Class Description


EmClusterList& contents(void)
const EmClusterList& contents() const
Returns a reference to container of EmCluster objects. You may use this to access STL container methods such as getting iterators for the collection, determining the size of the collection, or determining if the collection is empty. Examples:
      // Get a ConstHandle to the EmCluster collection
      CdfEmClusterColl::const_handle chEmClusterColl;
      CdfEmClusterColl::find(chEmClusterColl);
      CdfEmClusterColl::const_iterator clusterIter;
      clusterIter = chEmClusterColl->contents().begin();
      int collSize = chEmClusterColl->contents().size();


static CdfEmClusterColl::Error find(CdfEmClusterColl::const_handle&)
static CdfEmClusterColl::Error find( CdfEmClusterColl::const_handle&, const std::string& )
Returns true is CdfEmClusterColl is found in the event. If true, the const_handle is filled in. For an example, see the "contents" method above. The first form will return the first CdfEmClusterColl found in the event record. The second method searches for a collection identified by the string passed in the argument list.

Top of Page

CdfEmObjectColl Class Description


EmObjectList& contents(void)
const EmObjectList& contents() const
Returns a reference to container of CdfEmObject objects. You may use this to access STL container methods such as getting iterators for the collection, determining the size of the collection, or determining if the collection is empty. Examples:
      // Get a ConstHandle to the CdfEmObject collection
      CdfEmObjectColl::const_handle chEmObjectColl;
      CdfEmObjectColl::find(chEmObjectColl);
      CdfEmObjectColl::const_iterator objectIter;
      objectIter = chEmObjectColl->contents().begin();
      int collSize = chEmObjectColl->contents().size();


static CdfEmObjectColl::Error find(CdfEmObjectColl::const_handle&)
static CdfEmObjectColl::Error find( CdfEmObjectColl::const_handle&, const std::string& )
Returns true is CdfEmObjectColl is found in the event. If true, the const_handle is filled in. For an example, see the "contents" method above. The first form will return the first CdfEmObjectColl found in the event record. The second method searches for a collection identified by the string passed in the argument list.

Top of Page




Last updated Fri Dec 01 16:15 CST 2000
Send complaints, problems, or requests concerning this page to Bob Wagner