#include <MeasurementProvider.h>
Inheritance diagram for MeasurementProvider:
Public Member Functions | |
MeasurementProvider (const std::string &type, const std::string &name, const IInterface *parent) | |
Standard constructor. | |
virtual | ~MeasurementProvider () |
Destructor. | |
StatusCode | initialize () |
void | load () |
StatusCode | load (Track &track) |
Measurement & | measurement (const LHCbID &, double par0=999., double par1=999.) |
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 |
std::string | m_measLocation |
Definition at line 38 of file MeasurementProvider.h.
|
Standard constructor.
Definition at line 30 of file MeasurementProvider.cpp. References m_itDetPath, m_measLocation, m_otDetPath, and m_veloDetPath. 00033 : GaudiTool ( type, name , parent ) 00034 { 00035 declareInterface<IMeasurementProvider>(this); 00036 00037 declareProperty( "OTGeometryPath", 00038 m_otDetPath = DeOTDetectorLocation::Default ); 00039 declareProperty( "ITGeometryPath", 00040 m_itDetPath = DeSTDetectorLocation::Default ); 00041 declareProperty( "VeloGeometryPath", 00042 m_veloDetPath = "/dd/Structure/LHCb/Velo" ); 00043 00044 declareProperty( "MeasLocation" , 00045 m_measLocation = "/Event/Rec/Track/Measurements" ); 00046 }
|
|
Destructor.
Definition at line 51 of file MeasurementProvider.cpp. 00051 {};
|
|
Implements IMeasurementProvider. Definition at line 56 of file MeasurementProvider.cpp. References m_itDet, m_itDetPath, m_otDet, m_otDetPath, m_veloDet, and m_veloDetPath. 00056 { 00057 00058 StatusCode sc = GaudiTool::initialize(); 00059 if (sc.isFailure()) return sc; // error already reported by base class 00060 00061 m_otDet = getDet<DeOTDetector>( m_otDetPath ); 00062 00063 m_itDet = getDet<DeSTDetector>( m_itDetPath ); 00064 00065 m_veloDet = getDet<DeVelo>( m_veloDetPath ); 00066 00067 return StatusCode::SUCCESS; 00068 }
|
|
Implements IMeasurementProvider. Definition at line 85 of file MeasurementProvider.cpp. References measurement(). 00086 { 00087 const std::vector<LHCbID>& ids = track.lhcbIDs(); 00088 for (std::vector<LHCbID>::const_iterator it = ids.begin(); 00089 it != ids.end(); it++) { 00090 const LHCbID& id = *it; 00091 debug() << "LHCbID = " << id << endreq; 00092 } 00093 for (std::vector<LHCbID>::const_iterator it = ids.begin(); 00094 it != ids.end(); it++) { 00095 const LHCbID& id = *it; 00096 Measurement& meas = measurement(id); 00097 track.addToMeasurements(meas); 00098 } 00099 return StatusCode::SUCCESS; 00100 }
|
|
Implements IMeasurementProvider. Definition at line 73 of file MeasurementProvider.cpp. References m_itClusters, m_otTimes, and m_veloClusters. 00073 { 00074 00075 m_otTimes = get<OTTimes>( OTTimeLocation::Default ); 00076 00077 m_itClusters = get<ITClusters>( ITClusterLocation::Default ); 00078 00079 m_veloClusters = get<VeloClusters>( VeloClusterLocation::Default ); 00080 }
|
|
Implements IMeasurementProvider. Definition at line 105 of file MeasurementProvider.cpp. References m_itClusters, m_itDet, m_otDet, m_otTimes, m_veloClusters, and m_veloDet. Referenced by load(). 00107 { 00108 00109 // TODO first look if it is in the list already :) 00110 Measurement* meas = NULL; 00111 if ( id.isVelo() ) { 00112 VeloChannelID vid = id.veloID(); 00113 VeloCluster* clus = m_veloClusters->object( vid ); 00114 if (clus != NULL) { 00115 if (vid.isRType()) { 00116 meas = new VeloRMeasurement(*clus,*m_veloDet, par0); 00117 } else { 00118 meas = new VeloPhiMeasurement(*clus,*m_veloDet); 00119 } 00120 } 00121 else { 00122 debug() << "VeloCluster is NULL!" << endreq; 00123 } 00124 } else if ( id.isST() ) { 00125 ITChannelID sid = id.stID(); 00126 ITCluster* clus = m_itClusters->object(sid); 00127 if (clus != NULL) 00128 meas = new ITMeasurement(*clus,*m_itDet); 00129 else { 00130 debug() << "ITCluster is NULL!" << endreq; 00131 } 00132 } else if ( id.isOT() ) { 00133 OTChannelID oid = id.otID(); 00134 OTTime* clus = m_otTimes->object(oid); 00135 if (clus != NULL) { 00136 if (par0 == 999.) par0 = 0.; 00137 meas = new OTMeasurement(*clus,*m_otDet, (int) par0, par1); 00138 } 00139 else { 00140 debug() << "OTTime is NULL!" << endreq; 00141 } 00142 } 00143 00144 if (meas == NULL) 00145 error() << "Unable to create measurement!" << endreq; 00146 00147 debug() << "Creating measurement of type " << meas -> type() 00148 << " lhcbID " << id 00149 << " pars : " << par0 << ","<< par1 << endreq; 00150 00151 return *meas; 00152 }
|
|
Definition at line 70 of file MeasurementProvider.h. Referenced by load(), and measurement(). |
|
Definition at line 62 of file MeasurementProvider.h. Referenced by initialize(), and measurement(). |
|
Name of the IT XML geom path.
Definition at line 66 of file MeasurementProvider.h. Referenced by initialize(), and MeasurementProvider(). |
|
Definition at line 73 of file MeasurementProvider.h. Referenced by MeasurementProvider(). |
|
Definition at line 61 of file MeasurementProvider.h. Referenced by initialize(), and measurement(). |
|
Name of the OT XML geom path.
Definition at line 65 of file MeasurementProvider.h. Referenced by initialize(), and MeasurementProvider(). |
|
Definition at line 69 of file MeasurementProvider.h. Referenced by load(), and measurement(). |
|
Definition at line 71 of file MeasurementProvider.h. Referenced by load(), and measurement(). |
|
Definition at line 63 of file MeasurementProvider.h. Referenced by initialize(), and measurement(). |
|
Name of the Velo XML geom path.
Definition at line 67 of file MeasurementProvider.h. Referenced by initialize(), and MeasurementProvider(). |