Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

Anp Namespace Reference

Handle class template - a simplified version of boost::intrusive_ptr. More...


Classes

class  Anp::AlgAdapt
class  Anp::AlgCaddy< T >
class  Anp::AlgEvent
class  Anp::AlgSnarl
class  Anp::AlgStore
class  Anp::Basic
class  Anp::BeamData
class  Anp::DataItem< K, D >
struct  Anp::CoordXYZ
class  Anp::DrawSnarl
class  Anp::DrawSpan
class  Anp::EventAdcTab
class  Anp::EventDisplay
class  Anp::EventHitTab
class  Anp::RecordStore
class  Anp::SnarlAdcTab
class  Anp::SnarlTimeTab
class  Anp::StdHepTab
class  Anp::Event
class  Anp::EventTab
class  Anp::Factory< T >
class  Anp::FillMuonId
struct  Anp::FillMuonId::PlaneData
class  Anp::FillTrackGeom
class  Anp::FluxInfo
class  Anp::Base
class  Anp::Handle< T >
class  Anp::Header
class  Anp::AxisInfo
class  Anp::HistInfo
class  Anp::HistMan
class  Anp::Bin< T >
class  Anp::Hist1d< T >
class  Anp::KeyPair< T >
class  Anp::FillkNN
class  Anp::Lock< T >
class  Anp::Mutex
class  Anp::CountHist
class  Anp::DataCorr
class  Anp::PlotBasic
class  Anp::PlotBeam
class  Anp::PlotData
class  Anp::PlotEff
class  Anp::PlotEvent
class  Anp::PlotPur
class  Anp::PlotResol
class  Anp::PlotReson
class  Anp::PlotSelect
class  Anp::PlotShower
class  Anp::PlotTrack
class  Anp::PlotTrackGeom
class  Anp::PlotTruth
class  Anp::PlotVtx
class  Anp::RecoNu
class  Anp::Record
class  Anp::RunAlgEvent
class  Anp::RunAlgSnarl
class  Anp::RunAlgStore
class  Anp::RunFinder
class  Anp::SaveRecord
class  Anp::SaveSimpleEvent
class  Anp::SimpleEvent
class  Anp::BeamCut
class  Anp::FiducialCut
class  Anp::SelectAntiNeutrino
class  Anp::SelectBeam
class  Anp::SelectCount
class  Anp::SelectFiducial
class  Anp::SelectFlux
class  Anp::SelectKinem
class  Anp::SelectNeutrino
class  Anp::SelectSpill
class  Anp::Shower
class  Anp::StdHep
class  Anp::FillBasic
class  Anp::FillBeam
class  Anp::FillEvent
class  Anp::FillHeader
class  Anp::FillShower
class  Anp::FillStrip
class  Anp::FillTrack
class  Anp::FillTruth
class  Anp::Interface
class  Anp::Strip
struct  Anp::Strip::TrackInfo
struct  Anp::BySigCor
struct  Anp::ByPlaneStrip
class  Anp::Track
class  Anp::TruthReco
class  Anp::WeightReco
class  Anp::Truth
class  Anp::Vertex

Typedefs

typedef Anp::Handle< Anp::AlgAdaptAlgAdaptPtr
typedef Anp::Handle< Anp::AlgEventAlgEventPtr
typedef Anp::Handle< Anp::AlgSnarlAlgSnarlPtr
typedef Anp::Handle< Anp::AlgStoreAlgStorePtr
typedef DataItem< std::string,
Float_t > 
StringData
typedef DataItem< Short_t,
Float_t > 
Data
typedef std::vector< Anp::DataDataVec
typedef DataVec::const_iterator DataIter
typedef DataVec::iterator DataIterator
typedef Anp::Handle< Anp::EventTabEventTabPtr
typedef std::vector< Anp::Event
>::const_iterator 
EventIter
typedef std::vector< Anp::Track
>::const_iterator 
TrackIter
typedef std::vector< Anp::Truth
>::const_iterator 
TruthIter
typedef std::vector< Anp::Strip
>::const_iterator 
StripIter
typedef std::vector< Anp::Shower
>::const_iterator 
ShowerIter
typedef std::vector< Anp::StdHep
>::const_iterator 
StdHepIter
typedef std::vector< Anp::Event
>::iterator 
EventIterator
typedef std::vector< Anp::Track
>::iterator 
TrackIterator
typedef std::vector< Anp::Truth
>::iterator 
TruthIterator
typedef std::vector< Anp::Strip
>::iterator 
StripIterator
typedef std::vector< Anp::Shower
>::iterator 
ShowerIterator
typedef std::vector< Anp::StdHep
>::iterator 
StdHepIterator
typedef std::vector< StripIterStripVec
typedef std::vector< TrackIterTrackVec
typedef std::vector< ShowerIterShowerVec
typedef std::vector< Anp::TruthReco
>::const_iterator 
TruthRecoIter
typedef std::vector< Anp::TruthReco
>::iterator 
TruthRecoIterator
typedef std::vector< Anp::WeightReco
>::const_iterator 
WeightRecoIter

Functions

template<class T>
unsigned int NameWidth (const std::vector< AlgCaddy< T > > &vec)
template<class T>
unsigned int NumbWidth (const std::vector< AlgCaddy< T > > &vec)
std::ostream & operator<< (std::ostream &o, const BeamData &self)
template<class K, class D>
bool operator< (const DataItem< K, D > &lhs, const DataItem< K, D > &rhs)
template<class K, class D>
bool operator< (const DataItem< K, D > &lhs, const K &rhs)
template<class K, class D>
bool operator< (const K &lhs, const DataItem< K, D > &rhs)
template<class K, class D>
bool operator== (const DataItem< K, D > &lhs, const DataItem< K, D > &rhs)
template<class K, class D>
bool operator== (const DataItem< K, D > &lhs, const K &rhs)
template<class K, class D>
bool operator== (const K &lhs, const DataItem< K, D > &rhs)
Double_t InitDouble (void)
Float_t InitFloat (void)
Int_t InitInt (void)
Short_t InitShort (void)
UShort_t InitUShort (void)
UInt_t InitUInt (void)
Bool_t InitBool (void)
Char_t InitChar (void)
bool ReadRegistry (const std::string &filepath, Registry &reg, bool quiet=true)
const std::pair< std::string,
bool > 
GetString (const std::string &prefix, const std::string &key, const Registry &reg)
TDirectory * GetDir (std::string path, TDirectory *dir)
float uv2x (float u, float v)
float uv2y (float u, float v)
float xy2u (float x, float y)
float xy2v (float x, float y)
double pi ()
double angle (double x, double y)
const CoordXYZ gnumi_to_near (const CoordXYZ pos)
const CoordXYZ near_to_gnumi (const CoordXYZ pos)
const CoordXYZ gnumi_to_far (const CoordXYZ pos)
const CoordXYZ far_to_gnumi (const CoordXYZ pos)
bool operator== (short index, const Event &event)
bool operator== (const Event &event, short index)
bool operator== (const Event &lhs, const Event &rhs)
bool operator< (const Event &lhs, const Event &rhs)
template<typename T>
std::ostream & operator<< (std::ostream &o, const Handle< T > &handle)
std::ostream & operator<< (std::ostream &o, const Header &self)
std::ostream & operator<< (std::ostream &o, const HistInfo &self)
std::ostream & operator<< (std::ostream &o, const AxisInfo &self)
template<typename T>
bool operator< (const Bin< T > &lhs, const Bin< T > &rhs)
template<typename T>
bool operator< (const Bin< T > &lhs, const T &rhs)
template<typename T>
bool operator< (const T &lhs, const Bin< T > &rhs)
template<typename T>
bool operator< (const Bin< T > &lhs, unsigned int bin)
template<typename T>
bool operator< (unsigned int bin, const Bin< T > &rhs)
template<typename T>
bool operator== (const Bin< T > &lhs, unsigned int bin)
template<typename T>
bool operator== (unsigned int bin, const Bin< T > &rhs)
template<typename T>
Bin< T > Merge (const Bin< T > &lhs, const Bin< T > &rhs)
template<typename T>
TH1 * CreateTH1 (const Hist1d< T > &h, const std::string &name="h")
template<typename T>
std::ostream & operator<< (std::ostream &o, const Bin< T > &self)
template<typename T>
GetKernelOverlap (const T lpos, const T rpos, const T cpos, const T width)
template<typename T>
std::ostream & operator<< (std::ostream &o, const Hist1d< T > &self)
template<typename T>
std::ostream & operator<< (std::ostream &o, const KeyPair< T > &self)
bool operator== (const Anp::Handle< Anp::CountHist > &lhs, const Anp::Handle< Anp::CountHist > &rhs)
bool operator== (short index, const RecoNu &reco)
bool operator== (const RecoNu &reco, short index)
bool operator== (const RecoNu &lhs, const RecoNu &rhs)
bool operator< (short index, const RecoNu &reco)
bool operator< (const RecoNu &reco, short index)
bool operator< (const RecoNu &lhs, const RecoNu &rhs)
TrackIter LongestTrack (const Event &event, const Record &record)
TrackVec GetTrack (const Event &event, const Record &record)
ShowerVec GetShower (const Event &event, const Record &record)
StripVec GetStrip (const Event &event, const Record &record, const char *view=0)
StripVec GetStrip (const Track &track, const Record &record, const char *view=0)
StripVec GetStrip (const Shower &shower, const Record &record, const char *view=0)
bool operator== (short index, const Shower &shower)
bool operator== (const Shower &shower, short index)
bool operator== (const Shower &lhs, const Shower &rhs)
bool operator== (short index, const Strip &strip)
bool operator== (const Strip &strip, short index)
bool operator== (const Strip &lhs, const Strip &rhs)
const std::map< short, float > GetTrackData (const Track &track)
bool operator== (short index, const Track &track)
bool operator== (const Track &track, short index)
bool operator== (const Track &lhs, const Track &rhs)
bool operator== (short index, const Truth &truth)
bool operator== (const Truth &truth, short index)
bool operator== (const Truth &lhs, const Truth &rhs)
bool operator< (const Truth &lhs, const Truth &rhs)
bool operator== (const RecoNu &reconu, const Truth &truth)
bool operator== (const Truth &truth, const RecoNu &reconu)

