#include <TrgTrackToTrack.h>
Public Member Functions | |
TrgTrackToTrack (const std::string &name, ISvcLocator *pSvcLocator) | |
Destructor. | |
virtual | ~TrgTrackToTrack () |
Algorithm initialization. | |
virtual StatusCode | initialize () |
Algorithm execution. | |
virtual StatusCode | execute () |
Algorithm finalization. | |
virtual StatusCode | finalize () |
void | testLHCbIDs (const TrgTrack >rack) |
Protected Types | |
typedef std::vector< TrgTrack * >::const_iterator | TrgTrackIterator |
Protected Attributes | |
TrgTrackContainer * | m_trgContainer |
the input track container | |
std::string | m_trgTracksName |
input tracks | |
std::string | m_tracksLocation |
location to store the score |
Definition at line 19 of file TrgTrackToTrack.h.
|
Definition at line 44 of file TrgTrackToTrack.h. |
|
Destructor.
Definition at line 20 of file TrgTrackToTrack.cpp. References m_tracksLocation, and m_trgTracksName. 00022 : GaudiAlgorithm ( name , pSvcLocator ) 00023 , m_trgContainer() 00024 { 00025 declareProperty( "TrgTracksName" , 00026 m_trgTracksName = TrgTrackLocation::Long ); 00027 00028 declareProperty( "TracksLocation" , 00029 m_tracksLocation = "/Event/Rec/Tr/NewTracks" ); 00030 00031 }
|
|
Algorithm initialization.
Definition at line 33 of file TrgTrackToTrack.cpp. 00033 {};
|
|
Algorithm finalization.
Definition at line 58 of file TrgTrackToTrack.cpp. References m_tracksLocation, m_trgContainer, testLHCbIDs(), TrgTrackConverter::toTrack(), str::track(), and str::trgTrack(). 00058 { 00059 00060 StatusCode sc = StatusCode::SUCCESS; 00061 00062 Tracks* tracks = new Tracks(); 00063 00064 for (TrgTrackIterator it = m_trgContainer->begin(); 00065 it != m_trgContainer->end(); it++) { 00066 const TrgTrack& gtrack = *(*it); 00067 Track* track = new Track(); 00068 TrgTrackConverter::toTrack(gtrack,*track); 00069 tracks->insert(track); 00070 testLHCbIDs(gtrack); 00071 debug() << str::trgTrack(gtrack) << endreq; 00072 debug() << str::track(*track) << endreq; 00073 } 00074 00075 debug() << " number of TrgTracks " << m_trgContainer->size() << endreq; 00076 debug() << " number converted Tracks " << tracks->size() << endreq; 00077 00078 // locate the tracks in the TES 00079 sc = put( tracks, m_tracksLocation); 00080 00081 return sc; 00082 00083 }
|
|
Definition at line 85 of file TrgTrackToTrack.cpp. 00085 {
00086 return StatusCode::SUCCESS;
00087 }
|
|
Algorithm execution. get the pointers to the tracks containers release the tool Definition at line 35 of file TrgTrackToTrack.cpp. References m_tracksLocation, m_trgContainer, and m_trgTracksName. 00035 { 00036 00037 // initialize the gaudi-algorithm 00038 StatusCode sc = GaudiAlgorithm::initialize(); 00039 if ( sc.isFailure() ) return sc; 00040 00041 // get the dataProvider 00042 TrgDataProvider* trgData = tool<TrgDataProvider>( "TrgDataProvider" ); 00043 00045 m_trgContainer = trgData->tracks(m_trgTracksName); 00046 00048 release(trgData); 00049 00050 info() << " -- parameters of TrgTrackToTrack -- " << endreq; 00051 info() << " TrgTrack input container " << m_trgTracksName << endreq; 00052 info() << " Track output contaner " << m_tracksLocation << endreq; 00053 info() << " ----------------------------------- " << endreq; 00054 00055 return StatusCode::SUCCESS; 00056 }
|
|
Definition at line 90 of file TrgTrackToTrack.cpp. References TrgTrackConverter::lhcbIDs(). Referenced by execute(). 00090 { 00091 00092 std::vector<LHCbID> ids = TrgTrackConverter::lhcbIDs(gtrack); 00093 int i = 0; 00094 00095 const std::vector< std::pair<VeloChannelID,int> >& vref 00096 = gtrack.veloReference(); 00097 for (std::vector< std::pair<VeloChannelID,int> >::const_iterator 00098 it = vref.begin(); it != vref.end(); it++) { 00099 const std::pair<VeloChannelID,int>& velo = *it; 00100 LHCbID id = ids[i]; 00101 debug() << " detector: velo " << velo.first << " size " << velo.second 00102 << endreq; 00103 debug() << " channelID " << velo.first.channelID() << endreq; 00104 debug() << " LHCbID " << id.detectorType() << ", " 00105 << id.channelID() <<"," << id.spareBits()<< endreq; 00106 // id.setSpareBits((unsigned) velo.second); 00107 i++; 00108 } 00109 00110 const std::vector< std::pair<ITChannelID,int> >& itref 00111 = gtrack.itReference(); 00112 for (std::vector< std::pair<ITChannelID,int> >::const_iterator 00113 it = itref.begin(); it != itref.end(); it++) { 00114 const std::pair<ITChannelID,int>& si = *it; 00115 LHCbID id = ids[i]; 00116 debug() << " detector: it " << si.first << " size " << si.second 00117 << endreq; 00118 debug() << " channelID " << si.first.channelID() << endreq; 00119 debug() << " LHCbID " << id.detectorType() << ", " 00120 << id.channelID() <<"," << id.spareBits()<< endreq; 00121 i++; 00122 } 00123 00124 00125 const std::vector< std::pair<OTChannelID,int> >& otref 00126 = gtrack.otReference(); 00127 for (std::vector< std::pair<OTChannelID,int> >::const_iterator 00128 it = otref.begin(); it != otref.end(); it++) { 00129 const std::pair<OTChannelID,int>& ot = *it; 00130 LHCbID id = ids[i]; 00131 debug() << " detector: ot " << ot.first << " size " << ot.second 00132 << endreq; 00133 debug() << " channelID " << ot.first.channelID() << endreq; 00134 debug() << " LHCbID " << id.detectorType() << ", " 00135 << id.channelID() <<"," << id.spareBits()<< endreq; 00136 // id.setSpareBits((unsigned) ot.second); 00137 i++; 00138 } 00139 }
|
|
location to store the score
Definition at line 52 of file TrgTrackToTrack.h. Referenced by execute(), initialize(), and TrgTrackToTrack(). |
|
the input track container
Definition at line 42 of file TrgTrackToTrack.h. Referenced by execute(), and initialize(). |
|
input tracks
Definition at line 49 of file TrgTrackToTrack.h. Referenced by initialize(), and TrgTrackToTrack(). |