Anp::FiducialCut Class Reference

#include <FiducialCut.h>

List of all members.

Public Types

enum  Strategy {
  kUnknown = 0, kDisk = 1, kSquareXY = 2, kSquareUV = 3,
  kCC2008 = 4
}

Public Member Functions

 FiducialCut ()
 ~FiducialCut ()
Strategy GetStrategy () const
bool Check () const
bool Count () const
bool Erase () const
bool Valid () const
bool SelectStdHep () const
bool UseTrackVtx () const
int FiducialKey () const
double NearMinZ () const
double NearMaxZ () const
double NearRadius () const
double NearSpanU () const
double NearSpanV () const
double NearBeamX () const
double NearBeamY () const
double FarSM1MinZ () const
double FarSM1MaxZ () const
double FarSM2MinZ () const
double FarSM2MaxZ () const
double FarMaxRadius () const
double FarMinRadius () const
double TrackZOffset () const
bool Init (std::string path="", bool quiet=true)
void Print (std::ostream &os=std::cout) const

Private Attributes

std::string fPath
Strategy fStrategy
bool fCheck
bool fCount
bool fErase
bool fValid
bool fSelectStdHep
bool fUseTrackVtx
int fFiducialKey
double fNearMinZ
double fNearMaxZ
double fNearRadius
double fNearSpanU
double fNearSpanV
double fNearBeamX
double fNearBeamY
double fFarSM1MinZ
double fFarSM1MaxZ
double fFarSM2MinZ
double fFarSM2MaxZ
double fFarMaxRadius
double fFarMinRadius
double fTrackZOffset

Detailed Description

Definition at line 17 of file FiducialCut.h.


Member Enumeration Documentation

Enumerator:
kUnknown 
kDisk 
kSquareXY 
kSquareUV 
kCC2008 

Definition at line 21 of file FiducialCut.h.

00022       {
00023          kUnknown  = 0,
00024          kDisk     = 1,
00025          kSquareXY = 2,
00026          kSquareUV = 3,
00027          kCC2008   = 4
00028       };


Constructor & Destructor Documentation

Anp::FiducialCut::FiducialCut (  ) 

Definition at line 19 of file FiducialCut.cxx.

00020    :fPath(),
00021     fStrategy(kDisk),
00022     fCheck(false),
00023     fCount(true),
00024     fErase(true),
00025     fValid(false),
00026     fSelectStdHep(false),
00027     fUseTrackVtx(false),
00028     fFiducialKey(100),
00029     fNearMinZ(0.0),
00030     fNearMaxZ(0.0),     
00031     fNearRadius(0.0),
00032     fNearSpanU(0.0),
00033     fNearSpanV(0.0),
00034     fNearBeamX(0.0),
00035     fNearBeamY(0.0),
00036     fFarSM1MinZ(0.0),
00037     fFarSM1MaxZ(0.0),
00038     fFarSM2MinZ(0.0),
00039     fFarSM2MaxZ(0.0),
00040     fFarMaxRadius(0.0),
00041     fFarMinRadius(0.0),
00042     fTrackZOffset(0.0)
00043 {
00044 }

Anp::FiducialCut::~FiducialCut (  ) 

Definition at line 47 of file FiducialCut.cxx.

00048 {
00049 }


Member Function Documentation

bool Anp::FiducialCut::Check (  )  const [inline]

Definition at line 107 of file FiducialCut.h.

References fCheck.

00107 { return fCheck; }

bool Anp::FiducialCut::Count (  )  const [inline]

Definition at line 108 of file FiducialCut.h.

References fCount.

00108 { return fCount; }

bool Anp::FiducialCut::Erase (  )  const [inline]

Definition at line 109 of file FiducialCut.h.

References fErase.

Referenced by Anp::SelectFiducial::Run().

00109 { return fErase; }

double Anp::FiducialCut::FarMaxRadius (  )  const [inline]

Definition at line 129 of file FiducialCut.h.

References fFarMaxRadius.

00129 { return fFarMaxRadius; }

double Anp::FiducialCut::FarMinRadius (  )  const [inline]

Definition at line 130 of file FiducialCut.h.

References fFarMinRadius.

00130 { return fFarMinRadius; }

double Anp::FiducialCut::FarSM1MaxZ (  )  const [inline]