Variables

const double GNUMINearX = 1.48844
const double GNUMINearY = 0.0
const double GNUMINearZ = 1039.35
const double GNUMIFarX = 0.0
const double GNUMIFarY = 0.0
const double GNUMIFarZ = 735.34E3
const double GNUMICosZ = 0.998318471
const double GNUMISinZ = 0.057967487
const Double_t kDouble = -1000.0
const Float_t kFloat = -1000.0
const Int_t kInt = -1000
const Short_t kShort = -1000
const UShort_t kUShort = 1000
const UInt_t kUInt = 1000
const Bool_t kBool = false
const Char_t kChar = 0


Detailed Description

Handle class template - a simplified version of boost::intrusive_ptr.

Abstract Factory template that handles arbitrary types

This template creates Factory stores creator functors to template parameter class. Factory is a singelton class which is explicitly deleted.

Source: Andrei Alexandrescu, Modern C++ Design


Typedef Documentation

typedef Anp::Handle<Anp::AlgAdapt> Anp::AlgAdaptPtr
 

Definition at line 73 of file AlgAdapt.h.

Referenced by Anp::SelectFlux::GetAlg(), and Anp::SelectFlux::SetWeight().

typedef Anp::Handle<Anp::AlgEvent> Anp::AlgEventPtr
 

Definition at line 66 of file AlgEvent.h.

Referenced by Anp::RunAlgEvent::Config(), Anp::RunAlgEvent::End(), Anp::PlotSelect::End(), Anp::SelectCount::GetCount(), Anp::PlotSelect::GetEnu(), Anp::PlotSelect::GetRes(), Anp::PlotSelect::GetSel(), Anp::RunAlgEvent::Run(), Anp::PlotSelect::Run(), Anp::SelectAntiNeutrino::SelectAntiNeutrino(), and Anp::SelectNeutrino::SelectNeutrino().

typedef Anp::Handle<Anp::AlgSnarl> Anp::AlgSnarlPtr
 

Definition at line 67 of file AlgSnarl.h.

Referenced by Anp::RunAlgSnarl::Config(), Anp::SelectKinem::End(), Anp::SelectFlux::End(), Anp::RunAlgSnarl::End(), Anp::SelectKinem::GetAlg(), Anp::SelectFlux::GetAlg(), Anp::SelectKinem::Run(), Anp::SelectFlux::Run(), and Anp::RunAlgSnarl::Run().

typedef Anp::Handle<Anp::AlgStore> Anp::AlgStorePtr
 

Definition at line 62 of file AlgStore.h.

Referenced by Anp::RunAlgStore::Config(), and Anp::RunAlgStore::Run().

typedef DataItem<Short_t, Float_t> Anp::Data
 

Definition at line 60 of file DataItem.h.

Referenced by Anp::Truth::Add(), Anp::Track::Add(), Anp::Strip::Add(), Anp::Event::Add(), Anp::Truth::DataAt(), Anp::Track::DataAt(), Anp::Strip::DataAt(), Anp::Event::DataAt(), TGeant3::DefineParticle(), Anp::FillkNN::Fill(), Anp::FillTruth::FillBeamWeight(), Anp::FillkNN::Find(), RerootToTruthModule::Get(), RerootFlsDigitToDigiPE::Get(), Anp::FillkNN::Get(), Anp::Interface::GetData(), Anp::PlotData::GetMap(), GetTrackData(), NCExtrapolationJK::PredictSpectrum(), and Anp::Truth::WeightBeam().

typedef DataVec::const_iterator Anp::DataIter
 

Definition at line 62 of file DataItem.h.

Referenced by Anp::Truth::DataAt(), Anp::Track::DataAt(), Anp::Strip::DataAt(), Anp::Event::DataAt(), Anp::Truth::DataBeg(), Anp::Strip::DataBeg(), Anp::Event::DataBeg(), Anp::Truth::DataEnd(), Anp::Strip::DataEnd(), Anp::Event::DataEnd(), Anp::FillkNN::Fill(), Anp::FillkNN::Get(), Anp::Interface::GetData(), Anp::PlotData::GetMap(), and GetTrackData().

typedef DataVec::iterator Anp::DataIterator
 

Definition at line 63 of file DataItem.h.

Referenced by Anp::Event::DataBegIterator(), and Anp::Event::DataEndIterator().

typedef std::vector<Anp::Data> Anp::DataVec
 

Definition at line 61 of file DataItem.h.

Referenced by Anp::FillkNN::Find(), and Anp::FillkNN::Run().

typedef std::vector<Anp::Event>::const_iterator Anp::EventIter
 

Definition at line 27 of file Record.h.

Referenced by Anp::AlgCaddy< T >::AllSnarl(), Anp::Record::EventBeg(), Anp::Record::EventEnd(), Anp::FillTruth::FillBeamWeight(), Anp::Record::FindEvent(), Anp::Interface::GetData(), Anp::FillTruth::IsConsistent(), Anp::AlgCaddy< T >::OutSnarl(), Anp::SelectFiducial::PassTruth(), Anp::SelectFiducial::Run(), Anp::SaveSimpleEvent::Run(), Anp::PlotVtx::Run(), Anp::PlotData::Run(), and Anp::PlotBasic::Run().

typedef std::vector<Anp::Event>::iterator Anp::EventIterator
 

Definition at line 34 of file Record.h.

