#include <TrueTracksCreator.h>
Public Member Functions | |
TrueTracksCreator (const std::string &name, ISvcLocator *pSvcLocator) | |
Standard constructor. | |
virtual | ~TrueTracksCreator () |
Destructor. | |
virtual StatusCode | initialize () |
Algorithm initialization. | |
virtual StatusCode | execute () |
Algorithm execution. | |
virtual StatusCode | finalize () |
Algorithm finalization. | |
void | sortMeasurements (Track *track) |
Private Member Functions | |
StatusCode | registerTracks (Tracks *tracksCont) |
Register the tracks in the Transient event store. | |
StatusCode | addOTTimes (OTTimes *times, MCParticle *mcPart, Track *track) |
Add outer tracker clusters. | |
StatusCode | addITClusters (MCParticle *mcPart, Track *track) |
Add inner tracker clusters. | |
StatusCode | addVeloClusters (MCParticle *mcPart, Track *track) |
Add velo r and phi clusters. | |
StatusCode | initializeState (double z, Track *track, MCParticle *mcPart) |
Initialize seed state. | |
StatusCode | deleteStates (Track *track) |
Delete all states on the track. | |
Private Attributes | |
OTTime2MCHitAsct::IAsct * | m_otTim2MCHit |
ITCluster2MCParticleAsct::IAsct * | m_itClus2MCP |
VeloCluster2MCParticleAsct::IAsct * | m_veloClus2MCP |
DeOTDetector * | m_otTracker |
Pointer to OT detector element. | |
DeSTDetector * | m_itTracker |
Pointer to ST detector element. | |
DeVelo * | m_velo |
Pointer to VELO detector element. | |
std::string | m_otTrackerPath |
Name of the OT XML geom path. | |
std::string | m_itTrackerPath |
Name of the IT XML geom path. | |
std::string | m_veloPath |
Name of the Velo XML geom path. | |
ITrackSelector * | m_trackSelector |
Track selection tool. | |
IStateCreator * | m_stateCreator |
Create 'seed' state at last measurement. | |
bool | m_addOTTimes |
true if OT clusters should be put on track | |
bool | m_addITClusters |
true if IT clusters should be put on track | |
bool | m_addVeloClusters |
true if Velo R clusters should be put on track | |
bool | m_initState |
initialize seed state | |
bool | m_fitTracks |
if true then the tracks are fitted | |
bool | m_upstream |
upstream or downstream fit | |
bool | m_trueStatesAtMeas |
Store true states at each measurement position. | |
std::string | m_tracksTESPath |
TrTracks container path in EvDS. | |
std::string | m_relationTable |
Location of the associator table. | |
int | m_minNHits |
Minimum number of hits on the track. | |
double | m_errorX2 |
Error^2 on x. | |
double | m_errorY2 |
Error^2 on y. | |
double | m_errorTx2 |
Error^2 on slope x. | |
double | m_errorTy2 |
Error^2 on slope y. | |
double | m_errorP |
dp/p |
In addition, the tracks can be fitted. Several fitter tools are used for each type of track. The direction of the fit can be set with a job-option.
Instead of fitting the track, the states can be filled with true states. The true-state creator tool creates states from MCParticles and their MCHits.
M. Needham
R.M. van der Eijk (28-5-2002)
J. van Tilburg (02-07-2003)
Definition at line 63 of file TrueTracksCreator.h.
|
Standard constructor. default job Options Definition at line 38 of file TrueTracksCreator.cpp. References m_addITClusters, m_addOTTimes, m_addVeloClusters, m_errorP, m_errorTx2, m_errorTy2, m_errorX2, m_errorY2, m_fitTracks, m_initState, m_itTrackerPath, m_minNHits, m_otTrackerPath, m_relationTable, m_tracksTESPath, m_trueStatesAtMeas, m_upstream, and m_veloPath. 00040 : GaudiAlgorithm( name, pSvcLocator ) 00041 , m_otTim2MCHit(0) 00042 , m_itClus2MCP(0) 00043 , m_veloClus2MCP(0) 00044 , m_otTracker(0) 00045 , m_itTracker(0) 00046 , m_velo(0) 00047 , m_trackSelector(0) 00048 , m_stateCreator(0) 00049 // , m_tracksFitter(0) 00050 // , m_veloTracksFitter(0) 00051 // , m_seedTracksFitter(0) 00052 { 00054 declareProperty( "AddOTTimes", m_addOTTimes = true ); 00055 declareProperty( "AddITClusters", m_addITClusters = true ); 00056 declareProperty( "AddVeloClusters", m_addVeloClusters = true ); 00057 declareProperty( "InitState", m_initState = true ); 00058 declareProperty( "FitTracks", m_fitTracks = true ); 00059 declareProperty( "FitUpstream", m_upstream = true ); 00060 declareProperty( "TrueStatesAtMeasZPos", m_trueStatesAtMeas = false ); 00061 declareProperty( "TracksTESPath", 00062 m_tracksTESPath = "Rec/Track/Ideal" ); 00063 declareProperty( "RelationTable", 00064 m_relationTable = "Rec/Relations/IdealTr2MCP" ); 00065 declareProperty( "OTGeometryPath", 00066 m_otTrackerPath = DeOTDetectorLocation::Default ); 00067 declareProperty( "ITGeometryPath", 00068 m_itTrackerPath = DeSTDetectorLocation::Default ); 00069 declareProperty( "VeloGeometryPath", 00070 m_veloPath = "/dd/Structure/LHCb/Velo" ); 00071 declareProperty( "MinNHits", m_minNHits = 6 ); 00072 declareProperty( "ErrorX2", m_errorX2 = 4.0 ); 00073 declareProperty( "ErrorY2", m_errorY2 = 400.0 ); 00074 declareProperty( "ErrorTx2", m_errorTx2 = 6.e-5 ); 00075 declareProperty( "ErrorTy2", m_errorTy2 = 1.e-4 ); 00076 declareProperty( "ErrorP", m_errorP = 0.15 ); 00077 }
|
|
Destructor.
Definition at line 82 of file TrueTracksCreator.cpp. 00082 {}
|
|
Add inner tracker clusters. Retrieve ITClusters from inverse relation Definition at line 460 of file TrueTracksCreator.cpp. References m_itClus2MCP, and m_itTracker. Referenced by execute(). 00462 { 00463 unsigned int nITMeas = 0; 00464 00466 ITCluster2MCParticleAsct::FromRange range = m_itClus2MCP -> rangeTo( mcPart ); 00467 ITCluster2MCParticleAsct::FromIterator iClus; 00468 for ( iClus = range.begin(); iClus != range.end(); ++iClus) { 00469 ITCluster* aCluster = iClus->to(); 00470 ITMeasurement meas = ITMeasurement( *aCluster, *m_itTracker ); 00471 track -> addToMeasurements( meas ); 00472 nITMeas++; 00473 } 00474 00475 debug() << "- " << nITMeas << " ITMeasurements added" << endreq; 00476 00477 return StatusCode::SUCCESS; 00478 }
|
|
Add outer tracker clusters.
Definition at line 405 of file TrueTracksCreator.cpp. References m_otTim2MCHit, and m_otTracker. Referenced by execute(). 00408 { 00409 unsigned int nOTMeas = 0; 00410 00411 // Loop over outer tracker clusters 00412 OTTimes::const_iterator itOTTime = times -> begin(); 00413 while ( itOTTime != times->end() ) { 00414 OTTime* aTime = *itOTTime; 00415 00416 // retrieve MCHit associated with this cluster 00417 OTTime2MCHitAsct::ToRange range = m_otTim2MCHit -> rangeFrom(aTime); 00418 OTTime2MCHitAsct::ToIterator iTim; 00419 for ( iTim = range.begin(); iTim != range.end(); ++iTim ) { 00420 MCHit* aMCHit = iTim -> to(); 00421 MCParticle* aParticle = aMCHit -> mcParticle(); 00422 if ( aParticle == mcPart ) { 00423 // get the ambiguity from the MCHit 00424 const OTChannelID channel = aTime -> channel(); 00425 DeOTModule* module = m_otTracker -> module( channel ); 00426 const HepPoint3D entryP = aMCHit -> entry(); 00427 const HepPoint3D exitP = aMCHit -> exit(); 00428 double deltaZ = exitP.z() - entryP.z(); 00429 if (0.0 == deltaZ) continue; // curling track inside layer 00430 const double tx = (exitP.x() - entryP.x()) / deltaZ; 00431 const double ty = (exitP.y() - entryP.y()) / deltaZ; 00432 double mcDist = module -> distanceToWire( channel.straw(), 00433 entryP, tx, ty ); 00434 int ambiguity = 1; 00435 if ( mcDist < 0.0 ) ambiguity = -1; 00436 // Get the tu from the MCHit 00437 double angle = module -> stereoAngle(); 00438 double tu = tx * cos(angle) + ty * sin(angle); 00439 // Make the TrMeasurement 00440 OTMeasurement otTim = OTMeasurement( *aTime, *m_otTracker, 00441 ambiguity, tu ); 00442 track -> addToMeasurements( otTim ); 00443 nOTMeas++; 00444 debug() << " - added OTMeasurement, ambiguity = " 00445 << ambiguity << endreq; 00446 } 00447 } 00448 // next cluster 00449 ++itOTTime; 00450 } // loop over outer tracker clusters 00451 00452 debug() << "- " << nOTMeas << " OTMeasurements added" << endreq; 00453 00454 return StatusCode::SUCCESS; 00455 }
|
|
Add velo r and phi clusters. Retrieve VeloClusters from inverse relation Definition at line 483 of file TrueTracksCreator.cpp. References m_stateCreator, m_velo, and m_veloClus2MCP. Referenced by execute(). 00485 { 00486 unsigned int nVeloRMeas = 0; 00487 unsigned int nVeloPhiMeas = 0; 00488 00490 VeloCluster2MCParticleAsct::FromRange range = m_veloClus2MCP->rangeTo(mcPart); 00491 VeloCluster2MCParticleAsct::FromIterator iClus; 00492 for ( iClus = range.begin(); iClus != range.end(); ++iClus) { 00493 VeloCluster* aCluster = iClus->to(); 00494 // Check if velo cluster is r or phi clusters 00495 if ( m_velo -> isRSensor( aCluster->sensor() ) ) { 00496 00497 double z = m_velo -> zSensor( aCluster -> sensor() ); 00498 double phi = 999.0; 00499 State* tempState; 00500 StatusCode sc = m_stateCreator -> createState( mcPart, z, tempState ); 00501 if ( sc.isSuccess() ) { 00502 HepVector vec = tempState -> stateVector(); 00503 phi = atan2( vec[1], vec[0] ); 00504 } 00505 delete tempState; 00506 00507 VeloRMeasurement meas = VeloRMeasurement( *aCluster, *m_velo, phi ); 00508 track -> addToMeasurements( meas ); 00509 nVeloRMeas++; 00510 } 00511 else { 00512 VeloPhiMeasurement meas = VeloPhiMeasurement( *aCluster, *m_velo ); 00513 track -> addToMeasurements( meas ); 00514 nVeloPhiMeas++; 00515 } 00516 } 00517 00518 debug() << "- " << nVeloRMeas << " / " << nVeloPhiMeas 00519 << " Velo R/Phi Measurements added" << endreq; 00520 00521 return StatusCode::SUCCESS; 00522 }
|
|
Delete all states on the track.
Definition at line 577 of file TrueTracksCreator.cpp. References str::states(). Referenced by execute(). 00578 { 00579 std::vector<State*> tmpStates = track -> states(); 00580 for ( std::vector<State*>::const_iterator it = tmpStates.begin(); 00581 it != tmpStates.end(); it++) { 00582 track -> removeFromStates( (*it) ); 00583 } 00584 00585 return StatusCode::SUCCESS; 00586 }
|
|
Algorithm execution. Retrieve the Containers for Clusters and Times Definition at line 140 of file TrueTracksCreator.cpp. References addITClusters(), addOTTimes(), addVeloClusters(), deleteStates(), initializeState(), str::lhcbID(), m_addITClusters, m_addOTTimes, m_addVeloClusters, m_initState, m_minNHits, m_relationTable, m_stateCreator, m_trackSelector, m_trueStatesAtMeas, m_upstream, TrackFunctor::nMeasurements(), and registerTracks(). 00141 { 00142 debug() << "==> Execute" << endreq; 00143 00144 // Event header info 00145 EventHeader* evtHdr = get<EventHeader>( EventHeaderLocation::Default ); 00146 debug() << "Run " << evtHdr -> runNum() 00147 << "\tEvent " << evtHdr -> evtNum() << endreq; 00148 00149 // Retrieve the MCParticle container 00150 MCParticles* particles = get<MCParticles>( MCParticleLocation::Default ); 00151 00153 OTTimes* otTimes = get<OTTimes>( OTTimeLocation::Default ); 00154 debug() << "- retrieved " << otTimes -> size() << " OTTimes." << endreq; 00155 00156 // Make container for tracks 00157 Tracks* tracksCont = new Tracks(); 00158 00159 // create relation table and register it in the event transient store 00160 typedef RelationWeighted1D<Track,MCParticle,double> Table; 00161 Table* table = new Table(); 00162 StatusCode sc = eventSvc() -> registerObject( m_relationTable, table ); 00163 if( sc.isFailure() ) { 00164 error() << "Unable to register the relation container = " 00165 << m_relationTable << " status = " << sc << endreq; 00166 return sc ; 00167 } 00168 else { 00169 verbose() << "Relations container " << m_relationTable 00170 << " registered" << endreq; 00171 } 00172 00173 debug() << "Starting loop over the " 00174 << particles -> size() << " MCParticles ... " << endreq; 00175 00176 // loop over MCParticles 00177 // ===================== 00178 MCParticles::const_iterator iPart; 00179 for ( iPart = particles->begin(); particles->end() != iPart; ++iPart ) { 00180 MCParticle* mcParticle = *iPart; 00181 debug() << endreq 00182 << "- MCParticle of type " 00183 << m_trackSelector -> trackType( mcParticle ) 00184 << " , (key # " << mcParticle -> key() << ")" << endreq 00185 << " - momentum = " << mcParticle -> momentum() << " MeV" << endreq 00186 << " - P = " << mcParticle -> momentum().vect().mag() 00187 << " MeV" <<endreq 00188 << " - charge = " 00189 << ( mcParticle -> particleID().threeCharge() / 3 ) << endreq; 00190 if ( m_trackSelector -> select( mcParticle ) ) { 00191 debug() << endreq 00192 << "Selected MCParticle of type " 00193 << m_trackSelector -> trackType( mcParticle ) 00194 << " , (key # " << mcParticle -> key() << ")" << endreq 00195 << " - momentum = " << mcParticle -> momentum() << " MeV" <<endreq 00196 << " - P = " << mcParticle -> momentum().vect().mag() 00197 << " MeV" <<endreq 00198 << " - charge = " 00199 << ( mcParticle -> particleID().threeCharge() / 3 ) << endreq; 00200 00201 // Make a new track 00202 // ---------------- 00203 Track* track = new Track(); 00204 00205 m_trackSelector -> setTrackType( mcParticle, track ); 00206 00207 // Check whether a Velo track is backward 00208 if ( TrackKeys::Velo == track -> type() ) { 00209 const double pz = mcParticle -> momentum().pz(); 00210 if ( pz < 0.0 ) track -> setFlag( TrackKeys::Backward, true ); 00211 } 00212 00213 // Add Velo clusters 00214 // ----------------- 00215 if ( m_addVeloClusters == true ) { 00216 debug() << "... adding VeloXxxClusters" << endreq; 00217 sc = addVeloClusters( mcParticle, track ); 00218 if ( sc.isFailure() ) { 00219 error() << "Unable to add velo R clusters" << endreq; 00220 return StatusCode::FAILURE; 00221 } 00222 } 00223 00224 // Add IT clusters 00225 // --------------- 00226 if ( m_addITClusters == true ) { 00227 debug() << "... adding ITClusters" << endreq; 00228 sc = addITClusters( mcParticle, track ); 00229 if ( sc.isFailure() ) { 00230 error() << "Unable to add inner tracker clusters" << endreq; 00231 return StatusCode::FAILURE; 00232 } 00233 } 00234 00235 // Add OTTimes 00236 // ----------- 00237 if ( m_addOTTimes == true && otTimes != 0 ) { 00238 debug() << "... adding OTTimes" << endreq; 00239 sc = addOTTimes( otTimes, mcParticle, track ); 00240 if ( sc.isFailure() ) { 00241 error() << "Unable to add outer tracker OTTimes" << endreq; 00242 return StatusCode::FAILURE; 00243 } 00244 } 00245 00246 // Check if the track contains enough hits 00247 // --------------------------------------- 00248 if ( (int) track -> nMeasurements() < m_minNHits) { 00249 debug() << " -> track deleted. Had only " << track -> nMeasurements() 00250 << " hits" << endreq; 00251 delete track; 00252 continue; // go to next track 00253 } 00254 00255 // Sort the measurements in z 00256 // -------------------------- 00257 //sortMeasurements( track ); // no more needed! 00258 00259 // Initialize a seed state 00260 // ----------------------- 00261 if ( m_initState ) { 00262 if ( m_upstream ) { 00263 std::vector<Measurement*>::const_reverse_iterator rbeginM = 00264 track -> measurements().rbegin(); 00265 sc = this -> initializeState( (*rbeginM)->z(), 00266 track, mcParticle ); 00267 } 00268 else { 00269 std::vector<Measurement*>::const_iterator beginM = 00270 track -> measurements().begin(); 00271 sc = this -> initializeState( (*beginM)->z(), 00272 track, mcParticle ); 00273 } 00274 if ( !sc.isSuccess() ) { 00275 delete track; 00276 continue; // go to next track 00277 } 00278 } 00279 00280 // Set some of the track properties 00281 // -------------------------------- 00282 track -> setStatus( TrackKeys::PatRecMeas ); 00283 track -> setFlag( TrackKeys::Unique, true ); 00284 track -> setHistory( TrackKeys::TrackIdealPR ); 00285 // Fit the track 00286 //if ( m_initState && m_fitTracks ) { 00287 // select appropriate track fitter 00288 //ITrackFitter* fitter = m_tracksFitter; 00289 //if( track -> type() == TrackKeys::Velo 00290 //|| track -> checkFlag( TrackKeys::Backward ) ) 00291 //fitter = m_veloTracksFitter; 00292 //if ( track->velo() || track->veloBack() ) fitter = m_veloTracksFitter; 00293 //if ( track -> type() == TrackKeys::Upstream ) fitter = m_veloTTTracksFitter; 00294 //if ( track->veloTT() ) fitter = m_veloTTTracksFitter; 00295 //if ( track -> type() == TrackKeys::Ttrack ) fitter = m_seedTracksFitter; 00296 //if ( track->seed() ) fitter = m_seedTracksFitter; 00297 // Fit the track 00298 //if ( m_upstream ) { // do upstream fit 00299 // sc = fitter->fitUpstream(track, track->rbeginM(), track->rendM() ); 00300 //} else { // do downstream fit 00301 // sc = fitter->fitDownstream(track, track->beginM(), track->endM() ); 00302 //} 00303 // Set error flag if fit failed 00304 //if ( sc.isFailure() ) track -> setStatus( TrackKeys::Failed ); 00305 //if ( sc.isFailure() ) track -> setErrorFlag(1); 00306 //} 00307 00308 // Add true states at each measurement 00309 // =================================== 00310 if ( m_trueStatesAtMeas ) { 00311 deleteStates( track ); 00312 sc = StatusCode::SUCCESS; 00313 std::vector<Measurement*>::const_iterator iMeas = 00314 track -> measurements().begin(); 00315 std::vector<Measurement*>::const_iterator endM = 00316 track -> measurements().end(); 00317 //Track::const_measure_iterator iMeas = track->beginM(); 00318 while ( sc.isSuccess() && iMeas != endM ) { 00319 State* tempState; 00320 sc = m_stateCreator -> createState( mcParticle, 00321 (*iMeas)->z(), 00322 tempState ); 00323 if ( sc.isSuccess() ) track -> addToStates( *tempState ); 00324 else delete tempState; 00325 ++iMeas; 00326 } 00327 if ( sc.isFailure() ) { 00328 delete track; 00329 continue; 00330 } 00331 } 00332 00333 // Add the track to the Tracks container and fill the relations table 00334 // ------------------------------------------------------------------ 00335 tracksCont -> add( track ); 00336 table -> relate( track, mcParticle, 1.0 ); 00337 00338 // debugging Track ... 00339 // ------------------- 00340 debug() 00341 << "-> Track with key # " << track -> key() << endreq 00342 << " * charge = " << track -> charge() << endreq 00343 << " * is Invalid = " << track -> checkFlag( TrackKeys::Invalid ) << endreq 00344 << " * is Unique = " << track -> checkFlag( TrackKeys::Unique ) << endreq 00345 << " * is of type = " << track -> type() << endreq 00346 << " * is Backward = " << track -> checkFlag( TrackKeys::Backward ) << endreq 00347 << " * # measurements = " << track -> nMeasurements() << endreq; 00348 00349 // print the measurements 00350 const std::vector<Measurement*>& meas = track -> measurements(); 00351 for ( std::vector<Measurement*>::const_iterator itMeas = meas.begin(); 00352 itMeas != meas.end(); itMeas++ ) { 00353 debug() << " - measurement of type " << (*itMeas) -> type() << endreq 00354 << " - z = " << (*itMeas) -> z() << " mm" << endreq 00355 << " - LHCbID = " << (*itMeas) -> lhcbID() << endreq; 00356 // continue according to type ... 00357 if ( (*itMeas) -> lhcbID().isOT() ) { 00358 debug() << " - XxxChannelID = " << (*itMeas) -> lhcbID().otID() << endreq; 00359 } 00360 else if ( (*itMeas) -> lhcbID().isST() ) { 00361 debug() << " - XxxChannelID = " << (*itMeas) -> lhcbID().stID() << endreq; 00362 } 00363 else if ( (*itMeas) -> lhcbID().isVelo() ) { 00364 debug() << " - XxxChannelID = " << (*itMeas) -> lhcbID().veloID() << endreq; 00365 } 00366 } 00367 00368 } // is selected 00369 } // looping over MCParticles 00370 00371 // Store the Tracks in the TES 00372 // =========================== 00373 sc = registerTracks( tracksCont ); 00374 if( sc.isFailure() ) return sc; 00375 00376 debug() << "Created " << tracksCont -> size() << " tracks." << endreq; 00377 00378 return StatusCode::SUCCESS; 00379 }
|
|
Algorithm finalization.
Definition at line 384 of file TrueTracksCreator.cpp. References m_itClus2MCP, m_otTim2MCHit, m_trackSelector, and m_veloClus2MCP. 00385 { 00386 debug() << "==> Finalize" << endreq; 00387 00388 // Release all tools and services 00389 // ------------------------------ 00390 if ( m_veloClus2MCP ) toolSvc()->releaseTool( m_veloClus2MCP ); 00391 if ( m_itClus2MCP ) toolSvc()->releaseTool( m_itClus2MCP ); 00392 if ( m_otTim2MCHit ) toolSvc()->releaseTool( m_otTim2MCHit ); 00393 if ( m_trackSelector ) toolSvc()->releaseTool( m_trackSelector ); 00394 00395 //if ( m_tracksFitter ) toolSvc()->releaseTool( m_tracksFitter ); 00396 //if ( m_veloTracksFitter ) toolSvc()->releaseTool( m_veloTracksFitter ); 00397 //if ( m_seedTracksFitter ) toolSvc()->releaseTool( m_seedTracksFitter ); 00398 00399 return GaudiAlgorithm::finalize(); // must be called after all other actions 00400 }
|
|
Algorithm initialization.
Definition at line 87 of file TrueTracksCreator.cpp. References m_fitTracks, m_itClus2MCP, m_itTracker, m_itTrackerPath, m_otTim2MCHit, m_otTracker, m_otTrackerPath, m_stateCreator, m_trackSelector, m_velo, m_veloClus2MCP, and m_veloPath. 00088 { 00089 StatusCode sc = GaudiAlgorithm::initialize(); // must be executed first 00090 00091 // Retrieve the MC associators 00092 // --------------------------- 00093 sc = toolSvc() -> retrieveTool( "OTTime2MCHitAsct", m_otTim2MCHit ); 00094 if ( !sc ) { return sc; } 00095 sc = toolSvc() -> retrieveTool( "ITCluster2MCParticleAsct", m_itClus2MCP ); 00096 if ( !sc ) { return sc; } 00097 sc = toolSvc() -> retrieveTool( "VeloCluster2MCParticleAsct", m_veloClus2MCP ); 00098 if ( !sc ) { return sc; } 00099 debug() << "Associators retrieved." << endreq; 00100 00101 // Load Geometry from XmlDDDB 00102 // -------------------------- 00103 m_otTracker = getDet<DeOTDetector>( m_otTrackerPath ); 00104 00105 m_itTracker = getDet<DeSTDetector>( m_itTrackerPath ); 00106 00107 m_velo = getDet<DeVelo>( m_veloPath ); 00108 debug() << "Geometry read in." << endreq; 00109 00110 // Retrieve the TrackSelector tool 00111 m_trackSelector = tool<ITrackSelector>( "TrackSelector" ); 00112 00113 // Retrieve the TrueStateCreator tool 00114 m_stateCreator = tool<IStateCreator>( "TrueStateCreator" ); 00115 00116 if ( m_fitTracks ) { 00117 always() << "Fitting part of algorithm not yet done!" << endreq; 00118 // sc = toolSvc()->retrieveTool( "TrFitAtAllPoints", "Fitter", 00119 // m_tracksFitter, this ); 00120 // if ( !sc ) { return sc; } 00121 // sc = toolSvc()->retrieveTool( "TrFitAtAllPoints", "SeedFitter", 00122 // m_seedTracksFitter, this ); 00123 // if ( !sc ) { return sc; } 00124 // sc = toolSvc()->retrieveTool( "TrFitAtAllPoints", "VeloFitter", 00125 // m_veloTracksFitter, this ); 00126 // if ( !sc ) { return sc; } 00127 // sc = toolSvc()->retrieveTool( "TrFitAtAllPoints", "VeloTTFitter", 00128 // m_veloTTTracksFitter, this ); 00129 // if ( !sc ) { return sc; } 00130 } 00131 00132 info() << "initialized succesfully" << endreq; 00133 00134 return StatusCode::SUCCESS; 00135 }
|
|
Initialize seed state.
Definition at line 541 of file TrueTracksCreator.cpp. References m_errorP, m_errorTx2, m_errorTy2, m_errorX2, m_errorY2, m_stateCreator, and State::qOverP(). Referenced by execute(). 00544 { 00545 State* state; 00546 StatusCode sc = m_stateCreator -> createState( mcPart, z, state ); 00547 if ( sc.isSuccess() ) { 00548 // set covariance matrix to a somewhat larger value for the fit 00549 HepSymMatrix& cov = state -> covariance(); 00550 cov.fast(1,1) = m_errorX2; 00551 cov.fast(2,2) = m_errorY2; 00552 cov.fast(3,3) = m_errorTx2; 00553 cov.fast(4,4) = m_errorTy2; 00554 cov.fast(5,5) = pow( m_errorP * state->qOverP(), 2. ); 00555 00556 track -> addToStates( *state ); 00557 00558 double qP = state -> qOverP(); 00559 00560 debug() << "- State added:" << endreq 00561 << " - position = " << state -> position() << " mm" <<endreq 00562 << " - momentum = " << state -> momentum() << " MeV" <<endreq 00563 << " - P = " << state -> p() << " MeV" <<endreq 00564 << " - charge = " << ( qP != 0. ? int(fabs(qP)/qP) : 0 ) << endreq; 00565 } 00566 else { 00567 delete state; 00568 debug() << "-> unable to add a State!" << endreq; 00569 } 00570 00571 return sc; 00572 }
|
|
Register the tracks in the Transient event store.
Definition at line 527 of file TrueTracksCreator.cpp. References m_tracksTESPath. Referenced by execute(). 00528 { 00529 StatusCode sc = put( tracksCont, m_tracksTESPath ); 00530 if ( sc.isFailure() ) 00531 error() << "Unable to register the output container at " 00532 << m_tracksTESPath << ". Status is " << sc << endreq; 00533 verbose() << "Tracks container stored in the TES" << endreq; 00534 00535 return StatusCode::SUCCESS; 00536 }
|
|
Definition at line 76 of file TrueTracksCreator.h. 00076 { 00077 std::sort( track->measurements().begin(), 00078 track->measurements().end(), 00079 TrackFunctor::increasingByZ<Measurement>() ); 00080 };
|
|
true if IT clusters should be put on track
Definition at line 126 of file TrueTracksCreator.h. Referenced by execute(), and TrueTracksCreator(). |
|
true if OT clusters should be put on track
Definition at line 125 of file TrueTracksCreator.h. Referenced by execute(), and TrueTracksCreator(). |
|
true if Velo R clusters should be put on track
Definition at line 127 of file TrueTracksCreator.h. Referenced by execute(), and TrueTracksCreator(). |
|
dp/p
Definition at line 139 of file TrueTracksCreator.h. Referenced by initializeState(), and TrueTracksCreator(). |
|
Error^2 on slope x.
Definition at line 137 of file TrueTracksCreator.h. Referenced by initializeState(), and TrueTracksCreator(). |
|
Error^2 on slope y.
Definition at line 138 of file TrueTracksCreator.h. Referenced by initializeState(), and TrueTracksCreator(). |
|
Error^2 on x.
Definition at line 135 of file TrueTracksCreator.h. Referenced by initializeState(), and TrueTracksCreator(). |
|
Error^2 on y.
Definition at line 136 of file TrueTracksCreator.h. Referenced by initializeState(), and TrueTracksCreator(). |
|
if true then the tracks are fitted
Definition at line 129 of file TrueTracksCreator.h. Referenced by initialize(), and TrueTracksCreator(). |
|
initialize seed state
Definition at line 128 of file TrueTracksCreator.h. Referenced by execute(), and TrueTracksCreator(). |
|
Definition at line 105 of file TrueTracksCreator.h. Referenced by addITClusters(), finalize(), and initialize(). |
|
Pointer to ST detector element.
Definition at line 110 of file TrueTracksCreator.h. Referenced by addITClusters(), and initialize(). |
|
Name of the IT XML geom path.
Definition at line 113 of file TrueTracksCreator.h. Referenced by initialize(), and TrueTracksCreator(). |
|
Minimum number of hits on the track.
Definition at line 134 of file TrueTracksCreator.h. Referenced by execute(), and TrueTracksCreator(). |
|
Definition at line 104 of file TrueTracksCreator.h. Referenced by addOTTimes(), finalize(), and initialize(). |
|
Pointer to OT detector element.
Definition at line 109 of file TrueTracksCreator.h. Referenced by addOTTimes(), and initialize(). |
|
Name of the OT XML geom path.
Definition at line 112 of file TrueTracksCreator.h. Referenced by initialize(), and TrueTracksCreator(). |
|
Location of the associator table.
Definition at line 133 of file TrueTracksCreator.h. Referenced by execute(), and TrueTracksCreator(). |
|
Create 'seed' state at last measurement.
Definition at line 118 of file TrueTracksCreator.h. Referenced by addVeloClusters(), execute(), initialize(), and initializeState(). |
|
Track selection tool.
Definition at line 117 of file TrueTracksCreator.h. Referenced by execute(), finalize(), and initialize(). |
|
TrTracks container path in EvDS.
Definition at line 132 of file TrueTracksCreator.h. Referenced by registerTracks(), and TrueTracksCreator(). |
|
Store true states at each measurement position.
Definition at line 131 of file TrueTracksCreator.h. Referenced by execute(), and TrueTracksCreator(). |
|
upstream or downstream fit
Definition at line 130 of file TrueTracksCreator.h. Referenced by execute(), and TrueTracksCreator(). |
|
Pointer to VELO detector element.
Definition at line 111 of file TrueTracksCreator.h. Referenced by addVeloClusters(), and initialize(). |
|
Definition at line 106 of file TrueTracksCreator.h. Referenced by addVeloClusters(), finalize(), and initialize(). |
|
Name of the Velo XML geom path.
Definition at line 114 of file TrueTracksCreator.h. Referenced by initialize(), and TrueTracksCreator(). |