Back to index

See source file

CCandidatory.h

 
//----------------------------------------------------------------------------- 
//  $Header: /tmp_mnt/asis/offline/ceres/cool/project/RCS/CCandidatory.h,v 1.6 1997/04/25 15:05:38 messer Exp $ 
// 
//  COOL Program Library   
//  Copyright (C) CERES collaboration, 1996 
// 
//  Declaration of class ... 
// 
//----------------------------------------------------------------------------- 
#ifndef CCANDIDATORY_H 
#define CCANDIDATORY_H 
 
#include "cool.h" 
#include "CRich1.h" 
#include "CRich2.h" 
#include "CPadChamber.h" 
#include "CVertex.h" 
#include "CSortedList.h" 
#include "CElectronTrack.h" 
#include "CCandidatorySetup.h" 
 
#define C_SETUPFILE_CANDIDATORY "setup.candidatory" 
 
// 
// This class is a set of tools to make rich ring candidates using the 
// information from the external tracking detectors at the earliest 
// possible stage. The idea is to use a very low threshold in the hough 
// transformation, thus keeping the efficiency as high as possible. 
// The resulting high background should be reduced by requiring a match 
// to the silicon drift detectors or the padchamber. 
// 
// Functions and what they do: 
// 
// (i)   CBoolean makeHoughCandidates(CList<CElectronTrack>&, CRich1&) 
//       - Match rich1 hough candidates to silicon track segments and store 
//         the surviving candidates in the rich1 candidate list. 
//       - rich1.makeHoughCandidates must have been called before. 
//       - Silicon tracks must have been made before. 
// 
// (ii)  CBoolean makeHoughCandidates(CList<CElectronTrack>&, CRich2&, CPadChamber&) 
//       - Match rich2 hough candidates to the closestPadcHits of tracks in the given 
//         trackllist and store the surviving candidates in the rich2 candidate list. 
//       - rich2.makeHoughCandidates must have been called before. 
//       - rich-padc-tracks must have been made before, best done by 
//           make rich1 rings 
//           make rich2 hough-candidates 
//           call copyCandidatesToRings(rich2) 
//           make full tracks 
// 
// (iii) CBoolean makeHoughCandidates(CVertex&, CRich1&, CRich2&, CPadChamber&) 
//       - Match rich2 hough candidates to the padc hits using ALL possible 
//         combinations of rich1 rings and rich2 candidates to calculate the 
//         hit-predictor in the padchamber. 
//       - rich1 rings must have been made before. 
//       - rich2.makeHoughCandidates must have been called before. 
// 
// (iv)  CBoolean makeHoughCandidates(CRich2&, CPadChamber&) 
//       - For each rich2 hough-candidate check for a hit in a butterfly in the 
//         padchamber. 
//       - rich2.makeHoughCandidates must have been called before. 
//        
class CCandidatory {  
 
public:  
  CCandidatory(const char* = 0); 
  ~CCandidatory(); 
 
  CCandidatory(const CCandidatory &); 
  CCandidatory & operator = (const CCandidatory &); 
 
public:  
   CList<CRingCandidate>* getCandidateList() const { return candidateList; } 
 
   void copyCandidatesToRings(CRich&); 
   CBoolean makeHoughCandidates(CSortedList<CElectronTrack>&, CRich1&); 
   CBoolean makeHoughCandidates(CSortedList<CElectronTrack>&, CRich2&, CPadChamber&); 
   CBoolean makeHoughCandidates(CVertex&, CRich1&, CRich2&, CPadChamber&); 
   CBoolean makeHoughCandidates(CVertex&, CRich2&, CPadChamber&); 
    
   // 
   // The following four functions only call the ones above. 
   // They are needed, because otcl does not treat the 
   // overloading correctly. 
   // 
   CBoolean makeRich1Candidates(CSortedList<CElectronTrack>& tl, CRich1& r1) 
   { 
      return makeHoughCandidates(tl, r1); 
   } 
   CBoolean makeRich2TrackCandidates(CSortedList<CElectronTrack>& tl, CRich2& r2, CPadChamber& pc) 
   { 
      return makeHoughCandidates(tl, r2, pc); 
   } 
   CBoolean makeRich2Candidates(CVertex& vtx, CRich1& r1, CRich2& r2, CPadChamber& pc) 
   { 
      return makeHoughCandidates(vtx, r1, r2, pc); 
   } 
   CBoolean makePureRich2PadcCandidates(CVertex& vtx, CRich2& r2, CPadChamber& pc) 
   { 
      return makeHoughCandidates(vtx, r2, pc); 
   } 
    
   virtual void listSetup(ostream& = cout) const;  
 
private: 
   double padChamberButterfly(double); 
   double rich2PadcPhiDeflectionAt1GeV(double); 
    
private: 
   CCandidatorySetup *setup; 
   CList<CRingCandidate> *candidateList; 
};  
 
#endif /* CCANDIDATORY_H */  

Back to index

See source file