Referenced by Anp::SelectKinem::AddData(), Anp::Record::Erase(), Anp::Record::EventBegIterator(), Anp::Record::EventEndIterator(), Anp::SelectNeutrino::Run(), Anp::SelectKinem::Run(), Anp::SelectFiducial::Run(), Anp::RunAlgEvent::Run(), Anp::PlotTruth::Run(), Anp::PlotShower::Run(), Anp::PlotSelect::Run(), Anp::PlotPur::Run(), Anp::PlotEvent::Run(), Anp::FillMuonId::Run(), Anp::FillkNN::Run(), and Anp::SelectFlux::SetWeight().

typedef Anp::Handle<Anp::EventTab> Anp::EventTabPtr
 

Definition at line 54 of file EventTab.h.

Referenced by Anp::EventDisplay::Add(), Anp::DrawSnarl::Config(), Anp::EventDisplay::GetCurrent(), Anp::EventDisplay::InitTab(), and Anp::EventDisplay::PrintTab().

typedef std::vector<Anp::Shower>::const_iterator Anp::ShowerIter
 

Definition at line 31 of file Record.h.

Referenced by Anp::FillEvent::Fill(), GetShower(), Anp::PlotShower::Run(), Anp::PlotBasic::Run(), Anp::Record::ShowerBeg(), and Anp::Record::ShowerEnd().

typedef std::vector<Anp::Shower>::iterator Anp::ShowerIterator
 

Definition at line 38 of file Record.h.

Referenced by Anp::Record::Erase(), Anp::SelectFiducial::Run(), Anp::Record::ShowerBegIterator(), and Anp::Record::ShowerEndIterator().

typedef std::vector<ShowerIter> Anp::ShowerVec
 

Definition at line 43 of file Record.h.

Referenced by GetShower(), and Anp::EventHitTab::SetShowers().

typedef std::vector<Anp::StdHep>::const_iterator Anp::StdHepIter
 

Definition at line 32 of file Record.h.

Referenced by Anp::Record::FindStdHep(), Anp::FillTruth::IsConsistent(), Anp::PlotData::Particle(), Anp::Draw::Read(), Anp::FillMuonId::Run(), Anp::Record::StdHepBeg(), and Anp::Record::StdHepEnd().

typedef std::vector<Anp::StdHep>::iterator Anp::StdHepIterator
 

Definition at line 39 of file Record.h.

Referenced by Anp::Record::Erase(), Anp::SelectFiducial::Run(), Anp::Record::StdHepBegIterator(), and Anp::Record::StdHepEndIterator().

typedef DataItem<std::string, Float_t> Anp::StringData
 

Definition at line 59 of file DataItem.h.

typedef std::vector<Anp::Strip>::const_iterator Anp::StripIter
 

Definition at line 30 of file Record.h.

Referenced by Anp::SnarlAdcTab::Add(), GetStrip(), Anp::SnarlTimeTab::NewSnarl(), Anp::FillMuonId::Select(), Anp::SnarlTimeTab::Set(), Anp::Record::StripBeg(), and Anp::Record::StripEnd().

typedef std::vector<Anp::Strip>::iterator Anp::StripIterator
 

Definition at line 37 of file Record.h.

Referenced by Anp::Record::Erase(), Anp::Record::StripBegIterator(), and Anp::Record::StripEndIterator().

typedef std::vector<StripIter> Anp::StripVec
 

Definition at line 41 of file Record.h.

Referenced by GetStrip(), Anp::StdHepTab::Set(), Anp::SnarlAdcTab::Set(), Anp::EventAdcTab::Set(), Anp::EventHitTab::SetShowers(), and Anp::EventHitTab::SetTrack().

typedef std::vector<Anp::Track>::const_iterator Anp::TrackIter
 

Definition at line 28 of file Record.h.

Referenced by Anp::SelectKinem::AddData(), Anp::FillEvent::Fill(), Anp::Interface::GetData(), GetTrack(), Anp::FillTruth::IsConsistent(), LongestTrack(), Anp::SelectFiducial::PassTruth(), Anp::PlotData::Plot(), Anp::SelectNeutrino::Run(), Anp::SelectFiducial::Run(), Anp::PlotVtx::Run(), Anp::PlotTrackGeom::Run(), Anp::PlotTrack::Run(), Anp::PlotSelect::Run(), Anp::PlotData::Run(), Anp::PlotBasic::Run(), Anp::FillMuonId::Run(), Anp::FillkNN::Run(), Anp::SelectAntiNeutrino::Run1(), Anp::SelectAntiNeutrino::Run2(), Anp::Record::TrackBeg(), and Anp::Record::TrackEnd().

typedef std::vector<Anp::Track>::iterator Anp::TrackIterator
 

Definition at line 35 of file Record.h.

Referenced by Anp::Record::Erase(), Anp::SelectFiducial::Run(), Anp::PlotTrack::Run(), Anp::FillTrackGeom::Run(), Anp::FillMuonId::Run(), Anp::FillkNN::Run(), Anp::Record::TrackBegIterator(), and Anp::Record::TrackEndIterator().

typedef std::vector<TrackIter> Anp::TrackVec
 

Definition at line 42 of file Record.h.

Referenced by GetTrack(), and Anp::EventHitTab::Set().

typedef std::vector<Anp::Truth>::const_iterator Anp::TruthIter
 

Definition at line 29 of file Record.h.

Referenced by Anp::SelectKinem::AddData(), Anp::Record::FindStdHep(), Anp::Record::FindTruth(), Anp::FillTruth::IsConsistent(), Anp::PlotData::Plot(), Anp::RecordStore::PrintTruth(), Anp::SelectFiducial::Run(), Anp::SelectCount::Run(), Anp::SaveSimpleEvent::Run(), Anp::PlotVtx::Run(), Anp::PlotTruth::Run(), Anp::PlotSelect::Run(), Anp::PlotPur::Run(), Anp::PlotEff::Run(), Anp::SelectKinem::Select(), Anp::StdHepTab::Set(), Anp::Record::TruthBeg(), and Anp::Record::TruthEnd().

typedef std::vector<Anp::Truth>::iterator Anp::TruthIterator
 

Definition at line 36 of file Record.h.

Referenced by Anp::Record::Erase(), Anp::SelectFiducial::Run(), Anp::SelectFlux::SetWeight(), Anp::Record::TruthBegIterator(), and Anp::Record::TruthEndIterator().

typedef std::vector<Anp::TruthReco>::const_iterator Anp::TruthRecoIter
 

Definition at line 101 of file Truth.h.

Referenced by Anp::Truth::Find(), Anp::Record::FindStdHep(), Anp::FillTruth::IsConsistent(), operator==(), Anp::PlotTruth::Plot(), Anp::RecordStore::PrintTruth(), Anp::Truth::RecoBeg(), Anp::Truth::RecoEnd(), Anp::SelectFiducial::Run(), and Anp::PlotEff::Run().

typedef std::vector<Anp::TruthReco>::iterator Anp::TruthRecoIterator
 

Definition at line 102 of file Truth.h.

Referenced by Anp::Truth::Erase(), Anp::Truth::RecoBegIterator(), Anp::Truth::RecoEndIterator(), and Anp::SelectFiducial::Run().

typedef std::vector<Anp::WeightReco>::const_iterator Anp::WeightRecoIter
 

Definition at line 103 of file Truth.h.

Referenced by Anp::Truth::FindWeight(), Anp::SelectFlux::SetWeight(), Anp::Truth::WeightBeg(), and Anp::Truth::WeightEnd().


Function Documentation

double Anp::angle double  x,
double  y
 

Definition at line 77 of file Default.cxx.

References angle(), InitDouble(), and pi().

Referenced by angle(), Anp::FillTrackGeom::Fill(), Anp::PlotTrack::FillGeometry(), Anp::PlotTrackGeom::FillProjection(), Anp::PlotTrackGeom::FillRotation(), Anp::PlotTrack::FillRotation(), and Anp::PlotTrackGeom::FillXProduct().

