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::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::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 > |
| 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::SelectSpill |
| struct | Anp::RunSubrun |
| class | Anp::SelectTrue |
| class | Anp::StudyFiducial |
| class | Anp::Shower |
| class | Anp::StdHep |
| class | Anp::FillBasic |
| class | Anp::FillEnergy |
| class | Anp::FillEvent |
| class | Anp::FillHeader |
| class | Anp::FillShower |
| class | Anp::FillStrip |
| class | Anp::FillTrack |
| class | Anp::FillTruth |
| class | Anp::Interface |
| class | Anp::RunAlgStore |
| 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::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< StripIter > | StripVec |
| typedef std::vector< TrackIter > | TrackVec |
| typedef std::vector< ShowerIter > | ShowerVec |
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) |
| 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== (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== (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 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 36 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 41 of file PhysicsNtuple/Utils.h. Referenced by GetShower(), and Anp::EventHitTab::SetShowers(). |
|
|
Definition at line 30 of file PhysicsNtuple/Utils.h. Referenced by Anp::PlotTrack::FillResol(), Anp::Record::FindStdHep(), Anp::FillTruth::IsConsistent(), Anp::PlotData::Particle(), Anp::Draw::Read(), Anp::FillTruth::Run(), Anp::FillMuonId::Run(), Anp::Record::StdHepBeg(), and Anp::Record::StdHepEnd(). |
|
|
Definition at line 37 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 28 of file PhysicsNtuple/Utils.h. Referenced by Anp::SnarlAdcTab::Add(), Anp::PlotPmt::Collect(), GetStrip(), Anp::SnarlTimeTab::NewSnarl(), Anp::PlotSnarl::Run(), Anp::FillSnarl::Run(), Anp::FillNPlane::Run(), Anp::FillMuonId::Select(), Anp::SnarlTimeTab::Set(), Anp::Record::StripBeg(), and Anp::Record::StripEnd(). |
|
|
Definition at line 35 of file PhysicsNtuple/Utils.h. Referenced by Anp::Record::Erase(), Anp::Record::StripBegIterator(), and Anp::Record::StripEndIterator(). |
|
|
Definition at line 39 of file PhysicsNtuple/Utils.h. Referenced by GetStrip(), Anp::StdHepTab::Set(), Anp::SnarlAdcTab::Set(), Anp::EventAdcTab::Set(), Anp::EventHitTab::SetShowers(), and Anp::EventHitTab::SetTrack(). |
|
|
|
|
Definition at line 40 of file PhysicsNtuple/Utils.h. Referenced by GetTrack(), Anp::SelectReson::Run(), and Anp::EventHitTab::Set(). |
|
|
|
Definition at line 34 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 25 of file Truth.h. Referenced by Anp::RunkNN::AddData(), Anp::Truth::Find(), Anp::Record::FindStdHep(), Anp::FillTruth::IsConsistent(), Anp::PlotTruth::Plot(), PrintRecordTruth(), Anp::RecordStore::PrintTruth(), Anp::Truth::RecoBeg(), Anp::Truth::RecoEnd(), Anp::SelectFiducial::Run(), Anp::PlotEff::Run(), and Anp::TrueNu::TrueNu(). |
|
|
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 94 of file Default.cxx. Referenced by angle(), Anp::FillTrackGeom::Fill(), Anp::PlotTrackGeom::FillProjection(), Anp::PlotTrackGeom::FillRotation(), Anp::PlotTrackGeom::FillXProduct(), and Anp::PlotEvent::Plot(). 00095 {
00096 const double radius = std::sqrt(x*x + y*y);
00097
00098 if(!(radius > 0.0))
00099 {
00100 return 0.0;
00101 }
00102
00103 if(!(+x < radius))
00104 {
00105 return std::acos(+1.0);
00106 }
00107 if(!(-x < radius))
00108 {
00109 return std::acos(-1.0);
00110 }
00111
00112 double angle = std::acos(x/radius);
00113
00114 if(y < 0.0)
00115 {
00116 angle = 2.0 * pi() - angle;
00117 }
00118
00119 return angle;
00120 }
|
|
|
Definition at line 315 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(). 00316 {
00317 //
00318 // Apply weights to reconstructed objects
00319 //
00320
00321 if(record.GetHeader().IsData() || record.TruthBeg() == record.TruthEnd())
00322 {
00323 return;
00324 }
00325
00326 for(EventIterator ievent = record.EventBegIterator(); ievent != record.EventEndIterator(); ++ievent)
00327 {
00328 const TruthIter itruth = record.FindTruth(*ievent);
00329
00330 if(itruth != record.TruthEnd())
00331 {
00332 ievent -> SetWeight(itruth -> Weight());
00333 }
00334 else
00335 {
00336 cerr << "ApplyTrueWeights - failed to find truth record" << endl;
00337 }
00338 }
00339
00340 for(TrackIterator itrack = record.TrackBegIterator(); itrack != record.TrackEndIterator(); ++itrack)
00341 {
00342 const TruthIter itruth = record.FindTruth(*itrack);
00343
00344 if(itruth != record.TruthEnd())
00345 {
00346 itrack -> SetWeight(itruth -> Weight());
00347 }
00348 else
00349 {
00350 cerr << "ApplyTrueWeights - failed to find truth record" << endl;
00351 }
00352 }
00353
00354 for(ShowerIterator ishower = record.ShowerBegIterator(); ishower != record.ShowerEndIterator(); ++ishower)
00355 {
00356 const TruthIter itruth = record.FindTruth(*ishower);
00357
00358 if(itruth != record.TruthEnd())
00359 {
00360 ishower -> SetWeight(itruth -> Weight());
00361 }
00362 else
00363 {
00364 cerr << "ApplyTrueWeights - failed to find truth record" << endl;
00365 }
00366 }
00367 }
|
|
||||||||||||||||
|
Definition at line 269 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::SelectNuMu::Run(), Anp::SelectNC::Run(), and Anp::SelectKinem::Run(). 00270 {
00271 //
00272 // Remove reconstructed tracks that do not match events in (ibeg, iend) range
00273 //
00274 TrackIterator itrack = record.TrackBegIterator();
00275 while(itrack != record.TrackEndIterator())
00276 {
00277 //
00278 // Find first event that matches this track
00279 //
00280 const EventIter ievent = std::find(ibeg, iend, *itrack);
00281
00282 if(ievent != iend)
00283 {
00284 ++itrack;
00285 }
00286 else
00287 {
00288 itrack = record.Erase(itrack);
00289 }
00290 }
00291
00292 //
00293 // Remove reconstructed showers that do not match events in (ibeg, iend) range
00294 //
00295 ShowerIterator ishower = record.ShowerBegIterator();
00296 while(ishower != record.ShowerEndIterator())
00297 {
00298 //
00299 // Find first event that matches this shower
00300 //
00301 const EventIter ievent = std::find(ibeg, iend, *ishower);
00302
00303 if(ievent != iend)
00304 {
00305 ++ishower;
00306 }
00307 else
00308 {
00309 ishower = record.Erase(ishower);
00310 }
00311 }
00312 }
|
|
|
Definition at line 357 of file AlgAdapt.cxx. References UtilString::StringTok(). Referenced by Anp::AlgAdapt::Read(). 00358 {
00359 vector<double> dvec;
00360
00361 //
00362 // Parse into individual strings
00363 //
00364 vector<string> svec;
00365 UtilString::StringTok(svec, dstr, ", ");
00366
00367 if(svec.empty())
00368 {
00369 cerr << " Anp::ConvertString2Vector - input string has no data:\n " << dstr << endl;
00370 return dvec;
00371 }
00372
00373 for(unsigned int i = 0; i < svec.size(); ++i)
00374 {
00375 stringstream temp;
00376 temp << svec[i];
00377
00378 double value = -1.0e9;
00379 temp >> value;
00380
00381 if(!temp.fail())
00382 {
00383 dvec.push_back(value);
00384 }
00385 else
00386 {
00387 cerr << " Anp::ConvertString2Vector - stringstream >> failed for " << svec[i] << endl;
00388 }
00389 }
00390
00391 return dvec;
00392 }
|
|
||||||||||
|
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 344 of file AlgAdapt.cxx. Referenced by Anp::AlgAdapt::Save(). 00345 {
00346 stringstream dstr;
00347 for(vector<double>::const_iterator dit = dvec.begin(); dit != dvec.end(); ++dit)
00348 {
00349 dstr << setprecision(9) << fixed << *dit;
00350 if(dit + 1 != dvec.end()) dstr << ", ";
00351 }
00352
00353 return dstr.str();
00354 }
|
|
||||||||||
|
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 986 of file Hist1d.h. References Anp::Hist1d< T >::GetBins(), Anp::Hist1d< T >::GetIntegral(), and SetDir(). Referenced by Anp::HistMan::CreateTH1(). 00987 {
00988 const std::vector<Bin<T> > &bvec = h.GetBins();
00989
00990 if(bvec.empty())
00991 {
00992 return 0;
00993 }
00994
00995 double *array = new double[bvec.size() - 1];
00996
00997 for(int ibin = 1; ibin < int(bvec.size()); ++ibin)
00998 {
00999 array[ibin - 1] = bvec[ibin].edge();
01000 }
01001
01002 TH1 *th1 = new TH1D(name.c_str(), name.c_str(), bvec.size() - 2, array);
01003
01004 delete [] array;
01005
01006 for(int ibin = 0; ibin < int(bvec.size()); ++ibin)
01007 {
01008 th1 -> SetBinContent(ibin, bvec[ibin].sum());
01009 }
01010
01011 Anp::SetDir(th1, 0);
01012 th1 -> SetEntries(h.GetIntegral("UO"));
01013
01014 return th1;
01015 }
|
|
|
Definition at line 83 of file Default.cxx. References GNUMICosZ, GNUMISinZ, Anp::CoordXYZ::y, and Anp::CoordXYZ::z. 00084 {
00085 CoordXYZ new_pos = pos;
00086
00087 new_pos.z = pos.z * GNUMICosZ + pos.y * GNUMISinZ + GNUMIFarZ;
00088 new_pos.y = -pos.z * GNUMISinZ + pos.y * GNUMICosZ;
00089
00090 return new_pos;
00091 }
|
|
||||||||||
|
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 45 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(). 00046 {
00047 //
00048 // Return first event shower
00049 //
00050
00051 for(ShowerIter ishower = record.ShowerBeg(); ishower != record.ShowerEnd(); ++ishower)
00052 {
00053 if(event.FirstShower(ishower -> ShowerIndex()))
00054 {
00055 return ishower;
00056 }
00057 }
00058
00059 return record.ShowerEnd();
00060 }
|
|
|
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 376 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::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::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(). 00377 {
00378 //
00379 // Recursively reate directory path in dir
00380 //
00381 if(!dir || path.empty() || path == "/")
00382 {
00383 return dir;
00384 }
00385
00386 // remove trailing slash if present
00387 if(path.substr(path.size() - 1, 1) == "/")
00388 {
00389 path = path.substr(0, path.size() - 1);
00390 }
00391
00392 std::string::size_type pos = path.find_last_of('/');
00393 if(pos != std::string::npos)
00394 {
00395 // recursively walk upward until all slash characters are removed
00396 dir = Anp::GetDir(path.substr(0, pos), dir);
00397
00398 // make directory path of last substring without slash
00399 path = path.substr(pos + 1, path.size() - pos);
00400 }
00401
00402 Anp::Lock<Mutex> lock(Anp::GetROOTMutex());
00403
00404 if(dir -> Get(path.c_str()))
00405 {
00406 return dynamic_cast<TDirectory *>(dir -> Get(path.c_str()));
00407 }
00408
00409 return dir -> mkdir(path.c_str());
00410 }
|
|
||||||||||||||||||||||||
|
Definition at line 296 of file Hist1d.h. 00297 {
00298 // Compute fraction of kernel intergral for kernel centered at x0 = cpos
00299 // and between lpos and rpos boundaries. Kernel function is (1-((x-x0)/w)^2)^2
00300 // for x < 1.0 and 0 otherwise. Kerner integral I(x) = (x - 2*x^3/3 + x^5/5)/C,
00301 // where C = 16/15.
00302
00303 if(!(lpos < rpos) || !(width > 0.0))
00304 {
00305 std::cerr << "GetKernelOverlap - invalid input parameters ("
00306 << lpos << ", " << rpos << ", " << cpos << ", " << width << ")" << std::endl;
00307 return 0;
00308 }
00309
00310 T ledge = cpos - width;
00311 T redge = cpos + width;
00312
00313 if(ledge < lpos) ledge = lpos;
00314 if(redge > rpos) redge = rpos;
00315
00316 const T x1 = (ledge - cpos)/width;
00317 const T x2 = (redge - cpos)/width;
00318
00319 const T I1 = x1 - 2.0*x1*x1*x1/3.0 + x1*x1*x1*x1*x1/5.0;
00320 const T I2 = x2 - 2.0*x2*x2*x2/3.0 + x2*x2*x2*x2*x2/5.0;
00321
00322 const T overlap = 15.0*(I2 - I1)/16.0;
00323
00324 //std::cout << "(lpos, rpos, cpos) = ("
00325 //<< lpos << ", " << rpos << ", " << cpos << ")" << std::endl
00326 //<< "(ledg, redg, width, overlap) = ("
00327 //<< ledge << ", " << redge << ", " << width << ", " << overlap << ")" << std::endl;
00328
00329 return overlap;
00330 }
|
|
|
Definition at line 431 of file Default.cxx. 00432 {
00433 return MAINMutex;
00434 }
|
|
|
Definition at line 437 of file Default.cxx. Referenced by Anp::RunAlgSnarl::Config(). 00438 {
00439 return ROOTMutex;
00440 }
|
|
||||||||||||
|
Definition at line 117 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(). 00118 {
00119 //
00120 // Find all showers that belongs this reconstructed event
00121 //
00122
00123 ShowerVec vec;
00124 for(ShowerIter shower = record.ShowerBeg(); shower != record.ShowerEnd(); ++shower)
00125 {
00126 if(event.MatchShower(shower -> ShowerIndex()))
00127 {
00128 vec.push_back(shower);
00129 }
00130 }
00131
00132 return vec;
00133 }
|
|
||||||||||||
|
Definition at line 586 of file FillBasic.cxx. References MSG, and NtpStRecord::stp. Referenced by Anp::FillBasic::Get(), and PrintStrips(). 00587 {
00588 //
00589 // Return pointer to NtpSRStrip with "index"
00590 //
00591 const TClonesArray *strip_array = record.stp;
00592 if(!strip_array)
00593 {
00594 MSG("FillAlg", Msg::kWarning) << "NtpStRecord does not have valid strip array." << endl;
00595 return 0;
00596 }
00597
00598 NtpSRStrip *ntpstp = dynamic_cast<NtpSRStrip *>(strip_array -> At(index));
00599 if(!ntpstp)
00600 {
00601 MSG("FillAlg", Msg::kWarning) << "Could not find NtpSRStrip at " << index << endl;
00602 return 0;
00603 }
00604
00605 return ntpstp;
00606 }
|
|
||||||||||||||||
|
Definition at line 237 of file Default.cxx. References Registry::Get(). Referenced by Anp::SelectCount::Config(), and PTGuiMainFrame::ProcessMessage(). 00240 {
00241 std::pair<std::string, bool> result(std::string(""), false);
00242
00243 if(prefix.empty() && key.empty())
00244 {
00245 return result;
00246 }
00247
00248 const char *value_char = 0;
00249 if(reg.Get((prefix + key).c_str(), value_char) && value_char)
00250 {
00251 result.first = value_char;
00252 result.second = true;
00253 }
00254 else if(reg.Get(key.c_str(), value_char) && value_char)
00255 {
00256 result.first = value_char;
00257 result.second = true;
00258 }
00259
00260 return result;
00261 }
|
|
||||||||||||||||
|
Definition at line 224 of file Utils.cxx. References Anp::Shower::ShowerIndex(), Anp::Record::StripBeg(), Anp::Record::StripEnd(), StripIter, and StripVec. 00225 {
00226 //
00227 // Find all strips that belongs this reconstructed shower
00228 //
00229
00230 short key = 0;
00231 if(view)
00232 {
00233 if(std::strcmp(view, "V") == 0 || std::strcmp(view, "v") == 0)
00234 {
00235 key = 3;
00236 }
00237 else if(std::strcmp(view, "U") == 0 || view && std::strcmp(view, "u") == 0)
00238 {
00239 key = 2;
00240 }
00241 }
00242
00243 StripVec vec;
00244 for(StripIter strip = record.StripBeg(); strip != record.StripEnd(); ++strip)
00245 {
00246 if(!strip -> MatchShw(shower.ShowerIndex()))
00247 {
00248 continue;
00249 }
00250
00251 if(key == 0)
00252 {
00253 vec.push_back(strip);
00254 }
00255 else if(key == 3 && strip -> IsVview())
00256 {
00257 vec.push_back(strip);
00258 }
00259 else if(key == 2 && strip -> IsUview())
00260 {
00261 vec.push_back(strip);
00262 }
00263 }
00264
00265 return vec;
00266 }
|
|
||||||||||||||||
|
Definition at line 180 of file Utils.cxx. References Anp::Record::StripBeg(), Anp::Record::StripEnd(), StripIter, StripVec, and Anp::Track::TrackIndex(). 00181 {
00182 //
00183 // Find all strips that belongs this reconstructed track
00184 //
00185
00186 short key = 0;
00187 if(view)
00188 {
00189 if(std::strcmp(view, "V") == 0 || std::strcmp(view, "v") == 0)
00190 {
00191 key = 3;
00192 }
00193 else if(std::strcmp(view, "U") == 0 || view && std::strcmp(view, "u") == 0)
00194 {
00195 key = 2;
00196 }
00197 }
00198
00199 StripVec vec;
00200 for(StripIter strip = record.StripBeg(); strip != record.StripEnd(); ++strip)
00201 {
00202 if(!strip -> MatchTrk(track.TrackIndex()))
00203 {
00204 continue;
00205 }
00206
00207 if(key == 0)
00208 {
00209 vec.push_back(strip);
00210 }
00211 else if(key == 3 && strip -> IsVview())
00212 {
00213 vec.push_back(strip);
00214 }
00215 else if(key == 2 && strip -> IsUview())
00216 {
00217 vec.push_back(strip);
00218 }
00219 }
00220 return vec;
00221 }
|
|
||||||||||||||||
|
Definition at line 136 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(). 00137 {
00138 //
00139 // Find all strips that belongs this reconstructed event
00140 //
00141
00142 short key = 0;
00143 if(view)
00144 {
00145 if(std::strcmp(view, "V") == 0 || std::strcmp(view, "v") == 0)
00146 {
00147 key = 3;
00148 }
00149 else if(std::strcmp(view, "U") == 0 || view && std::strcmp(view, "u") == 0)
00150 {
00151 key = 2;
00152 }
00153 }
00154
00155 StripVec vec;
00156 for(StripIter strip = record.StripBeg(); strip != record.StripEnd(); ++strip)
00157 {
00158 if(!strip -> MatchEvt(event.EventIndex()))
00159 {
00160 continue;
00161 }
00162
00163 if(key == 0)
00164 {
00165 vec.push_back(strip);
00166 }
00167 else if(key == 3 && strip -> IsVview())
00168 {
00169 vec.push_back(strip);
00170 }
00171 else if(key == 2 && strip -> IsUview())
00172 {
00173 vec.push_back(strip);
00174 }
00175 }
00176 return vec;
00177 }
|
|
||||||||||||
|
Definition at line 99 of file Utils.cxx. References Anp::Event::MatchTrack(), Anp::Record::TrackBeg(), Anp::Record::TrackEnd(), TrackIter, and TrackVec. Referenced by Anp::SelectReson::Run(), Anp::FillEvent::Run(), and Anp::EventHitTab::Set(). 00100 {
00101 //
00102 // Find all tracks that belongs this reconstructed event
00103 //
00104
00105 TrackVec vec;
00106 for(TrackIter track = record.TrackBeg(); track != record.TrackEnd(); ++track)
00107 {
00108 if(event.MatchTrack(track -> TrackIndex()))
00109 {
00110 vec.push_back(track);
00111 }
00112 }
00113 return vec;
00114 }
|
|
||||||||||||
|
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 72 of file Default.cxx. References GNUMICosZ, GNUMISinZ, Anp::CoordXYZ::y, and Anp::CoordXYZ::z. 00073 {
00074 CoordXYZ new_pos = pos;
00075
00076 new_pos.z = (pos.z - GNUMIFarZ) * GNUMICosZ - pos.y * GNUMISinZ;
00077 new_pos.y = (pos.z - GNUMIFarZ) * GNUMISinZ + pos.y * GNUMICosZ;
00078
00079 return new_pos;
00080 }
|
|
|
Definition at line 48 of file Default.cxx. References GNUMICosZ, GNUMISinZ, Anp::CoordXYZ::x, Anp::CoordXYZ::y, and Anp::CoordXYZ::z. 00049 {
00050 CoordXYZ new_pos;
00051
00052 new_pos.x = pos.x + GNUMINearX;
00053 new_pos.z = (pos.z - GNUMINearZ) * GNUMICosZ + pos.y * GNUMISinZ;
00054 new_pos.y = -(pos.z - GNUMINearZ) * GNUMISinZ + pos.y * GNUMICosZ;
00055
00056 return new_pos;
00057 }
|
|
||||||||||||
|
Definition at line 16 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::SelectKinem::Pass(), Anp::PlotData::Plot(), PrimaryShower(), Anp::SelectNuMu::Run(), Anp::SelectNC::Run(), Anp::SelectFiducial::Run(), Anp::PlotVtx::Run(), Anp::PlotTrack::Run(), Anp::PlotEvent::Run(), Anp::PlotBasic::Run(), Anp::FillMuonId::Run(), Anp::FillMadId::Run(), Anp::FillkNN::Run(), Anp::FillEnergy::Run(), Anp::SelectAntiNeutrino::Run1(), and Anp::SelectAntiNeutrino::Run2(). 00017 {
00018 //
00019 // Find longest track that belongs this reconstructed event
00020 //
00021
00022 TrackIter ltrack = record.TrackEnd();
00023
00024 for(TrackIter itrack = record.TrackBeg(); itrack != record.TrackEnd(); ++itrack)
00025 {
00026 if(!event.MatchTrack(itrack -> TrackIndex()))
00027 {
00028 continue;
00029 }
00030
00031 if(ltrack == record.TrackEnd())
00032 {
00033 ltrack = itrack;
00034 }
00035 else if(ltrack -> GetBasic().NPlaneScint() < itrack -> GetBasic().NPlaneScint())
00036 {
00037 ltrack = itrack;
00038 }
00039 }
00040
00041 return ltrack;
00042 }
|
|
|
Definition at line 133 of file RecoNu.h. Referenced by m_delta2(). 00133 { return 1.232; }
|
|
|
Definition at line 137 of file RecoNu.h. References m_delta(). Referenced by Anp::RecoNu::ERES(). 00137 { return Anp::m_delta() * Anp::m_delta(); }
|
|
|
Definition at line 132 of file RecoNu.h. Referenced by m_muon2(). 00132 { return 0.1056584; }
|
|
|
Definition at line 136 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(). 00136 { return Anp::m_muon() * Anp::m_muon(); }
|
|
|
Definition at line 131 of file RecoNu.h. Referenced by Anp::RecoNu::EQES(), Anp::RecoNu::ERES(), m_proton2(), RecoW2(), Anp::RecoNu::W2(), and Anp::RecoNu::X(). 00131 { return 0.9382720; }
|
|
|
Definition at line 135 of file RecoNu.h. References m_proton(). Referenced by Anp::RecoNu::EQES(), RecoW2(), and Anp::RecoNu::W2(). 00135 { return Anp::m_proton() * Anp::m_proton(); }
|
|
||||||||||||||||
|
Definition at line 1017 of file PhysicsNtuple/Hist/HistMan.cxx. References Anp::HistMan::CreateTH1(), Anp::HistMan::Instance(), and SetDir(). Referenced by Anp::PlotTrackGeom::Set(). 01018 {
01019 TH1 *h = Anp::HistMan::Instance().CreateTH1(key, dir);
01020 if(h)
01021 {
01022 Anp::SetDir(h, dir_);
01023 }
01024
01025 return h;
01026 }
|
|
||||||||||||||||
|
Definition at line 1029 of file PhysicsNtuple/Hist/HistMan.cxx. References Anp::HistMan::CreateTH2(), Anp::HistMan::Instance(), and SetDir(). Referenced by Anp::PlotTrackGeom::Set(), and Anp::PlotEvent::Set(). 01030 {
01031 TH2 *h = Anp::HistMan::Instance().CreateTH2(key, dir);
01032 if(h)
01033 {
01034 Anp::SetDir(h, dir_);
01035 }
01036
01037 return h;
01038 }
|
|
||||||||||||||||
|
Definition at line 333 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(). 00334 {
00335 Bin<T> bin(std::min<unsigned int>(lhs.bin(), rhs.bin()),
00336 std::min<T>(lhs.edge(), rhs.edge()));
00337
00338 bin.set_sum(lhs.sum() + rhs.sum(), lhs.sum2() + rhs.sum2());
00339 bin.set_ent(lhs.entries() + rhs.entries());
00340
00341 return bin;
00342 }
|
|
||||||||||
|
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 60 of file Default.cxx. References GNUMICosZ, GNUMISinZ, Anp::CoordXYZ::x, Anp::CoordXYZ::y, and Anp::CoordXYZ::z. 00061 {
00062 CoordXYZ new_pos;
00063
00064 new_pos.x = pos.x - GNUMINearX;
00065 new_pos.z = pos.z * GNUMICosZ - pos.y * GNUMISinZ + GNUMINearZ;
00066 new_pos.y = pos.z * GNUMISinZ + pos.y * GNUMICosZ;
00067
00068 return new_pos;
00069 }
|
|
||||||||||
|
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 408 of file Header.cxx. 00409 {
00410 return !(lhs == rhs);
00411 }
|
|
||||||||||||
|
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 280 of file Hist1d.h. References Anp::Bin< T >::bin(). 00280 { return lhs < rhs.bin(); }
|
|
||||||||||||||||
|
Definition at line 277 of file Hist1d.h. References Anp::Bin< T >::bin(). 00277 { return lhs.bin() < rhs; }
|
|
||||||||||||||||
|
Definition at line 274 of file Hist1d.h. References Anp::Bin< T >::edge(). 00274 { return lhs < rhs.edge(); }
|
|
||||||||||||||||
|
Definition at line 271 of file Hist1d.h. References Anp::Bin< T >::edge(). 00271 { return lhs.edge() < rhs; }
|
|
||||||||||||||||
|
Definition at line 268 of file Hist1d.h. References Anp::Bin< T >::bin(). 00268 { 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 1020 of file Hist1d.h. References Anp::Hist1d< T >::Print(). 01021 {
01022 self.Print(o);
01023 return o;
01024 }
|
|
||||||||||||||||
|
Definition at line 289 of file Hist1d.h. References Anp::Bin< T >::print(). 00290 {
00291 self.print(o);
00292 return o;
00293 }
|
|
||||||||||||
|
Definition at line 1010 of file PhysicsNtuple/Hist/HistMan.cxx. References Anp::AxisInfo::Print(). 01011 {
01012 self.Print(o);
01013 return o;
01014 }
|
|
||||||||||||
|
Definition at line 945 of file PhysicsNtuple/Hist/HistMan.cxx. References Anp::AxisInfo::Print(). 00946 {
00947 self.Print(o);
00948 return o;
00949 }
|
|
||||||||||||
|
Definition at line 414 of file Header.cxx. 00415 {
00416 self.Print(o);
00417 return o;
00418 }
|
|
||||||||||||||||
|
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 334 of file Truth.h. References Anp::Truth::Find(), and Anp::Truth::RecoEnd(). 00335 {
00336 return (truth.Find(shower) != truth.RecoEnd());
00337 }
|
|
||||||||||||
|
Definition at line 330 of file Truth.h. References Anp::Truth::Find(), and Anp::Truth::RecoEnd(). 00331 {
00332 return (truth.Find(shower) != truth.RecoEnd());
00333 }
|
|
||||||||||||
|
Definition at line 325 of file Truth.h. References Anp::Truth::Find(), and Anp::Truth::RecoEnd(). 00326 {
00327 return (truth.Find(track) != truth.RecoEnd());
00328 }
|
|
||||||||||||
|
Definition at line 321 of file Truth.h. References Anp::Truth::Find(), and Anp::Truth::RecoEnd(). 00322 {
00323 return (truth.Find(track) != truth.RecoEnd());
00324 }
|
|
||||||||||||
|
Definition at line 316 of file Truth.h. References Anp::Truth::Find(), and Anp::Truth::RecoEnd(). 00317 {
00318 return (truth.Find(reco) != truth.RecoEnd());
00319 }
|
|
||||||||||||
|
Definition at line 312 of file Truth.h. References Anp::Truth::Find(), and Anp::Truth::RecoEnd(). 00313 {
00314 return (truth.Find(reco) != truth.RecoEnd());
00315 }
|
|
||||||||||||
|
Definition at line 303 of file Truth.h. References Anp::Truth::Find(), and Anp::Truth::RecoEnd(). 00304 {
00305 return (truth.Find(event) != truth.RecoEnd());
00306 }
|
|
||||||||||||
|
Definition at line 307 of file Truth.h. References Anp::Truth::Find(), and Anp::Truth::RecoEnd(). 00308 {
00309 return (truth.Find(event) != truth.RecoEnd());
00310 }
|
|
||||||||||||
|
Definition at line 298 of file Truth.h. References Anp::Truth::TruthIndex(). 00299 {
00300 return (lhs.TruthIndex() == rhs.TruthIndex());
00301 }
|
|
||||||||||||
|
Definition at line 294 of file Truth.h. References Anp::Truth::TruthIndex(). 00295 {
00296 return (index == truth.TruthIndex());
00297 }
|
|
||||||||||||
|
Definition at line 290 of file Truth.h. References Anp::Truth::TruthIndex(). 00291 {
00292 return (index == truth.TruthIndex());
00293 }
|
|
||||||||||||
|
Definition at line 178 of file TrueNu.h. References Anp::TrueNu::Match(). 00179 {
00180 return tnu.Match(rnu);
00181 }
|
|
||||||||||||
|
Definition at line 174 of file TrueNu.h. References Anp::TrueNu::Match(). 00175 {
00176 return tnu.Match(rnu);
00177 }
|
|
||||||||||||
|
Definition at line 170 of file TrueNu.h. References Anp::TrueNu::Index(). 00171 {
00172 return (lhs.Index() == rhs.Index());
00173 }
|
|
||||||||||||
|
Definition at line 166 of file TrueNu.h. References Anp::TrueNu::Index(). 00167 {
00168 return (index == reco.Index());
00169 }
|
|
||||||||||||
|
Definition at line 162 of file TrueNu.h. References Anp::TrueNu::Index(). 00163 {
00164 return (index == reco.Index());
00165 }
|
|
||||||||||||
|
Definition at line 158 of file Track.h. References Anp::Track::TrackIndex(). 00159 {
00160 return (lhs.TrackIndex() == rhs.TrackIndex());
00161 }
|
|
||||||||||||
|
Definition at line 154 of file Track.h. References Anp::Track::TrackIndex(). 00155 {
00156 return (index == track.TrackIndex());
00157 }
|
|
||||||||||||
|
Definition at line 150 of file Track.h. References Anp::Track::TrackIndex(). 00151 {
00152 return (index == track.TrackIndex());
00153 }
|
|
||||||||||||
|
Definition at line 227 of file PhysicsNtuple/Strip.h. References Anp::Strip::Index(). 00228 {
00229 return (lhs.Index() == rhs.Index());
00230 }
|
|
||||||||||||
|
Definition at line 223 of file PhysicsNtuple/Strip.h. References Anp::Strip::Index(). 00224 {
00225 return (index == strip.Index());
00226 }
|
|
||||||||||||
|
Definition at line 219 of file PhysicsNtuple/Strip.h. References Anp::Strip::Index(). 00220 {
00221 return (index == strip.Index());
00222 }
|
|
||||||||||||
|
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 401 of file SelectSpill.cxx. References Anp::RunSubrun::run, and Anp::RunSubrun::subrun. 00402 {
00403 if(lhs.run < 0 || rhs.run < 0)
00404 {
00405 return false;
00406 }
00407
00408 if(lhs.run == rhs.run)
00409 {
00410 if(lhs.subrun == rhs.subrun)
00411 {
00412 return true;
00413 }
00414 else if(lhs.subrun < 0 || rhs.subrun < 0)
00415 {
00416 return true;
00417 }
00418 }
00419
00420 return false;
00421 }
|
|
||||||||||||
|
Definition at line 224 of file RecoNu.h. References Anp::RecoNu::Index(). 00225 {
00226 return (lhs.Index() == rhs.Index());
00227 }
|
|
||||||||||||
|
Definition at line 220 of file RecoNu.h. References Anp::RecoNu::Index(). 00221 {
00222 return (index == rnu.Index());
00223 }
|
|
||||||||||||
|
Definition at line 216 of file RecoNu.h. References Anp::RecoNu::Index(). 00217 {
00218 return (index == rnu.Index());
00219 }
|
|
||||||||||||
|
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 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 286 of file Hist1d.h. References Anp::Bin< T >::bin(). 00286 { return lhs == rhs.bin(); }
|
|
||||||||||||||||
|
Definition at line 283 of file Hist1d.h. References Anp::Bin< T >::bin(). 00283 { return lhs.bin() == rhs; }
|
|
||||||||||||
|
Definition at line 389 of file Header.cxx. References Anp::Header::Run(), Anp::Header::Snarl(), and Anp::Header::SubRun(). 00390 {
00391 if(lhs.Run() != rhs.Run())
00392 {
00393 return false;
00394 }
00395 else if(lhs.SubRun() != rhs.SubRun())
00396 {
00397 return false;
00398 }
00399 else if(lhs.Snarl() != rhs.Snarl())
00400 {
00401 return false;
00402 }
00403
00404 return true;
00405 }
|
|
||||||||||||
|
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 Event.cxx. References Anp::Event::MatchTrack(), and Anp::Track::TrackIndex(). 00144 {
00145 return event.MatchTrack(track.TrackIndex());
00146 }
|
|
||||||||||||
|
Definition at line 137 of file Event.cxx. References Anp::Event::MatchTrack(), and Anp::Track::TrackIndex(). 00138 {
00139 return event.MatchTrack(track.TrackIndex());
00140 }
|
|
||||||||||||
|
Definition at line 131 of file Event.cxx. References Anp::Event::MatchShower(), and Anp::Shower::ShowerIndex(). 00132 {
00133 return event.MatchShower(shower.ShowerIndex());
00134 }
|
|
||||||||||||
|
Definition at line 125 of file Event.cxx. References Anp::Event::MatchShower(), and Anp::Shower::ShowerIndex(). 00126 {
00127 return event.MatchShower(shower.ShowerIndex());
00128 }
|
|
||||||||||||
|
Definition at line 166 of file Event.h. References Anp::Event::EventIndex(). 00167 {
00168 return (lhs.EventIndex() == rhs.EventIndex());
00169 }
|
|
||||||||||||
|
Definition at line 162 of file Event.h. References Anp::Event::EventIndex(). 00163 {
00164 return (index == event.EventIndex());
00165 }
|
|
||||||||||||
|
Definition at line 158 of file 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 82 of file Default.h. Referenced by angle(). 00082 { return 3.1415926536; }
|
|
||||||||||||
|
Definition at line 63 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(). 00064 {
00065 //
00066 // Find primary event shower: !!!hardcoded constants!!!
00067 //
00068
00069 const ShowerIter ishower = Anp::FirstShower(event, record);
00070 if(ishower == record.ShowerEnd())
00071 {
00072 return record.ShowerEnd();
00073 }
00074
00075 const TrackIter itrack = Anp::LongestTrack(event, record);
00076 if(itrack == record.TrackEnd())
00077 {
00078 return ishower;
00079 }
00080 else
00081 {
00082 const double ecut = 2.0; // Minimum shower energy
00083 const double zcut = 0.5; // Maximum z position separation
00084
00085 if(std::fabs(ishower -> GetVtx().Z() - itrack -> GetBegVtx().Z()) < zcut)
00086 {
00087 return ishower;
00088 }
00089 else if(ishower -> EnergyCC() > ecut)
00090 {
00091 return ishower;
00092 }
00093 }
00094
00095 return record.ShowerEnd();
00096 }
|
|
||||||||||||
|
Definition at line 370 of file Utils.cxx. References Lit::Print(), Anp::Record::TruthBeg(), Anp::Record::TruthEnd(), TruthIter, and TruthRecoIter. 00371 {
00372 for(TruthIter itruth = record.TruthBeg(); itruth != record.TruthEnd(); ++itruth)
00373 {
00374 itruth -> Print(os);
00375
00376 for(TruthRecoIter ireco = itruth -> RecoBeg(); ireco != itruth -> RecoEnd(); ++ireco)
00377 {
00378 os << " ";
00379 ireco -> Print(os);
00380 }
00381 }
00382 }
|
|
||||||||||||
|
Definition at line 726 of file RunModule.cxx. References min. Referenced by Anp::RunModule::RunChain(). 00727 {
00728 const int hours = static_cast<int>(realt/3600.0);
00729 const int min = static_cast<int>(realt/60.0) - 60*hours;
00730
00731 realt -= hours * 3600;
00732 realt -= min * 60;
00733
00734 if (realt < 0) realt = 0;
00735 if (cput < 0) cput = 0;
00736
00737 const int sec = static_cast<int>(realt);
00738
00739 cout << "Real time " << setw(2) << setfill('0') << hours
00740 << ":" << setw(2) << setfill('0') << min
00741 << ":" << setw(2) << setfill('0') << sec
00742 << " CPU time " << setprecision(3) << fixed << cput << endl;
00743 }
|
|
||||||||||||||||
|
Definition at line 609 of file FillBasic.cxx. References GetSRStrip(), Lit::Print(), and NtpStRecord::stp. Referenced by TestDataModule::Reco(). 00610 {
00611 if(nstrip < 1 || !index_array)
00612 {
00613 return;
00614 }
00615
00616 const TClonesArray *strip_array = record.stp;
00617 if(!strip_array)
00618 {
00619 cerr << "PrintStrips - NtpStRecord does not have valid strip array." << endl;
00620 return;
00621 }
00622
00623 const int entries = strip_array -> GetEntries();
00624
00625 double raw_east = 0.0, raw_west = 0.0;
00626
00627 cout << "Printing " << nstrip << " strips of NtpSRStrip type" << endl;
00628
00629 for(int i = 0; i < nstrip; ++i)
00630 {
00631 const short index = index_array[i];
00632 if(index < 0 || index >= entries)
00633 {
00634 cerr << "PrintStrips - NtpSRStrip index is out of range: " << index << endl;
00635 continue;
00636 }
00637
00638 NtpSRStrip *ntpstp = Anp::GetSRStrip(record, index);
00639 if(!ntpstp)
00640 {
00641 continue;
00642 }
00643
00644 if(index != ntpstp -> index)
00645 {
00646 cerr << "PrintStrips - mismatched strip and TClonesArray index" << std::endl;
00647 continue;
00648 }
00649
00650 if(ntpstp -> pmtindex0 >= 0 && ntpstp -> ph0.raw > 0.0)
00651 {
00652 raw_east += ntpstp -> ph0.raw;
00653 }
00654 if(ntpstp -> pmtindex1 >= 0 && ntpstp -> ph1.raw > 0.0)
00655 {
00656 raw_west += ntpstp -> ph1.raw;
00657 }
00658
00659 cout << "----------------------------------------------------------------------------" << endl;
00660 cout << "NtpSRStrip #" << i + 1 << " raw (east, west) = ("
00661 << ntpstp -> ph0.raw << ", " << ntpstp -> ph1.raw << ")" << endl;
00662 ntpstp -> Print();
00663 }
00664
00665 cout << "total raw (east, west, total) = (" << raw_east << ", " << raw_west << ", "
00666 << raw_east + raw_west << ")" << endl;
00667 }
|
|
||||||||||||||||
|
Definition at line 302 of file Default.cxx. References Registry::Get(). 00303 {
00304 const char *value_char = 0;
00305 if(!reg.Get(key.c_str(), value_char) || !value_char)
00306 {
00307 return false;
00308 }
00309
00310 value = std::string(value_char);
00311 return true;
00312 }
|
|
||||||||||||||||
|
Definition at line 264 of file Default.cxx. References Registry::Get(). Referenced by TestDataModule::Config(), Anp::SelectSpill::Config(), Anp::SelectNuMu::Config(), Anp::SelectNC::Config(), Anp::SelectCount::Config(), Anp::SelectAntiNeutrino::Config(), Anp::RunModule::Config(), Anp::RunkNN::Config(), Anp::RunAlgStore::Config(), Anp::RunAlgSnarl::Config(), Anp::PmtHit::Config(), Anp::PlotVtx::Config(), Anp::PlotTruth::Config(), Anp::PlotTrackGeom::Config(), Anp::PlotReson::Config(), Anp::PlotPmt::Config(), Anp::PlotFlux::Config(), Anp::PlotEff::Config(), Anp::PlotData::Config(), Anp::Interface::Config(), Anp::FillTruth::Config(), Anp::FillTrack::Config(), Anp::FillSnarl::Config(), Anp::FillShower::Config(), Anp::FillMuonId::Config(), Anp::FillMadId::Config(), Anp::FillkNN::Config(), Anp::FillHeader::Config(), Anp::FillFlux::Config(), Anp::FillBasic::Config(), Anp::SelectFlux::Init(), Anp::FillkNN::Init(), and Anp::FiducialCut::Init(). 00265 {
00266 //
00267 // Read "const char*" key from Registry and convert it boolean. Return
00268 // true if "value" is modified based on Registry value and false otherwise.
00269 //
00270
00271 if(key.empty())
00272 {
00273 cerr << "Anp::Read - key is empty for bool type" << endl;
00274 return false;
00275 }
00276
00277 const char *value_char = 0;
00278 if(reg.Get(key.c_str(), value_char) && value_char)
00279 {
00280 if(std::strcmp(value_char, "yes") == 0 ||
00281 std::strcmp(value_char, "Yes") == 0 ||
00282 std::strcmp(value_char, "true") == 0 ||
00283 std::strcmp(value_char, "True") == 0)
00284 {
00285 value = true;
00286 return true;
00287 }
00288 else if(std::strcmp(value_char, "no") == 0 ||
00289 std::strcmp(value_char, "No") == 0 ||
00290 std::strcmp(value_char, "false") == 0 ||
00291 std::strcmp(value_char, "False") == 0)
00292 {
00293 value = false;
00294 return true;
00295 }
00296 }
00297
00298 return false;
00299 }
|
|
||||||||||||||||
|
Definition at line 123 of file Default.cxx. References infile, Registry::KeyExists(), Registry::LockKeys(), Registry::LockValues(), 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(). 00124 {
00125 if(!quiet)
00126 {
00127 std::cout << "-------------------------------------------------------------" << std::endl;
00128 std::cout << "Configuraton file:" << std::endl << " " << filepath << std::endl;
00129 std::cout << std::endl;
00130 }
00131
00132 std::ifstream infile(filepath.c_str());
00133 if(!infile || !infile.is_open())
00134 {
00135 std::cerr << "Anp::ReadRegistry - failed to open file: " << filepath << std::endl;
00136 if(quiet)
00137 {
00138 std::cout << "-------------------------------------------------------------" << std::endl;
00139 }
00140 return false;
00141 }
00142
00143 reg.UnLockKeys();
00144 reg.UnLockValues();
00145
00146 while(!infile.eof())
00147 {
00148 std::string line;
00149 std::getline(infile, line);
00150
00151 if(line.empty() || line.find("#",0) != std::string::npos)
00152 {
00153 continue;
00154 }
00155
00156 const std::string::size_type nbeg = line.find_first_of("[", 0);
00157 const std::string::size_type nend = line.find_first_of("]", 0);
00158
00159 if(nbeg == std::string::npos || nend == std::string::npos || !(nbeg < nend))
00160 {
00161 if(!quiet) std::cout << " Failed to parse name" << std::endl;
00162 continue;
00163 }
00164
00165 const std::string::size_type vbeg = line.find_first_of("[", nend + 1);
00166 const std::string::size_type vend = line.find_first_of("]", nend + 1);
00167
00168 if(vbeg == std::string::npos || vend == std::string::npos || !(vbeg < vend))
00169 {
00170 if(!quiet) std::cout << " Failed to parse value" << std::endl;
00171 continue;
00172 }
00173
00174 const std::string::size_type tbeg = line.find_first_of("[", vend + 1);
00175 const std::string::size_type tend = line.find_first_of("]", vend + 1);
00176
00177 if(tbeg == std::string::npos || tend == std::string::npos || !(tbeg < tend))
00178 {
00179 if(!quiet) std::cout << " Failed to parse type" << std::endl;
00180 continue;
00181 }
00182
00183 const std::string name = line.substr(nbeg + 1, nend - nbeg - 1);
00184 const std::string value = line.substr(vbeg + 1, vend - vbeg - 1);
00185 const std::string type = line.substr(tbeg + 1, tend - tbeg - 1);
00186
00187 if(!quiet) std:: cout << " " << name << " = " << value << " (" << type << ")" << std::endl;
00188
00189 if(reg.KeyExists(name.c_str()))
00190 {
00191 std::cerr << "Anp::ReadRegistry - key [" << name << "] already exists" << std::endl;
00192 continue;
00193 }
00194
00195 if(type == "string")
00196 {
00197 reg.Set(name.c_str(), value.c_str());
00198 }
00199 else if(type == "double")
00200 {
00201 const double value_double = std::atof(value.c_str());
00202 reg.Set(name.c_str(), value_double);
00203 }
00204 else if(type == "int")
00205 {
00206 if(value.find(".",0) != std::string::npos)
00207 {
00208 if(!quiet) std::cerr << " Forcing conversion of double to integer" << std::endl;
00209 const int value_int = static_cast<int>(std::atof(value.c_str()));
00210 reg.Set(name.c_str(), value_int);
00211 }
00212 else
00213 {
00214 const int value_int = std::atoi(value.c_str());
00215 reg.Set(name.c_str(), value_int);
00216 }
00217 }
00218 }
00219
00220 if(infile.is_open())
00221 {
00222 infile.close();
00223 }
00224
00225 reg.LockKeys();
00226 reg.LockValues();
00227
00228 if(!quiet)
00229 {
00230 std::cout << "-------------------------------------------------------------" << std::endl;
00231 }
00232
00233 return true;
00234 }
|
|
||||||||||||
|
Definition at line 344 of file SelectSpill.cxx. References infile, run(), UtilString::StringTok(), and sub(). Referenced by Anp::SelectSpill::ReadList(). 00345 {
00346 vector<RunSubrun> rlist;
00347
00348 std::ifstream infile(path.c_str());
00349 if(!infile.is_open())
00350 {
00351 return rlist;
00352 }
00353
00354 while(!infile.eof())
00355 {
00356 std::string line;
00357 std::getline(infile, line);
00358
00359 if(line.empty()) continue;
00360
00361 vector<string> svec;
00362 UtilString::StringTok(svec, line, " ");
00363
00364 //
00365 // Run list must have run and subrun fiels
00366 //
00367 if(svec.size() != 2) continue;
00368
00369 stringstream runS, subS;
00370 runS << svec.front();
00371 subS << svec.back();
00372
00373 int run = -1, sub = -1;
00374
00375 runS >> run;
00376 subS >> sub;
00377
00378 if(runS.fail() || subS.fail())
00379 {
00380 cerr << " Anp::ReadRunList - stringstream operator>> failed for: " << line << endl;
00381 }
00382 else
00383 {
00384
00385 rlist.push_back(Anp::RunSubrun(run, sub));
00386 }
00387 }
00388
00389 if(print)
00390 {
00391 for(vector<RunSubrun>::const_iterator rit = rlist.begin(); rit != rlist.end(); ++rit)
00392 {
00393 cout << rit -> run << " " << rit -> subrun << endl;
00394 }
00395 }
00396
00397 return rlist;
00398 }
|
|
||||||||||||
|
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 315 of file Default.cxx. References Registry::Get(), Registry::GetTypeAsString(), Registry::Key(), Registry::KeysLocked(), Registry::LockKeys(), Registry::LockValues(), Registry::Set(), Registry::UnLockKeys(), Registry::UnLockValues(), and Registry::ValuesLocked(). Referenced by Anp::SelectKinem::GetAlg(). 00316 {
00317 //
00318 // Recursively walk through Registry and add "value" at "key"
00319 //
00320 if(key.empty())
00321 {
00322 cerr << "Anp::SetKey - key string is empty" << endl;
00323 return 0;
00324 }
00325 if(value.empty())
00326 {
00327 cerr << "Anp::SetKey - value string is empty" << endl;
00328 return 0;
00329 }
00330
00331 const bool klock = reg.KeysLocked();
00332 const bool vlock = reg.ValuesLocked();
00333
00334 if(klock) reg.UnLockKeys();
00335 if(vlock) reg.UnLockValues();
00336 reg.Set(key.c_str(), value.c_str());
00337
00338 Registry::RegistryKey rkey = reg.Key();
00339 vector<string> rvec;
00340
00341 const char* charkey = 0;
00342 while( (charkey = rkey()) )
00343 {
00344 if(charkey && reg.GetTypeAsString(charkey) == "Registry")
00345 {
00346 rvec.push_back(charkey);
00347 }
00348 }
00349
00350 int nadd = 1;
00351 for(vector<string>::const_iterator sit = rvec.begin(); sit != rvec.end(); ++sit)
00352 {
00353 const string &skey = *sit;
00354
00355 Registry dreg;
00356 if(!reg.Get(skey.c_str(), dreg))
00357 {
00358 cerr << "SelectKinem::GetAlg - failed to get Registry at: " << skey << endl;
00359 continue;
00360 }
00361
00362 //
00363 // Recursively walk through Registry daughter objects
00364 //
00365 nadd += Anp::SetKey(dreg, key, value);
00366 reg.Set(skey.c_str(), dreg);
00367 }
00368
00369 if(klock) reg.LockKeys();
00370 if(vlock) reg.LockValues();
00371
00372 return nadd;
00373 }
|
|
||||||||||||
|
Definition at line 76 of file Default.h. Referenced by Anp::Vertex::CosX(), and Anp::Vertex::X(). 00076 { return (u - v)*0.707106781; }
|
|
||||||||||||
|
Definition at line 77 of file Default.h. Referenced by Anp::Vertex::CosY(), and Anp::Vertex::Y(). 00077 { return (u + v)*0.707106781; }
|
|
||||||||||||
|
Definition at line 79 of file Default.h. Referenced by Anp::Truth::GetVtx(), and Anp::SelectFiducial::Pass(). 00079 { return (y + x)*0.707106781; }
|
|
||||||||||||
|
Definition at line 80 of file Default.h. Referenced by Anp::Truth::GetVtx(), and Anp::SelectFiducial::Pass(). 00080 { return (y - x)*0.707106781; }
|
|
|
Definition at line 43 of file Default.cxx. Referenced by far_to_gnumi(), gnumi_to_far(), gnumi_to_near(), and near_to_gnumi(). |
|
|
Definition at line 39 of file Default.cxx. |
|
|
Definition at line 40 of file Default.cxx. |
|
|
Definition at line 41 of file Default.cxx. |
|
|
Definition at line 35 of file Default.cxx. |
|
|
Definition at line 36 of file Default.cxx. |
|
|
Definition at line 37 of file Default.cxx. |
|
|
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 25 of file Default.cxx. |
|
|
Definition at line 24 of file Default.cxx. |
1.3.9.1