Back to index

See source file

CSidcTrackingStrategy.h

 
//----------------------------------------------------------------------------- 
//  $Header: /tmp_mnt/asis/offline/ceres/cool/project/RCS/CSidcTrackingStrategy.h,v 3.2 1997/04/25 15:05:29 messer Exp $ 
// 
//  COOL Program Library   
//  Copyright (C) CERES collaboration, 1996 
// 
//  Declaration of class CSidcTrackingStrategy. 
// 
//  Creates all tracks according to the hits of the detectors passed 
//  as arguments. Passing a detector as the null-pointer is allowed. 
//  In this case the referring detector is not included into the tracking. 
//  Detectors may be passed to the constructor or set individually. 
// 
//  NOTE: 
//  getTracks copies tracks/segments according to a bitwise OR of  
//  one or several CTrackMask masks. The result is filled 
//  into the given track list. 
//  Note, that it is the users responsibility to handle the 
//  memory allocated by the obtained tracks. 
//  'getTracks' creates a deep copy not a shallow one. 
//  example: 
//     strategy.getTracks(trackList, hasVertex|hasSidc2Match); 
// 
//  The returned list will contain all segments which at least have  
//  the requested bit(s) set. E.g., if you ask for 
//  'hasVertex|hasSidc2Match' there may well be segments with the 
//  hasSidc1Match bit set.  
//   
//----------------------------------------------------------------------------- 
#ifndef CSIDCTRACKINGSTRATEGY_H 
#define CSIDCTRACKINGSTRATEGY_H 
 
#include "cool.h" 
#include "CSortedList.h" 
#include "CTrack.h" 
#include "CTrackingStrategy.h"  
    
class CVertex; 
class CSidc; 
 
class CSidcTrackingStrategy : public CTrackingStrategy { 
public: 
   CSidcTrackingStrategy(CVertex*, CSidc*, CSidc*, const char* = 0);  
   ~CSidcTrackingStrategy();  
    
   virtual CBoolean makeTracks() {return makeSidcTracks();} 
   CBoolean getTracks(CSortedList<CTrack>& list, unsigned long mask)  
   {return getSidcTracks(list, mask);} 
 
   void clearSidcTracks() { if (sidcTracks) sidcTracks->clearAndDestroy(); } 
    
   void	setVertex(CVertex* ptr) {vertex = ptr;} 
   void	setSidc1(CSidc* ptr)   {sidc1 = ptr;} 
   void	setSidc2(CSidc* ptr)   {sidc2 = ptr;} 
       
   CSortedList<CTrack>* getInternalSidcTrackList() const { return sidcTracks; } 
   void attachInternalSidcTrackList(CSortedList<CTrack>* tlist) { sidcTracks = tlist; } 
   CSortedList<CTrack>* detachInternalSidcTrackList(); 
    
protected:    
   CBoolean makeSidcTracks(); 
   CBoolean getSidcTracks(CSortedList<CTrack>&, unsigned long); 
   void     getClosestHitInSidc(const CSidcHit*, CEventCoord, const CSidc*, CSidcHit*&, CSidcHit*&, 
				int&, double&, double&, double&); 
 
protected: 
   const CVertex* vertex; 
   const CSidc*   sidc1; 
   const CSidc*   sidc2; 
   CSortedList<CTrack>* sidcTracks; 
};    
			      
#endif /* CSIDCTRACKINGSTRATEGY_H */ 

Back to index

See source file