00078 {
00079    const double radius = std::sqrt(x*x + y*y);
00080    
00081    if(!(radius > 0.0))
00082    {
00083       return InitDouble();
00084    }
00085    
00086    if(!(+x < radius))
00087    {
00088       return std::acos(+1.0);
00089    }
00090    if(!(-x < radius))
00091    {
00092       return std::acos(-1.0);
00093    }
00094 
00095    double angle = std::acos(x/radius);
00096    
00097    if(y < 0.0)
00098    {
00099       angle = 2.0 * pi() - angle;
00100    }
00101 
00102    return angle;
00103 }

template<typename T>
TH1 * Anp::CreateTH1 const Hist1d< T > &  h,
const std::string &  name = "h"
 

Definition at line 864 of file Hist1d.h.

References Anp::Hist1d< T >::GetBins(), and Anp::Hist1d< T >::GetIntegral().

00865    {
00866       const std::vector<Bin<T> > &bvec = h.GetBins();
00867 
00868       if(bvec.empty())
00869       {
00870          return 0;
00871       }
00872 
00873       double *array = new double[bvec.size() - 1];
00874 
00875       for(int ibin = 1; ibin < int(bvec.size()); ++ibin)
00876       {
00877          array[ibin - 1] = bvec[ibin].edge();
00878       }
00879 
00880       TH1 *th1 = new TH1D(name.c_str(), name.c_str(), bvec.size() - 2, array);
00881 
00882       delete [] array;
00883 
00884       for(int ibin = 0; ibin < int(bvec.size()); ++ibin)
00885       {
00886          th1 -> SetBinContent(ibin, bvec[ibin].sum());
00887       }
00888 
00889       th1 -> SetDirectory(0);
00890       th1 -> SetEntries(h.GetIntegral("UO"));
00891 
00892       return th1;
00893    }

const Anp::CoordXYZ Anp::far_to_gnumi const CoordXYZ  pos  ) 
 

Definition at line 66 of file Default.cxx.

References GNUMICosZ, GNUMISinZ, Anp::CoordXYZ::y, and Anp::CoordXYZ::z.

00067 {
00068    CoordXYZ new_pos = pos;
00069    
00070    new_pos.z =  pos.z * GNUMICosZ + pos.y * GNUMISinZ + GNUMIFarZ;
00071    new_pos.y = -pos.z * GNUMISinZ + pos.y * GNUMICosZ;
00072 
00073    return new_pos;
00074 }

TDirectory * Anp::GetDir std::string  path,
TDirectory *  dir
 

Definition at line 246 of file Default.cxx.

Referenced by Anp::PlotPur::Add(), Anp::PlotEff::Add(), Anp::PlotData::Get(), Anp::SelectKinem::GetAlg(), Anp::SelectFlux::GetAlg(), Anp::SelectCount::GetCount(), Anp::PlotSelect::GetEnu(), Anp::PlotReson::GetPlot(), Anp::PlotSelect::GetRes(), Anp::PlotSelect::GetSel(), Anp::SelectNeutrino::Set(), Anp::SelectKinem::Set(), Anp::SelectFlux::Set(), Anp::SelectCount::Set(), Anp::SelectAntiNeutrino::Set(), Anp::PlotVtx::Set(), Anp::PlotSelect::Set(), Anp::PlotPur::Set(), Anp::PlotEff::Set(), and Anp::PlotBasic::Set().

00247 {
00248    if(!dir || path.empty() || path == "/")
00249    {
00250       return dir;
00251    }
00252    
00253    // remove trailing slash if present
00254    if(path.substr(path.size() - 1, 1) == "/")
00255    {
00256       path = path.substr(0, path.size() - 1);
00257    }
00258 
00259    std::string::size_type pos = path.find_last_of('/');
00260    if(pos != std::string::npos)
00261    {
00262       // recursively walk upward until all slash characters are removed
00263       dir = GetDir(path.substr(0, pos), dir);
00264 
00265       // make directory path of last substring without slash
00266       path = path.substr(pos + 1, path.size() - pos);
00267    }
00268 
00269    if(dir -> Get(path.c_str()))
00270    {
00271       return dynamic_cast<TDirectory *>(dir -> Get(path.c_str()));
00272    }
00273    
00274    return dir -> mkdir(path.c_str());
00275 }

template<typename T>
T GetKernelOverlap const T  lpos,
const T  rpos,
const T  cpos,
const T  width
[inline]
 

Definition at line 281 of file Hist1d.h.

00282    {
00283       // Compute fraction of kernel intergral for kernel centered at x0 = cpos 
00284       // and between lpos and rpos boundaries. Kernel function is (1-((x-x0)/w)^2)^2
00285       // for x < 1.0 and 0 otherwise. Kerner integral I(x) = (x - 2*x^3/3 + x^5/5)/C,
00286       // where C = 16/15.
00287       
00288       if(!(lpos < rpos) || !(width > 0.0))
00289       {
00290          std::cerr << "GetKernelOverlap - invalid input parameters (" 
00291                    << lpos << ", " << rpos << ", " << cpos << ", " << width << ")" << std::endl;
00292          return 0;
00293       }
00294 
00295       T ledge = cpos - width;
00296       T redge = cpos + width;
00297 
00298       if(ledge < lpos) ledge = lpos;
00299       if(redge > rpos) redge = rpos;
00300       
00301       const T x1 = (ledge - cpos)/width;
00302       const T x2 = (redge - cpos)/width;
00303 
00304       const T I1 = x1 - 2.0*x1*x1*x1/3.0 + x1*x1*x1*x1*x1/5.0;
00305       const T I2 = x2 - 2.0*x2*x2*x2/3.0 + x2*x2*x2*x2*x2/5.0;
00306 
00307       const T overlap = 15.0*(I2 - I1)/16.0;
00308 
00309       //std::cout << "(lpos, rpos, cpos) = (" 
00310       //<< lpos << ", " << rpos << ", " << cpos << ")" << std::endl
00311       //<< "(ledg, redg, width, overlap) = (" 
00312       //<< ledge << ", " << redge << ", " << width << ", " << overlap << ")" << std::endl;
00313 
00314       return overlap;
00315    }

Anp::ShowerVec Anp::GetShower const Event &  event,
const Record &  record
 

Definition at line 315 of file Record.cxx.

References Anp::Event::MatchShower(), Anp::Record::ShowerBeg(), Anp::Record::ShowerEnd(), ShowerIter, and ShowerVec.

Referenced by Anp::FillEvent::Run(), and Anp::EventHitTab::SetShowers().

00316 {
00317    ShowerVec vec;
00318    for(ShowerIter shower = record.ShowerBeg(); shower != record.ShowerEnd(); ++shower)
00319    {
00320       if(event.MatchShower(shower -> ShowerIndex()))
00321       {
00322          vec.push_back(shower);
00323       }
00324    }   
00325    return vec;
00326 }

const std::pair< std::string, bool > Anp::GetString const std::string &  prefix,
const std::string &  key,
const Registry reg
 

Definition at line 219 of file Default.cxx.

References Registry::Get().

Referenced by Anp::SelectCount::Config(), and PTGuiMainFrame::ProcessMessage().

00222 {
00223    std::pair<std::string, bool> result(std::string(""), false);
00224    
00225    if(prefix.empty() && key.empty())
00226    {
00227       return result;
00228    }
00229 
00230    const char *value_char = 0;
00231    if(reg.Get((prefix + key).c_str(), value_char)  && value_char)
00232    {
00233       result.first = value_char;
00234       result.second = true;      
00235    }
00236    else if(reg.Get(key.c_str(), value_char)  && value_char)
00237    {
00238       result.first = value_char;
00239       result.second = true;     
00240    }
00241 
00242    return result;
00243 }

Anp::StripVec Anp::GetStrip const Shower &  shower,
const Record &  record,
const char *  view = 0
 

Definition at line 409 of file Record.cxx.

References Anp::Shower::ShowerIndex(), Anp::Record::StripBeg(), Anp::Record::StripEnd(), StripIter, and StripVec.