Definition at line 125 of file FiducialCut.h.

References fFarSM1MaxZ.

00125 { return fFarSM1MaxZ; }

double Anp::FiducialCut::FarSM1MinZ (  )  const [inline]

Definition at line 124 of file FiducialCut.h.

References fFarSM1MinZ.

00124 { return fFarSM1MinZ; }

double Anp::FiducialCut::FarSM2MaxZ (  )  const [inline]

Definition at line 127 of file FiducialCut.h.

References fFarSM2MaxZ.

00127 { return fFarSM2MaxZ; }

double Anp::FiducialCut::FarSM2MinZ (  )  const [inline]

Definition at line 126 of file FiducialCut.h.

References fFarSM2MinZ.

00126 { return fFarSM2MinZ; }

int Anp::FiducialCut::FiducialKey (  )  const [inline]

Definition at line 114 of file FiducialCut.h.

References fFiducialKey.

Referenced by Anp::SelectFiducial::Run().

00114 { return fFiducialKey; }

FiducialCut::Strategy Anp::FiducialCut::GetStrategy (  )  const [inline]

Definition at line 105 of file FiducialCut.h.

References fStrategy.

00105 { return fStrategy; }

bool Anp::FiducialCut::Init ( std::string  path = "",
bool  quiet = true 
)

Definition at line 52 of file FiducialCut.cxx.

References fCheck, fCount, fErase, fFarMaxRadius, fFarMinRadius, fFarSM1MaxZ, fFarSM1MinZ, fFarSM2MaxZ, fFarSM2MinZ, fFiducialKey, fNearBeamX, fNearBeamY, fNearMaxZ, fNearMinZ, fNearRadius, fNearSpanU, fNearSpanV, fPath, fSelectStdHep, fStrategy, fTrackZOffset, fUseTrackVtx, fValid, Registry::Get(), kCC2008, kDisk, kSquareUV, kSquareXY, Anp::Read(), Anp::ReadRegistry(), and reg.

Referenced by Anp::SelectFiducial::Config().

00053 {
00054    Registry reg;
00055 
00056    fPath = path;
00057    fValid = false;
00058 
00059    if(!fPath.empty() && Anp::ReadRegistry(fPath, reg, quiet))
00060    {
00061       fValid = true;
00062    }
00063    else
00064    {
00065       const char *value_char = std::getenv("SRT_PRIVATE_CONTEXT");
00066       if(value_char)
00067       {
00068          fPath = std::string(value_char) + "/PhysicsNtuple/Config/FiducialCut.txt";
00069          if(Anp::ReadRegistry(fPath, reg, quiet))
00070          {
00071             fValid = true;
00072          }
00073       }
00074    }
00075 
00076    if(!fValid)
00077    {
00078       std::cerr << " FiducialCut - failed to find valid registry file" << std::endl;
00079       return false;
00080    }
00081 
00082    Anp::Read(reg, "Check", fCheck);
00083    Anp::Read(reg, "Count", fCount);
00084    Anp::Read(reg, "Erase", fErase);
00085 
00086    if(!Anp::Read(reg, "UseTrackVtx", fUseTrackVtx))
00087    {
00088       Anp::Read(reg, "UseTrackVertex", fUseTrackVtx);
00089    }
00090    
00091    if(!Anp::Read(reg, "SelectStdHep", fSelectStdHep))
00092    {
00093       Anp::Read(reg, "SelectFiducialStdHep", fSelectStdHep);
00094    }
00095 
00096    if(!reg.Get("FiducialKey", fFiducialKey)) reg.Get("FiducialCode", fFiducialKey);
00097 
00098    reg.Get("NearMinZ", fNearMinZ);
00099    reg.Get("NearMaxZ", fNearMaxZ);
00100    reg.Get("NearRadius", fNearRadius);
00101    reg.Get("NearSpanU", fNearSpanU);
00102    reg.Get("NearSpanV", fNearSpanV);
00103    reg.Get("NearBeamX", fNearBeamX);
00104    reg.Get("NearBeamY", fNearBeamY);
00105    reg.Get("FarSM1MinZ", fFarSM1MinZ);
00106    reg.Get("FarSM1MaxZ", fFarSM1MaxZ);
00107    reg.Get("FarSM2MinZ", fFarSM2MinZ);
00108    reg.Get("FarSM2MaxZ", fFarSM2MaxZ);
00109    reg.Get("FarMaxRadius", fFarMaxRadius);
00110    reg.Get("FarMinRadius", fFarMinRadius);
00111    reg.Get("TrackZOffset", fTrackZOffset);
00112    
00113    const char *value_char = 0;
00114    if(reg.Get("Strategy", value_char) && value_char)
00115    {
00116       if(std::strcmp("SquareUV", value_char) == 0)
00117       {
00118          fStrategy = kSquareUV;
00119       }
00120       else if(std::strcmp("SquareXY", value_char) == 0)
00121       {
00122          fStrategy = kSquareXY;
00123       }
00124       else if(std::strcmp("CC2008", value_char) == 0)
00125       {
00126          fStrategy = kCC2008;
00127       }
00128       else
00129       {
00130          fStrategy = kDisk;
00131       }
00132    }
00133 
00134    return true;
00135 }

