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

NtpMREvent.cxx

Go to the documentation of this file.
00001 
00002 // NtpMREvent
00003 //
00004 // NtpMREvent is an ntuple class to hold the shower data
00005 //
00007 
00008 #include <iostream>
00009 using namespace std;
00010 
00011 #include "MessageService/MsgService.h"
00012 #include "MuonRemoval/NtpMREvent.h"
00013 #include "MuonRemoval/AlgRmMu.h"
00014 
00015 ClassImp(NtpMREvent)
00016 
00017 std::ostream& operator << (std::ostream& os, const NtpMREvent& ntp) 
00018                                      { return ntp.Print(os); }
00019 
00020 CVSID("$Id: NtpMREvent.cxx,v 1.8 2008/09/17 02:56:19 tjyang Exp $");
00021 
00022 void NtpMREvent::AddStripAt(Int_t stripindex, Int_t mrinfo, Int_t ind) {
00023 
00024   if ( ind < 0 || ind >= nstrip ) {
00025     MSG("NtpEM",Msg::kWarning) 
00026       << "Attempt to add strip at index " << ind
00027       << " outside of array size " << nstrip << " ignored." << endl;
00028     return;
00029   }
00030     
00031   stp[ind] = stripindex;
00032   mrstp[ind] = mrinfo;
00033   return;
00034     
00035 }
00036 
00037 Bool_t NtpMREvent::StpIsTrueMu(Int_t stripindex)
00038 {
00039   if(stripindex>=nstrip) return false;
00040   return (mrstp[stripindex] & RmMuMask::kRMMU_ISMU_MASK);
00041 }
00042 
00043 Bool_t NtpMREvent::StpIsTrueShw(Int_t stripindex)
00044 {
00045   if(stripindex>=nstrip) return false;
00046   return (mrstp[stripindex] & RmMuMask::kRMMU_ISSHW_MASK);
00047 }
00048 
00049 Bool_t NtpMREvent::StpIsScaled(Int_t stripindex)
00050 {
00051   if(stripindex>=nstrip) return false;
00052   return (mrstp[stripindex] & RmMuMask::kRMMU_ISSCALED_MASK);
00053 }
00054 
00055 Bool_t NtpMREvent::StpIsInRecoTrk(Int_t stripindex)
00056 {
00057   if(stripindex>=nstrip) return false;
00058   return (mrstp[stripindex] & RmMuMask::kRMMU_INRECOTRK_MASK);
00059 }
00060 
00061 Float_t  NtpMREvent::StpScaleFactor(Int_t stripindex)
00062 {
00063   if(stripindex>=nstrip) return 0.0;
00064   return ( float(mrstp[stripindex]>>RmMuMask::kRMMU_NUM_SHIFT) / 
00065            RmMuMask::kRMMU_SCL_FACT_SCALE );
00066 }
00067 
00068 Bool_t NtpMREvent::StpIsRetained(Int_t stripindex)
00069 {
00070   if(stripindex>=nstrip) return false;
00071   return (mrstp[stripindex] & RmMuMask::kRMMU_ISRETAIN_MASK);
00072 }
00073 
00074 Bool_t NtpMREvent::StpIsMCElec(Int_t stripindex)
00075 {
00076   if(stripindex>=nstrip) return false;
00077   return (mrstp[stripindex] & RmMuMask::kRMMU_ISMCELEC_MASK);
00078 }
00079 
00080 NtpMREvent::NtpMREvent(): 
00081   index(0),ndigit(0),nstrip(0),stp(0),mrstp(0),
00082   orig_event(-1),best_event(-1),best_purity(0),best_complete(0),
00083   best_purity_phw(0),best_complete_phw(0),
00084   elec_complete(0),elec_complete_phw(0),
00085   best_elec_complete_phw(0), best_elec_complete(0), 
00086   best_elec_event(0), comb_complete(0), comb_complete_phw(0),
00087   best_comb_complete(0), best_comb_complete_phw(0),
00088   best_comb_event(0),
00089   shwvtxx(0),shwvtxy(0),shwvtxz(0),shwendx(0),shwendy(0),shwendz(0),
00090   shwvtxplane(0),shwendplane(0),shwnplane(0),shwcharge(0),
00091   vtxx(0),vtxy(0),vtxz(0),vtxdistance(),endx(0),endy(0),endz(0),enddistance(0),
00092   vtxp(0),endp(0),npln(0),prng(0),pcrv(0),pvdx(0),pvdy(0),pvdz(0),zenith(0),azimuth(0),
00093   fitp(0),endc(0),pass(0),pmux(0),pmuy(0),
00094   pmuz(0),mxpl(0),qp(0),mrmpmux(0),mrmpmuy(0),
00095   mrmpmuz(0),mrmQ2(0),mrmEshw(0)
00096 {
00097 }
00098 
00099 NtpMREvent::NtpMREvent(Int_t ninit) : 
00100   index(0),ndigit(0),nstrip(ninit),stp(0),mrstp(0),
00101   orig_event(-1),best_event(-1),best_purity(0),best_complete(0),
00102   best_purity_phw(0),best_complete_phw(0),
00103   elec_complete(0),elec_complete_phw(0),
00104   best_elec_complete_phw(0), best_elec_complete(0),
00105   best_elec_event(0), comb_complete(0), comb_complete_phw(0),
00106   best_comb_complete(0), best_comb_complete_phw(0),
00107   best_comb_event(0),
00108   shwvtxx(0),shwvtxy(0),shwvtxz(0),shwendx(0),shwendy(0),shwendz(0),
00109   shwvtxplane(0),shwendplane(0),shwnplane(0),shwcharge(0),
00110   vtxx(0),vtxy(0),vtxz(0),vtxdistance(),endx(0),endy(0),endz(0),enddistance(0),
00111   vtxp(0),endp(0),npln(0),prng(0),pcrv(0),pvdx(0),pvdy(0),pvdz(0),zenith(0),azimuth(0),
00112   fitp(0),endc(0),pass(0),pmux(0),pmuy(0),
00113   pmuz(0),mxpl(0),qp(0),mrmpmux(0),mrmpmuy(0),
00114   mrmpmuz(0),mrmQ2(0),mrmEshw(0)
00115 {
00116   if ( nstrip ) {
00117     stp = new Int_t[nstrip];
00118     mrstp = new Int_t[nstrip];
00119     for ( Int_t i = 0; i < nstrip; i++ ) {
00120       stp[i] = -1;
00121       mrstp[i] = -1;
00122     }
00123   }
00124 }
00125 
00126 std::ostream& NtpMREvent::Print(std::ostream& os) const {
00127   
00128   os << "NtpMREvent::Print" << endl;
00129   return os;
00130   
00131 }
00132 
00133 void NtpMREvent::Print(Option_t* /* option */) const {
00134   
00135   Print(std::cout);
00136   return;
00137 
00138 }

Generated on Mon Feb 15 11:07:06 2010 for loon by  doxygen 1.3.9.1