00410 {
00411    short key = 0;
00412    if(view)
00413    {
00414       if(std::strcmp(view, "V") == 0 || std::strcmp(view, "v") == 0)
00415       {
00416          key = 3;
00417       }
00418       else if(std::strcmp(view, "U") == 0 || view && std::strcmp(view, "u") == 0)
00419       {
00420          key = 2;
00421       }
00422    }
00423 
00424    StripVec vec;
00425    for(StripIter strip = record.StripBeg(); strip != record.StripEnd(); ++strip)
00426    {
00427       if(!strip -> MatchShw(shower.ShowerIndex()))
00428       {
00429          continue;
00430       }
00431 
00432       if(key == 0)
00433       {
00434          vec.push_back(strip);
00435       }
00436       else if(key == 3 && strip -> IsVview())
00437       {
00438          vec.push_back(strip);
00439       }
00440       else if(key == 2 && strip -> IsUview())
00441       {
00442          vec.push_back(strip);
00443       }
00444    }   
00445    return vec;
00446 }

Anp::StripVec Anp::GetStrip const Track &  track,
const Record &  record,
const char *  view = 0
 

Definition at line 369 of file Record.cxx.

References Anp::Record::StripBeg(), Anp::Record::StripEnd(), StripIter, StripVec, and Anp::Track::TrackIndex().

00370 {
00371    short key = 0;
00372    if(view)
00373    {
00374       if(std::strcmp(view, "V") == 0 || std::strcmp(view, "v") == 0)
00375       {
00376          key = 3;
00377       }
00378       else if(std::strcmp(view, "U") == 0 || view && std::strcmp(view, "u") == 0)
00379       {
00380          key = 2;
00381       }
00382    }
00383 
00384    StripVec vec;
00385    for(StripIter strip = record.StripBeg(); strip != record.StripEnd(); ++strip)
00386    {
00387       if(!strip -> MatchTrk(track.TrackIndex()))
00388       {
00389          continue;
00390       }
00391 
00392       if(key == 0)
00393       {
00394          vec.push_back(strip);
00395       }
00396       else if(key == 3 && strip -> IsVview())
00397       {
00398          vec.push_back(strip);
00399       }
00400       else if(key == 2 && strip -> IsUview())
00401       {
00402          vec.push_back(strip);
00403       }
00404    }   
00405    return vec;
00406 }

Anp::StripVec Anp::GetStrip const Event &  event,
const Record &  record,
const char *  view = 0
 

Definition at line 329 of file Record.cxx.

References Anp::Event::EventIndex(), Anp::Record::StripBeg(), Anp::Record::StripEnd(), StripIter, and StripVec.

Referenced by Anp::FillMuonId::Select(), Anp::StdHepTab::Set(), Anp::SnarlAdcTab::Set(), Anp::EventAdcTab::Set(), Anp::EventHitTab::SetShowers(), and Anp::EventHitTab::SetTrack().

00330 {
00331    short key = 0;
00332    if(view)
00333    {
00334       if(std::strcmp(view, "V") == 0 || std::strcmp(view, "v") == 0)
00335       {
00336          key = 3;
00337       }
00338       else if(std::strcmp(view, "U") == 0 || view && std::strcmp(view, "u") == 0)
00339       {
00340          key = 2;
00341       }
00342    }
00343 
00344    StripVec vec;
00345    for(StripIter strip = record.StripBeg(); strip != record.StripEnd(); ++strip)
00346    {
00347       if(!strip -> MatchEvt(event.EventIndex()))
00348       {
00349          continue;
00350       }
00351 
00352       if(key == 0)
00353       {
00354          vec.push_back(strip);
00355       }
00356       else if(key == 3 && strip -> IsVview())
00357       {
00358          vec.push_back(strip);
00359       }
00360       else if(key == 2 && strip -> IsUview())
00361       {
00362          vec.push_back(strip);
00363       }
00364    }   
00365    return vec;
00366 }

Anp::TrackVec Anp::GetTrack const Event &  event,
const Record &  record
 

Definition at line 301 of file Record.cxx.

References Anp::Event::MatchTrack(), Anp::Record::TrackBeg(), Anp::Record::TrackEnd(), TrackIter, and TrackVec.

Referenced by Anp::FillEvent::Run(), and Anp::EventHitTab::Set().

00302 {
00303    TrackVec vec;
00304    for(TrackIter track = record.TrackBeg(); track != record.TrackEnd(); ++track)
00305    {
00306       if(event.MatchTrack(track -> TrackIndex()))
00307       {
00308          vec.push_back(track);
00309       }
00310    }   
00311    return vec;
00312 }

const std::map< short, float > Anp::GetTrackData const Track &  track  ) 
 

Definition at line 282 of file Track.cxx.

References Data, Anp::Track::DataBeg(), Anp::Track::DataEnd(), DataIter, and Anp::Corr::Key.

00283 {
00284    std::map<short, float> dmap;
00285    for(DataIter dit = track.DataBeg(); dit != track.DataEnd(); ++dit)
00286    {
00287       const short key  = dit -> Key();
00288       const float data = dit -> Data();
00289       
00290       std::map<short, float>::iterator fit = dmap.find(key);
00291       if(fit != dmap.end())
00292       {
00293          std::cerr << "Anp::GetTrackData() - found duplicate track data key" << std::endl;
00294          continue;
00295       }
00296 
00297       dmap.insert(std::pair<short, float>(key, data));
00298    }
00299    
00300    return dmap;
00301 }

const Anp::CoordXYZ Anp::gnumi_to_far const CoordXYZ  pos  ) 
 

Definition at line 55 of file Default.cxx.

References GNUMICosZ, GNUMISinZ, Anp::CoordXYZ::y, and Anp::CoordXYZ::z.

00056 {
00057    CoordXYZ new_pos = pos;
00058    
00059    new_pos.z = (pos.z - GNUMIFarZ) * GNUMICosZ - pos.y * GNUMISinZ;
00060    new_pos.y = (pos.z - GNUMIFarZ) * GNUMISinZ + pos.y * GNUMICosZ;
00061 
00062    return new_pos;
00063 }

const Anp::CoordXYZ Anp::gnumi_to_near const CoordXYZ  pos  ) 
 

Definition at line 31 of file Default.cxx.

References GNUMICosZ, GNUMISinZ, Anp::CoordXYZ::x, Anp::CoordXYZ::y, and Anp::CoordXYZ::z.

00032 {
00033    CoordXYZ new_pos;
00034    
00035    new_pos.x =   pos.x + GNUMINearX;
00036    new_pos.z =  (pos.z - GNUMINearZ) * GNUMICosZ + pos.y * GNUMISinZ;
00037    new_pos.y = -(pos.z - GNUMINearZ) * GNUMISinZ + pos.y * GNUMICosZ;
00038 
00039    return new_pos;
00040 }

Bool_t Anp::InitBool void   )  [inline]
 

Definition at line 91 of file Default.h.

00091 { return  false; }

Char_t Anp::InitChar void   )  [inline]
 

Definition at line 92 of file Default.h.

00092 { return  0; }

Double_t Anp::InitDouble void   )  [inline]
 

Definition at line 85 of file Default.h.

Referenced by angle(), and Anp::CoordXYZ::CoordXYZ().

00085 { return -1000.0; }

Float_t Anp::InitFloat void   )  [inline]
 

Definition at line 86 of file Default.h.

Referenced by Anp::FluxInfo::Clear(), and Anp::FluxInfo::FluxInfo().

00086 { return -1000.0; }

Int_t Anp::InitInt void   )  [inline]
 

Definition at line 87 of file Default.h.

Referenced by Anp::FluxInfo::Clear(), and Anp::FluxInfo::FluxInfo().

00087 { return -1000; }

Short_t Anp::InitShort void   )  [inline]
 

Definition at line 88 of file Default.h.

00088 { return -1000; }

UInt_t Anp::InitUInt void   )  [inline]
 

Definition at line 90 of file Default.h.

00090 { return  1000; }