double Anp::FiducialCut::NearBeamX (  )  const [inline]

Definition at line 121 of file FiducialCut.h.

References fNearBeamX.

00121 { return fNearBeamX; }

double Anp::FiducialCut::NearBeamY (  )  const [inline]

Definition at line 122 of file FiducialCut.h.

References fNearBeamY.

00122 { return fNearBeamY; }

double Anp::FiducialCut::NearMaxZ (  )  const [inline]

Definition at line 117 of file FiducialCut.h.

References fNearMaxZ.

00117 { return fNearMaxZ; }     

double Anp::FiducialCut::NearMinZ (  )  const [inline]

Definition at line 116 of file FiducialCut.h.

References fNearMinZ.

00116 { return fNearMinZ; }

double Anp::FiducialCut::NearRadius (  )  const [inline]

Definition at line 118 of file FiducialCut.h.

References fNearRadius.

00118 { return fNearRadius; }

double Anp::FiducialCut::NearSpanU (  )  const [inline]

Definition at line 119 of file FiducialCut.h.

References fNearSpanU.

00119 { return fNearSpanU; }

double Anp::FiducialCut::NearSpanV (  )  const [inline]

Definition at line 120 of file FiducialCut.h.

References fNearSpanV.

00120 { return fNearSpanV; }

void Anp::FiducialCut::Print ( std::ostream &  os = std::cout  )  const

Definition at line 138 of file FiducialCut.cxx.

References fCheck, fCount, fErase, fFarMaxRadius, fFarMinRadius, fFarSM1MaxZ, fFarSM1MinZ, fFarSM2MaxZ, fFarSM2MinZ, fFiducialKey, fNearBeamX, fNearBeamY, fNearMaxZ, fNearMinZ, fNearRadius, fNearSpanU, fNearSpanV, fPath, fSelectStdHep, fTrackZOffset, and fUseTrackVtx.

Referenced by Anp::SelectFiducial::Config().

00139 {
00140    os << "   Path = " << fPath << std::endl
00141       << "   Check = " <<  fCheck << std::endl
00142       << "   Count = " <<  fCount << std::endl
00143       << "   Erase = " <<  fErase << std::endl
00144       << "   UseTrackVtx = " <<  fUseTrackVtx << std::endl
00145       << "   SelectStdHep = " <<  fSelectStdHep << std::endl            
00146       << "   FiducialKey = " << fFiducialKey << std::endl   
00147       << "   NearMinZ = " << fNearMinZ << std::endl
00148       << "   NearMaxZ = " << fNearMaxZ << std::endl     
00149       << "   NearRadius = " << fNearRadius << std::endl
00150       << "   NearSpanU = " << fNearSpanU << std::endl
00151       << "   NearSpanV = " << fNearSpanV << std::endl
00152       << "   NearBeamX = " << fNearBeamX << std::endl
00153       << "   NearBeamY = " << fNearBeamY << std::endl   
00154       << "   FarSM1MinZ = " << fFarSM1MinZ << std::endl
00155       << "   FarSM1MaxZ = " << fFarSM1MaxZ << std::endl
00156       << "   FarSM2MinZ = " << fFarSM2MinZ << std::endl
00157       << "   FarSM2MaxZ = " << fFarSM2MaxZ << std::endl
00158       << "   FarMaxRadius = " << fFarMaxRadius << std::endl
00159       << "   FarMinRadius = " << fFarMinRadius << std::endl
00160       << "   TrackZOffset = " << fTrackZOffset << std::endl;
00161 }

