#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 () |
void | load () |
StatusCode | load (Track &track) |
Measurement & | measurement (const LHCbID &, double par0=999., double par1=999.) |
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 |
std::string | m_measLocation |
Definition at line 32 of file MeasurementProvider.h.
|
Standard constructor.
Definition at line 30 of file MeasurementProvider.cpp. References m_itDetPath, m_measLocation, and m_otDetPath. 00033 : GaudiTool ( type, name , parent ) 00034 { 00035 declareInterface<MeasurementProvider>(this); 00036 00037 declareProperty( "OTGeometryPath", 00038 m_otDetPath = DeOTDetectorLocation::Default ); 00039 declareProperty( "ITGeometryPath", 00040 m_itDetPath = DeSTDetectorLocation::Default ); 00041 declareProperty( "VeloGeometryPath", 00042 m_otDetPath = "/dd/Structure/LHCb/Velo" ); 00043 00044 declareProperty( "MeasLocation" , 00045 m_measLocation = "/Event/Rec/Tr/Measurements" ); 00046 }
|
|
Destructor.
Definition at line 51 of file MeasurementProvider.cpp. 00051 {};
|
|
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 }
|
|
Definition at line 36 of file MeasurementProvider.h. References IID_MeasurementProvider(). 00036 { return IID_MeasurementProvider; }
|
|
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 Measurement& meas = measurement(id); 00092 track.addToMeasurements(meas); 00093 } 00094 return StatusCode::SUCCESS; 00095 }
|
|
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 }
|
|
Definition at line 100 of file MeasurementProvider.cpp. References m_itClusters, m_itDet, m_otDet, m_otTimes, m_veloClusters, and m_veloDet. Referenced by load(). 00102 { 00103 00104 // TODO first look if it is in the list already :) 00105 Measurement* meas = NULL; 00106 if (id.isVelo()) { 00107 VeloChannelID vid = id.veloID(); 00108 VeloCluster* clus = m_veloClusters->object(vid); 00109 if (clus != NULL) { 00110 if (vid.isRType()) { 00111 meas = new VeloRMeasurement(*clus,*m_veloDet, par0); 00112 } else { 00113 meas = new VeloPhiMeasurement(*clus,*m_veloDet); 00114 } 00115 } 00116 } else if (id.isST()) { 00117 ITChannelID sid = id.stID(); 00118 ITCluster* clus = m_itClusters->object(sid); 00119 if (clus != NULL) 00120 meas = new ITMeasurement(*clus,*m_itDet); 00121 } else if (id.isOT()) { 00122 OTChannelID oid = id.otID(); 00123 OTTime* clus = m_otTimes->object(oid); 00124 if (clus != NULL) { 00125 if (par0 == 999.) par0 = 0.; 00126 meas = new OTMeasurement(*clus,*m_otDet, (int) par0, par1); 00127 } 00128 00129 } 00130 00131 if (meas != NULL) { 00132 //meas->setLhcbID(id); 00133 } else { 00134 error() << " not able to create measurement " << endreq; 00135 } 00136 00137 debug() << " creating measurement " << id.detectorType() 00138 << " channel " << id.channelID() 00139 << " pars : " << par0 << ","<< par1 << endreq; 00140 00141 return *meas; 00142 }
|
|
Definition at line 67 of file MeasurementProvider.h. Referenced by load(), and measurement(). |
|
Definition at line 59 of file MeasurementProvider.h. Referenced by initialize(), and measurement(). |
|
Name of the IT XML geom path.
Definition at line 63 of file MeasurementProvider.h. Referenced by initialize(), and MeasurementProvider(). |
|
Definition at line 70 of file MeasurementProvider.h. Referenced by MeasurementProvider(). |
|
Definition at line 58 of file MeasurementProvider.h. Referenced by initialize(), and measurement(). |
|
Name of the OT XML geom path.
Definition at line 62 of file MeasurementProvider.h. Referenced by initialize(), and MeasurementProvider(). |
|
Definition at line 66 of file MeasurementProvider.h. Referenced by load(), and measurement(). |
|
Definition at line 68 of file MeasurementProvider.h. Referenced by load(), and measurement(). |
|
Definition at line 60 of file MeasurementProvider.h. Referenced by initialize(), and measurement(). |
|
Name of the Velo XML geom path.
Definition at line 64 of file MeasurementProvider.h. Referenced by initialize(). |