Back to index

See source file

CTrackingSetup.h

 
//----------------------------------------------------------------------------- 
//  $Header: /asis/offline/ceres/cool/project/RCS/CTrackingSetup.h,v 3.4 1997/07/23 13:15:10 messer Exp $ 
// 
//  COOL Program Library   
//  Copyright (C) CERES collaboration, 1996 
// 
//  Declaration of class CTrackingSetup. 
// 
//----------------------------------------------------------------------------- 
#ifndef CTRACKINGSETUP_H 
#define CTRACKINGSETUP_H 
 
#include "cool.h"  
#include "CSetup.h"  
 
class CTrackingSetup: public CSetup {  
public:  
   CTrackingSetup();  
    
public:  
   void _read(const char*); 
   void _list(ostream& = cout); 
   void read(const char* file); 
   void list(ostream& ost = cout); 
    
public: 
   double getPtCut() const { return ptCut; } 
   double getRich1CenterResolution() const { return rich1CenterResolution; } 
   double getRich2CenterResolution() const { return rich2CenterResolution; } 
   double getSidcTrackResolution() const { return sidcTrackResolution; } 
   double getPadcHitResolution() const { return padcHitResolution; } 
   double getMultipleScattering() const { return multipleScattering; } 
   double getButterflySigmas() const { return butterflySigmas; } 
   double getPhiMatchWindowRichSidc() const { return phiMatchWindowRichSidc; } 
   double getThetaMatchWindowRichSidc() const { return thetaMatchWindowRichSidc; } 
   double getRadiusMatchWindowSidc12() const { return radiusMatchWindowSidc12; } 
   double getMaxDeltaXYRichPadc() const { return maxDeltaXYRichPadc; } 
   double getPhiMatchWindowSidc12() const { return phiMatchWindowSidc12; }       
   double getPhiMatchFactorSidc12() const { return phiMatchFactorSidc12; }       
   CBoolean getFieldFlag() const { return fieldFlag; } 
   int getNumberOfRuns() const { return numberOfRuns; } 
   int getDefaultFieldInPercent() const { return defaultFieldInPercent; } 
   inline double getPhiDeflectionParameters(int) const; 
   inline double getFieldEffectParameters(int) const;  
   inline int    getRunsWithDifferentField(int) const; 
   inline int    getFieldInPercent(int); 
    
   void setPtCut(double val)                    { ptCut = val; } 
   void setFieldFlag(CBoolean val)              { fieldFlag = val; } 
   void setButterflySigmas(double val)          { butterflySigmas = val; } 
   void setMultipleScattering(double val)       { multipleScattering = val; } 
   void setRich1CenterResolution(double val)    { rich1CenterResolution = val; } 
   void setRich2CenterResolution(double val)    { rich2CenterResolution = val; } 
   void setSidcTrackResolution(double val)      { sidcTrackResolution = val; } 
   void setPadcHitResolution(double val)        { padcHitResolution = val; } 
   void setRadiusMatchWindowSidc12(double val)  { radiusMatchWindowSidc12 = val; } 
   void setMaxDeltaXYRichPadc(double val)       { maxDeltaXYRichPadc = val; } 
   void setPhiMatchWindowSidc12(double val)     { phiMatchWindowSidc12 = val; } 
   void setPhiMatchFactorSidc12(double val)     { phiMatchFactorSidc12 = val; } 
   void setPhiMatchWindowRichSidc(double val)   { phiMatchWindowRichSidc = val; }    
   void setThetaMatchWindowRichSidc(double val) { thetaMatchWindowRichSidc = val; }  
 
   // 
   // get and set functions for pion analysis 
   // 
   double getRich1RotationAngle() const { return rich1RotationAngle; } 
   double getRich2RotationAngle() const { return rich2RotationAngle; } 
   double getPadChamberRotationAngle() const { return padChamberRotationAngle; } 
   double getPCFensterMatch() const { return pCFensterMatch; } 
   double getWaitedPhiWindow() const { return waitedPhiWindow; } 
   double getRich1AsymptoticRadius() const { return rich1AsymptoticRadius; } 
   double getRich2AsymptoticRadius() const { return rich2AsymptoticRadius; } 
   double getRelRadiusAllowedDifference() const { return relRadiusAllowedDifference; } 
   double getCutRelRadius1() const { return cutRelRadius1; } 
   double getCutRelRadius2() const { return cutRelRadius2; } 
   double getPhiWindow() const { return phiWindow; } 
   double getThetaWindow() const { return thetaWindow; } 
   double getRadiusFactor() const { return radiusFactor; } 
   int    getMinHits() const { return minHits; } 
   int    getVectorSize() const { return vectorSize; } 
 
