Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

...

Across the beam gap, the geometric numbering continues to increment even where there are not physically crystals present.

Image Added

Accessing ECAL Channel Conditions in Java

Before the conditions can be accessed, the DatabaseConditionsManager must be created and initialized correctly, which should happen automatically if you are running a command line job or using the monitoring application.

The ECAL channel conditions can be accessed in user code in the following way.

Code Block
themeEclipse
titleAccessing ECAL Channel Conditions
// Get ECAL conditions.
EcalConditions ecalConditions = ConditionsManager.defaultInstance().getCachedConditions(EcalConditions.class, TableConstants.ECAL_CONDITIONS).getCachedData();

// Get the list of EcalChannel objects.
EcalChannelCollection channels = ecalConditions.getChannelCollection();        

The channel mapping is modeled by the EcalChannel class which has the unique channel ID plus the associated geometric and DAQ information.

Once retrieved from the conditions system, a channel object can be used to get the conditions constants associated with a single crystal.

Code Block
titleGetting Channel Constants
EcalChannelConstants channelConstants = ecalConditions.getChannelConstants(anEcalChannelObject);

Channels may be looked up in the collection using several different search methods.

Code Block
titleSearching for Channels
// Find a channel by its encoded geometric ID e.g. from an LCIO hit object like CalorimeterHit.
CalorimeterHit hit = ...;
EcalChannel channel = channels.findGeomtric(hit.getCellID());

// Find a channel by its unique channel ID.  This finds channel #1.
EcalChannel channel = channels.findChannel(1);

// Find a channel by its DAQ information.  This looks up the crystal connected to crate 1, slot 20 and channel 12 on the DAQ.
EcalChannel channel = channels.findChannel(new DaqId(new int [] { 1, 20, 12 } ));

There are several other ways of looking up channels not listed here.  Please refer to the source code for EcalChannel for complete details.

ECAL Channel Mapping Table Dump

...