Anp::FillMRCC Class Reference

#include <FillMRCC.h>

Inheritance diagram for Anp::FillMRCC:
Anp::AlgStore Anp::Base

List of all members.

Public Member Functions

 FillMRCC ()
virtual ~FillMRCC ()
bool Run (Record &record, TObject *ptr=0)
void Config (const Registry &reg)

Private Member Functions

const MRCCInfo Fill (const NtpMREvent &mrevent) const

Private Attributes

bool fDebug

Detailed Description

Definition at line 17 of file FillMRCC.h.


Constructor & Destructor Documentation

Anp::FillMRCC::FillMRCC (  ) 

Definition at line 32 of file FillMRCC.cxx.

00033   :fDebug(true)
00034 {    
00035 }

Anp::FillMRCC::~FillMRCC (  )  [virtual]

Definition at line 38 of file FillMRCC.cxx.

00039 {
00040 }


Member Function Documentation

void Anp::FillMRCC::Config ( const Registry reg  )  [virtual]

Reimplemented from Anp::AlgStore.

Definition at line 87 of file FillMRCC.cxx.

References fDebug, Registry::KeyExists(), and Anp::Read().

00088 {
00089 
00090   Anp::Read(reg,"FillMRCCDebug",fDebug);
00091    if(reg.KeyExists("PrintConfig"))
00092    {
00093      cout << "FillMRCC::Config" << endl;
00094      cout << "Debug    "<<fDebug<< endl;
00095    }
00096 }

const Anp::MRCCInfo Anp::FillMRCC::Fill ( const NtpMREvent mrevent  )  const [private]

Definition at line 99 of file FillMRCC.cxx.

References NtpMREvent::best_complete, Anp::MRCCInfo::best_complete, NtpMREvent::best_complete_phw, Anp::MRCCInfo::best_complete_phw, NtpMREvent::best_event, NtpMREvent::best_purity, Anp::MRCCInfo::best_purity, Anp::MRCCInfo::best_purity_phw, NtpMREvent::best_purity_phw, Anp::MRCCInfo::elec_complete, NtpMREvent::elec_complete, Anp::MRCCInfo::elec_complete_phw, NtpMREvent::elec_complete_phw, NtpMREvent::endc, Anp::MRCCInfo::endc, Anp::MRCCInfo::fitp, NtpMREvent::fitp, NtpMREvent::index, Anp::MRCCInfo::index, Anp::MRCCInfo::mrcc_index, Anp::MRCCInfo::mxpl, NtpMREvent::mxpl, NtpMREvent::ndigit, Anp::MRCCInfo::ndigit, Anp::MRCCInfo::npln, NtpMREvent::npln, Anp::MRCCInfo::nstrip, NtpMREvent::nstrip, NtpMREvent::orig_event, Anp::MRCCInfo::orig_index, NtpMREvent::pass, Anp::MRCCInfo::pass, NtpMREvent::pcrv, Anp::MRCCInfo::pcrv, Anp::MRCCInfo::pmux, NtpMREvent::pmux, Anp::MRCCInfo::pmuy, NtpMREvent::pmuy, Anp::MRCCInfo::pmuz, NtpMREvent::pmuz, Anp::MRCCInfo::prng, NtpMREvent::prng, NtpMREvent::pvdx, Anp::MRCCInfo::pvdx, NtpMREvent::pvdy, Anp::MRCCInfo::pvdy, NtpMREvent::pvdz, Anp::MRCCInfo::pvdz, NtpMREvent::vtxp, Anp::MRCCInfo::vtxp, Anp::MRCCInfo::vtxx, NtpMREvent::vtxx, Anp::MRCCInfo::vtxy, NtpMREvent::vtxy, Anp::MRCCInfo::vtxz, and NtpMREvent::vtxz.

Referenced by Run().