   void setRich1RotationAngle(double val)         { rich1RotationAngle = val; } 
   void setRich2RotationAngle(double val)         { rich2RotationAngle = val; } 
   void setPadChamberRotationAngle(double val)    { padChamberRotationAngle = val; } 
   void setPCFensterMatch(double val)             { pCFensterMatch = val; } 
   void setWaitedPhiWindow(double val)            { waitedPhiWindow = val; } 
   void setRich1AsymptoticRadius(double val)      { rich1AsymptoticRadius = val; } 
   void setRich2AsymptoticRadius(double val)      { rich2AsymptoticRadius = val; } 
   void setRelRadiusAllowedDifference(double val) { relRadiusAllowedDifference = val; } 
   void setCutRelRadius1(double val)              { cutRelRadius1 = val; } 
   void setCutRelRadius2(double val)              { cutRelRadius2 = val; } 
   void setPhiWindow(double val)                  { phiWindow = val; } 
   void setThetaWindow(double val)                { thetaWindow = val; } 
 
   // 
   // get and set functions for photon analysis 
   // 
   int getMinDeDxSidc2() const { return minDeDxSidc2; } 
 
   void setMinDeDxSidc2(int val) { minDeDxSidc2 = val; } 
    
   // 
   // get and set functions for candidate filtering 
   // 
   double   getHoughMaxDeltaXYRich1Sidc() const { return houghMaxDeltaXYRich1Sidc; } 
   double   getHoughMaxDeltaXYRich2Padc() const { return houghMaxDeltaXYRich2Padc; } 
    
   void setHoughMaxDeltaXYRich1Sidc(double dxy) { houghMaxDeltaXYRich1Sidc = dxy; } 
   void setHoughMaxDeltaXYRich2Padc(double dxy) { houghMaxDeltaXYRich2Padc = dxy; } 
    
protected:  
   CBoolean fieldFlag;			// 0 = off, 1 = on 
   double   phiDeflectionParameters[3]; // parameter to calculate phi deflection as function of theta 
   double   fieldEffectParameters[3];   // to calculate 2nd order field effect as function of theta and dphi 
 
   // 
   // variables for run-dependent field settings 
   // 
   int numberOfRuns; 
   int *runsWithDifferentField; 
   int defaultFieldInPercent; 
   int *fieldInPercent; 
   int lastRequestedRunNumber; 
   int indexOfLastRequestedRun; 
    
   double   ptCut;			// pt cut in GeV/c 
   double   rich1CenterResolution;      // RICH-1 ring center resolution in mrad 
   double   rich2CenterResolution;      // RICH-2 ring center resolution in mrad 
   double   sidcTrackResolution;        // SIDC 1/2 track resolution in mrad 
   double   padcHitResolution;          // PadChamber hit resolution in mrad 
   double   multipleScattering;         // multiple scattering @ 1 GeV/c in mrad 
   double   butterflySigmas;            // scales butterfly match window 
   double   maxDeltaXYRichPadc;         // max distance between padc predictor and padc hit (in pads) 
   double   phiMatchWindowRichSidc;     // in rad 
   double   thetaMatchWindowRichSidc;   // in mrad 
   double   radiusMatchWindowSidc12;    // in cm 
   double   phiMatchWindowSidc12;       // in rad  
   double   phiMatchFactorSidc12;       // used in search for closest and next hit 
 
   // 
   // for pion analysis 
   // 
   int      minHits;                    // minimum number of hits for 1 ring 
   int      vectorSize;                 // size of RadiusVector; 
   double   radiusFactor; 
   double   phiWindow;		 
   double   thetaWindow; 
   double   cutRelRadius1;		 
   double   cutRelRadius2; 
   double   relRadiusAllowedDifference;   
   double   rich1AsymptoticRadius; 
   double   rich2AsymptoticRadius; 
   double   waitedPhiWindow; 
   double   pCFensterMatch;  
   double   rich1RotationAngle;  
   double   rich2RotationAngle;  
   double   padChamberRotationAngle; 
 
   // 
   // for photon analysis 
   // 
   int minDeDxSidc2; 
 
   // 
   // for candidate filtering 
   // 
   double   houghMaxDeltaXYRich1Sidc;   // in pads 
   double   houghMaxDeltaXYRich2Padc;   // in pads 
}; 
 
double CTrackingSetup::getPhiDeflectionParameters(int i) const  
{ 
   if ( i < 0 || i >= 3 ) 
      return 0.; 
   else   
      return phiDeflectionParameters[i]; 
} 
 
double CTrackingSetup::getFieldEffectParameters(int i) const  
{ 
   if ( i < 0 || i >= 3 ) 
      return 0.; 
   else   
      return fieldEffectParameters[i]; 
} 
 
int CTrackingSetup::getRunsWithDifferentField(int i) const 
{ 
   if (i < 0 || i >= numberOfRuns) 
      return 0; 
   else 
      return runsWithDifferentField[i]; 
} 
 
int CTrackingSetup::getFieldInPercent(int requestedRunNumber) 
{ 
   if (requestedRunNumber == lastRequestedRunNumber) { 
      return fieldInPercent[indexOfLastRequestedRun]; 
   } 
   else { 
      for (int i=numberOfRuns-1; i>=0; i--) { 
	 if (runsWithDifferentField[i] <= requestedRunNumber) { 
	    lastRequestedRunNumber = requestedRunNumber; 
	    indexOfLastRequestedRun = i; 
	    return fieldInPercent[i]; 
	 } 
      } 
      return defaultFieldInPercent; 
   } 
} 
#endif /* CTRACKINGSETUP_H */  

Back to index

See source file