UShort_t Anp::InitUShort void   )  [inline]
 

Definition at line 89 of file Default.h.

00089 { return  1000; }

Anp::TrackIter Anp::LongestTrack const Event &  event,
const Record &  record
 

Definition at line 449 of file Record.cxx.

References Anp::Event::MatchTrack(), Anp::Record::TrackBeg(), Anp::Record::TrackEnd(), and TrackIter.

Referenced by Anp::SelectKinem::AddData(), Anp::FillEvent::Fill(), Anp::PlotData::Plot(), Anp::SelectNeutrino::Run(), Anp::SelectFiducial::Run(), Anp::PlotVtx::Run(), Anp::PlotSelect::Run(), Anp::PlotBasic::Run(), Anp::FillMuonId::Run(), Anp::FillkNN::Run(), and Anp::SelectAntiNeutrino::Run2().

00450 {
00451    TrackIter long_track = record.TrackEnd();
00452 
00453    for(TrackIter track = record.TrackBeg(); track != record.TrackEnd(); ++track)
00454    {
00455       if(!event.MatchTrack(track -> TrackIndex()))
00456       {
00457          continue;
00458       }
00459 
00460       if(long_track == record.TrackEnd())
00461       {
00462          long_track = track;
00463       }
00464       else if(long_track -> GetBasic().NPlane(false) < track -> GetBasic().NPlane(false))
00465       {
00466          long_track = track;
00467       }
00468    }
00469 
00470    return long_track;
00471 }

template<typename T>
Bin<T> Merge const Bin< T > &  lhs,
const Bin< T > &  rhs
 

template<class T>
unsigned int NameWidth const std::vector< AlgCaddy< T > > &  vec  ) 
 

Definition at line 60 of file AlgCaddy.h.

Referenced by Anp::SelectCount::End().

00061    {
00062       unsigned int width = 0;      
00063       for(typename std::vector<AlgCaddy<T> >::const_iterator it = vec.begin(); it != vec.end(); ++it)
00064       {
00065          width = std::max<unsigned int>(width, (it -> name).size());
00066       }
00067 
00068       return width;
00069    }

const Anp::CoordXYZ Anp::near_to_gnumi const CoordXYZ  pos  ) 
 

Definition at line 43 of file Default.cxx.

References GNUMICosZ, GNUMISinZ, Anp::CoordXYZ::x, Anp::CoordXYZ::y, and Anp::CoordXYZ::z.

00044 {
00045    CoordXYZ new_pos;
00046    
00047    new_pos.x = pos.x - GNUMINearX;
00048    new_pos.z = pos.z * GNUMICosZ - pos.y * GNUMISinZ + GNUMINearZ;
00049    new_pos.y = pos.z * GNUMISinZ + pos.y * GNUMICosZ;
00050 
00051    return new_pos;
00052 }

template<class T>
unsigned int NumbWidth const std::vector< AlgCaddy< T > > &  vec  ) 
 

Definition at line 72 of file AlgCaddy.h.

Referenced by Anp::SelectCount::End().

00073    {
00074       unsigned int width = 0;      
00075       for(typename std::vector<AlgCaddy<T> >::const_iterator it = vec.begin(); it != vec.end(); ++it)
00076       {
00077          width = std::max<unsigned int>(width, it -> Width(it -> NSnarlAll));
00078          width = std::max<unsigned int>(width, it -> Width(it -> NSnarlOut));
00079          width = std::max<unsigned int>(width, it -> Width(it -> NEventAll));
00080          width = std::max<unsigned int>(width, it -> Width(it -> NEventAll));
00081          width = std::max<unsigned int>(width, it -> Width(static_cast<unsigned int>(it -> WEventAll)));
00082          width = std::max<unsigned int>(width, it -> Width(static_cast<unsigned int>(it -> WEventOut)));
00083       }
00084 
00085       return width;
00086    }

bool Anp::operator< const Truth &  lhs,
const Truth &  rhs
[inline]
 

Definition at line 384 of file Truth.h.

References Anp::Truth::TruthIndex().

00385    {
00386       return (lhs.TruthIndex() < rhs.TruthIndex());
00387    }

bool Anp::operator< const RecoNu &  lhs,
const RecoNu &  rhs
[inline]
 

Definition at line 294 of file RecoNu.h.

References Anp::RecoNu::Index().

00295    {
00296       return (lhs.Index() < rhs.Index());
00297    }

bool Anp::operator< const RecoNu &  reco,
short  index
[inline]
 

Definition at line 290 of file RecoNu.h.

References Anp::RecoNu::Index().

00291    {
00292       return (index < reco.Index());
00293    }

bool Anp::operator< short  index,
const RecoNu &  reco
[inline]
 

Definition at line 286 of file RecoNu.h.

References Anp::RecoNu::Index().

00287    {
00288       return (index < reco.Index());
00289    }

template<typename T>
bool Anp::operator< unsigned int  bin,
const Bin< T > &  rhs
[inline]
 

Definition at line 265 of file Hist1d.h.

References Anp::Bin< T >::bin().

00265 { return lhs < rhs.bin(); } 

template<typename T>
bool Anp::operator< const Bin< T > &  lhs,
unsigned int  bin
[inline]
 

Definition at line 262 of file Hist1d.h.

References Anp::Bin< T >::bin().

00262 { return lhs.bin() < rhs; }

template<typename T>
bool Anp::operator< const T &  lhs,
const Bin< T > &  rhs
[inline]
 

Definition at line 259 of file Hist1d.h.

References Anp::Bin< T >::edge().

00259 { return lhs < rhs.edge(); }  

template<typename T>
bool Anp::operator< const Bin< T > &  lhs,
const T &  rhs
[inline]
 

Definition at line 256 of file Hist1d.h.

References Anp::Bin< T >::edge().

00256 { return lhs.edge() < rhs; }

template<typename T>
bool Anp::operator< const Bin< T > &  lhs,
const Bin< T > &  rhs
[inline]
 

Definition at line 253 of file Hist1d.h.

References Anp::Bin< T >::bin().

00253 { return lhs.bin() < rhs.bin(); }

bool Anp::operator< const Event &  lhs,
const Event &  rhs
[inline]
 

Definition at line 208 of file Event.h.

References Anp::Event::EventIndex().

00209    {
00210       return (lhs.EventIndex() < rhs.EventIndex());
00211    }

template<class K, class D>
bool Anp::operator< const K &  lhs,
const DataItem< K, D > &  rhs
[inline]
 

Definition at line 102 of file DataItem.h.

00103    {
00104       return (lhs < rhs.Key());
00105    }

template<class K, class D>
bool Anp::operator< const DataItem< K, D > &  lhs,
const K &  rhs
[inline]
 

Definition at line 96 of file DataItem.h.

00097    {
00098       return (lhs.Key() < rhs);
00099    }

template<class K, class D>
bool Anp::operator< const DataItem< K, D > &  lhs,
const DataItem< K, D > &  rhs
[inline]
 

Definition at line 90 of file DataItem.h.

00091    {
00092       return (lhs.Key() < rhs.Key());
00093    }

template<typename T>
std::ostream& operator<< std::ostream &  o,
const KeyPair< T > &  self
 

Definition at line 102 of file KeyPair.h.

00103    {
00104       self.Print(o);
00105       return o;
00106    }

template<typename T>
std::ostream& operator<< std::ostream &  o,
const Hist1d< T > &  self
 

Definition at line 898 of file Hist1d.h.

References Anp::Hist1d< T >::Print().

00899    {
00900       self.Print(o);
00901       return o;
00902    }

template<typename T>
std::ostream& operator<< std::ostream &  o,
const Bin< T > &  self
[inline]
 

Definition at line 274 of file Hist1d.h.

References Anp::Bin< T >::print().

00275    {
00276       self.print(o);
00277       return o;
00278    }

ostream & Anp::operator<< std::ostream &  o,
const AxisInfo &  self
 

