Classes | |
| class | Anp::AlgAdapt |
| class | Anp::AlgCaddy< T > |
| class | Anp::AlgEvent |
| class | Anp::AlgSnarl |
| class | Anp::AlgStore |
| class | Anp::Basic |
| 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::FillData |
| struct | Anp::FillData::Tree |
| class | Anp::FillMuonId |
| struct | Anp::FillMuonId::PlaneData |
| struct | Anp::DataNPlane |
| class | Anp::FillNPlane |
| class | Anp::FillSnarl |
| struct | Anp::CountPlaneStrip |
| struct | Anp::CountAboveBelow |
| 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::AlgThread |
| struct | Anp::PrevDataKey |
| class | Anp::FillkNN |
| class | Anp::RunkNN |
| class | Anp::FitPoint |
| class | Anp::LocalFit |
| class | Anp::FillFlux |
| class | Anp::FillMadId |
| class | Anp::MRCCInfo |
| class | Anp::Lock< T > |
| class | Anp::Mutex |
| class | Anp::CondVar |
| class | Anp::CountHist |
| class | Anp::DataCorr |
| class | Anp::HistBasic |
| class | Anp::PlotBasic |
| class | Anp::PlotData |
| class | Anp::PlotEff |
| class | Anp::PlotEvent |
| class | Anp::HistFlux |
| class | Anp::PlotFlux |
| class | Anp::HistKinem |
| class | Anp::PlotKinem |
| class | Anp::PlotPmt |
| class | Anp::PlotPur |
| class | Anp::PlotResol |
| struct | Anp::PlotResol::Hist |
| class | Anp::PlotReson |
| class | Anp::PlotShort |
| class | Anp::PlotShortSelect |
| class | Anp::PlotShower |
| class | Anp::PlotSnarl |
| class | Anp::HistTime |
| struct | Anp::HistTime::Spill |
| class | Anp::PlotTime |
| class | Anp::PlotTrack |
| class | Anp::PlotTrackGeom |
| class | Anp::PlotTruth |
| class | Anp::HistVtx |
| class | Anp::PlotVtx |
| struct | Anp::PlaneHitColl |
| class | Anp::PmtHit |
| class | Anp::ReadTree< T > |
| struct | Anp::ReadTree< T >::Data |
| class | Anp::RecoNu |
| class | Anp::Record |
| class | Anp::RunAlgEvent |
| class | Anp::RunAlgSnarl |
| class | Anp::RunFinder |
| class | Anp::RunModule |
| class | Anp::RunThread< T > |
| class | Anp::FiducialCut |
| class | Anp::SelectAntiNeutrino |
| class | Anp::SelectCount |
| class | Anp::SelectFiducial |
| class | Anp::SelectFlux |
| class | Anp::SelectKinem |
| class | Anp::SelectNC |
| class | Anp::SelectNuMu |
| class | Anp::SelectReson |
| class | Anp::SelectShort |
| class | Anp::SelectSpill |
| struct | Anp::RunSubrun |
| class | Anp::SelectTrue |
| class | Anp::StudyFiducial |
| class | Anp::FillShortEvent |
| class | Anp::FillShortVar |
| class | Anp::StripLink |
| class | Anp::Shower |
| class | Anp::StdHep |
| class | Anp::FillBasic |
| class | Anp::FillEnergy |
| class | Anp::FillEvent |
| class | Anp::FillHeader |
| class | Anp::FillMRCC |
| class | Anp::FillShower |
| class | Anp::FillStrip |
| class | Anp::FillTrack |
| class | Anp::FillTruth |
| class | Anp::Interface |
| class | Anp::RunAlgStore |
| class | Anp::StorekNNData |
| class | Anp::StreamBuf |
| class | Anp::Strip |
| struct | Anp::Strip::TrackInfo |
| struct | Anp::BySigCor |
| struct | Anp::ByPlaneStrip |
| class | Anp::Track |
| class | Anp::TrueNu |
| class | Anp::Truth |
| class | Anp::TruthReco |
| class | Anp::Vertex |
Typedefs | |
| typedef Anp::Handle< Anp::AlgEvent > | AlgEventPtr |
| typedef Anp::Handle< Anp::AlgSnarl > | AlgSnarlPtr |
| typedef Anp::Handle< Anp::AlgStore > | AlgStorePtr |
| typedef DataItem< std::string, Float_t > | StringData |
| typedef DataItem< Short_t, Float_t > | Data |
| typedef std::vector< Anp::Data > | DataVec |
| typedef DataVec::const_iterator | DataIter |
| typedef DataVec::iterator | DataIterator |
| typedef Anp::Handle< Anp::EventTab > | EventTabPtr |
| typedef std::vector< Anp::TruthReco >::const_iterator | TruthRecoIter |
| typedef std::vector< Anp::TruthReco >::iterator | TruthRecoIterator |
| 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::MRCCInfo >::const_iterator | MRCCIter |
| 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< Anp::MRCCInfo >::iterator | MRCCIterator |
| typedef std::vector< StripIter > | StripVec |
| typedef std::vector< TrackIter > | TrackVec |
| typedef std::vector< ShowerIter > | ShowerVec |
| typedef std::vector< MRCCIter > | MRCCVec |
Functions | |
| const std::string | ConvertVector2String (const std::vector< double > &dvec) |
| const std::vector< double > | ConvertString2Vector (const std::string &dstr) |
| template<class T> | |
| const std::string | ConvertVectorToString (const std::vector< T > &dvec) |
| template<class T> | |
| const std::vector< T > | ConvertStringToVector (const std::string &dstr) |
| template<class T> | |
| unsigned int | NameWidth (const std::vector< AlgCaddy< T > > &vec) |
| template<class T> | |
| unsigned int | NumbWidth (const std::vector< AlgCaddy< T > > &vec) |
| 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) |
| std::ostream & | operator<< (std::ostream &os, const Data &data) |
| bool | ReadRegistry (const std::string &filepath, Registry ®, bool quiet=true) |
| const std::pair< std::string, bool > | GetString (const std::string &prefix, const std::string &key, const Registry ®) |
| bool | Read (const Registry ®, const std::string &key, bool &value) |
| bool | Read (const Registry ®, const std::string &key, std::string &value) |
| int | SetKey (Registry ®, const std::string &key, const std::string &value) |
| TDirectory * | GetDir (std::string path, TDirectory *dir) |
| TH1 * | SetDir (TH1 *h, TDirectory *dir, const std::string &name="") |
| Mutex & | GetMainMutex () |
| Mutex & | GetROOTMutex () |
| 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) |
| template<typename T> | |
| std::vector< T > | ReadList (const Registry ®, const std::string &key, const std::string &sep) |
| template<typename T> | |
| void | PrintList (const std::string &name, const std::vector< T > &lvec) |
| 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 &event, const Shower &shower) |
| bool | operator== (const Shower &shower, const Event &event) |
| bool | operator== (const Track &track, const Event &event) |
| bool | operator== (const Event &event, const Track &track) |
| bool | operator< (const DataNPlane &lhs, const DataNPlane &rhs) |
| bool | operator== (const DataNPlane &lhs, const DataNPlane &rhs) |
| bool | operator== (const CountPlaneStrip &lhs, const CountPlaneStrip &rhs) |
| template<typename T> | |
| std::ostream & | operator<< (std::ostream &o, const Handle< T > &handle) |
| bool | operator== (const Header &lhs, const Header &rhs) |
| bool | operator!= (const Header &lhs, const Header &rhs) |
| std::ostream & | operator<< (std::ostream &o, const Header &self) |
| TH1 * | MakeTH1 (const std::string &dir, TDirectory *dir_, const std::string &key) |
| TH2 * | MakeTH2 (const std::string &dir, TDirectory *dir_, const std::string &key) |
| 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> | |
| 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) |
| void * | run_alg_thread (void *data_) |
| bool | operator== (const FitPoint &lhs, const FitPoint &rhs) |
| bool | operator< (const FitPoint &lhs, const FitPoint &rhs) |
| bool | operator< (double value, const FitPoint &fit) |
| bool | operator< (const FitPoint &rhs, double value) |
| bool | operator== (int index, const FitPoint &fit) |
| bool | operator== (const FitPoint &fit, int index) |
| bool | operator== (short index, const MRCCInfo &mrccin) |
| bool | operator== (const MRCCInfo &mrccin, short index) |
| bool | operator== (const MRCCInfo &lhs, const MRCCInfo &rhs) |
| bool | operator== (const Anp::Handle< Anp::CountHist > &lhs, const Anp::Handle< Anp::CountHist > &rhs) |
| bool | operator< (const PlaneHitColl &lhs, const PlaneHitColl &rhs) |
| bool | operator== (const PlaneHitColl &lhs, const PlaneHitColl &rhs) |
| bool | operator< (const short lhs, const PlaneHitColl &rhs) |
| bool | operator< (const PlaneHitColl &lhs, const short rhs) |
| bool | operator== (const short lhs, const PlaneHitColl &rhs) |
| bool | operator== (const PlaneHitColl &lhs, const short rhs) |
| bool | operator== (short index, const RecoNu &rnu) |
| bool | operator== (const RecoNu &rnu, short index) |
| bool | operator== (const RecoNu &lhs, const RecoNu &rhs) |
| double | RecoQ2 (const RecoNu &rnu, Reco::Formula formula) |
| double | RecoW2 (const RecoNu &rnu, Reco::Formula formula) |
| double | m_proton () |
| double | m_muon () |
| double | m_delta () |
| double | m_proton2 () |
| double | m_muon2 () |
| double | m_delta2 () |
| void * | get_snarl_done (void *alg_) |
| void | PrintStopWatch (double realt, double cput) |
| template<class T> | |
| void * | get_thread_done (void *data_) |
| double | GetUVAssymForQES (const Event &event, const Record &record) |
| const std::vector< RunSubrun > | ReadRunList (const std::string &path, bool print=false) |
| bool | operator== (const RunSubrun &lhs, const RunSubrun &rhs) |
| bool | operator< (const StripLink A, const StripLink B) |
| bool | operator== (short index, const Shower &shower) |
| bool | operator== (const Shower &shower, short index) |
| bool | operator== (const Shower &lhs, const Shower &rhs) |
| NtpSRStrip * | GetSRStrip (const NtpStRecord &ntpr, int index) |
| void | PrintStrips (const NtpStRecord &record, const int *index_array, int nstrip) |
| template<class T> | |
| std::vector< const T * > | FillRecoTruth (const TClonesArray *array) |
| bool | operator== (short index, const Strip &strip) |
| bool | operator== (const Strip &strip, short index) |
| bool | operator== (const Strip &lhs, const Strip &rhs) |
| 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 TrueNu &reco) |
| bool | operator== (const TrueNu &reco, short index) |
| bool | operator== (const TrueNu &lhs, const TrueNu &rhs) |
| bool | operator== (const TrueNu &tnu, const RecoNu &rnu) |
| bool | operator== (const RecoNu &rnu, const TrueNu &tnu) |
| 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 Event &event, const Truth &truth) |
| bool | operator== (const Truth &truth, const Event &event) |
| bool | operator== (const RecoNu &reco, const Truth &truth) |
| bool | operator== (const Truth &truth, const RecoNu &reco) |
| bool | operator== (const Track &track, const Truth &truth) |
| bool | operator== (const Truth &truth, const Track &track) |
| bool | operator== (const Shower &shower, const Truth &truth) |
| bool | operator== (const Truth &truth, const Shower &shower) |
| bool | operator== (const Event &event, const TruthReco &truth) |
| bool | operator== (const TruthReco &truth, const Event &event) |
| bool | operator== (const Track &track, const TruthReco &truth) |
| bool | operator== (const TruthReco &truth, const Track &track) |
| bool | operator== (const RecoNu &event, const TruthReco &truth) |
| bool | operator== (const TruthReco &truth, const RecoNu &event) |
| bool | operator== (const Shower &shower, const TruthReco &truth) |
| bool | operator== (const TruthReco &truth, const Shower &shower) |
| TrackIter | LongestTrack (const Event &event, const Record &record) |
| ShowerIter | FirstShower (const Event &event, const Record &record) |
| ShowerIter | PrimaryShower (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) |
| void | CleanRecord (const EventIter ibeg, const EventIter iend, Record &record) |
| void | ApplyTrueWeights (Record &record) |
| void | PrintRecordTruth (const Record &record, std::ostream &o=std::cout) |
Variables | |
| Mutex | ROOTMutex |
| Mutex | MAINMutex |
| const double | GNUMINearX = 1.48844 |
| const double | GNUMINearY = 0.0 |
| const double | GNUMINearZ = 1036.49 |
| 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 |
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
|
|
Definition at line 66 of file AlgEvent.h. Referenced by Anp::RunAlgEvent::Config(), Anp::RunAlgEvent::End(), and Anp::RunAlgEvent::Run(). |
|
|
Definition at line 72 of file AlgSnarl.h. Referenced by Anp::RunAlgSnarl::Config(), Anp::SelectTrue::End(), Anp::SelectKinem::End(), Anp::RunAlgSnarl::End(), Anp::SelectTrue::GetAlg(), Anp::SelectKinem::GetAlg(), Anp::SelectTrue::Run(), and Anp::SelectKinem::Run(). |
|
|
Definition at line 62 of file AlgStore.h. Referenced by Anp::RunAlgStore::Config(), and Anp::RunAlgStore::Run(). |
|
|
|
|
Definition at line 66 of file DataItem.h. Referenced by Anp::Track::DataBegIterator(), Anp::Event::DataBegIterator(), Anp::Track::DataEndIterator(), Anp::Event::DataEndIterator(), Anp::Track::Erase(), and Anp::Event::Erase(). |
|
|
Definition at line 64 of file DataItem.h. Referenced by Anp::FillkNN::Find(), and Anp::FillkNN::Run(). |
|
|
|
|
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(). |
|
|
Definition at line 31 of file PhysicsNtuple/Utils.h. Referenced by Anp::Record::MRCCBeg(), and Anp::Record::MRCCEnd(). |
|
|
Definition at line 39 of file PhysicsNtuple/Utils.h. Referenced by Anp::Record::Erase(), Anp::Record::MRCCBegIterator(), and Anp::Record::MRCCEndIterator(). |
|
|
Definition at line 44 of file PhysicsNtuple/Utils.h. |
|
|
Definition at line 29 of file PhysicsNtuple/Utils.h. Referenced by Anp::FillEvent::Fill(), FirstShower(), GetShower(), GetUVAssymForQES(), Anp::FillTruth::IsConsistent(), PrimaryShower(), Anp::SelectNC::Run(), Anp::PlotVtx::Run(), Anp::PlotShower::Run(), Anp::PlotBasic::Run(), Anp::FillEnergy::Run(), Anp::Record::ShowerBeg(), and Anp::Record::ShowerEnd(). |
|
|
Definition at line 37 of file PhysicsNtuple/Utils.h. Referenced by ApplyTrueWeights(), CleanRecord(), Anp::Record::Erase(), Anp::SelectFiducial::Run(), Anp::FillEnergy::Run(), Anp::Record::ShowerBegIterator(), and Anp::Record::ShowerEndIterator(). |
|
|
Definition at line 43 of file PhysicsNtuple/Utils.h. Referenced by GetShower(), and Anp::EventHitTab::SetShowers(). |
|
|
|
Definition at line 38 of file PhysicsNtuple/Utils.h. Referenced by Anp::Record::Erase(), Anp::SelectFiducial::Run(), Anp::Record::StdHepBegIterator(), and Anp::Record::StdHepEndIterator(). |
|
|
Definition at line 62 of file DataItem.h. |
|
|
|
Definition at line 36 of file PhysicsNtuple/Utils.h. Referenced by Anp::Record::Erase(), Anp::Record::StripBegIterator(), and Anp::Record::StripEndIterator(). |
|
|
Definition at line 41 of file PhysicsNtuple/Utils.h. |
|
|
|
|
Definition at line 42 of file PhysicsNtuple/Utils.h. Referenced by GetTrack(), Anp::SelectShort::Run(), Anp::SelectReson::Run(), Anp::FillShortVar::Run(), and Anp::EventHitTab::Set(). |
|
|
|
Definition at line 35 of file PhysicsNtuple/Utils.h. Referenced by Anp::Record::Erase(), Anp::SelectFlux::Run(), Anp::SelectFiducial::Run(), Anp::PlotTruth::Run(), Anp::FillFlux::Run(), Anp::Record::TruthBegIterator(), and Anp::Record::TruthEndIterator(). |
|
|
|
Definition at line 26 of file Truth.h. Referenced by Anp::Truth::Erase(), Anp::Truth::RecoBegIterator(), Anp::Truth::RecoEndIterator(), and Anp::SelectFiducial::Run(). |
|
||||||||||||
|
Definition at line 95 of file Default.cxx. Referenced by angle(), Anp::FillTrackGeom::Fill(), Anp::PlotTrackGeom::FillProjection(), Anp::PlotTrackGeom::FillRotation(), Anp::PlotTrackGeom::FillXProduct(), and Anp::PlotEvent::Plot(). 00096 {
00097 const double radius = std::sqrt(x*x + y*y);
00098
00099 if(!(radius > 0.0))
00100 {
00101 return 0.0;
00102 }
00103
00104 if(!(+x < radius))
00105 {
00106 return std::acos(+1.0);
00107 }
00108 if(!(-x < radius))
00109 {
00110 return std::acos(-1.0);
00111 }
00112
00113 double angle = std::acos(x/radius);
00114
00115 if(y < 0.0)
00116 {
00117 angle = 2.0 * pi() - angle;
00118 }
00119
00120 return angle;
00121 }
|
|
|
Definition at line 317 of file Utils.cxx. References Anp::Record::EventBegIterator(), Anp::Record::EventEndIterator(), EventIterator, Anp::Record::FindTruth(), Anp::Record::GetHeader(), Anp::Header::IsData(), Anp::Record::ShowerBegIterator(), Anp::Record::ShowerEndIterator(), ShowerIterator, Anp::Record::TrackBegIterator(), Anp::Record::TrackEndIterator(), TrackIterator, Anp::Record::TruthBeg(), Anp::Record::TruthEnd(), and TruthIter. Referenced by Anp::SelectFlux::Run(), and Anp::FillFlux::Run(). 00318 {
00319 //
00320 // Apply weights to reconstructed objects
00321 //
00322
00323 if(record.GetHeader().IsData() || record.TruthBeg() == record.TruthEnd())
00324 {
00325 return;
00326 }
00327
00328 for(EventIterator ievent = record.EventBegIterator(); ievent != record.EventEndIterator(); ++ievent)
00329 {
00330 const TruthIter itruth = record.FindTruth(*ievent);
00331
00332 if(itruth != record.TruthEnd())
00333 {
00334 ievent -> SetWeight(itruth -> Weight());
00335 }
00336 else
00337 {
00338 cerr << "ApplyTrueWeights - failed to find truth record" << endl;
00339 }
00340 }
00341
00342 for(TrackIterator itrack = record.TrackBegIterator(); itrack != record.TrackEndIterator(); ++itrack)
00343 {
00344 const TruthIter itruth = record.FindTruth(*itrack);
00345
00346 if(itruth != record.TruthEnd())
00347 {
00348 itrack -> SetWeight(itruth -> Weight());
00349 }
00350 else
00351 {
00352 cerr << "ApplyTrueWeights - failed to find truth record" << endl;
00353 }
00354 }
00355
00356 for(ShowerIterator ishower = record.ShowerBegIterator(); ishower != record.ShowerEndIterator(); ++ishower)
00357 {
00358 const TruthIter itruth = record.FindTruth(*ishower);
00359
00360 if(itruth != record.TruthEnd())
00361 {
00362 ishower -> SetWeight(itruth -> Weight());
00363 }
00364 else
00365 {
00366 cerr << "ApplyTrueWeights - failed to find truth record" << endl;
00367 }
00368 }
00369 }
|
|
||||||||||||||||
|
Definition at line 271 of file Utils.cxx. References Anp::Record::Erase(), EventIter, find(), Anp::Record::ShowerBegIterator(), Anp::Record::ShowerEndIterator(), ShowerIterator, Anp::Record::TrackBegIterator(), Anp::Record::TrackEndIterator(), and TrackIterator. Referenced by Anp::SelectTrue::Run(), Anp::SelectShort::Run(), Anp::SelectNuMu::Run(), Anp::SelectNC::Run(), Anp::SelectKinem::Run(), and Anp::FillShortEvent::Run(). 00272 {
00273 //
00274 // Remove reconstructed tracks that do not match events in (ibeg, iend) range
00275 //
00276 TrackIterator itrack = record.TrackBegIterator();
00277 while(itrack != record.TrackEndIterator())
00278 {
00279 //
00280 // Find first event that matches this track
00281 //
00282 const EventIter ievent = std::find(ibeg, iend, *itrack);
00283
00284 if(ievent != iend)
00285 {
00286 ++itrack;
00287 }
00288 else
00289 {
00290 itrack = record.Erase(itrack);
00291 }
00292 }
00293
00294 //
00295 // Remove reconstructed showers that do not match events in (ibeg, iend) range
00296 //
00297 ShowerIterator ishower = record.ShowerBegIterator();
00298 while(ishower != record.ShowerEndIterator())
00299 {
00300 //
00301 // Find first event that matches this shower
00302 //
00303 const EventIter ievent = std::find(ibeg, iend, *ishower);
00304
00305 if(ievent != iend)
00306 {
00307 ++ishower;
00308 }
00309 else
00310 {
00311 ishower = record.Erase(ishower);
00312 }
00313 }
00314 }
|
|
|
Definition at line 354 of file AlgAdapt.cxx. References UtilString::StringTok(). Referenced by Anp::AlgAdapt::Read(). 00355 {
00356 vector<double> dvec;
00357
00358 //
00359 // Parse into individual strings
00360 //
00361 vector<string> svec;
00362 UtilString::StringTok(svec, dstr, ", ");
00363
00364 if(svec.empty())
00365 {
00366 cerr << " Anp::ConvertString2Vector - input string has no data:\n " << dstr << endl;
00367 return dvec;
00368 }
00369
00370 for(unsigned int i = 0; i < svec.size(); ++i)
00371 {
00372 stringstream temp;
00373 temp << svec[i];
00374
00375 double value = -1.0e9;
00376 temp >> value;
00377
00378 if(!temp.fail())
00379 {
00380 dvec.push_back(value);
00381 }
00382 else
00383 {
00384 cerr << " Anp::ConvertString2Vector - stringstream >> failed for " << svec[i] << endl;
00385 }
00386 }
00387
00388 return dvec;
00389 }
|
|
||||||||||
|
Definition at line 130 of file AlgAdapt.h. References UtilString::StringTok(). 00131 {
00132 std::vector<T> dvec;
00133
00134 //
00135 // Parse into individual strings
00136 //
00137 std::vector<std::string> svec;
00138 UtilString::StringTok(svec, dstr, ", ");
00139
00140 if(svec.empty())
00141 {
00142 return dvec;
00143 }
00144
00145 for(unsigned int i = 0; i < svec.size(); ++i)
00146 {
00147 std::stringstream temp;
00148 temp << svec[i];
00149
00150 T value;
00151 temp >> value;
00152
00153 if(!temp.fail())
00154 {
00155 dvec.push_back(value);
00156 }
00157 else
00158 {
00159 std::cerr << "Anp::ConvertString2Vector - stringstream >> failed for " << svec[i] << std::endl;
00160 }
00161 }
00162
00163 return dvec;
00164 }
|
|
|
Definition at line 341 of file AlgAdapt.cxx. Referenced by Anp::AlgAdapt::Save(). 00342 {
00343 stringstream dstr;
00344 for(vector<double>::const_iterator dit = dvec.begin(); dit != dvec.end(); ++dit)
00345 {
00346 dstr << setprecision(9) << fixed << *dit;
00347 if(dit + 1 != dvec.end()) dstr << ", ";
00348 }
00349
00350 return dstr.str();
00351 }
|
|
||||||||||
|
Definition at line 117 of file AlgAdapt.h. 00118 {
00119 std::stringstream dstr;
00120 for(typename std::vector<T>::const_iterator dit = dvec.begin(); dit != dvec.end(); ++dit)
00121 {
00122 dstr << *dit;
00123 if(dit + 1 != dvec.end()) dstr << ", ";
00124 }
00125
00126 return dstr.str();
00127 }
|
|
||||||||||||||||
|
Definition at line 987 of file Hist1d.h. References Anp::Hist1d< T >::GetBins(), Anp::Hist1d< T >::GetIntegral(), and SetDir(). Referenced by Anp::HistMan::CreateTH1(). 00988 {
00989 const std::vector<Bin<T> > &bvec = h.GetBins();
00990
00991 if(bvec.empty())
00992 {
00993 return 0;
00994 }
00995
00996 double *array = new double[bvec.size() - 1];
00997
00998 for(int ibin = 1; ibin < int(bvec.size()); ++ibin)
00999 {
01000 array[ibin - 1] = bvec[ibin].edge();
01001 }
01002
01003 TH1 *th1 = new TH1D(name.c_str(), name.c_str(), bvec.size() - 2, array);
01004
01005 delete [] array;
01006
01007 for(int ibin = 0; ibin < int(bvec.size()); ++ibin)
01008 {
01009 th1 -> SetBinContent(ibin, bvec[ibin].sum());
01010 }
01011
01012 Anp::SetDir(th1, 0);
01013 th1 -> SetEntries(h.GetIntegral("UO"));
01014
01015 return th1;
01016 }
|
|
|
Definition at line 84 of file Default.cxx. References GNUMICosZ, GNUMISinZ, Anp::CoordXYZ::y, and Anp::CoordXYZ::z. 00085 {
00086 CoordXYZ new_pos = pos;
00087
00088 new_pos.z = pos.z * GNUMICosZ + pos.y * GNUMISinZ + GNUMIFarZ;
00089 new_pos.y = -pos.z * GNUMISinZ + pos.y * GNUMICosZ;
00090
00091 return new_pos;
00092 }
|
|
||||||||||
|
Definition at line 613 of file FillTruth.cxx. 00614 {
00615 //
00616 // Collect and return records that match true and reconstructed objects
00617 //
00618
00619 vector<const T *> tvec;
00620
00621 if(!array)
00622 {
00623 cerr << "FillRecoTruth<T> - TClonesArray of reco-to-truth records does not exist" << endl;
00624 return tvec;
00625 }
00626
00627 const int nentries = array -> GetEntries();
00628 for(int index = 0; index < nentries; ++index)
00629 {
00630 const T *treco = dynamic_cast<const T *>(array -> At(index));
00631 if(!treco)
00632 {
00633 cerr << "FillRecoTruth<T> - dynamic_cast failed at index: "<< index << endl;
00634 continue;
00635 }
00636
00637 if(treco -> index != index)
00638 {
00639 cerr << "FillRecoTruth<T> - wrong index at index: "<< index << endl;
00640 continue;
00641 }
00642
00643 tvec.push_back(treco);
00644 }
00645
00646 return tvec;
00647 }
|
|
||||||||||||
|
Definition at line 46 of file Utils.cxx. References Anp::Event::FirstShower(), Anp::Record::ShowerBeg(), Anp::Record::ShowerEnd(), and ShowerIter. Referenced by PrimaryShower(), Anp::PlotShower::Run(), and Anp::PlotBasic::Run(). 00047 {
00048 //
00049 // Return first event shower
00050 //
00051
00052 for(ShowerIter ishower = record.ShowerBeg(); ishower != record.ShowerEnd(); ++ishower)
00053 {
00054 if(event.FirstShower(ishower -> ShowerIndex()))
00055 {
00056 return ishower;
00057 }
00058 }
00059
00060 return record.ShowerEnd();
00061 }
|
|
|
Definition at line 380 of file RunAlgSnarl.cxx. 00381 {
00382 //
00383 // Global function that runs in a new thread
00384 //
00385 if(!alg_)
00386 {
00387 cerr << "Anp::get_snarl_done - null input pointer" << endl;
00388 return 0;
00389 }
00390
00391 //
00392 // Get algorithm pointer
00393 //
00394 Anp::RunAlgSnarl *alg = static_cast<Anp::RunAlgSnarl *> (alg_);
00395
00396 while(true)
00397 {
00398 Anp::Lock<Anp::Mutex> lock(alg -> fMutex);
00399
00400 //
00401 // All work is done, exit function
00402 //
00403 if(alg -> fCond.GetValue() != 0 &&
00404 alg -> fCond.GetValue() != 1)
00405 {
00406 break;
00407 }
00408
00409 while(alg -> fCond.GetValue() == 0)
00410 {
00411 alg -> fCond.Wait(alg -> fMutex);
00412 }
00413
00414 //
00415 // Do actual work and reset status to idle
00416 //
00417 if(alg -> fCond.GetValue() == 1)
00418 {
00419 alg -> RunRecord();
00420 alg -> fCond.SetValue(0);
00421 alg -> fCond.Signal();
00422 }
00423 }
00424
00425 return alg;
00426 }
|
|
||||||||||
|
Definition at line 66 of file RunThread.h. 00067 {
00068 if(!data_)
00069 {
00070 std::cerr << "Anp::get_thread_done - null data pointer" << std::endl;
00071 return 0;
00072 }
00073
00074 T *data = static_cast<T *> (data_);
00075
00076 data -> GetDone();
00077
00078 return data;
00079 }
|
|
||||||||||||
|
Definition at line 377 of file Default.cxx. Referenced by Anp::PlotPur::Add(), Anp::PlotEff::Add(), Anp::FillData::Config(), Anp::PlotKinem::Fill(), Anp::PlotBasic::Fill(), Anp::PlotData::Get(), Anp::SelectCount::GetCount(), Anp::PlotVtx::GetPlot(), Anp::PlotTruth::GetPlot(), Anp::PlotReson::GetPlot(), Anp::PlotFlux::GetPlot(), Anp::PlotShortSelect::Plot(), Anp::PlotShort::Plot(), Anp::PlotShort::PlotStandard(), Anp::SelectTrue::Set(), Anp::SelectKinem::Set(), Anp::SelectCount::Set(), Anp::RunAlgEvent::Set(), Anp::PlotVtx::Set(), Anp::PlotTruth::Set(), Anp::PlotTrackGeom::Set(), Anp::PlotTrack::Set(), Anp::PlotTime::Set(), Anp::PlotSnarl::Set(), Anp::PlotShower::Set(), Anp::PlotShortSelect::Set(), Anp::PlotShort::Set(), Anp::PlotPur::Set(), Anp::PlotPmt::Set(), Anp::PlotKinem::Set(), Anp::PlotFlux::Set(), Anp::PlotEvent::Set(), Anp::PlotEff::Set(), Anp::PlotData::Set(), Anp::PlotBasic::Set(), Anp::FillData::Set(), and Anp::Plot::Data::Set(). 00378 {
00379 //
00380 // Recursively reate directory path in dir
00381 //
00382 if(!dir || path.empty() || path == "/")
00383 {
00384 return dir;
00385 }
00386
00387 // remove trailing slash if present
00388 if(path.substr(path.size() - 1, 1) == "/")
00389 {
00390 path = path.substr(0, path.size() - 1);
00391 }
00392
00393 std::string::size_type pos = path.find_last_of('/');
00394 if(pos != std::string::npos)
00395 {
00396 // recursively walk upward until all slash characters are removed
00397 dir = Anp::GetDir(path.substr(0, pos), dir);
00398
00399 // make directory path of last substring without slash
00400 path = path.substr(pos + 1, path.size() - pos);
00401 }
00402
00403 Anp::Lock<Mutex> lock(Anp::GetROOTMutex());
00404
00405 if(dir -> Get(path.c_str()))
00406 {
00407 return dynamic_cast<TDirectory *>(dir -> Get(path.c_str()));
00408 }
00409
00410 return dir -> mkdir(path.c_str());
00411 }
|
|
||||||||||||||||||||||||
|
Definition at line 297 of file Hist1d.h. 00298 {
00299 // Compute fraction of kernel intergral for kernel centered at x0 = cpos
00300 // and between lpos and rpos boundaries. Kernel function is (1-((x-x0)/w)^2)^2
00301 // for x < 1.0 and 0 otherwise. Kerner integral I(x) = (x - 2*x^3/3 + x^5/5)/C,
00302 // where C = 16/15.
00303
00304 if(!(lpos < rpos) || !(width > 0.0))
00305 {
00306 std::cerr << "GetKernelOverlap - invalid input parameters ("
00307 << lpos << ", " << rpos << ", " << cpos << ", " << width << ")" << std::endl;
00308 return 0;
00309 }
00310
00311 T ledge = cpos - width;
00312 T redge = cpos + width;
00313
00314 if(ledge < lpos) ledge = lpos;
00315 if(redge > rpos) redge = rpos;
00316
00317 const T x1 = (ledge - cpos)/width;
00318 const T x2 = (redge - cpos)/width;
00319
00320 const T I1 = x1 - 2.0*x1*x1*x1/3.0 + x1*x1*x1*x1*x1/5.0;
00321 const T I2 = x2 - 2.0*x2*x2*x2/3.0 + x2*x2*x2*x2*x2/5.0;
00322
00323 const T overlap = 15.0*(I2 - I1)/16.0;
00324
00325 //std::cout << "(lpos, rpos, cpos) = ("
00326 //<< lpos << ", " << rpos << ", " << cpos << ")" << std::endl
00327 //<< "(ledg, redg, width, overlap) = ("
00328 //<< ledge << ", " << redge << ", " << width << ", " << overlap << ")" << std::endl;
00329
00330 return overlap;
00331 }
|
|
|
Definition at line 432 of file Default.cxx. 00433 {
00434 return MAINMutex;
00435 }
|
|
|
Definition at line 438 of file Default.cxx. Referenced by Anp::RunAlgSnarl::Config(). 00439 {
00440 return ROOTMutex;
00441 }
|
|
||||||||||||
|
Definition at line 118 of file Utils.cxx. References Anp::Event::MatchShower(), Anp::Record::ShowerBeg(), Anp::Record::ShowerEnd(), ShowerIter, and ShowerVec. Referenced by Anp::FillEvent::Run(), and Anp::EventHitTab::SetShowers(). 00119 {
00120 //
00121 // Find all showers that belongs this reconstructed event
00122 //
00123
00124 ShowerVec vec;
00125 for(ShowerIter shower = record.ShowerBeg(); shower != record.ShowerEnd(); ++shower)
00126 {
00127 if(event.MatchShower(shower -> ShowerIndex()))
00128 {
00129 vec.push_back(shower);
00130 }
00131 }
00132
00133 return vec;
00134 }
|
|
||||||||||||
|
Definition at line 587 of file FillBasic.cxx. References MSG, and NtpStRecord::stp. Referenced by Anp::FillBasic::Get(), and PrintStrips(). 00588 {
00589 //
00590 // Return pointer to NtpSRStrip with "index"
00591 //
00592 const TClonesArray *strip_array = record.stp;
00593 if(!strip_array)
00594 {
00595 MSG("FillAlg", Msg::kWarning) << "NtpStRecord does not have valid strip array." << endl;
00596 return 0;
00597 }
00598
00599 NtpSRStrip *ntpstp = dynamic_cast<NtpSRStrip *>(strip_array -> At(index));
00600 if(!ntpstp)
00601 {
00602 MSG("FillAlg", Msg::kWarning) << "Could not find NtpSRStrip at " << index << endl;
00603 return 0;
00604 }
00605
00606 return ntpstp;
00607 }
|
|
||||||||||||||||
|
Definition at line 238 of file Default.cxx. References Registry::Get(), and reg. Referenced by Anp::SelectCount::Config(), and PTGuiMainFrame::ProcessMessage(). 00241 {
00242 std::pair<std::string, bool> result(std::string(""), false);
00243
00244 if(prefix.empty() && key.empty())
00245 {
00246 return result;
00247 }
00248
00249 const char *value_char = 0;
00250 if(reg.Get((prefix + key).c_str(), value_char) && value_char)
00251 {
00252 result.first = value_char;
00253 result.second = true;
00254 }
00255 else if(reg.Get(key.c_str(), value_char) && value_char)
00256 {
00257 result.first = value_char;
00258 result.second = true;
00259 }
00260
00261 return result;
00262 }
|
|
||||||||||||||||
|
Definition at line 226 of file Utils.cxx. References Anp::Shower::ShowerIndex(), Anp::Record::StripBeg(), Anp::Record::StripEnd(), StripIter, and StripVec. 00227 {
00228 //
00229 // Find all strips that belongs this reconstructed shower
00230 //
00231
00232 short key = 0;
00233 if(view)
00234 {
00235 if(std::strcmp(view, "V") == 0 || std::strcmp(view, "v") == 0)
00236 {
00237 key = 3;
00238 }
00239 else if(std::strcmp(view, "U") == 0 || view && std::strcmp(view, "u") == 0)
00240 {
00241 key = 2;
00242 }
00243 }
00244
00245 StripVec vec;
00246 for(StripIter strip = record.StripBeg(); strip != record.StripEnd(); ++strip)
00247 {
00248 if(!strip -> MatchShw(shower.ShowerIndex()))
00249 {
00250 continue;
00251 }
00252
00253 if(key == 0)
00254 {
00255 vec.push_back(strip);
00256 }
00257 else if(key == 3 && strip -> IsVview())
00258 {
00259 vec.push_back(strip);
00260 }
00261 else if(key == 2 && strip -> IsUview())
00262 {
00263 vec.push_back(strip);
00264 }
00265 }
00266
00267 return vec;
00268 }
|
|
||||||||||||||||
|
Definition at line 182 of file Utils.cxx. References Anp::Record::StripBeg(), Anp::Record::StripEnd(), StripIter, StripVec, and Anp::Track::TrackIndex(). 00183 {
00184 //
00185 // Find all strips that belongs this reconstructed track
00186 //
00187
00188 short key = 0;
00189 if(view)
00190 {
00191 if(std::strcmp(view, "V") == 0 || std::strcmp(view, "v") == 0)
00192 {
00193 key = 3;
00194 }
00195 else if(std::strcmp(view, "U") == 0 || view && std::strcmp(view, "u") == 0)
00196 {
00197 key = 2;
00198 }
00199 }
00200
00201 StripVec vec;
00202 for(StripIter strip = record.StripBeg(); strip != record.StripEnd(); ++strip)
00203 {
00204 if(!strip -> MatchTrk(track.TrackIndex()))
00205 {
00206 continue;
00207 }
00208
00209 if(key == 0)
00210 {
00211 vec.push_back(strip);
00212 }
00213 else if(key == 3 && strip -> IsVview())
00214 {
00215 vec.push_back(strip);
00216 }
00217 else if(key == 2 && strip -> IsUview())
00218 {
00219 vec.push_back(strip);
00220 }
00221 }
00222 return vec;
00223 }
|
|
||||||||||||||||
|
Definition at line 137 of file Utils.cxx. References Anp::Event::EventIndex(), Anp::Record::StripBeg(), Anp::Record::StripEnd(), StripIter, and StripVec. Referenced by Anp::PlotPmt::Collect(), Anp::RunModule::Run(), Anp::FillSnarl::Run(), Anp::FillMuonId::Select(), Anp::StdHepTab::Set(), Anp::SnarlAdcTab::Set(), Anp::EventAdcTab::Set(), Anp::EventHitTab::SetShowers(), and Anp::EventHitTab::SetTrack(). 00138 {
00139 //
00140 // Find all strips that belongs this reconstructed event
00141 //
00142
00143 short key = 0;
00144 if(view)
00145 {
00146 if(std::strcmp(view, "V") == 0 || std::strcmp(view, "v") == 0)
00147 {
00148 key = 3;
00149 }
00150 else if(std::strcmp(view, "U") == 0 || view && std::strcmp(view, "u") == 0)
00151 {
00152 key = 2;
00153 }
00154 }
00155
00156 StripVec vec;
00157 for(StripIter strip = record.StripBeg(); strip != record.StripEnd(); ++strip)
00158 {
00159 if(!strip -> MatchEvt(event.EventIndex()))
00160 {
00161 continue;
00162 }
00163
00164 if(key == 0)
00165 {
00166 vec.push_back(strip);
00167 }
00168 else if(key == 3 && strip -> IsVview())
00169 {
00170 vec.push_back(strip);
00171 }
00172 else if(key == 2 && strip -> IsUview())
00173 {
00174 vec.push_back(strip);
00175 }
00176 }
00177
00178 return vec;
00179 }
|
|
||||||||||||
|
Definition at line 100 of file Utils.cxx. References Anp::Event::MatchTrack(), Anp::Record::TrackBeg(), Anp::Record::TrackEnd(), TrackIter, and TrackVec. Referenced by Anp::SelectShort::Run(), Anp::SelectReson::Run(), Anp::FillShortVar::Run(), Anp::FillEvent::Run(), and Anp::EventHitTab::Set(). 00101 {
00102 //
00103 // Find all tracks that belongs this reconstructed event
00104 //
00105
00106 TrackVec vec;
00107 for(TrackIter track = record.TrackBeg(); track != record.TrackEnd(); ++track)
00108 {
00109 if(event.MatchTrack(track -> TrackIndex()))
00110 {
00111 vec.push_back(track);
00112 }
00113 }
00114 return vec;
00115 }
|
|
||||||||||||
|
Definition at line 506 of file SelectKinem.cxx. References PrimaryShower(), Anp::Record::ShowerEnd(), and ShowerIter. 00507 {
00508 //
00509 // Get UV assymmetry of primary event shower
00510 //
00511
00512 const ShowerIter ishower = Anp::PrimaryShower(event, record);
00513 if(ishower == record.ShowerEnd())
00514 {
00515 return 0.0;
00516 }
00517
00518 const double uv_sum = (ishower -> GetBasic()).SigCorU() + (ishower -> GetBasic()).SigCorV();
00519 const double uv_dif = (ishower -> GetBasic()).SigCorU() - (ishower -> GetBasic()).SigCorV();
00520
00521 if(uv_sum > 0.0)
00522 {
00523 return uv_dif/uv_sum;
00524 }
00525
00526 return 0.0;
00527 }
|
|
|
Definition at line 73 of file Default.cxx. References GNUMICosZ, GNUMISinZ, Anp::CoordXYZ::y, and Anp::CoordXYZ::z. 00074 {
00075 CoordXYZ new_pos = pos;
00076
00077 new_pos.z = (pos.z - GNUMIFarZ) * GNUMICosZ - pos.y * GNUMISinZ;
00078 new_pos.y = (pos.z - GNUMIFarZ) * GNUMISinZ + pos.y * GNUMICosZ;
00079
00080 return new_pos;
00081 }
|
|
|
Definition at line 49 of file Default.cxx. References GNUMICosZ, GNUMISinZ, Anp::CoordXYZ::x, Anp::CoordXYZ::y, and Anp::CoordXYZ::z. 00050 {
00051 CoordXYZ new_pos;
00052
00053 new_pos.x = pos.x + GNUMINearX;
00054 new_pos.z = (pos.z - GNUMINearZ) * GNUMICosZ + pos.y * GNUMISinZ;
00055 new_pos.y = -(pos.z - GNUMINearZ) * GNUMISinZ + pos.y * GNUMICosZ;
00056
00057 return new_pos;
00058 }
|
|
||||||||||||
|
Definition at line 17 of file Utils.cxx. References Anp::Event::MatchTrack(), Anp::Record::TrackBeg(), Anp::Record::TrackEnd(), and TrackIter. Referenced by Anp::RunkNN::AddData(), Anp::FillEvent::Fill(), Anp::PlotShort::FillStandard(), Anp::SelectKinem::Pass(), Anp::PlotShortSelect::Plot(), Anp::PlotData::Plot(), Anp::PlotShort::PlotStandard(), PrimaryShower(), Anp::SelectShort::Run(), Anp::SelectNuMu::Run(), Anp::SelectNC::Run(), Anp::SelectFiducial::Run(), Anp::PlotVtx::Run(), Anp::PlotTrack::Run(), Anp::PlotEvent::Run(), Anp::PlotBasic::Run(), Anp::FillShortVar::Run(), Anp::FillShortEvent::Run(), Anp::FillMuonId::Run(), Anp::FillMadId::Run(), Anp::FillkNN::Run(), Anp::FillEnergy::Run(), Anp::SelectAntiNeutrino::Run1(), and Anp::SelectAntiNeutrino::Run2(). 00018 {
00019 //
00020 // Find longest track that belongs this reconstructed event
00021 //
00022
00023 TrackIter ltrack = record.TrackEnd();
00024
00025 for(TrackIter itrack = record.TrackBeg(); itrack != record.TrackEnd(); ++itrack)
00026 {
00027 if(!event.MatchTrack(itrack -> TrackIndex()))
00028 {
00029 continue;
00030 }
00031
00032 if(ltrack == record.TrackEnd())
00033 {
00034 ltrack = itrack;
00035 }
00036 else if(ltrack -> GetBasic().NPlaneScint() < itrack -> GetBasic().NPlaneScint())
00037 {
00038 ltrack = itrack;
00039 }
00040 }
00041
00042 return ltrack;
00043 }
|
|
|
Definition at line 134 of file RecoNu.h. Referenced by m_delta2(). 00134 { return 1.232; }
|
|
|
Definition at line 138 of file RecoNu.h. References m_delta(). Referenced by Anp::RecoNu::ERES(). 00138 { return Anp::m_delta() * Anp::m_delta(); }
|
|
|
Definition at line 133 of file RecoNu.h. Referenced by m_muon2(). 00133 { return 0.1056584; }
|
|
|
Definition at line 137 of file RecoNu.h. References m_muon(). Referenced by Anp::RecoNu::ECur(), Anp::RecoNu::ELep(), Anp::RecoNu::EQES(), Anp::RecoNu::ERan(), Anp::RecoNu::ERES(), and Anp::RecoNu::SetELep(). 00137 { return Anp::m_muon() * Anp::m_muon(); }
|
|
|
Definition at line 132 of file RecoNu.h. Referenced by Anp::RecoNu::EQES(), Anp::RecoNu::ERES(), m_proton2(), RecoW2(), Anp::RecoNu::W2(), and Anp::RecoNu::X(). 00132 { return 0.9382720; }
|
|
|
Definition at line 136 of file RecoNu.h. References m_proton(). Referenced by Anp::RecoNu::EQES(), RecoW2(), and Anp::RecoNu::W2(). 00136 { return Anp::m_proton() * Anp::m_proton(); }
|
|
||||||||||||||||
|
Definition at line 1046 of file PhysicsNtuple/Hist/HistMan.cxx. References Anp::HistMan::CreateTH1(), Anp::HistMan::Instance(), and SetDir(). Referenced by Anp::PlotTrackGeom::Set(). 01047 {
01048 TH1 *h = Anp::HistMan::Instance().CreateTH1(key, dir);
01049 if(h)
01050 {
01051 Anp::SetDir(h, dir_);
01052 }
01053
01054 return h;
01055 }
|
|
||||||||||||||||
|
Definition at line 1058 of file PhysicsNtuple/Hist/HistMan.cxx. References Anp::HistMan::CreateTH2(), Anp::HistMan::Instance(), and SetDir(). Referenced by Anp::PlotTrackGeom::Set(), and Anp::PlotEvent::Set(). 01059 {
01060 TH2 *h = Anp::HistMan::Instance().CreateTH2(key, dir);
01061 if(h)
01062 {
01063 Anp::SetDir(h, dir_);
01064 }
01065
01066 return h;
01067 }
|
|
||||||||||||||||
|
Definition at line 334 of file Hist1d.h. References Anp::Bin< T >::bin(), Anp::Bin< T >::edge(), Anp::Bin< T >::entries(), Anp::Bin< T >::set_ent(), Anp::Bin< T >::set_sum(), Anp::Bin< T >::sum(), and Anp::Bin< T >::sum2(). 00335 {
00336 Bin<T> bin(std::min<unsigned int>(lhs.bin(), rhs.bin()),
00337 std::min<T>(lhs.edge(), rhs.edge()));
00338
00339 bin.set_sum(lhs.sum() + rhs.sum(), lhs.sum2() + rhs.sum2());
00340 bin.set_ent(lhs.entries() + rhs.entries());
00341
00342 return bin;
00343 }
|
|
||||||||||
|
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 }
|
|
|
Definition at line 61 of file Default.cxx. References GNUMICosZ, GNUMISinZ, Anp::CoordXYZ::x, Anp::CoordXYZ::y, and Anp::CoordXYZ::z. 00062 {
00063 CoordXYZ new_pos;
00064
00065 new_pos.x = pos.x - GNUMINearX;
00066 new_pos.z = pos.z * GNUMICosZ - pos.y * GNUMISinZ + GNUMINearZ;
00067 new_pos.y = pos.z * GNUMISinZ + pos.y * GNUMICosZ;
00068
00069 return new_pos;
00070 }
|
|
||||||||||
|
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 }
|
|
||||||||||||
|
Definition at line 427 of file Header.cxx. 00428 {
00429 return !(lhs == rhs);
00430 }
|
|
||||||||||||
|
Definition at line 45 of file StripLink.h. References Anp::StripLink::strip, and StripIter. 00045 {
00046 StripIter sA = (A).strip;
00047 StripIter sB = (B).strip;
00048 return (sA->GetStrip() < sB->GetStrip());
00049 }
|
|
||||||||||||
|
Definition at line 152 of file PmtHit.h. References Anp::PlaneHitColl::GetPlane(). 00153 {
00154 return lhs.GetPlane() < rhs;
00155 }
|
|
||||||||||||
|
Definition at line 148 of file PmtHit.h. References Anp::PlaneHitColl::GetPlane(). 00149 {
00150 return lhs < rhs.GetPlane();
00151 }
|
|
||||||||||||
|
Definition at line 139 of file PmtHit.h. References Anp::PlaneHitColl::GetPlane(). 00140 {
00141 return lhs.GetPlane() < rhs.GetPlane();
00142 }
|
|
||||||||||||
|
Definition at line 200 of file FitPoint.cxx. References Anp::FitPoint::X(). 00201 {
00202 return (fit.X() < value);
00203 }
|
|
||||||||||||
|
Definition at line 206 of file FitPoint.cxx. References Anp::FitPoint::X(). 00207 {
00208 return (value < fit.X());
00209 }
|
|
||||||||||||
|
Definition at line 194 of file FitPoint.cxx. References Anp::FitPoint::X(). 00195 {
00196 return (lhs.X() < rhs.X());
00197 }
|
|
||||||||||||||||
|
Definition at line 281 of file Hist1d.h. References Anp::Bin< T >::bin(). 00281 { return lhs < rhs.bin(); }
|
|
||||||||||||||||
|
Definition at line 278 of file Hist1d.h. References Anp::Bin< T >::bin(). 00278 { return lhs.bin() < rhs; }
|
|
||||||||||||||||
|
Definition at line 275 of file Hist1d.h. References Anp::Bin< T >::edge(). 00275 { return lhs < rhs.edge(); }
|
|
||||||||||||||||
|
Definition at line 272 of file Hist1d.h. References Anp::Bin< T >::edge(). 00272 { return lhs.edge() < rhs; }
|
|
||||||||||||||||
|
Definition at line 269 of file Hist1d.h. References Anp::Bin< T >::bin(). 00269 { return lhs.bin() < rhs.bin(); }
|
|
||||||||||||
|
Definition at line 179 of file FillNPlane.cxx. References Anp::DataNPlane::plane. 00180 {
00181 return (lhs.plane < rhs.plane);
00182 }
|
|
||||||||||||||||
|
Definition at line 115 of file DataItem.h. 00116 {
00117 return (lhs < rhs.Key());
00118 }
|
|
||||||||||||||||
|
Definition at line 109 of file DataItem.h. 00110 {
00111 return (lhs.Key() < rhs);
00112 }
|
|
||||||||||||||||
|
Definition at line 103 of file DataItem.h. 00104 {
00105 return (lhs.Key() < rhs.Key());
00106 }
|
|
||||||||||||||||
|
Definition at line 102 of file KeyPair.h. 00103 {
00104 self.Print(o);
00105 return o;
00106 }
|
|
||||||||||||||||
|
Definition at line 1021 of file Hist1d.h. References Anp::Hist1d< T >::Print(). 01022 {
01023 self.Print(o);
01024 return o;
01025 }
|
|
||||||||||||||||
|
Definition at line 290 of file Hist1d.h. References Anp::Bin< T >::print(). 00291 {
00292 self.print(o);
00293 return o;
00294 }
|
|
||||||||||||
|
Definition at line 1039 of file PhysicsNtuple/Hist/HistMan.cxx. References Anp::AxisInfo::Print(). 01040 {
01041 self.Print(o);
01042 return o;
01043 }
|
|
||||||||||||
|
Definition at line 974 of file PhysicsNtuple/Hist/HistMan.cxx. References Anp::AxisInfo::Print(). 00975 {
00976 self.Print(o);
00977 return o;
00978 }
|
|
||||||||||||
|
Definition at line 433 of file Header.cxx. 00434 {
00435 self.Print(o);
00436 return o;
00437 }
|
|
||||||||||||||||
|
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 }
|
|
||||||||||||
|
Definition at line 138 of file DataItem.h. References Anp::DataItem< K, D >::Data(), and Anp::DataItem< K, D >::Key(). 00139 {
00140 os << "data[" << data.Key() << "]=" << data.Data();
00141 return os;
00142 }
|
|
||||||||||||
|
Definition at line 111 of file TruthReco.cxx. References Anp::TruthReco::IsShower(), Anp::TruthReco::RecoIndex(), and Anp::Shower::ShowerIndex(). 00112 {
00113 return (truth.IsShower() && truth.RecoIndex() == shower.ShowerIndex());
00114 }
|
|
||||||||||||
|
Definition at line 107 of file TruthReco.cxx. References Anp::TruthReco::IsShower(), Anp::TruthReco::RecoIndex(), and Anp::Shower::ShowerIndex(). 00108 {
00109 return (truth.IsShower() && truth.RecoIndex() == shower.ShowerIndex());
00110 }
|
|
||||||||||||
|
Definition at line 87 of file TruthReco.cxx. References Anp::RecoNu::Index(), Anp::TruthReco::IsEvent(), and Anp::TruthReco::RecoIndex(). 00088 {
00089 return (truth.IsEvent() && truth.RecoIndex() == event.Index());
00090 }
|
|
||||||||||||
|
Definition at line 91 of file TruthReco.cxx. References Anp::RecoNu::Index(), Anp::TruthReco::IsEvent(), and Anp::TruthReco::RecoIndex(). 00092 {
00093 return (truth.IsEvent() && truth.RecoIndex() == event.Index());
00094 }
|
|
||||||||||||
|
Definition at line 101 of file TruthReco.cxx. References Anp::TruthReco::IsTrack(), Anp::TruthReco::RecoIndex(), and Anp::Track::TrackIndex(). 00102 {
00103 return (truth.IsTrack() && truth.RecoIndex() == track.TrackIndex());
00104 }
|
|
||||||||||||
|
Definition at line 97 of file TruthReco.cxx. References Anp::TruthReco::IsTrack(), Anp::TruthReco::RecoIndex(), and Anp::Track::TrackIndex(). 00098 {
00099 return (truth.IsTrack() && truth.RecoIndex() == track.TrackIndex());
00100 }
|
|
||||||||||||
|
Definition at line 77 of file TruthReco.cxx. References Anp::Event::EventIndex(), Anp::TruthReco::IsEvent(), and Anp::TruthReco::RecoIndex(). 00078 {
00079 return (truth.IsEvent() && truth.RecoIndex() == event.EventIndex());
00080 }
|
|
||||||||||||
|
Definition at line 81 of file TruthReco.cxx. References Anp::Event::EventIndex(), Anp::TruthReco::IsEvent(), and Anp::TruthReco::RecoIndex(). 00082 {
00083 return (truth.IsEvent() && truth.RecoIndex() == event.EventIndex());
00084 }
|
|
||||||||||||
|
Definition at line 336 of file Truth.h. References Anp::Truth::Find(), and Anp::Truth::RecoEnd(). 00337 {
00338 return (truth.Find(shower) != truth.RecoEnd());
00339 }
|
|
||||||||||||
|
Definition at line 332 of file Truth.h. References Anp::Truth::Find(), and Anp::Truth::RecoEnd(). 00333 {
00334 return (truth.Find(shower) != truth.RecoEnd());
00335 }
|
|
||||||||||||
|
Definition at line 327 of file Truth.h. References Anp::Truth::Find(), and Anp::Truth::RecoEnd(). 00328 {
00329 return (truth.Find(track) != truth.RecoEnd());
00330 }
|
|
||||||||||||
|
Definition at line 323 of file Truth.h. References Anp::Truth::Find(), and Anp::Truth::RecoEnd(). 00324 {
00325 return (truth.Find(track) != truth.RecoEnd());
00326 }
|
|
||||||||||||
|
Definition at line 318 of file Truth.h. References Anp::Truth::Find(), and Anp::Truth::RecoEnd(). 00319 {
00320 return (truth.Find(reco) != truth.RecoEnd());
00321 }
|
|
||||||||||||
|
Definition at line 314 of file Truth.h. References Anp::Truth::Find(), and Anp::Truth::RecoEnd(). 00315 {
00316 return (truth.Find(reco) != truth.RecoEnd());
00317 }
|
|
||||||||||||
|
Definition at line 305 of file Truth.h. References Anp::Truth::Find(), and Anp::Truth::RecoEnd(). 00306 {
00307 return (truth.Find(event) != truth.RecoEnd());
00308 }
|
|
||||||||||||
|
Definition at line 309 of file Truth.h. References Anp::Truth::Find(), and Anp::Truth::RecoEnd(). 00310 {
00311 return (truth.Find(event) != truth.RecoEnd());
00312 }
|
|
||||||||||||
|
Definition at line 300 of file Truth.h. References Anp::Truth::TruthIndex(). 00301 {
00302 return (lhs.TruthIndex() == rhs.TruthIndex());
00303 }
|
|
||||||||||||
|
Definition at line 296 of file Truth.h. References Anp::Truth::TruthIndex(). 00297 {
00298 return (index == truth.TruthIndex());
00299 }
|
|
||||||||||||
|
Definition at line 292 of file Truth.h. References Anp::Truth::TruthIndex(). 00293 {
00294 return (index == truth.TruthIndex());
00295 }
|
|
||||||||||||
|
Definition at line 179 of file TrueNu.h. References Anp::TrueNu::Match(). 00180 {
00181 return tnu.Match(rnu);
00182 }
|
|
||||||||||||
|
Definition at line 175 of file TrueNu.h. References Anp::TrueNu::Match(). 00176 {
00177 return tnu.Match(rnu);
00178 }
|
|
||||||||||||
|
Definition at line 171 of file TrueNu.h. References Anp::TrueNu::Index(). 00172 {
00173 return (lhs.Index() == rhs.Index());
00174 }
|
|
||||||||||||
|
Definition at line 167 of file TrueNu.h. References Anp::TrueNu::Index(). 00168 {
00169 return (index == reco.Index());
00170 }
|
|
||||||||||||
|
Definition at line 163 of file TrueNu.h. References Anp::TrueNu::Index(). 00164 {
00165 return (index == reco.Index());
00166 }
|
|
||||||||||||
|
Definition at line 159 of file Track.h. References Anp::Track::TrackIndex(). 00160 {
00161 return (lhs.TrackIndex() == rhs.TrackIndex());
00162 }
|
|
||||||||||||
|
Definition at line 155 of file Track.h. References Anp::Track::TrackIndex(). 00156 {
00157 return (index == track.TrackIndex());
00158 }
|
|
||||||||||||
|
Definition at line 151 of file Track.h. References Anp::Track::TrackIndex(). 00152 {
00153 return (index == track.TrackIndex());
00154 }
|
|
||||||||||||
|
Definition at line 228 of file PhysicsNtuple/Strip.h. References Anp::Strip::Index(). 00229 {
00230 return (lhs.Index() == rhs.Index());
00231 }
|
|
||||||||||||
|
Definition at line 224 of file PhysicsNtuple/Strip.h. References Anp::Strip::Index(). 00225 {
00226 return (index == strip.Index());
00227 }
|
|
||||||||||||
|
Definition at line 220 of file PhysicsNtuple/Strip.h. References Anp::Strip::Index(). 00221 {
00222 return (index == strip.Index());
00223 }
|
|
||||||||||||
|
Definition at line 120 of file Shower.h. References Anp::Shower::ShowerIndex(). 00121 {
00122 return (lhs.ShowerIndex() == rhs.ShowerIndex());
00123 }
|
|
||||||||||||
|
Definition at line 116 of file Shower.h. References Anp::Shower::ShowerIndex(). 00117 {
00118 return (index == shower.ShowerIndex());
00119 }
|
|
||||||||||||
|
Definition at line 112 of file Shower.h. References Anp::Shower::ShowerIndex(). 00113 {
00114 return (index == shower.ShowerIndex());
00115 }
|
|
||||||||||||
|
Definition at line 428 of file SelectSpill.cxx. References Anp::RunSubrun::run, and Anp::RunSubrun::subrun. 00429 {
00430 if(lhs.run < 0 || rhs.run < 0)
00431 {
00432 return false;
00433 }
00434
00435 if(lhs.run == rhs.run)
00436 {
00437 if(lhs.subrun == rhs.subrun)
00438 {
00439 return true;
00440 }
00441 else if(lhs.subrun < 0 || rhs.subrun < 0)
00442 {
00443 return true;
00444 }
00445 }
00446
00447 return false;
00448 }
|
|
||||||||||||
|
Definition at line 225 of file RecoNu.h. References Anp::RecoNu::Index(). 00226 {
00227 return (lhs.Index() == rhs.Index());
00228 }
|
|
||||||||||||
|
Definition at line 221 of file RecoNu.h. References Anp::RecoNu::Index(). 00222 {
00223 return (index == rnu.Index());
00224 }
|
|
||||||||||||
|
Definition at line 217 of file RecoNu.h. References Anp::RecoNu::Index(). 00218 {
00219 return (index == rnu.Index());
00220 }
|
|
||||||||||||
|
Definition at line 161 of file PmtHit.h. References Anp::PlaneHitColl::GetPlane(). 00162 {
00163 return lhs.GetPlane() == rhs;
00164 }
|
|
||||||||||||
|
Definition at line 157 of file PmtHit.h. References Anp::PlaneHitColl::GetPlane(). 00158 {
00159 return lhs == rhs.GetPlane();
00160 }
|
|
||||||||||||
|
Definition at line 143 of file PmtHit.h. References Anp::PlaneHitColl::GetPlane(). 00144 {
00145 return lhs.GetPlane() == rhs.GetPlane();
00146 }
|
|
||||||||||||
|
Definition at line 185 of file CountHist.cxx. References Anp::Handle< T >::valid(). 00186 {
00187 if(!lhs.valid() || !rhs.valid())
00188 {
00189 return false;
00190 }
00191
00192 if(lhs -> GetInteraction() != rhs -> GetInteraction())
00193 {
00194 return false;
00195 }
00196
00197 if(lhs -> GetReson() != rhs -> GetReson())
00198 {
00199 return false;
00200 }
00201
00202 if(lhs -> GetParticle() != rhs -> GetParticle())
00203 {
00204 return false;
00205 }
00206
00207 return true;
00208 }
|
|
||||||||||||
|
Definition at line 80 of file PhysicsNtuple/MRCCInfo.h. References Anp::MRCCInfo::MRCCInfoIndex(). 00081 {
00082 return (lhs.MRCCInfoIndex() == rhs.MRCCInfoIndex());
00083 }
|
|
||||||||||||
|
Definition at line 75 of file PhysicsNtuple/MRCCInfo.h. References Anp::MRCCInfo::MRCCInfoIndex(). 00076 {
00077 return (index == mrccin.MRCCInfoIndex());
00078 }
|
|
||||||||||||
|
Definition at line 71 of file PhysicsNtuple/MRCCInfo.h. References Anp::MRCCInfo::MRCCInfoIndex(). 00072 {
00073 return (index == mrccin.MRCCInfoIndex());
00074 }
|
|
||||||||||||
|
Definition at line 218 of file FitPoint.cxx. References Anp::FitPoint::Index(). 00219 {
00220 return (index == fit.Index());
00221 }
|
|
||||||||||||
|
Definition at line 212 of file FitPoint.cxx. References Anp::FitPoint::Index(). 00213 {
00214 return (index == fit.Index());
00215 }
|
|
||||||||||||
|
Definition at line 188 of file FitPoint.cxx. References Anp::FitPoint::Index(). 00189 {
00190 return (lhs.Index() == rhs.Index());
00191 }
|
|
||||||||||||||||
|
Definition at line 287 of file Hist1d.h. References Anp::Bin< T >::bin(). 00287 { return lhs == rhs.bin(); }
|
|
||||||||||||||||
|
Definition at line 284 of file Hist1d.h. References Anp::Bin< T >::bin(). 00284 { return lhs.bin() == rhs; }
|
|
||||||||||||
|
Definition at line 408 of file Header.cxx. References Anp::Header::Run(), Anp::Header::Snarl(), and Anp::Header::SubRun(). 00409 {
00410 if(lhs.Run() != rhs.Run())
00411 {
00412 return false;
00413 }
00414 else if(lhs.SubRun() != rhs.SubRun())
00415 {
00416 return false;
00417 }
00418 else if(lhs.Snarl() != rhs.Snarl())
00419 {
00420 return false;
00421 }
00422
00423 return true;
00424 }
|
|
||||||||||||
|
Definition at line 228 of file FillSnarl.cxx. References Anp::CountPlaneStrip::GetPlane(), and Anp::CountPlaneStrip::GetStrip(). 00229 {
00230 if(lhs.GetPlane() == rhs.GetPlane() && lhs.GetStrip() == rhs.GetStrip())
00231 {
00232 return true;
00233 }
00234
00235 return false;
00236 }
|
|
||||||||||||
|
Definition at line 185 of file FillNPlane.cxx. References Anp::DataNPlane::plane. 00186 {
00187 return (lhs.plane == rhs.plane);
00188 }
|
|
||||||||||||
|
Definition at line 143 of file PhysicsNtuple/Event.cxx. References Anp::Event::MatchTrack(), and Anp::Track::TrackIndex(). 00144 {
00145 return event.MatchTrack(track.TrackIndex());
00146 }
|
|
||||||||||||
|
Definition at line 137 of file PhysicsNtuple/Event.cxx. References Anp::Event::MatchTrack(), and Anp::Track::TrackIndex(). 00138 {
00139 return event.MatchTrack(track.TrackIndex());
00140 }
|
|
||||||||||||
|
Definition at line 131 of file PhysicsNtuple/Event.cxx. References Anp::Event::MatchShower(), and Anp::Shower::ShowerIndex(). 00132 {
00133 return event.MatchShower(shower.ShowerIndex());
00134 }
|
|
||||||||||||
|
Definition at line 125 of file PhysicsNtuple/Event.cxx. References Anp::Event::MatchShower(), and Anp::Shower::ShowerIndex(). 00126 {
00127 return event.MatchShower(shower.ShowerIndex());
00128 }
|
|
||||||||||||
|
Definition at line 166 of file PhysicsNtuple/Event.h. References Anp::Event::EventIndex(). 00167 {
00168 return (lhs.EventIndex() == rhs.EventIndex());
00169 }
|
|
||||||||||||
|
Definition at line 162 of file PhysicsNtuple/Event.h. References Anp::Event::EventIndex(). 00163 {
00164 return (index == event.EventIndex());
00165 }
|
|
||||||||||||
|
Definition at line 158 of file PhysicsNtuple/Event.h. References Anp::Event::EventIndex(). 00159 {
00160 return (index == event.EventIndex());
00161 }
|
|
||||||||||||||||
|
Definition at line 133 of file DataItem.h. References Anp::DataItem< K, D >::Key(). 00134 {
00135 return (lhs == rhs.Key());
00136 }
|
|
||||||||||||||||
|
Definition at line 127 of file DataItem.h. References Anp::DataItem< K, D >::Key(). 00128 {
00129 return (lhs.Key() == rhs);
00130 }
|
|
||||||||||||||||
|
Definition at line 121 of file DataItem.h. References Anp::DataItem< K, D >::Key(). 00122 {
00123 return (lhs.Key() == rhs.Key());
00124 }
|
|
|
Definition at line 87 of file Default.h. Referenced by angle(). 00087 { return 3.1415926536; }
|
|
||||||||||||
|
Definition at line 64 of file Utils.cxx. References FirstShower(), LongestTrack(), Anp::Record::ShowerEnd(), ShowerIter, Anp::Record::TrackEnd(), TrackIter, and StandardMaterial::Z(). Referenced by Anp::FillEvent::Fill(), GetUVAssymForQES(), Anp::PlotVtx::Run(), Anp::PlotShower::Run(), and Anp::PlotBasic::Run(). 00065 {
00066 //
00067 // Find primary event shower: !!!hardcoded constants!!!
00068 //
00069
00070 const ShowerIter ishower = Anp::FirstShower(event, record);
00071 if(ishower == record.ShowerEnd())
00072 {
00073 return record.ShowerEnd();
00074 }
00075
00076 const TrackIter itrack = Anp::LongestTrack(event, record);
00077 if(itrack == record.TrackEnd())
00078 {
00079 return ishower;
00080 }
00081 else
00082 {
00083 const double ecut = 2.0; // Minimum shower energy
00084 const double zcut = 0.5; // Maximum z position separation
00085
00086 if(std::fabs(ishower -> GetVtx().Z() - itrack -> GetBegVtx().Z()) < zcut)
00087 {
00088 return ishower;
00089 }
00090 else if(ishower -> EnergyCC() > ecut)
00091 {
00092 return ishower;
00093 }
00094 }
00095
00096 return record.ShowerEnd();
00097 }
|
|
||||||||||||||||
|
Definition at line 143 of file Default.h. 00145 {
00146 for(unsigned int ipos = 0; ipos < lvec.size(); ++ipos)
00147 {
00148 if(ipos == 0)
00149 {
00150 std::cout << name << " = " << lvec[ipos];
00151 }
00152 else
00153 {
00154 std::cout << ", " << lvec[ipos];
00155 }
00156
00157 if(ipos + 1 == lvec.size())
00158 {
00159 std::cout << std::endl;
00160 }
00161 }
00162 }
|
|
||||||||||||
|
Definition at line 372 of file Utils.cxx. References Lit::Print(), Anp::Record::TruthBeg(), Anp::Record::TruthEnd(), TruthIter, and TruthRecoIter. 00373 {
00374 for(TruthIter itruth = record.TruthBeg(); itruth != record.TruthEnd(); ++itruth)
00375 {
00376 itruth -> Print(os);
00377
00378 for(TruthRecoIter ireco = itruth -> RecoBeg(); ireco != itruth -> RecoEnd(); ++ireco)
00379 {
00380 os << " ";
00381 ireco -> Print(os);
00382 }
00383 }
00384 }
|
|
||||||||||||
|
Definition at line 737 of file RunModule.cxx. References min. Referenced by Anp::RunModule::RunChain(). 00738 {
00739 const int hours = static_cast<int>(realt/3600.0);
00740 const int min = static_cast<int>(realt/60.0) - 60*hours;
00741
00742 realt -= hours * 3600;
00743 realt -= min * 60;
00744
00745 if (realt < 0) realt = 0;
00746 if (cput < 0) cput = 0;
00747
00748 const int sec = static_cast<int>(realt);
00749
00750 cout << "Real time " << setw(2) << setfill('0') << hours
00751 << ":" << setw(2) << setfill('0') << min
00752 << ":" << setw(2) << setfill('0') << sec
00753 << " CPU time " << setprecision(3) << fixed << cput << endl;
00754 }
|
|
||||||||||||||||
|
Definition at line 610 of file FillBasic.cxx. References GetSRStrip(), Lit::Print(), and NtpStRecord::stp. Referenced by TestDataModule::Reco(). 00611 {
00612 if(nstrip < 1 || !index_array)
00613 {
00614 return;
00615 }
00616
00617 const TClonesArray *strip_array = record.stp;
00618 if(!strip_array)
00619 {
00620 cerr << "PrintStrips - NtpStRecord does not have valid strip array." << endl;
00621 return;
00622 }
00623
00624 const int entries = strip_array -> GetEntries();
00625
00626 double raw_east = 0.0, raw_west = 0.0;
00627
00628 cout << "Printing " << nstrip << " strips of NtpSRStrip type" << endl;
00629
00630 for(int i = 0; i < nstrip; ++i)
00631 {
00632 const short index = index_array[i];
00633 if(index < 0 || index >= entries)
00634 {
00635 cerr << "PrintStrips - NtpSRStrip index is out of range: " << index << endl;
00636 continue;
00637 }
00638
00639 NtpSRStrip *ntpstp = Anp::GetSRStrip(record, index);
00640 if(!ntpstp)
00641 {
00642 continue;
00643 }
00644
00645 if(index != ntpstp -> index)
00646 {
00647 cerr << "PrintStrips - mismatched strip and TClonesArray index" << std::endl;
00648 continue;
00649 }
00650
00651 if(ntpstp -> pmtindex0 >= 0 && ntpstp -> ph0.raw > 0.0)
00652 {
00653 raw_east += ntpstp -> ph0.raw;
00654 }
00655 if(ntpstp -> pmtindex1 >= 0 && ntpstp -> ph1.raw > 0.0)
00656 {
00657 raw_west += ntpstp -> ph1.raw;
00658 }
00659
00660 cout << "----------------------------------------------------------------------------" << endl;
00661 cout << "NtpSRStrip #" << i + 1 << " raw (east, west) = ("
00662 << ntpstp -> ph0.raw << ", " << ntpstp -> ph1.raw << ")" << endl;
00663 ntpstp -> Print();
00664 }
00665
00666 cout << "total raw (east, west, total) = (" << raw_east << ", " << raw_west << ", "
00667 << raw_east + raw_west << ")" << endl;
00668 }
|
|
||||||||||||||||
|
Definition at line 303 of file Default.cxx. References Registry::Get(), and reg. 00304 {
00305 const char *value_char = 0;
00306 if(!reg.Get(key.c_str(), value_char) || !value_char)
00307 {
00308 return false;
00309 }
00310
00311 value = std::string(value_char);
00312 return true;
00313 }
|
|
||||||||||||||||
|
||||||||||||||||||||
|
Definition at line 95 of file Default.h. References Registry::Get(), reg, and UtilString::StringTok(). Referenced by Anp::SelectSpill::Init(). 00098 {
00099 std::vector<T> lvec;
00100
00101 const char *list_char = 0;
00102 if(!reg.Get(key.c_str(), list_char) || !list_char)
00103 {
00104 return lvec;
00105 }
00106
00107 std::vector<std::string> svec;
00108 UtilString::StringTok(svec, list_char, sep.c_str());
00109
00110 if(svec.empty())
00111 {
00112 return lvec;
00113 }
00114
00115 for(unsigned int i = 0; i < svec.size(); ++i)
00116 {
00117 std::stringstream valS;
00118 T valT;
00119
00120 valS << svec[i];
00121 valS >> valT;
00122
00123 if(valS.fail())
00124 {
00125 std::cerr << "ReadList<T> - stringstream operator>> failed for: " << svec[i] << std::endl;
00126 }
00127 else
00128 {
00129 lvec.push_back(valT);
00130 }
00131 }
00132
00133 return lvec;
00134 }
|
|
||||||||||||||||
|
Definition at line 124 of file Default.cxx. References infile, Registry::KeyExists(), Registry::LockKeys(), Registry::LockValues(), reg, Registry::Set(), Registry::UnLockKeys(), and Registry::UnLockValues(). Referenced by Anp::SelectNuMu::Config(), Anp::SelectKinem::Config(), Anp::Interface::Config(), Anp::DrawSnarl::Config(), and Anp::FiducialCut::Init(). 00125 {
00126 if(!quiet)
00127 {
00128 std::cout << "-------------------------------------------------------------" << std::endl;
00129 std::cout << "Configuraton file:" << std::endl << " " << filepath << std::endl;
00130 std::cout << std::endl;
00131 }
00132
00133 std::ifstream infile(filepath.c_str());
00134 if(!infile || !infile.is_open())
00135 {
00136 std::cerr << "Anp::ReadRegistry - failed to open file: " << filepath << std::endl;
00137 if(quiet)
00138 {
00139 std::cout << "-------------------------------------------------------------" << std::endl;
00140 }
00141 return false;
00142 }
00143
00144 reg.UnLockKeys();
00145 reg.UnLockValues();
00146
00147 while(!infile.eof())
00148 {
00149 std::string line;
00150 std::getline(infile, line);
00151
00152 if(line.empty() || line.find("#",0) != std::string::npos)
00153 {
00154 continue;
00155 }
00156
00157 const std::string::size_type nbeg = line.find_first_of("[", 0);
00158 const std::string::size_type nend = line.find_first_of("]", 0);
00159
00160 if(nbeg == std::string::npos || nend == std::string::npos || !(nbeg < nend))
00161 {
00162 if(!quiet) std::cout << " Failed to parse name" << std::endl;
00163 continue;
00164 }
00165
00166 const std::string::size_type vbeg = line.find_first_of("[", nend + 1);
00167 const std::string::size_type vend = line.find_first_of("]", nend + 1);
00168
00169 if(vbeg == std::string::npos || vend == std::string::npos || !(vbeg < vend))
00170 {
00171 if(!quiet) std::cout << " Failed to parse value" << std::endl;
00172 continue;
00173 }
00174
00175 const std::string::size_type tbeg = line.find_first_of("[", vend + 1);
00176 const std::string::size_type tend = line.find_first_of("]", vend + 1);
00177
00178 if(tbeg == std::string::npos || tend == std::string::npos || !(tbeg < tend))
00179 {
00180 if(!quiet) std::cout << " Failed to parse type" << std::endl;
00181 continue;
00182 }
00183
00184 const std::string name = line.substr(nbeg + 1, nend - nbeg - 1);
00185 const std::string value = line.substr(vbeg + 1, vend - vbeg - 1);
00186 const std::string type = line.substr(tbeg + 1, tend - tbeg - 1);
00187
00188 if(!quiet) std:: cout << " " << name << " = " << value << " (" << type << ")" << std::endl;
00189
00190 if(reg.KeyExists(name.c_str()))
00191 {
00192 std::cerr << "Anp::ReadRegistry - key [" << name << "] already exists" << std::endl;
00193 continue;
00194 }
00195
00196 if(type == "string")
00197 {
00198 reg.Set(name.c_str(), value.c_str());
00199 }
00200 else if(type == "double")
00201 {
00202 const double value_double = std::atof(value.c_str());
00203 reg.Set(name.c_str(), value_double);
00204 }
00205 else if(type == "int")
00206 {
00207 if(value.find(".",0) != std::string::npos)
00208 {
00209 if(!quiet) std::cerr << " Forcing conversion of double to integer" << std::endl;
00210 const int value_int = static_cast<int>(std::atof(value.c_str()));
00211 reg.Set(name.c_str(), value_int);
00212 }
00213 else
00214 {
00215 const int value_int = std::atoi(value.c_str());
00216 reg.Set(name.c_str(), value_int);
00217 }
00218 }
00219 }
00220
00221 if(infile.is_open())
00222 {
00223 infile.close();
00224 }
00225
00226 reg.LockKeys();
00227 reg.LockValues();
00228
00229 if(!quiet)
00230 {
00231 std::cout << "-------------------------------------------------------------" << std::endl;
00232 }
00233
00234 return true;
00235 }
|
|
||||||||||||
|
Definition at line 372 of file SelectSpill.cxx. References infile, run(), and UtilString::StringTok(). Referenced by Anp::SelectSpill::ReadList(). 00373 {
00374 vector<RunSubrun> rlist;
00375
00376 std::ifstream infile(path.c_str());
00377 if(!infile.is_open())
00378 {
00379 return rlist;
00380 }
00381
00382 while(!infile.eof())
00383 {
00384 std::string line;
00385 std::getline(infile, line);
00386
00387 if(line.empty()) continue;
00388
00389 vector<string> svec;
00390 UtilString::StringTok(svec, line, " ");
00391
00392 //
00393 // Run list must have run and subrun fiels
00394 //
00395 if(svec.size() != 2) continue;
00396
00397 stringstream runS, subS;
00398 runS << svec.front();
00399 subS << svec.back();
00400
00401 int run = -1, sub = -1;
00402
00403 runS >> run;
00404 subS >> sub;
00405
00406 if(runS.fail() || subS.fail())
00407 {
00408 cerr << " Anp::ReadRunList - stringstream operator>> failed for: " << line << endl;
00409 }
00410 else
00411 {
00412 rlist.push_back(Anp::RunSubrun(run, sub));
00413 }
00414 }
00415
00416 if(print)
00417 {
00418 for(vector<RunSubrun>::const_iterator rit = rlist.begin(); rit != rlist.end(); ++rit)
00419 {
00420 cout << rit -> run << " " << rit -> subrun << endl;
00421 }
00422 }
00423
00424 return rlist;
00425 }
|
|
||||||||||||
|
Definition at line 188 of file RecoNu.cxx. References Anp::RecoNu::CosN(), Anp::RecoNu::ELep(), Anp::RecoNu::ENeu(), Anp::RecoNu::EQES(), and Anp::RecoNu::ERES(). Referenced by RecoW2(). 00189 {
00190 switch (formula)
00191 {
00192 case Reco::kSUM: return 2.0*rnu.ENeu()*rnu.ELep()*(1-rnu.CosN());
00193 case Reco::kQES: return 2.0*rnu.EQES()*rnu.ELep()*(1-rnu.CosN());
00194 case Reco::kRES: return 2.0*rnu.ERES()*rnu.ELep()*(1-rnu.CosN());
00195 default: break;
00196 }
00197
00198 cerr << "Anp::RecoQ2 - uknown formula parameter: " << formula << endl;
00199 return 0.0;
00200 }
|
|
||||||||||||
|
Definition at line 203 of file RecoNu.cxx. References Anp::RecoNu::EHad(), Anp::RecoNu::ELep(), Anp::RecoNu::EQES(), Anp::RecoNu::ERES(), m_proton(), m_proton2(), and RecoQ2(). 00204 {
00205 double ehad = 0.0;
00206 switch (formula)
00207 {
00208 case Reco::kSUM:
00209 {
00210 ehad = rnu.EHad();
00211 break;
00212 }
00213 case Reco::kQES:
00214 {
00215 ehad = rnu.EQES() - rnu.ELep();
00216 break;
00217 }
00218 case Reco::kRES:
00219 {
00220 ehad = rnu.ERES() - rnu.ELep();
00221 break;
00222 }
00223 default:
00224 {
00225 cerr << "Anp::RecoQ2 - uknown formula parameter: " << formula << endl;
00226 return 0.0;
00227 }
00228 }
00229
00230 if(ehad < 0.0) ehad = 0.0;
00231
00232 return m_proton2() + 2.0*m_proton()*ehad + Anp::RecoQ2(rnu, formula);
00233 }
|
|
|
Definition at line 13 of file AlgThread.cxx. 00014 {
00015 if(!data_)
00016 {
00017 cerr << "Anp::run_alg_thread - null data pointer" << endl;
00018 return 0;
00019 }
00020
00021 AlgThread *data = static_cast<AlgThread *> (data_);
00022
00023 data -> Run();
00024
00025 return data;
00026 }
|
|
||||||||||||||||
|
||||||||||||||||
|
Definition at line 316 of file Default.cxx. References Registry::Get(), Registry::GetTypeAsString(), Registry::Key(), Registry::KeysLocked(), Registry::LockKeys(), Registry::LockValues(), reg, Registry::Set(), Registry::UnLockKeys(), Registry::UnLockValues(), and Registry::ValuesLocked(). Referenced by Anp::SelectKinem::GetAlg(). 00317 {
00318 //
00319 // Recursively walk through Registry and add "value" at "key"
00320 //
00321 if(key.empty())
00322 {
00323 cerr << "Anp::SetKey - key string is empty" << endl;
00324 return 0;
00325 }
00326 if(value.empty())
00327 {
00328 cerr << "Anp::SetKey - value string is empty" << endl;
00329 return 0;
00330 }
00331
00332 const bool klock = reg.KeysLocked();
00333 const bool vlock = reg.ValuesLocked();
00334
00335 if(klock) reg.UnLockKeys();
00336 if(vlock) reg.UnLockValues();
00337 reg.Set(key.c_str(), value.c_str());
00338
00339 Registry::RegistryKey rkey = reg.Key();
00340 vector<string> rvec;
00341
00342 const char* charkey = 0;
00343 while( (charkey = rkey()) )
00344 {
00345 if(charkey && reg.GetTypeAsString(charkey) == "Registry")
00346 {
00347 rvec.push_back(charkey);
00348 }
00349 }
00350
00351 int nadd = 1;
00352 for(vector<string>::const_iterator sit = rvec.begin(); sit != rvec.end(); ++sit)
00353 {
00354 const string &skey = *sit;
00355
00356 Registry dreg;
00357 if(!reg.Get(skey.c_str(), dreg))
00358 {
00359 cerr << "SelectKinem::GetAlg - failed to get Registry at: " << skey << endl;
00360 continue;
00361 }
00362
00363 //
00364 // Recursively walk through Registry daughter objects
00365 //
00366 nadd += Anp::SetKey(dreg, key, value);
00367 reg.Set(skey.c_str(), dreg);
00368 }
00369
00370 if(klock) reg.LockKeys();
00371 if(vlock) reg.LockValues();
00372
00373 return nadd;
00374 }
|
|
||||||||||||
|
Definition at line 81 of file Default.h. Referenced by Anp::Vertex::CosX(), and Anp::Vertex::X(). 00081 { return (u - v)*0.707106781; }
|
|
||||||||||||
|
Definition at line 82 of file Default.h. Referenced by Anp::Vertex::CosY(), and Anp::Vertex::Y(). 00082 { return (u + v)*0.707106781; }
|
|
||||||||||||
|
Definition at line 84 of file Default.h. Referenced by Anp::Truth::GetVtx(), and Anp::SelectFiducial::Pass(). 00084 { return (y + x)*0.707106781; }
|
|
||||||||||||
|
Definition at line 85 of file Default.h. Referenced by Anp::Truth::GetVtx(), and Anp::SelectFiducial::Pass(). 00085 { return (y - x)*0.707106781; }
|
|
|
Definition at line 44 of file Default.cxx. Referenced by far_to_gnumi(), gnumi_to_far(), gnumi_to_near(), and near_to_gnumi(). |
|
|
Definition at line 40 of file Default.cxx. |
|
|
Definition at line 41 of file Default.cxx. |
|
|
Definition at line 42 of file Default.cxx. |
|
|
Definition at line 36 of file Default.cxx. |
|
|
Definition at line 37 of file Default.cxx. |
|
|
Definition at line 38 of file Default.cxx. |
|
|
Definition at line 45 of file Default.cxx. Referenced by far_to_gnumi(), gnumi_to_far(), gnumi_to_near(), and near_to_gnumi(). |
|
|
Definition at line 26 of file Default.cxx. |
|
|
Definition at line 25 of file Default.cxx. |
1.3.9.1