00100 {
00101 
00102   MRCCInfo mrccinfo;
00103 
00104   mrccinfo.mrcc_index = mrevent.best_event;
00105   mrccinfo.orig_index = mrevent.orig_event;
00106   mrccinfo.index   =   mrevent.index;
00107   mrccinfo.ndigit  =   mrevent.ndigit;
00108   mrccinfo.nstrip  =   mrevent.nstrip;
00109   //  mrccinfo.stp     =   mrevent.stp;
00110   //  mrccinfo.mrstp   =   mrevent.mrstp;
00111   mrccinfo.best_purity =      mrevent.best_purity;
00112   mrccinfo.best_complete =    mrevent.best_complete;
00113   mrccinfo.best_purity_phw =  mrevent.best_purity_phw;
00114   mrccinfo.best_complete_phw= mrevent.best_complete_phw;
00115   mrccinfo.elec_complete  =   mrevent.elec_complete;
00116   mrccinfo.elec_complete_phw= mrevent.elec_complete_phw;
00117   mrccinfo.vtxx  =   mrevent.vtxx;
00118   mrccinfo.vtxy  =   mrevent.vtxy;
00119   mrccinfo.vtxz  =   mrevent.vtxz;
00120   mrccinfo.vtxp  =   mrevent.vtxp;
00121   mrccinfo.npln  =   mrevent.npln;
00122   mrccinfo.prng  =   mrevent.prng;
00123   mrccinfo.pcrv  =   mrevent.pcrv;
00124   mrccinfo.pvdx  =   mrevent.pvdx;
00125   mrccinfo.pvdy  =   mrevent.pvdy;
00126   mrccinfo.pvdz  =   mrevent.pvdz;
00127   mrccinfo.fitp  =   mrevent.fitp;
00128   mrccinfo.endc  =   mrevent.endc;
00129   mrccinfo.pass  =   mrevent.pass;
00130   mrccinfo.pmux  =   mrevent.pmux;
00131   mrccinfo.pmuy  =   mrevent.pmuy;
00132   mrccinfo.pmuz  =   mrevent.pmuz;
00133   mrccinfo.mxpl  =   mrevent.mxpl;
00134 
00135    return mrccinfo;
00136 }

bool Anp::FillMRCC::Run ( Record record,
TObject *  ptr = 0 
) [virtual]

Implements Anp::AlgStore.

Definition at line 43 of file FillMRCC.cxx.

References Anp::Record::Add(), fDebug, Fill(), Anp::MRCCInfo::infoindex, Msg::kError, NtpMRRecord::mrevt, and MSG.

00044 {
00045    //
00046    // Get and fill Monte-Carlo truth and StdHep information
00047    //
00048   const NtpMRRecord* ntmrcc= dynamic_cast<NtpMRRecord *>(ptr);
00049   if(!ntmrcc){
00050     const MomNavigator *mom = dynamic_cast<const MomNavigator *> (ptr);
00051     if(mom)
00052       {
00053         ntmrcc = dynamic_cast<NtpMRRecord *>(mom -> GetFragment("NtpMRRecord")); 
00054         if(!ntmrcc)
00055           {
00056             MSG("FillAlg", Msg::kError) << "Failed to find NtpMRRecord pointer 1" << endl;
00057             return false;
00058           }
00059       }
00060     else
00061       {
00062         MSG("FillAlg", Msg::kError) << "Failed to find MomNavigator pointer" << endl;
00063         return false;
00064       }      
00065   }
00066   if(!ntmrcc)
00067     {
00068       MSG("FillAlg", Msg::kError) << "Failed to get NtpMRRecord pointer 2" << endl;
00069       return false;
00070     }
00071 
00072   TClonesArray& evtTca=*(ntmrcc->mrevt);
00073   //  TClonesArray& truTca=*(ntmrcc->mrtru);
00074 
00075   const Int_t numEvts=evtTca.GetEntriesFast();
00076   for(int jj=0;jj<numEvts;jj++){
00077     const NtpMREvent& mrccevt=   *dynamic_cast<NtpMREvent*>(evtTca[jj]);
00078     MRCCInfo minfo = Fill(mrccevt);
00079     minfo.infoindex = jj;
00080     record.Add(minfo);
00081   }
00082   if(fDebug)  cout<<"FillMRCC::Run - End "<<endl;
00083   return true;
00084 }


Member Data Documentation

bool Anp::FillMRCC::fDebug [private]

Definition at line 28 of file FillMRCC.h.

Referenced by Config(), and Run().


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

Generated on 16 Jan 2018 for loon by  doxygen 1.6.1