Definition at line 981 of file PhysicsNtuple/Hist/HistMan.cxx.

References Anp::AxisInfo::Print().

00982 {
00983    self.Print(o);
00984    return o;
00985 }

std::ostream & Anp::operator<< std::ostream &  o,
const HistInfo &  self
 

Definition at line 909 of file PhysicsNtuple/Hist/HistMan.cxx.

References Anp::AxisInfo::Print().

00910 {
00911    self.Print(o);
00912    return o;
00913 }

std::ostream & Anp::operator<< std::ostream &  o,
const Header self
 

Definition at line 188 of file Header.cxx.

00189 {
00190    self.Print(o);
00191    return o;
00192 }

template<typename T>
std::ostream& operator<< std::ostream &  o,
const Handle< T > &  handle
 

Handle<T> can be printed with "cout << handle;"

Definition at line 259 of file PhysicsNtuple/Handle.h.

00260 {
00261    o << *handle;
00262    return o;
00263 }

std::ostream & Anp::operator<< std::ostream &  o,
const BeamData self
 

Definition at line 93 of file BeamData.cxx.

00094 {
00095    self.Print(o);
00096    return o;
00097 }

bool Anp::operator== const Truth &  truth,
const RecoNu &  reconu
 

Definition at line 511 of file Truth.cxx.

00512 {
00513    return (reconu == truth);
00514 }

bool Anp::operator== const RecoNu &  reconu,
const Truth &  truth
 

Definition at line 493 of file Truth.cxx.

References Anp::RecoNu::Index(), Anp::Truth::RecoBeg(), Anp::Truth::RecoEnd(), and TruthRecoIter.

00494 {
00495    for(TruthRecoIter it = truth.RecoBeg(); it != truth.RecoEnd(); ++it)
00496    {
00497       if(it -> GetType() != TruthReco::kEvent)
00498       {
00499          continue;
00500       }
00501       if(it -> RecoIndex() == reconu.Index())
00502       {
00503          return true;
00504       }
00505    }
00506 
00507    return false;
00508 }

bool Anp::operator== const Truth &  lhs,
const Truth &  rhs
[inline]
 

Definition at line 380 of file Truth.h.

References Anp::Truth::TruthIndex().

00381    {
00382       return (lhs.TruthIndex() == rhs.TruthIndex());
00383    }

bool Anp::operator== const Truth &  truth,
short  index
[inline]
 

Definition at line 376 of file Truth.h.

References Anp::Truth::TruthIndex().

00377    {
00378       return (index == truth.TruthIndex());
00379    }

bool Anp::operator== short  index,
const Truth &  truth
[inline]
 

Definition at line 372 of file Truth.h.

References Anp::Truth::TruthIndex().

00373    {
00374       return (index == truth.TruthIndex());
00375    }

bool Anp::operator== const Track &  lhs,
const Track &  rhs
[inline]
 

Definition at line 117 of file Track.h.

References Anp::Track::TrackIndex().

00118    {
00119       return (lhs.TrackIndex() == rhs.TrackIndex());
00120    }

bool Anp::operator== const Track &  track,
short  index
[inline]
 

Definition at line 113 of file Track.h.

References Anp::Track::TrackIndex().

00114    {
00115       return (index == track.TrackIndex());
00116    }

bool Anp::operator== short  index,
const Track &  track
[inline]
 

Definition at line 109 of file Track.h.

References Anp::Track::TrackIndex().

00110    {
00111       return (index == track.TrackIndex());
00112    }

bool Anp::operator== const Strip &  lhs,
const Strip &  rhs
[inline]
 

Definition at line 257 of file PhysicsNtuple/Strip.h.

References Anp::Strip::Index().

00258    {
00259       return (lhs.Index() == rhs.Index());
00260    }

bool Anp::operator== const Strip &  strip,
short  index
[inline]
 

Definition at line 253 of file PhysicsNtuple/Strip.h.

References Anp::Strip::Index().

00254    {
00255       return (index == strip.Index());
00256    }

bool Anp::operator== short  index,
const Strip &  strip
[inline]
 

Definition at line 249 of file PhysicsNtuple/Strip.h.

References Anp::Strip::Index().

00250    {
00251       return (index == strip.Index());
00252    }

bool Anp::operator== const Shower &  lhs,
const Shower &  rhs
[inline]
 

Definition at line 77 of file Shower.h.

References Anp::Shower::ShowerIndex().

00078    {
00079       return (lhs.ShowerIndex() == rhs.ShowerIndex());
00080    }

bool Anp::operator== const Shower &  shower,
short  index
[inline]
 

Definition at line 73 of file Shower.h.

References Anp::Shower::ShowerIndex().

00074    {
00075       return (index == shower.ShowerIndex());
00076    }

bool Anp::operator== short  index,
const Shower &  shower
[inline]
 

Definition at line 69 of file Shower.h.

References Anp::Shower::ShowerIndex().

00070    {
00071       return (index == shower.ShowerIndex());
00072    }

bool Anp::operator== const RecoNu &  lhs,
const RecoNu &  rhs
[inline]
 

Definition at line 282 of file RecoNu.h.

References Anp::RecoNu::Index().

00283    {
00284       return (lhs.Index() == rhs.Index());
00285    }

bool Anp::operator== const RecoNu &  reco,
short  index
[inline]
 

Definition at line 278 of file RecoNu.h.

References Anp::RecoNu::Index().

00279    {
00280       return (index == reco.Index());
00281    }

bool Anp::operator== short  index,
const RecoNu &  reco
[inline]
 

Definition at line 274 of file RecoNu.h.

References Anp::RecoNu::Index().

00275    {
00276       return (index == reco.Index());
00277    }

bool Anp::operator== const Anp::Handle< Anp::CountHist > &  lhs,
const Anp::Handle< Anp::CountHist > &  rhs
 

Definition at line 190 of file CountHist.cxx.

References Anp::Handle< T >::valid().

00191 {
00192    if(!lhs.valid() || !rhs.valid())
00193    {
00194       return false;
00195    }
00196 
00197    if(lhs -> GetInter() != rhs -> GetInter())
00198    {
00199       return false;
00200    }
00201 
00202    if(lhs -> GetReson() != rhs -> GetReson())
00203    {
00204       return false;
00205    }
00206 
00207    if(lhs -> GetParticle() != rhs -> GetParticle())
00208    {
00209       return false;
00210    }   
00211    
00212    return true;
00213 }

template<typename T>
bool Anp::operator== unsigned int  bin,
const Bin< T > &  rhs
[inline]
 

Definition at line 271 of file Hist1d.h.

References Anp::Bin< T >::bin().

00271 { return lhs == rhs.bin(); } 

template<typename T>
bool Anp::operator== const Bin< T > &  lhs,
unsigned int  bin
[inline]
 

Definition at line 268 of file Hist1d.h.

References Anp::Bin< T >::bin().

00268 { return lhs.bin() == rhs; }

bool Anp::operator== const Event &  lhs,
const Event &  rhs
[inline]
 

Definition at line 204 of file Event.h.

References Anp::Event::EventIndex().

00205    {
00206       return (lhs.EventIndex() == rhs.EventIndex());
00207    }

bool Anp::operator== const Event &  event,
short  index
[inline]
 

Definition at line 200 of file Event.h.

References Anp::Event::EventIndex().

00201    {
00202       return (index == event.EventIndex());
00203    }

bool Anp::operator== short  index,
const Event &  event
[inline]
 

Definition at line 196 of file Event.h.

References Anp::Event::EventIndex().

00197    {
00198       return (index == event.EventIndex());
00199    }

template<class K, class D>
bool Anp::operator== const K &  lhs,
const DataItem< K, D > &  rhs
[inline]
 

Definition at line 120 of file DataItem.h.

References Anp::DataItem< K, D >::Key().

00121    {
00122       return (lhs == rhs.Key());
00123    }

template<class K, class D>
bool Anp::operator== const DataItem< K, D > &  lhs,
const K &  rhs
[inline]
 