bool Anp::FiducialCut::SelectStdHep (  )  const [inline]

Definition at line 112 of file FiducialCut.h.

References fSelectStdHep.

Referenced by Anp::SelectFiducial::Run().

00112 { return fSelectStdHep; }

double Anp::FiducialCut::TrackZOffset (  )  const [inline]

Definition at line 132 of file FiducialCut.h.

References fTrackZOffset.

Referenced by Anp::SelectFiducial::PassTrack().

00132 { return fTrackZOffset; }

bool Anp::FiducialCut::UseTrackVtx (  )  const [inline]

Definition at line 113 of file FiducialCut.h.

References fUseTrackVtx.

Referenced by Anp::SelectFiducial::Run().

00113 { return fUseTrackVtx; }

bool Anp::FiducialCut::Valid (  )  const [inline]

Definition at line 110 of file FiducialCut.h.

References fValid.

Referenced by Anp::SelectFiducial::Run().

00110 { return fValid; }


Member Data Documentation

bool Anp::FiducialCut::fCheck [private]

Definition at line 74 of file FiducialCut.h.

Referenced by Check(), Init(), and Print().

bool Anp::FiducialCut::fCount [private]

Definition at line 75 of file FiducialCut.h.

Referenced by Count(), Init(), and Print().

bool Anp::FiducialCut::fErase [private]

Definition at line 76 of file FiducialCut.h.

Referenced by Erase(), Init(), and Print().

Definition at line 96 of file FiducialCut.h.

Referenced by FarMaxRadius(), Init(), and Print().

Definition at line 97 of file FiducialCut.h.

Referenced by FarMinRadius(), Init(), and Print().

Definition at line 92 of file FiducialCut.h.

Referenced by FarSM1MaxZ(), Init(), and Print().

Definition at line 91 of file FiducialCut.h.

Referenced by FarSM1MinZ(), Init(), and Print().

Definition at line 94 of file FiducialCut.h.

Referenced by FarSM2MaxZ(), Init(), and Print().

Definition at line 93 of file FiducialCut.h.

Referenced by FarSM2MinZ(), Init(), and Print().

Definition at line 81 of file FiducialCut.h.

Referenced by FiducialKey(), Init(), and Print().

double Anp::FiducialCut::fNearBeamX [private]

Definition at line 88 of file FiducialCut.h.

Referenced by Init(), NearBeamX(), and Print().

double Anp::FiducialCut::fNearBeamY [private]

Definition at line 89 of file FiducialCut.h.

Referenced by Init(), NearBeamY(), and Print().

double Anp::FiducialCut::fNearMaxZ [private]

Definition at line 84 of file FiducialCut.h.

Referenced by Init(), NearMaxZ(), and Print().

double Anp::FiducialCut::fNearMinZ [private]

Definition at line 83 of file FiducialCut.h.

Referenced by Init(), NearMinZ(), and Print().

Definition at line 85 of file FiducialCut.h.

Referenced by Init(), NearRadius(), and Print().

double Anp::FiducialCut::fNearSpanU [private]

Definition at line 86 of file FiducialCut.h.

Referenced by Init(), NearSpanU(), and Print().

double Anp::FiducialCut::fNearSpanV [private]

Definition at line 87 of file FiducialCut.h.

Referenced by Init(), NearSpanV(), and Print().

std::string Anp::FiducialCut::fPath [private]

Definition at line 70 of file FiducialCut.h.

Referenced by Init(), and Print().

Definition at line 79 of file FiducialCut.h.

Referenced by Init(), Print(), and SelectStdHep().

Definition at line 72 of file FiducialCut.h.

Referenced by GetStrategy(), and Init().

Definition at line 99 of file FiducialCut.h.

Referenced by Init(), Print(), and TrackZOffset().

Definition at line 80 of file FiducialCut.h.

Referenced by Init(), Print(), and UseTrackVtx().

bool Anp::FiducialCut::fValid [private]

Definition at line 77 of file FiducialCut.h.

Referenced by Init(), and Valid().


The documentation for this class was generated from the following files:

Generated on 16 Apr 2018 for loon by  doxygen 1.6.1