Specialization for SimTrackerHits that have only one cellID. More...
#include <UTIL/CellIDEncoder.h>
Public Member Functions | |
CellIDEncoder (const CellIDEncoder &) | |
CellIDEncoder & | operator= (const CellIDEncoder &) |
CellIDEncoder (const std::string &cellIDEncoding, EVENT::LCCollection *col) | |
Constructor, sets collection parameter LCIO::CellIDEncoding to the given encoding string. | |
void | setCellID (T *hit) |
void | setCellIDFlag () |
Helper method that sets/unsets the proper bit for storing a second cellid word. | |
Protected Attributes | |
EVENT::LCCollection * | _col |
Specialization for SimTrackerHits that have only one cellID.
Convenient class for encoding cellIDs for various hit objects. It sets the proper collection parameter LCIO::CellIDEncoding and sets the proper flag bit for storing a second cellid if necessary. See UTIL::BitField64 for a description of the encoding string. Example:
CellIDEncoder<SimCalorimeterHitImpl> cd( "i:20,j:20,k:20" ,calVec ) ;
for(int j=0;j<NHITS;j++){
SimCalorimeterHitImpl* hit = new SimCalorimeterHitImpl ;
cd["i"] = j ;
cd["j"] = j + 100 ;
cd["k"] = j + 200 ;
cd.setCellID( hit ) ;
}