Definition at line 114 of file DataItem.h.

References Anp::DataItem< K, D >::Key().

00115    {
00116       return (lhs.Key() == rhs);
00117    }

template<class K, class D>
bool Anp::operator== const DataItem< K, D > &  lhs,
const DataItem< K, D > &  rhs
[inline]
 

Definition at line 108 of file DataItem.h.

References Anp::DataItem< K, D >::Key().

00109    {
00110       return (lhs.Key() == rhs.Key());
00111    }

double Anp::pi  )  [inline]
 

Definition at line 100 of file Default.h.

Referenced by angle().

00100 { return 3.1415926536; }

bool Anp::ReadRegistry const std::string &  filepath,
Registry reg,
bool  quiet = true
 

Definition at line 106 of file Default.cxx.

References infile, Registry::KeyExists(), Registry::LockKeys(), Registry::LockValues(), Registry::Set(), Registry::UnLockKeys(), and Registry::UnLockValues().

Referenced by Anp::DrawSnarl::Config(), Anp::FiducialCut::Init(), and Anp::BeamCut::Init().

00107 {
00108    if(!quiet)
00109    {
00110       std::cout << "-------------------------------------------------------------" << std::endl;
00111       std::cout << "Anp::ReadRegistry() - begin..." << std::endl;
00112       std::cout << "Configuraton file: " << filepath << std::endl;
00113       std::cout << std::endl;
00114    }
00115 
00116    std::ifstream infile(filepath.c_str());
00117    if(!infile || !infile.is_open())
00118    {
00119       std::cerr << "Anp::ReadRegistry() - failed to open file" << std::endl;
00120       std::cout << "-------------------------------------------------------------" << std::endl;
00121       return false;
00122    }
00123 
00124    reg.UnLockKeys();
00125    reg.UnLockValues();
00126    
00127    while(!infile.eof())
00128    {
00129       std::string line;
00130       std::getline(infile, line);
00131 
00132       if(line.empty() || line.find("#",0) != std::string::npos)
00133       {
00134          continue;
00135       }
00136       
00137       const std::string::size_type nbeg = line.find_first_of("[", 0);
00138       const std::string::size_type nend = line.find_first_of("]", 0);
00139 
00140       if(nbeg == std::string::npos || nend == std::string::npos || !(nbeg < nend))
00141       {
00142          if(!quiet) std::cout << " Failed to parse name" << std::endl;
00143          continue;
00144       }
00145 
00146       const std::string::size_type vbeg = line.find_first_of("[", nend + 1);
00147       const std::string::size_type vend = line.find_first_of("]", nend + 1);
00148       
00149       if(vbeg == std::string::npos || vend == std::string::npos || !(vbeg < vend))
00150       {
00151          if(!quiet) std::cout << " Failed to parse value" << std::endl;
00152          continue;
00153       }
00154 
00155       const std::string::size_type tbeg = line.find_first_of("[", vend + 1);
00156       const std::string::size_type tend = line.find_first_of("]", vend + 1);
00157       
00158       if(tbeg == std::string::npos || tend == std::string::npos || !(tbeg < tend))
00159       {
00160          if(!quiet) std::cout << " Failed to parse type" << std::endl;
00161          continue;
00162       }
00163 
00164       const std::string name  = line.substr(nbeg + 1, nend - nbeg - 1);
00165       const std::string value = line.substr(vbeg + 1, vend - vbeg - 1);
00166       const std::string type  = line.substr(tbeg + 1, tend - tbeg - 1);
00167       
00168       if(!quiet) std:: cout << " " << name  << " = " << value << " (" << type << ")" << std::endl;
00169 
00170       if(reg.KeyExists(name.c_str()))
00171       {
00172          std::cerr << "Anp::ReadRegistry() - key [" << name << "] already exists" << std::endl;
00173          continue;
00174       }
00175 
00176       if(type == "string")
00177       {
00178          reg.Set(name.c_str(), value.c_str());
00179       }
00180       else if(type == "double")
00181       {
00182          const double value_double = std::atof(value.c_str());
00183          reg.Set(name.c_str(), value_double);
00184       }
00185       else if(type == "int")
00186       {
00187          if(value.find(".",0) != std::string::npos)
00188          {
00189             if(!quiet) std::cerr << " Forcing conversion of double to integer" << std::endl;
00190             const int value_int = static_cast<int>(std::atof(value.c_str()));
00191             reg.Set(name.c_str(), value_int);
00192          }
00193          else
00194          {
00195             const int value_int = std::atoi(value.c_str());
00196             reg.Set(name.c_str(), value_int);
00197          }
00198       }
00199    }
00200    
00201    if(infile.is_open())
00202    {
00203       infile.close();
00204    }
00205 
00206    reg.LockKeys();
00207    reg.LockValues();
00208 
00209    if(!quiet)
00210    {
00211       std::cout << "Anp::ReadRegistry() - end" << std::endl;
00212       std::cout << "-------------------------------------------------------------" << std::endl;
00213    }
00214    
00215    return true;
00216 }

float Anp::uv2x float  u,
float  v
[inline]
 

Definition at line 94 of file Default.h.

Referenced by Anp::Vertex::CosX(), and Anp::Vertex::X().

00094 { return (u - v)*0.707106781; }

float Anp::uv2y float  u,
float  v
[inline]
 

Definition at line 95 of file Default.h.

Referenced by Anp::Vertex::CosY(), and Anp::Vertex::Y().

00095 { return (u + v)*0.707106781; }

float Anp::xy2u float  x,
float  y
[inline]
 

Definition at line 97 of file Default.h.

Referenced by Anp::Truth::GetVtx(), and Anp::SelectFiducial::Pass().

00097 { return (y + x)*0.707106781; }

float Anp::xy2v float  x,
float  y
[inline]
 

Definition at line 98 of file Default.h.

Referenced by Anp::Truth::GetVtx(), and Anp::SelectFiducial::Pass().

00098 { return (y - x)*0.707106781; }


Variable Documentation

const double Anp::GNUMICosZ = 0.998318471 [static]
 

Definition at line 26 of file Default.cxx.

Referenced by far_to_gnumi(), gnumi_to_far(), gnumi_to_near(), and near_to_gnumi().

const double Anp::GNUMIFarX = 0.0 [static]
 

Definition at line 22 of file Default.cxx.

const double Anp::GNUMIFarY = 0.0 [static]
 

Definition at line 23 of file Default.cxx.

const double Anp::GNUMIFarZ = 735.34E3 [static]
 

Definition at line 24 of file Default.cxx.

const double Anp::GNUMINearX = 1.48844 [static]
 

Definition at line 18 of file Default.cxx.

const double Anp::GNUMINearY = 0.0 [static]
 

Definition at line 19 of file Default.cxx.

const double Anp::GNUMINearZ = 1039.35 [static]
 

Definition at line 20 of file Default.cxx.

const double Anp::GNUMISinZ = 0.057967487 [static]
 

Definition at line 27 of file Default.cxx.

Referenced by far_to_gnumi(), gnumi_to_far(), gnumi_to_near(), and near_to_gnumi().

const Bool_t Anp::kBool = false
 

Definition at line 36 of file Default.h.

const Char_t Anp::kChar = 0
 

Definition at line 37 of file Default.h.

const Double_t Anp::kDouble = -1000.0
 

Definition at line 30 of file Default.h.

const Float_t Anp::kFloat = -1000.0
 

Definition at line 31 of file Default.h.

const Int_t Anp::kInt = -1000
 

Definition at line 32 of file Default.h.

const Short_t Anp::kShort = -1000
 

Definition at line 33 of file Default.h.

const UInt_t Anp::kUInt = 1000
 

Definition at line 35 of file Default.h.

const UShort_t Anp::kUShort = 1000
 

Definition at line 34 of file Default.h.


Generated on Thu Nov 1 12:01:59 2007 for loon by  doxygen 1.3.9.1