#include <MeasurementProvider.h>
Public Member Functions | |
MeasurementProvider (const std::string &type, const std::string &name, const IInterface *parent) | |
Standard constructor. | |
virtual | ~MeasurementProvider () |
Destructor. | |
StatusCode | initialize () |
StatusCode | load () |
Measurement & | measurement (const LHCbID &, double par=999., double par=999.) |
StatusCode | load (Track &track) |
Static Public Member Functions | |
static const InterfaceID & | interfaceID () |
Protected Attributes | |
DeOTDetector * | m_otDet |
DeSTDetector * | m_itDet |
DeVelo * | m_veloDet |
std::string | m_otDetPath |
Name of the OT XML geom path. | |
std::string | m_itDetPath |
Name of the IT XML geom path. | |
std::string | m_veloDetPath |
Name of the Velo XML geom path. | |
OTTimes * | m_otTimes |
ITClusters * | m_itClusters |
VeloClusters * | m_veloClusters |
Measurements * | m_meas |
std::string | m_measLocation |
Definition at line 26 of file MeasurementProvider.h.
|
Standard constructor.
Definition at line 28 of file MeasurementProvider.cpp. References m_itDetPath, m_measLocation, and m_otDetPath. 00031 : GaudiTool ( type, name , parent ) 00032 { 00033 declareInterface<MeasurementProvider>(this); 00034 00035 declareProperty( "OTGeometryPath", 00036 m_otDetPath = "/dd/Structure/LHCb/Tracker/OT" ); 00037 declareProperty( "ITGeometryPath", 00038 m_itDetPath = "/dd/Structure/LHCb/Tracker/IT" ); 00039 declareProperty( "VeloGeometryPath", 00040 m_otDetPath = "/dd/Structure/LHCb/Velo" ); 00041 00042 declareProperty( "MeasLocation" , 00043 m_measLocation = "/Event/Rec/Tr/Measurements" ); 00044 }
|
|
Destructor.
Definition at line 48 of file MeasurementProvider.cpp. 00048 {};
|
|
Definition at line 50 of file MeasurementProvider.cpp. References m_itDet, m_itDetPath, m_otDet, m_otDetPath, m_veloDet, and m_veloDetPath. 00050 { 00051 00052 m_otDet = getDet<DeOTDetector>( m_otDetPath ); 00053 00054 m_itDet = getDet<DeSTDetector>( m_itDetPath ); 00055 00056 m_veloDet = getDet<DeVelo>( m_veloDetPath ); 00057 00058 return StatusCode::SUCCESS; 00059 }
|
|
Definition at line 30 of file MeasurementProvider.h. References IID_MeasurementProvider(). 00030 { return IID_MeasurementProvider; }
|
|
Definition at line 118 of file MeasurementProvider.cpp. References measurement(). 00119 { 00120 const std::vector<LHCbID>& ids = track.lhcbIDs(); 00121 for (std::vector<LHCbID>::const_iterator it = ids.begin(); 00122 it != ids.end(); it++) { 00123 const LHCbID& id = *it; 00124 Measurement& meas = measurement(id); 00125 track.addToMeasurements(meas); 00126 } 00127 return StatusCode::SUCCESS; 00128 }
|
|
Definition at line 61 of file MeasurementProvider.cpp. References m_itClusters, m_meas, m_measLocation, m_otTimes, and m_veloClusters. 00061 { 00062 00063 m_otTimes = get<OTTimes>( OTTimeLocation::Default ); 00064 00065 m_itClusters = get<ITClusters>( ITClusterLocation::Default ); 00066 00067 m_veloClusters = get<VeloClusters>( VeloClusterLocation::Default); 00068 00069 m_meas = new Measurements(); 00070 StatusCode sc = put(m_meas, m_measLocation ); 00071 return sc; 00072 }
|
|
Definition at line 75 of file MeasurementProvider.cpp. References Measurement::setLhcbID(). Referenced by load(). 00075 { 00076 00077 // TODO first look if it is in the list already :) 00078 Measurement* meas = NULL; 00079 if (id.isVelo()) { 00080 VeloChannelID vid = id.veloID(); 00081 VeloCluster* clus = m_veloClusters->object(vid); 00082 if (clus != NULL) { 00083 if (vid.isRType()) { 00084 meas = new VeloRMeasurement(*clus,*m_veloDet, par0); 00085 } else { 00086 meas = new VeloPhiMeasurement(*clus,*m_veloDet); 00087 } 00088 } 00089 } else if (id.isST()) { 00090 ITChannelID sid = id.stID(); 00091 ITCluster* clus = m_itClusters->object(sid); 00092 if (clus != NULL) 00093 meas = new ITMeasurement(*clus,*m_itDet); 00094 } else if (id.isOT()) { 00095 OTChannelID oid = id.otID(); 00096 OTTime* clus = m_otTimes->object(oid); 00097 if (clus != NULL) { 00098 if (par0 == 999.) par0 = 0.; 00099 meas = new OTMeasurement(*clus,*m_otDet, (int) par0, par1); 00100 } 00101 00102 } 00103 00104 if (meas != NULL) { 00105 meas->setLhcbID(id); 00106 m_meas->insert(meas); 00107 } else { 00108 error() << " not able to create measurement " << endreq; 00109 } 00110 00111 debug() << " creating measurement " << id.detectorType() 00112 << " channel " << id.channelID() 00113 << " pars : " << par0 << ","<< par1 << endreq; 00114 00115 return *meas; 00116 }
|
|
Definition at line 60 of file MeasurementProvider.h. Referenced by load(). |
|
Definition at line 52 of file MeasurementProvider.h. Referenced by initialize(). |
|
Name of the IT XML geom path.
Definition at line 56 of file MeasurementProvider.h. Referenced by initialize(), and MeasurementProvider(). |
|
Definition at line 63 of file MeasurementProvider.h. Referenced by load(). |
|
Definition at line 65 of file MeasurementProvider.h. Referenced by load(), and MeasurementProvider(). |
|
Definition at line 51 of file MeasurementProvider.h. Referenced by initialize(). |
|
Name of the OT XML geom path.
Definition at line 55 of file MeasurementProvider.h. Referenced by initialize(), and MeasurementProvider(). |
|
Definition at line 59 of file MeasurementProvider.h. Referenced by load(). |
|
Definition at line 61 of file MeasurementProvider.h. Referenced by load(). |
|
Definition at line 53 of file MeasurementProvider.h. Referenced by initialize(). |
|
Name of the Velo XML geom path.
Definition at line 57 of file MeasurementProvider.h. Referenced by initialize(). |