CRichSetup.h
//-----------------------------------------------------------------------------
// $Header: CRichSetup.h,v 3.5 97/09/09 15:57:45 messer Exp $
//
// COOL Program Library
// Copyright (C) CERES collaboration, 1996
//
// Declarations for CRichSetup class.
//
//-----------------------------------------------------------------------------
#ifndef CRICHSETUP_H
#define CRICHSETUP_H
#include "cool.h"
#include "CRichLikeSetup.h"
class CRichSetup : public CRichLikeSetup {
public:
CRichSetup();
public:
void _read(const char*);
void _list(ostream& = cout);
void read(const char*);
void list(ostream& = cout);
public:
int getNSpokes () const { return nSpokes; }
int getNMirrorSegments () const { return nMirrorSegments; }
double getMirrorSegmentOffset () const { return mirrorSegmentOffset; }
double getSpokeWidth () const { return spokeWidth; }
double getFirstSpokeAngle () const { return firstSpokeAngle; }
double getFocalLength () const { return focalLength; }
double getFudgeFocalLength () const { return fudgeFocalLength; }
double getDetectorDistance () const { return detectorDistance; }
double getMirrorDistance () const { return mirrorDistance; }
double getGammaThreshold () const { return gammaThreshold; }
double getRadiatorLength () const { return radiatorLength; }
double getAsymptoticRadius () const { return asymptoticRadius; }
int getHoughMinAmp () const { return houghMinAmp; }
int getHoughMinFitHit () const { return houghMinFitHit; }
double getHoughMaxFitDis () const { return houghMaxFitDis; }
double getHoughChernovWidth () const { return houghChernovWidth; }
double getHoughMinDistance () const { return houghMinDistance; }
double getHoughMaxDeltaRadius() const { return houghMaxDeltaRadius; }
int getMinHitsPerRing () const { return minHitsPerRing; }
double getMaxHitRingDistance() const { return maxHitRingDistance; }
double getHalfRingSumMask() const { return halfRingSumMask; }
double getMaxChi2PerDofForRing() const { return maxChi2PerDofForRing;}
double getDeltaThetaCorrections(int i) const
{
if ( i < 0 || i >= 2 )
return 0.;
else
return deltaThetaCorrection[i];
}
inline double getSegmentFocalLength(int i) const
{
if ( i < 0 || i >= getNMirrorSegments() )
return 0.;
else
return segmentFocalLength[i];
}
inline double getSegmentFocalLengthCorrection(int i) const
{
if ( i < 0 || i >= getNMirrorSegments() )
return 0.;
else
return segmentFocalLengthCorrection[i];
}
inline float getSegmentFocalLengthCorrectionOffset() const
{ return segmentFocalLengthCorrectionOffset; }
inline CBoolean getUseVariableFocalLength() const { return useVariableFocalLength; }
double getPhiOffset() const { return phiOffset; }
int getClusterMaxSat() const { return clusterMaxSat; }
int getClusterMaxPads() const { return clusterMaxPads; }
int getClusterMinPads() const { return clusterMinPads; }
int getClusterMaxSat2() const { return clusterMaxSat2; }
int getClusterMaxSatPads() const { return clusterMaxSatPads; }
int getClusterMinSmallSize() const { return clusterMinSmallSize; }
int getClusterBigClusterWidth() const { return clusterBigClusterWidth; }
int getClusterSatTrackMaxWidth() const { return clusterSatTrackMaxWidth; }
int getClusterBigClusterMaxPads() const { return clusterBigClusterMaxPads; }
int getClusterSatTrackMaxSatPads() const { return clusterSatTrackMaxSatPads; }
int getClusterMaxPadsAboveThreshold() const { return clusterMaxPadsAboveThreshold; }
float getClusterMeanAmp() const { return clusterMeanAmp; }
float getClusterMaxLoad() const { return clusterMaxLoad; }
float getClusterMinRms2() const { return clusterMinRms2; }
float getClusterMaxRatio() const { return clusterMaxRatio; }
float getClusterMaxOccup() const { return clusterMaxOccup; }
float getClusterMaxLoad2() const { return clusterMaxLoad2; }
float getClusterSatPadAmp() const { return clusterSatPadAmp; }
float getClusterMaxRmsSize() const { return clusterMaxRmsSize; }
float getClusterPadLineRms2() const { return clusterPadLineRms2; }
float getClusterSatPadRatio() const { return clusterSatPadRatio; }
float getClusterLowThreshold() const { return clusterLowThreshold; }
float getClusterHighThreshold() const { return clusterHighThreshold; }
double getDeltaPhiFactor() const { return deltaPhiFactor; }
double getRadiusFactor1() const { return radiusFactor1; }
double getRadiusFactor2() const { return radiusFactor2; }
double getMCRingSigma() const { return mcRingSigma; }
void setFocalLength (const double fl) { focalLength = fl; }
void setFudgeFocalLength (const double fd) { fudgeFocalLength = fd; }
void setDetectorDistance (const double dd) { detectorDistance = dd; }
void setMirrorDistance (const double md) { mirrorDistance = md; }
CBoolean setSegmentFocalLength(int mirror, double focalLength);
CBoolean setSegmentFocalLengthCorrection(int mirror, double focalLengthCorrection );
void setSegmentFocalLengthCorrectionOffset(const double correction)
{ segmentFocalLengthCorrectionOffset = correction;}
void setUseVariableFocalLength(CBoolean val) { useVariableFocalLength = val; }
void setPhiOffset(const double val) { phiOffset = val; }
void setGammaThreshold (const double gt) { gammaThreshold = gt; }
void setRadiatorLength (const double rl) { radiatorLength = rl; }
void setAsymptoticRadius (const double ar) { asymptoticRadius = ar; }
void setMinHitsPerRing (const int n) { minHitsPerRing = n; }
void setMaxHitRingDistance(const double d) { maxHitRingDistance = d; }
void getMaxChi2PerDofForRing(const double val) { maxChi2PerDofForRing = val;}
void setHoughMinAmp (const int n) { houghMinAmp = n; }
void setHalfRingSumMask (const double hw) { halfRingSumMask = hw; }
void setDeltaThetaCorrections(const double first, const double second)
{deltaThetaCorrection[0] = first; deltaThetaCorrection[1] = second;}
void setClusterMaxSat(int newMaxSat) { clusterMaxSat = newMaxSat; }
void setClusterMaxPads(int newMaxPad) { clusterMaxPads = newMaxPad ; }
void setClusterMinPads(int newMinPad) { clusterMinPads = newMinPad ; }
void setClusterMaxSat2(int newMaxSat2) { clusterMaxSat2 = newMaxSat2; }
void setClusterMaxSatPads(int newVal) { clusterMaxSatPads = newVal; }
void setClusterMinSmallSize(int newVal) { clusterMinSmallSize = newVal; }
void setClusterBigClusterWidth(int newVal) { clusterBigClusterWidth = newVal; }
void setClusterSatTrackMaxWidth(int newVal) { clusterSatTrackMaxWidth= newVal; }
void setClusterBigClusterMaxPads(int newVal) { clusterBigClusterMaxPads= newVal; }
void setClusterSatTrackMaxSatPads(int newVal) { clusterSatTrackMaxSatPads= newVal; }
void setClusterMaxPadsAboveThreshold(int newVal) { clusterMaxPadsAboveThreshold = newVal; }
void setClusterMeanAmp(float newVal) { clusterMeanAmp = newVal; }
void setClusterMaxLoad(float newMaxLoad) { clusterMaxLoad = newMaxLoad; }
void setClusterMinRms2(float newMinRms2) { clusterMinRms2 = newMinRms2; }
void setClusterMaxRatio(float newMaxRatio ) { clusterMaxRatio = newMaxRatio; }
void setClusterMaxOccup(float newMaxOccup) { clusterMaxOccup = newMaxOccup; }
void setClusterMaxLoad2(float newMaxLoad2) { clusterMaxLoad2 = newMaxLoad2; }
void setClusterSatPadAmp(float newVal) { clusterSatPadAmp = newVal; }
void setClusterMaxRmsSize(float newVal) { clusterMaxRmsSize = newVal; }
void setClusterPadLineRms2(float newVal) { clusterPadLineRms2 = newVal; }
void setClusterSatPadRatio(float newVal) { clusterSatPadRatio = newVal; }
void setClusterLowThreshold(float newVal) { clusterLowThreshold = newVal; }
void setClusterHighThreshold(float newVal) { clusterHighThreshold = newVal; }
void setDeltaPhiFactor(double newVal) { deltaPhiFactor = newVal; }
void setRadiusFactor1(double newVal) { radiusFactor1 = newVal; }
void setRadiusFactor2(double newVal) { radiusFactor2 = newVal; }
void setMCRingSigma(double newVal) { mcRingSigma = newVal; }
protected:
int nSpokes; // number of spokes
int nMirrorSegments; // number of mirror segments
double mirrorSegmentOffset; // offset to the next lower mirror edge from phi=0
double spokeWidth; // in pads
double firstSpokeAngle; // in degrees (!)
double focalLength; // in cm
double fudgeFocalLength; // fudge focal length in cm
double detectorDistance; // detector-mirror distance in cm
double mirrorDistance; // mirror-target distance in cm
double segmentFocalLength[10]; // individual focal lengths for each mirror segment
double segmentFocalLengthCorrection[10]; // individual focal length correction for each mirror segment
double segmentFocalLengthCorrectionOffset; // common offset for focal length correction of mirror segments
CBoolean useVariableFocalLength;
double phiOffset; // to correct detector rotation
double gammaThreshold; // gamma threshold
double radiatorLength; // radiator length in cm
double asymptoticRadius; // asymptotic radius for electrons
int houghMinAmp; // cut for selection of maxima
int houghMinFitHit; // min. num. of hits in chernov mask
double houghMaxFitDis; // max. dist./nhit btw. cand-center and fit-center
double houghChernovWidth; // width of mask for Chernov Fit
double houghMinDistance; // min distance between two candidates
double houghMaxDeltaRadius; // max difference betw. asymp. radius and result of chernov fit
int minHitsPerRing;
double maxHitRingDistance; // max. distance from circumference in pads
double maxChi2PerDofForRing; // quality cut after ring fitting
double deltaThetaCorrection[2]; // deltaTheta(Theta) calibration correction constants
double halfRingSumMask; // for calculating the analog ring sum (in pads)
int clusterMaxSat; // cluster related cut variables
int clusterMaxPads;
int clusterMinPads;
int clusterMaxSat2;
int clusterMaxSatPads;
int clusterMinSmallSize;
int clusterBigClusterWidth;
int clusterSatTrackMaxWidth;
int clusterBigClusterMaxPads;
int clusterSatTrackMaxSatPads;
int clusterMaxPadsAboveThreshold;
float clusterMeanAmp;
float clusterMaxLoad;
float clusterMinRms2;
float clusterMaxRatio;
float clusterMaxOccup;
float clusterMaxLoad2;
float clusterSatPadAmp;
float clusterMaxRmsSize;
float clusterPadLineRms2;
float clusterSatPadRatio;
float clusterLowThreshold;
float clusterHighThreshold;
double mcRingSigma; // fudge factor to simulate bad ring center resolution
//
// for pion analysis
//
double deltaPhiFactor;
double radiusFactor1; // for drawing function
double radiusFactor2; // for drawing function
};
#endif /* CRICHSETUP_H */