MuParentHelper Class Reference

#include <MuParentHelper.h>

List of all members.

Public Member Functions

 MuParentHelper ()
 ~MuParentHelper ()
Bool_t SetFileDir (std::string, bool usemini=true)
void SetUseFullFile ()
Bool_t Status () const
void GetMuParent (Int_t, Int_t, Float_t, Float_t, Float_t, NuParent &)
void GetMuParent (Int_t, Int_t, Float_t, Float_t, Float_t, NtpMCFluxInfo &)
void GetMuDaughter (Int_t, Int_t, Float_t, Float_t, Float_t, NtpMCFluxInfo &, int desirednu=53)
void GetMuParent (NtpMCRecord *, int, NuParent &)
void GetMuParent (NtpStRecord *, int, NuParent &)
void GetMuParent (NtpMCFluxInfo *, NtpMCFluxInfo &)
void GetMuDaughter (NtpMCFluxInfo *, NtpMCFluxInfo &, int desirednu=53)
void FillANtpTruth (NtpMCRecord *, int, ANtpTruthInfoBeam &)
void FillANtpTruth (NtpStRecord *, int, ANtpTruthInfoBeam &)

Private Member Functions

Bool_t OpenFile ()
void SetAddresses ()
void SetVectorEntries ()
void CloseFile ()

Private Attributes

TFile * fFile
TTree * fTree
std::map< Int_t, std::map
< Int_t, Int_t > > 
fVec
std::string fdir
Bool_t fok
Bool_t fusemini
Int_t fRunNum
Int_t fEvtNum
Float_t fX
Float_t fY
Float_t fZ
Float_t fPX
Float_t fPY
Float_t fPZ
Int_t fPID
Int_t fGen
Float_t fNdxdz
Float_t fNdydz
Float_t fNpz
Float_t fNenergy
Float_t fNdxdznear
Float_t fNdydznear
Float_t fNenergynear
Float_t fNwtnear
Float_t fNdxdzfar
Float_t fNdydzfar
Float_t fNenergyfar
Float_t fNwtfar
Int_t fNorig
Int_t fNdecay
Int_t fNtype
Float_t fVx
Float_t fVy
Float_t fVz
Float_t fPdpx
Float_t fPdpy
Float_t fPdpz
Float_t fPpdxdz
Float_t fPpdydz
Float_t fPppz
Float_t fPpenergy
Int_t fPpmedium
Int_t fPtype
Float_t fPpvx
Float_t fPpvy
Float_t fPpvz
Float_t fMuparpx
Float_t fMuparpy
Float_t fMuparpz
Float_t fMupare
Float_t fNecm
Float_t fNimpwt
Float_t fXpoint
Float_t fYpoint
Float_t fZpoint
Float_t fMuX
Float_t fMuY
Float_t fMuZ
Float_t fMuPX
Float_t fMuPY
Float_t fMuPZ
Int_t fMuPID
Int_t fMuGen
Float_t fMuNdxdz
Float_t fMuNdydz
Float_t fMuNpz
Float_t fMuNenergy
Float_t fMuNdxdznear
Float_t fMuNdydznear
Float_t fMuNenergynear
Float_t fMuNwtnear
Float_t fMuNdxdzfar
Float_t fMuNdydzfar
Float_t fMuNenergyfar
Float_t fMuNwtfar
Int_t fMuNorig
Int_t fMuNdecay
Int_t fMuNtype
Float_t fMuVx
Float_t fMuVy
Float_t fMuVz
Float_t fMuPdpx
Float_t fMuPdpy
Float_t fMuPdpz
Float_t fMuPpdxdz
Float_t fMuPpdydz
Float_t fMuPppz
Float_t fMuPpenergy
Int_t fMuPpmedium
Int_t fMuPtype
Float_t fMuPpvx
Float_t fMuPpvy
Float_t fMuPpvz
Float_t fMuMuparpx
Float_t fMuMuparpy
Float_t fMuMuparpz
Float_t fMuMupare
Float_t fMuNecm
Float_t fMuNimpwt
Float_t fMuXpoint
Float_t fMuYpoint
Float_t fMuZpoint

Detailed Description

Definition at line 14 of file MuParentHelper.h.


Constructor & Destructor Documentation

MuParentHelper::MuParentHelper (  ) 

Definition at line 20 of file MuParentHelper.cxx.

References fdir, fFile, fok, fTree, fusemini, OpenFile(), SetAddresses(), and SetVectorEntries().

00021 {
00022   fok = false;
00023   fFile = NULL;
00024   fTree = NULL;
00025   fusemini = true;
00026   char *dir = getenv("GNUMIAUX");
00027   if(dir!=NULL) fdir = dir;
00028   else fdir = ".";
00029   if(OpenFile()) {
00030     SetAddresses();
00031     SetVectorEntries();
00032   }
00033 }

MuParentHelper::~MuParentHelper (  ) 

Definition at line 36 of file MuParentHelper.cxx.

References CloseFile().

00037 {
00038   CloseFile();
00039 }


Member Function Documentation

void MuParentHelper::CloseFile (  )  [private]

Definition at line 206 of file MuParentHelper.cxx.

References fFile, and fok.

Referenced by ~MuParentHelper().

00207 {
00208   if(fFile) {
00209     fFile->Close();
00210     delete fFile;
00211   }
00212   fok = false;
00213 }

void MuParentHelper::FillANtpTruth ( NtpStRecord rec,
int  mcevent,
ANtpTruthInfoBeam ntpBeam 
)

Definition at line 327 of file MuParentHelper.cxx.

References NuParent::GetGen(), GetMuParent(), NuParent::GetPID(), NuParent::GetPx(), NuParent::GetPy(), NuParent::GetPz(), NuParent::GetX(), NuParent::GetY(), NuParent::GetZ(), ANtpTruthInfoBeam::parentGen, ANtpTruthInfoBeam::parentPID, ANtpTruthInfoBeam::parentPX, ANtpTruthInfoBeam::parentPY, ANtpTruthInfoBeam::parentPZ, ANtpTruthInfoBeam::parentX, ANtpTruthInfoBeam::parentY, and ANtpTruthInfoBeam::parentZ.

00329 {
00330   NuParent parent;
00331   this->GetMuParent(rec,mcevent,parent);
00332   ntpBeam.parentX   = parent.GetX();
00333   ntpBeam.parentY   = parent.GetY();
00334   ntpBeam.parentZ   = parent.GetZ();
00335   ntpBeam.parentPX  = parent.GetPx();
00336   ntpBeam.parentPY  = parent.GetPy();
00337   ntpBeam.parentPZ  = parent.GetPz();
00338   ntpBeam.parentPID = parent.GetPID();
00339   ntpBeam.parentGen = parent.GetGen();
00340 }

void MuParentHelper::FillANtpTruth ( NtpMCRecord rec,
int  mcevent,
ANtpTruthInfoBeam ntpBeam 
)

Definition at line 311 of file MuParentHelper.cxx.

References NuParent::GetGen(), GetMuParent(), NuParent::GetPID(), NuParent::GetPx(), NuParent::GetPy(), NuParent::GetPz(), NuParent::GetX(), NuParent::GetY(), NuParent::GetZ(), ANtpTruthInfoBeam::parentGen, ANtpTruthInfoBeam::parentPID, ANtpTruthInfoBeam::parentPX, ANtpTruthInfoBeam::parentPY, ANtpTruthInfoBeam::parentPZ, ANtpTruthInfoBeam::parentX, ANtpTruthInfoBeam::parentY, and ANtpTruthInfoBeam::parentZ.

00313 {
00314   NuParent parent;
00315   this->GetMuParent(rec,mcevent,parent);
00316   ntpBeam.parentX   = parent.GetX();
00317   ntpBeam.parentY   = parent.GetY();
00318   ntpBeam.parentZ   = parent.GetZ();
00319   ntpBeam.parentPX  = parent.GetPx();
00320   ntpBeam.parentPY  = parent.GetPy();
00321   ntpBeam.parentPZ  = parent.GetPz();
00322   ntpBeam.parentPID = parent.GetPID();
00323   ntpBeam.parentGen = parent.GetGen();
00324 }

void MuParentHelper::GetMuDaughter ( NtpMCFluxInfo oldfi,
NtpMCFluxInfo newfi,
int  desirednu = 53 
)

Definition at line 593 of file MuParentHelper.cxx.

References NtpMCFluxInfo::fluxevtno, NtpMCFluxInfo::fluxrun, GetMuDaughter(), NtpMCFluxInfo::tpx, NtpMCFluxInfo::tpy, and NtpMCFluxInfo::tpz.

00595 {
00596   Int_t runnum = oldfi->fluxrun;
00597   Int_t evtnum = oldfi->fluxevtno;
00598   Float_t tpx = oldfi->tpx;
00599   Float_t tpy = oldfi->tpy;
00600   Float_t tpz = oldfi->tpz;
00601   this->GetMuDaughter(runnum,evtnum,tpx,tpy,tpz,newfi,desirednu);
00602 }

void MuParentHelper::GetMuDaughter ( Int_t  runnum,
Int_t  evtnum,
Float_t  tpx,
Float_t  tpy,
Float_t  tpz,
NtpMCFluxInfo fi,
int  desirednu = 53 
)

Definition at line 605 of file MuParentHelper.cxx.

References MuELoss::e, fEvtNum, fGen, NtpMCFluxInfo::fluxevtno, NtpMCFluxInfo::fluxrun, fMuGen, fMuMupare, fMuMuparpx, fMuMuparpy, fMuMuparpz, fMuNdecay, fMuNdxdz, fMuNdxdzfar, fMuNdxdznear, fMuNdydz, fMuNdydzfar, fMuNdydznear, fMuNecm, fMuNenergy, fMuNenergyfar, fMuNenergynear, fMuNimpwt, fMuNorig, fMuNpz, fMuNtype, fMuNwtfar, fMuNwtnear, fMuPdpx, fMuPdpy, fMuPdpz, fMuPpdxdz, fMuPpdydz, fMuPpenergy, fMuPpmedium, fMuPppz, fMuPpvx, fMuPpvy, fMuPpvz, fMuPtype, fMuPX, fMuPY, fMuPZ, fMuVx, fMuVy, fMuVz, fMuX, fMuXpoint, fMuY, fMuYpoint, fMuZ, fMuZpoint, fPID, fPX, fPY, fPZ, fRunNum, fTree, fVec, GEANTtoPDG(), NtpMCFluxInfo::index, NtpMCFluxInfo::mupare, NtpMCFluxInfo::muparpx, NtpMCFluxInfo::muparpy, NtpMCFluxInfo::muparpz, NtpMCFluxInfo::ndecay, NtpMCFluxInfo::ndxdz, NtpMCFluxInfo::ndxdzfar, NtpMCFluxInfo::ndxdznear, NtpMCFluxInfo::ndydz, NtpMCFluxInfo::ndydzfar, NtpMCFluxInfo::ndydznear, NtpMCFluxInfo::necm, NtpMCFluxInfo::nenergy, NtpMCFluxInfo::nenergyfar, NtpMCFluxInfo::nenergynear, NtpMCFluxInfo::nimpwt, NtpMCFluxInfo::norig, NtpMCFluxInfo::npz, NtpMCFluxInfo::ntype, NtpMCFluxInfo::nwtfar, NtpMCFluxInfo::nwtnear, NtpMCFluxInfo::pdpx, NtpMCFluxInfo::pdpy, NtpMCFluxInfo::pdpz, NtpMCFluxInfo::ppdxdz, NtpMCFluxInfo::ppdydz, NtpMCFluxInfo::ppenergy, NtpMCFluxInfo::ppmedium, NtpMCFluxInfo::pppz, NtpMCFluxInfo::ppvx, NtpMCFluxInfo::ppvy, NtpMCFluxInfo::ppvz, NtpMCFluxInfo::ptype, Munits::second, NtpMCFluxInfo::tgen, NtpMCFluxInfo::tptype, NtpMCFluxInfo::tpx, NtpMCFluxInfo::tpy, NtpMCFluxInfo::tpz, NtpMCFluxInfo::tvx, NtpMCFluxInfo::tvy, NtpMCFluxInfo::tvz, NtpMCFluxInfo::vx, NtpMCFluxInfo::vy, NtpMCFluxInfo::vz, NtpMCFluxInfo::xpoint, NtpMCFluxInfo::ypoint, and NtpMCFluxInfo::zpoint.

Referenced by GetMuDaughter().

00608 {
00609   const std::map<Int_t,std::map<Int_t,Int_t> >::const_iterator run_it = fVec.find(runnum);
00610   if(run_it == fVec.end())
00611   {
00612     //     std::cerr << "MuParentHelper: failed to find run number " << runnum << endl;
00613      return;
00614   }
00615 
00616   const std::map<Int_t,Int_t> &evt_map = run_it -> second;
00617   const std::map<Int_t,Int_t>::const_iterator evt_it = evt_map.find(evtnum);
00618   if(evt_it == evt_map.end())
00619   {
00620     //     std::cerr << "MuParentHelper: failed to find event number " << evtnum << endl;
00621      return;
00622   }
00623   
00624   const int entry = evt_it -> second;
00625 
00626   bool foundit=false;
00627 
00628   fTree->GetEntry(entry);
00629   if(fMuNtype==desirednu&&runnum==fRunNum&&evtnum==fEvtNum){ 
00630     foundit=true;
00631   }
00632   else{
00633     fTree->GetEntry(entry-1);
00634     if(fMuNtype==desirednu&&runnum==fRunNum&&evtnum==fEvtNum){
00635       foundit=true;
00636     }
00637     else{
00638       fTree->GetEntry(entry+1);    
00639       if(fMuNtype==desirednu&&runnum==fRunNum&&evtnum==fEvtNum){
00640         foundit=true;
00641       }
00642       else{
00643         foundit=false;
00644       }
00645     }
00646   }
00647 
00648   if(runnum==fRunNum && evtnum==fEvtNum &&
00649      2.*TMath::Abs(tpx-fPX)/(tpx+fPX)<1e-4 && 
00650      2.*TMath::Abs(tpy-fPY)/(tpy+fPY)<1e-4 && 
00651      2.*TMath::Abs(tpz-fPZ)/(tpz+fPZ)<1e-4) {    
00652     //have an entry in the tree:
00653     if(fPID!=0 && fGen!=0 && foundit) {
00654       //found parent!
00655       //return parent info
00656       fi.index=-1;
00657       fi.fluxrun=runnum;
00658       fi.fluxevtno=evtnum;
00659       fi.ndxdz=fMuNdxdz;
00660       fi.ndydz=fMuNdydz;
00661       fi.npz=fMuNpz;
00662       fi.nenergy=fMuNenergy;
00663       fi.ndxdznear=fMuNdxdznear;
00664       fi.ndydznear=fMuNdydznear;
00665       fi.nenergynear=fMuNenergynear;
00666       fi.nwtnear=fMuNwtnear;
00667       fi.ndxdzfar=fMuNdxdzfar;
00668       fi.ndydzfar=fMuNdydzfar;
00669       fi.nenergyfar=fMuNenergyfar;
00670       fi.nwtfar=fMuNwtfar;
00671       fi.norig=fMuNorig;
00672       fi.ndecay=fMuNdecay;
00673       fi.ntype=fMuNtype;
00674       fi.vx=fMuVx;
00675       fi.vy=fMuVy;
00676       fi.vz=fMuVz;
00677       fi.pdpx=fMuPdpx;
00678       fi.pdpy=fMuPdpy;
00679       fi.pdpz=fMuPdpz;
00680       fi.ppdxdz=fMuPpdxdz;
00681       fi.ppdydz=fMuPpdydz;
00682       fi.pppz=fMuPppz;
00683       fi.ppenergy=fMuPpenergy;
00684       fi.ppmedium=fMuPpmedium;
00685       fi.ptype=fMuPtype;
00686       fi.ppvx=fMuPpvx;
00687       fi.ppvy=fMuPpvy;
00688       fi.ppvz=fMuPpvz;
00689       fi.muparpx=fMuMuparpx;
00690       fi.muparpy=fMuMuparpy;
00691       fi.muparpz=fMuMuparpz;
00692       fi.mupare=fMuMupare;
00693       fi.necm=fMuNecm;
00694       fi.nimpwt=fMuNimpwt;
00695       fi.xpoint=fMuXpoint;
00696       fi.ypoint=fMuYpoint;
00697       fi.zpoint=fMuZpoint;
00698       fi.tvx=fMuX;
00699       fi.tvy=fMuY;
00700       fi.tvz=fMuZ;
00701       fi.tpx=fMuPX;
00702       fi.tpy=fMuPY;
00703       fi.tpz=fMuPZ;
00704       fi.tptype=GEANTtoPDG(fPID);
00705       fi.tgen=fMuGen;
00706     }
00707     else {
00708       //couldn't find the daughter
00709       //return zeros
00710       fi.index=-1;
00711       fi.fluxrun=runnum;
00712       fi.fluxevtno=evtnum;
00713       fi.ndxdz=0.;
00714       fi.ndydz=0.;
00715       fi.npz=0.;
00716       fi.nenergy=0.;
00717       fi.ndxdznear=0.;
00718       fi.ndydznear=0.;
00719       fi.nenergynear=0.;
00720       fi.nwtnear=0.;
00721       fi.ndxdzfar=0.;
00722       fi.ndydzfar=0.;
00723       fi.nenergyfar=0.;
00724       fi.nwtfar=0.;
00725       fi.norig=0;
00726       fi.ndecay=0;
00727       fi.ntype=0;
00728       fi.vx=0.;
00729       fi.vy=0.;
00730       fi.vz=0.;
00731       fi.pdpx=0.;
00732       fi.pdpy=0.;
00733       fi.pdpz=0.;
00734       fi.ppdxdz=0.;
00735       fi.ppdydz=0.;
00736       fi.pppz=0.;
00737       fi.ppenergy=0.;
00738       fi.ppmedium=0;
00739       fi.ptype=0;
00740       fi.ppvx=0.;
00741       fi.ppvy=0.;
00742       fi.ppvz=0.;
00743       fi.muparpx=0.;
00744       fi.muparpy=0.;
00745       fi.muparpz=0.;
00746       fi.mupare=0.;
00747       fi.necm=0.;
00748       fi.nimpwt=0.;
00749       fi.xpoint=0.;
00750       fi.ypoint=0.;
00751       fi.zpoint=0.;
00752       fi.tvx=0.;
00753       fi.tvy=0.;
00754       fi.tvz=0.;
00755       fi.tpx=0.;
00756       fi.tpy=0.;
00757       fi.tpz=0.;
00758       fi.tptype=0;
00759       fi.tgen=0;
00760     }
00761   }
00762   else {
00763     //couldn't find the daughter
00764     //return zeros
00765     fi.index=-1;
00766     fi.fluxrun=runnum;
00767     fi.fluxevtno=evtnum;
00768     fi.ndxdz=0.;
00769     fi.ndydz=0.;
00770     fi.npz=0.;
00771     fi.nenergy=0.;
00772     fi.ndxdznear=0.;
00773     fi.ndydznear=0.;
00774     fi.nenergynear=0.;
00775     fi.nwtnear=0.;
00776     fi.ndxdzfar=0.;
00777     fi.ndydzfar=0.;
00778     fi.nenergyfar=0.;
00779     fi.nwtfar=0.;
00780     fi.norig=0;
00781     fi.ndecay=0;
00782     fi.ntype=0;
00783     fi.vx=0.;
00784     fi.vy=0.;
00785     fi.vz=0.;
00786     fi.pdpx=0.;
00787     fi.pdpy=0.;
00788     fi.pdpz=0.;
00789     fi.ppdxdz=0.;
00790     fi.ppdydz=0.;
00791     fi.pppz=0.;
00792     fi.ppenergy=0.;
00793     fi.ppmedium=0;
00794     fi.ptype=0;
00795     fi.ppvx=0.;
00796     fi.ppvy=0.;
00797     fi.ppvz=0.;
00798     fi.muparpx=0.;
00799     fi.muparpy=0.;
00800     fi.muparpz=0.;
00801     fi.mupare=0.;
00802     fi.necm=0.;
00803     fi.nimpwt=0.;
00804     fi.xpoint=0.;
00805     fi.ypoint=0.;
00806     fi.zpoint=0.;
00807     fi.tvx=0.;
00808     fi.tvy=0.;
00809     fi.tvz=0.;
00810     fi.tpx=0.;
00811     fi.tpy=0.;
00812     fi.tpz=0.;
00813     fi.tptype=0;
00814     fi.tgen=0;
00815   }
00816 }

void MuParentHelper::GetMuParent ( NtpMCFluxInfo mufi,
NtpMCFluxInfo fi 
)

Definition at line 393 of file MuParentHelper.cxx.

References NtpMCFluxInfo::fluxevtno, NtpMCFluxInfo::fluxrun, GetMuParent(), NtpMCFluxInfo::tpx, NtpMCFluxInfo::tpy, and NtpMCFluxInfo::tpz.

00394 {
00395   GetMuParent(mufi->fluxrun,mufi->fluxevtno,mufi->tpx,mufi->tpy,mufi->tpz,fi);
00396 
00397 }

void MuParentHelper::GetMuParent ( NtpStRecord rec,
int  mcevent,
NuParent par 
)

Definition at line 297 of file MuParentHelper.cxx.

References NtpMCTruth::flux, NtpMCFluxInfo::fluxevtno, NtpMCFluxInfo::fluxrun, GetMuParent(), NtpStRecord::mc, NtpMCFluxInfo::tpx, NtpMCFluxInfo::tpy, and NtpMCFluxInfo::tpz.

00299 {
00300   TClonesArray& mcarray = *(rec->mc);
00301   NtpMCTruth *mc = static_cast<NtpMCTruth*>(mcarray[mcevent]);
00302   Int_t runnum = mc->flux.fluxrun;
00303   Int_t evtnum = mc->flux.fluxevtno;
00304   Float_t mu_tpx = mc->flux.tpx;
00305   Float_t mu_tpy = mc->flux.tpy;
00306   Float_t mu_tpz = mc->flux.tpz;
00307   this->GetMuParent(runnum,evtnum,mu_tpx,mu_tpy,mu_tpz,par);
00308 }

void MuParentHelper::GetMuParent ( NtpMCRecord rec,
int  mcevent,
NuParent par 
)

Definition at line 283 of file MuParentHelper.cxx.

References NtpMCTruth::flux, NtpMCFluxInfo::fluxevtno, NtpMCFluxInfo::fluxrun, GetMuParent(), NtpMCRecord::mc, NtpMCFluxInfo::tpx, NtpMCFluxInfo::tpy, and NtpMCFluxInfo::tpz.

00285 {
00286   TClonesArray& mcarray = *(rec->mc);
00287   NtpMCTruth *mc = static_cast<NtpMCTruth*>(mcarray[mcevent]);
00288   Int_t runnum = mc->flux.fluxrun;
00289   Int_t evtnum = mc->flux.fluxevtno;
00290   Float_t mu_tpx = mc->flux.tpx;
00291   Float_t mu_tpy = mc->flux.tpy;
00292   Float_t mu_tpz = mc->flux.tpz;
00293   this->GetMuParent(runnum,evtnum,mu_tpx,mu_tpy,mu_tpz,par);
00294 }

void MuParentHelper::GetMuParent ( Int_t  runnum,
Int_t  evtnum,
Float_t  mu_tpx,
Float_t  mu_tpy,
Float_t  mu_tpz,
NtpMCFluxInfo fi 
)

Definition at line 400 of file MuParentHelper.cxx.

References MuELoss::e, fEvtNum, fGen, NtpMCFluxInfo::fluxevtno, NtpMCFluxInfo::fluxrun, fMuGen, fMuMupare, fMuMuparpx, fMuMuparpy, fMuMuparpz, fMuNdecay, fMuNdxdz, fMuNdxdzfar, fMuNdxdznear, fMuNdydz, fMuNdydzfar, fMuNdydznear, fMuNecm, fMuNenergy, fMuNenergyfar, fMuNenergynear, fMuNimpwt, fMuNorig, fMuNpz, fMuNtype, fMuNwtfar, fMuNwtnear, fMupare, fMuparpx, fMuparpy, fMuparpz, fMuPdpx, fMuPdpy, fMuPdpz, fMuPID, fMuPpdxdz, fMuPpdydz, fMuPpenergy, fMuPpmedium, fMuPppz, fMuPpvx, fMuPpvy, fMuPpvz, fMuPtype, fMuPX, fMuPY, fMuPZ, fMuVx, fMuVy, fMuVz, fMuX, fMuXpoint, fMuY, fMuYpoint, fMuZ, fMuZpoint, fNdecay, fNdxdz, fNdxdzfar, fNdxdznear, fNdydz, fNdydzfar, fNdydznear, fNecm, fNenergy, fNenergyfar, fNenergynear, fNimpwt, fNorig, fNpz, fNtype, fNwtfar, fNwtnear, fPdpx, fPdpy, fPdpz, fPID, fPpdxdz, fPpdydz, fPpenergy, fPpmedium, fPppz, fPpvx, fPpvy, fPpvz, fPtype, fPX, fPY, fPZ, fRunNum, fTree, fVec, fVx, fVy, fVz, fX, fXpoint, fY, fYpoint, fZ, fZpoint, GEANTtoPDG(), NtpMCFluxInfo::index, NtpMCFluxInfo::mupare, NtpMCFluxInfo::muparpx, NtpMCFluxInfo::muparpy, NtpMCFluxInfo::muparpz, NtpMCFluxInfo::ndecay, NtpMCFluxInfo::ndxdz, NtpMCFluxInfo::ndxdzfar, NtpMCFluxInfo::ndxdznear, NtpMCFluxInfo::ndydz, NtpMCFluxInfo::ndydzfar, NtpMCFluxInfo::ndydznear, NtpMCFluxInfo::necm, NtpMCFluxInfo::nenergy, NtpMCFluxInfo::nenergyfar, NtpMCFluxInfo::nenergynear, NtpMCFluxInfo::nimpwt, NtpMCFluxInfo::norig, NtpMCFluxInfo::npz, NtpMCFluxInfo::ntype, NtpMCFluxInfo::nwtfar, NtpMCFluxInfo::nwtnear, NtpMCFluxInfo::pdpx, NtpMCFluxInfo::pdpy, NtpMCFluxInfo::pdpz, NtpMCFluxInfo::ppdxdz, NtpMCFluxInfo::ppdydz, NtpMCFluxInfo::ppenergy, NtpMCFluxInfo::ppmedium, NtpMCFluxInfo::pppz, NtpMCFluxInfo::ppvx, NtpMCFluxInfo::ppvy, NtpMCFluxInfo::ppvz, NtpMCFluxInfo::ptype, Munits::second, NtpMCFluxInfo::tgen, NtpMCFluxInfo::tptype, NtpMCFluxInfo::tpx, NtpMCFluxInfo::tpy, NtpMCFluxInfo::tpz, NtpMCFluxInfo::tvx, NtpMCFluxInfo::tvy, NtpMCFluxInfo::tvz, NtpMCFluxInfo::vx, NtpMCFluxInfo::vy, NtpMCFluxInfo::vz, NtpMCFluxInfo::xpoint, NtpMCFluxInfo::ypoint, and NtpMCFluxInfo::zpoint.

00403 {
00404   const std::map<Int_t,std::map<Int_t,Int_t> >::const_iterator run_it = fVec.find(runnum);
00405   if(run_it == fVec.end())
00406   {
00407     //     std::cerr << "MuParentHelper: failed to find run number " << runnum << endl;
00408      return;
00409   }
00410 
00411   const std::map<Int_t,Int_t> &evt_map = run_it -> second;
00412   const std::map<Int_t,Int_t>::const_iterator evt_it = evt_map.find(evtnum);
00413   if(evt_it == evt_map.end())
00414   {
00415     //     std::cerr << "MuParentHelper: failed to find event number " << evtnum << endl;
00416      return;
00417   }
00418   
00419   const int entry = evt_it -> second;
00420 
00421   fTree->GetEntry(entry);
00422   if(runnum==fRunNum && evtnum==fEvtNum &&
00423      2.*TMath::Abs(mu_tpx-fMuPX)/(mu_tpx+fMuPX)<1e-4 && 
00424      2.*TMath::Abs(mu_tpy-fMuPY)/(mu_tpy+fMuPY)<1e-4 && 
00425      2.*TMath::Abs(mu_tpz-fMuPZ)/(mu_tpz+fMuPZ)<1e-4) {    
00426     //have an entry in the tree:
00427     if(fPID!=0 && fGen!=0) {
00428       //found parent!
00429       //return parent info
00430       fi.index=-1;
00431       fi.fluxrun=runnum;
00432       fi.fluxevtno=evtnum;
00433       fi.ndxdz=fNdxdz;
00434       fi.ndydz=fNdydz;
00435       fi.npz=fNpz;
00436       fi.nenergy=fNenergy;
00437       fi.ndxdznear=fNdxdznear;
00438       fi.ndydznear=fNdydznear;
00439       fi.nenergynear=fNenergynear;
00440       fi.nwtnear=fNwtnear;
00441       fi.ndxdzfar=fNdxdzfar;
00442       fi.ndydzfar=fNdydzfar;
00443       fi.nenergyfar=fNenergyfar;
00444       fi.nwtfar=fNwtfar;
00445       fi.norig=fNorig;
00446       fi.ndecay=fNdecay;
00447       fi.ntype=fNtype;
00448       fi.vx=fVx;
00449       fi.vy=fVy;
00450       fi.vz=fVz;
00451       fi.pdpx=fPdpx;
00452       fi.pdpy=fPdpy;
00453       fi.pdpz=fPdpz;
00454       fi.ppdxdz=fPpdxdz;
00455       fi.ppdydz=fPpdydz;
00456       fi.pppz=fPppz;
00457       fi.ppenergy=fPpenergy;
00458       fi.ppmedium=fPpmedium;
00459       fi.ptype=fPtype;
00460       fi.ppvx=fPpvx;
00461       fi.ppvy=fPpvy;
00462       fi.ppvz=fPpvz;
00463       fi.muparpx=fMuparpx;
00464       fi.muparpy=fMuparpy;
00465       fi.muparpz=fMuparpz;
00466       fi.mupare=fMupare;
00467       fi.necm=fNecm;
00468       fi.nimpwt=fNimpwt;
00469       fi.xpoint=fXpoint;
00470       fi.ypoint=fYpoint;
00471       fi.zpoint=fZpoint;
00472       fi.tvx=fX;
00473       fi.tvy=fY;
00474       fi.tvz=fZ;
00475       fi.tpx=fPX;
00476       fi.tpy=fPY;
00477       fi.tpz=fPZ;
00478       fi.tptype=GEANTtoPDG(fPID);
00479       fi.tgen=fGen;
00480     }
00481     else {
00482       //couldn't find the parent
00483       //return muon parameters
00484       fi.index=-1;
00485       fi.fluxrun=runnum;
00486       fi.fluxevtno=evtnum;
00487       fi.ndxdz=fMuNdxdz;
00488       fi.ndydz=fMuNdydz;
00489       fi.npz=fMuNpz;
00490       fi.nenergy=fMuNenergy;
00491       fi.ndxdznear=fMuNdxdznear;
00492       fi.ndydznear=fMuNdydznear;
00493       fi.nenergynear=fMuNenergynear;
00494       fi.nwtnear=fMuNwtnear;
00495       fi.ndxdzfar=fMuNdxdzfar;
00496       fi.ndydzfar=fMuNdydzfar;
00497       fi.nenergyfar=fMuNenergyfar;
00498       fi.nwtfar=fMuNwtfar;
00499       fi.norig=fMuNorig;
00500       fi.ndecay=fMuNdecay;
00501       fi.ntype=fMuNtype;
00502       fi.vx=fMuVx;
00503       fi.vy=fMuVy;
00504       fi.vz=fMuVz;
00505       fi.pdpx=fMuPdpx;
00506       fi.pdpy=fMuPdpy;
00507       fi.pdpz=fMuPdpz;
00508       fi.ppdxdz=fMuPpdxdz;
00509       fi.ppdydz=fMuPpdydz;
00510       fi.pppz=fMuPppz;
00511       fi.ppenergy=fMuPpenergy;
00512       fi.ppmedium=fMuPpmedium;
00513       fi.ptype=fMuPtype;
00514       fi.ppvx=fMuPpvx;
00515       fi.ppvy=fMuPpvy;
00516       fi.ppvz=fMuPpvz;
00517       fi.muparpx=fMuMuparpx;
00518       fi.muparpy=fMuMuparpy;
00519       fi.muparpz=fMuMuparpz;
00520       fi.mupare=fMuMupare;
00521       fi.necm=fMuNecm;
00522       fi.nimpwt=fMuNimpwt;
00523       fi.xpoint=fMuXpoint;
00524       fi.ypoint=fMuYpoint;
00525       fi.zpoint=fMuZpoint;
00526       fi.tvx=fMuX;
00527       fi.tvy=fMuY;
00528       fi.tvz=fMuZ;
00529       fi.tpx=fMuPX;
00530       fi.tpy=fMuPY;
00531       fi.tpz=fMuPZ;
00532       fi.tptype=GEANTtoPDG(fMuPID);
00533       fi.tgen=fMuGen;
00534     }
00535   }
00536   else {
00537     //have no info about this event
00538     //return zeros
00539       fi.index=-1;
00540       fi.fluxrun=runnum;
00541       fi.fluxevtno=evtnum;
00542       fi.ndxdz=0.;
00543       fi.ndydz=0.;
00544       fi.npz=0.;
00545       fi.nenergy=0.;
00546       fi.ndxdznear=0.;
00547       fi.ndydznear=0.;
00548       fi.nenergynear=0.;
00549       fi.nwtnear=0.;
00550       fi.ndxdzfar=0.;
00551       fi.ndydzfar=0.;
00552       fi.nenergyfar=0.;
00553       fi.nwtfar=0.;
00554       fi.norig=0;
00555       fi.ndecay=0;
00556       fi.ntype=0;
00557       fi.vx=0.;
00558       fi.vy=0.;
00559       fi.vz=0.;
00560       fi.pdpx=0.;
00561       fi.pdpy=0.;
00562       fi.pdpz=0.;
00563       fi.ppdxdz=0.;
00564       fi.ppdydz=0.;
00565       fi.pppz=0.;
00566       fi.ppenergy=0.;
00567       fi.ppmedium=0;
00568       fi.ptype=0;
00569       fi.ppvx=0.;
00570       fi.ppvy=0.;
00571       fi.ppvz=0.;
00572       fi.muparpx=0.;
00573       fi.muparpy=0.;
00574       fi.muparpz=0.;
00575       fi.mupare=0.;
00576       fi.necm=0.;
00577       fi.nimpwt=0.;
00578       fi.xpoint=0.;
00579       fi.ypoint=0.;
00580       fi.zpoint=0.;
00581       fi.tvx=0.;
00582       fi.tvy=0.;
00583       fi.tvz=0.;
00584       fi.tpx=0.;
00585       fi.tpy=0.;
00586       fi.tpz=0.;
00587       fi.tptype=0;
00588       fi.tgen=0;
00589   }
00590 }

void MuParentHelper::GetMuParent ( Int_t  runnum,
Int_t  evtnum,
Float_t  mu_tpx,
Float_t  mu_tpy,
Float_t  mu_tpz,
NuParent par 
)

Definition at line 216 of file MuParentHelper.cxx.

References MuELoss::e, fEvtNum, fGen, fMuGen, fMuPID, fMuPX, fMuPY, fMuPZ, fMuX, fMuY, fMuZ, fPID, fPX, fPY, fPZ, fRunNum, fTree, fVec, fX, fY, fZ, GEANTtoPDG(), Munits::second, NuParent::SetGen(), NuParent::SetPID(), NuParent::SetPx(), NuParent::SetPy(), NuParent::SetPz(), NuParent::SetX(), NuParent::SetY(), and NuParent::SetZ().

Referenced by FillANtpTruth(), GetMuParent(), and MCFluxInfoAna::ResetMuParentInfo().

00219 {
00220   const std::map<Int_t,std::map<Int_t,Int_t> >::const_iterator run_it = fVec.find(runnum);
00221   if(run_it == fVec.end())
00222   {
00223     //     std::cerr << "MuParentHelper: failed to find run number " << runnum << endl;
00224      return;
00225   }
00226 
00227   const std::map<Int_t,Int_t> &evt_map = run_it -> second;
00228   const std::map<Int_t,Int_t>::const_iterator evt_it = evt_map.find(evtnum);
00229   if(evt_it == evt_map.end())
00230   {
00231     //     std::cerr << "MuParentHelper: failed to find event number " << evtnum << endl;
00232      return;
00233   }
00234   
00235   const int entry = evt_it -> second;
00236 
00237   fTree->GetEntry(entry);
00238   if(runnum==fRunNum && evtnum==fEvtNum &&
00239      2.*TMath::Abs(mu_tpx-fMuPX)/(mu_tpx+fMuPX)<1e-4 && 
00240      2.*TMath::Abs(mu_tpy-fMuPY)/(mu_tpy+fMuPY)<1e-4 && 
00241      2.*TMath::Abs(mu_tpz-fMuPZ)/(mu_tpz+fMuPZ)<1e-4) {    
00242     //have an entry in the tree:
00243     if(fPID!=0 && fGen!=0) {
00244       //found parent!
00245       //return parent info
00246       par.SetX(fX);
00247       par.SetY(fY);
00248       par.SetZ(fZ);
00249       par.SetPx(fPX);
00250       par.SetPy(fPY);
00251       par.SetPz(fPZ);
00252       par.SetPID(GEANTtoPDG(fPID));
00253       par.SetGen(fGen);
00254     }
00255     else {
00256       //couldn't find the parent
00257       //return muon parameters
00258       par.SetX(fMuX);
00259       par.SetY(fMuY);
00260       par.SetZ(fMuZ);
00261       par.SetPx(fMuPX);
00262       par.SetPy(fMuPY);
00263       par.SetPz(fMuPZ);
00264       par.SetPID(GEANTtoPDG(fMuPID));
00265       par.SetGen(fMuGen);
00266     }
00267   }
00268   else {
00269     //have no info about this event
00270     //return zeros
00271     par.SetX(0);
00272     par.SetY(0);
00273     par.SetZ(0);
00274     par.SetPx(0);
00275     par.SetPy(0);
00276     par.SetPz(0);
00277     par.SetPID(0);
00278     par.SetGen(0);
00279   }
00280 }

Bool_t MuParentHelper::OpenFile (  )  [private]

Definition at line 55 of file MuParentHelper.cxx.

References fdir, fFile, fok, fTree, and fusemini.

Referenced by MuParentHelper(), and SetFileDir().

00056 {
00057   if(fFile) {
00058     fFile->Close();
00059     delete fFile;       //delete TFile
00060   }
00061   char name[256];
00062   char slash = '/';
00063   TString st(fdir.c_str());  
00064   st.Remove(0,st.Last(slash)+1);
00065   if(fusemini){
00066     sprintf(name,"%s/mupiTreeMini_%s.root",fdir.c_str(),st.Data());
00067   }
00068   else{
00069     sprintf(name,"%s/mupiTree_%s.root",fdir.c_str(),st.Data());
00070   }
00071   cout << name << endl;
00072   fFile = new TFile(name,"READ");
00073   if(fFile->IsOpen() && !fFile->IsZombie()){
00074     fTree = (TTree*) fFile->Get("mupitree");
00075     fok = true;
00076     return true;
00077   }
00078   return false;
00079 }

void MuParentHelper::SetAddresses (  )  [private]

Definition at line 82 of file MuParentHelper.cxx.

References fEvtNum, fGen, fMuGen, fMuMupare, fMuMuparpx, fMuMuparpy, fMuMuparpz, fMuNdecay, fMuNdxdz, fMuNdxdzfar, fMuNdxdznear, fMuNdydz, fMuNdydzfar, fMuNdydznear, fMuNecm, fMuNenergy, fMuNenergyfar, fMuNenergynear, fMuNimpwt, fMuNorig, fMuNpz, fMuNtype, fMuNwtfar, fMuNwtnear, fMupare, fMuparpx, fMuparpy, fMuparpz, fMuPdpx, fMuPdpy, fMuPdpz, fMuPID, fMuPpdxdz, fMuPpdydz, fMuPpenergy, fMuPpmedium, fMuPppz, fMuPpvx, fMuPpvy, fMuPpvz, fMuPtype, fMuPX, fMuPY, fMuPZ, fMuVx, fMuVy, fMuVz, fMuX, fMuXpoint, fMuY, fMuYpoint, fMuZ, fMuZpoint, fNdecay, fNdxdz, fNdxdzfar, fNdxdznear, fNdydz, fNdydzfar, fNdydznear, fNecm, fNenergy, fNenergyfar, fNenergynear, fNimpwt, fNorig, fNpz, fNtype, fNwtfar, fNwtnear, fok, fPdpx, fPdpy, fPdpz, fPID, fPpdxdz, fPpdydz, fPpenergy, fPpmedium, fPppz, fPpvx, fPpvy, fPpvz, fPtype, fPX, fPY, fPZ, fRunNum, fTree, fusemini, fVx, fVy, fVz, fX, fXpoint, fY, fYpoint, fZ, and fZpoint.

Referenced by MuParentHelper(), and SetFileDir().

00083 {
00084   if(!fok) return;  
00085   fTree->SetBranchAddress("run",&fRunNum);
00086   fTree->SetBranchAddress("evtno",&fEvtNum);
00087   fTree->SetBranchAddress("tvx",&fX);
00088   fTree->SetBranchAddress("tvy",&fY);
00089   fTree->SetBranchAddress("tvz",&fZ);
00090   fTree->SetBranchAddress("tpx",&fPX);
00091   fTree->SetBranchAddress("tpy",&fPY);
00092   fTree->SetBranchAddress("tpz",&fPZ);
00093   fTree->SetBranchAddress("tptype",&fPID);
00094   fTree->SetBranchAddress("tgen",&fGen);
00095   if(!fusemini){
00096     fTree->SetBranchAddress("Ndxdz",&fNdxdz);
00097     fTree->SetBranchAddress("Ndydz",&fNdydz);
00098     fTree->SetBranchAddress("Npz",&fNpz);
00099     fTree->SetBranchAddress("Nenergy",&fNenergy);
00100     fTree->SetBranchAddress("Ndxdznea",&fNdxdznear);
00101     fTree->SetBranchAddress("Ndydznea",&fNdydznear);
00102     fTree->SetBranchAddress("Nenergyn",&fNenergynear);
00103     fTree->SetBranchAddress("Nwtnear",&fNwtnear);
00104     fTree->SetBranchAddress("Ndxdzfar",&fNdxdzfar);
00105     fTree->SetBranchAddress("Ndydzfar",&fNdydzfar);
00106     fTree->SetBranchAddress("Nenergyf",&fNenergyfar);
00107     fTree->SetBranchAddress("Nwtfar",&fNwtfar);
00108     fTree->SetBranchAddress("Norig",&fNorig);
00109     fTree->SetBranchAddress("Ndecay",&fNdecay);
00110     fTree->SetBranchAddress("Ntype",&fNtype);
00111     fTree->SetBranchAddress("Vx",&fVx);
00112     fTree->SetBranchAddress("Vy",&fVy);
00113     fTree->SetBranchAddress("Vz",&fVz);
00114     fTree->SetBranchAddress("pdpx",&fPdpx);
00115     fTree->SetBranchAddress("pdpy",&fPdpy);
00116     fTree->SetBranchAddress("pdpz",&fPdpz);  
00117     fTree->SetBranchAddress("ppdxdz",&fPpdxdz);
00118     fTree->SetBranchAddress("ppdydz",&fPpdydz);
00119     fTree->SetBranchAddress("pppz",&fPppz);  
00120     fTree->SetBranchAddress("ppenergy",&fPpenergy);
00121     fTree->SetBranchAddress("ppmedium",&fPpmedium);
00122     fTree->SetBranchAddress("ptype",&fPtype);
00123     fTree->SetBranchAddress("ppvx",&fPpvx);
00124     fTree->SetBranchAddress("ppvy",&fPpvy);
00125     fTree->SetBranchAddress("ppvz",&fPpvz);
00126     fTree->SetBranchAddress("muparpx",&fMuparpx);
00127     fTree->SetBranchAddress("muparpy",&fMuparpy);
00128     fTree->SetBranchAddress("muparpz",&fMuparpz);
00129     fTree->SetBranchAddress("mupare",&fMupare);
00130     fTree->SetBranchAddress("Necm",&fNecm);
00131     fTree->SetBranchAddress("Nimpwt",&fNimpwt);
00132     fTree->SetBranchAddress("xpoint",&fXpoint);
00133     fTree->SetBranchAddress("ypoint",&fYpoint);
00134     fTree->SetBranchAddress("zpoint",&fZpoint);
00135   }
00136 
00137   fTree->SetBranchAddress("mu_tvx",&fMuX);
00138   fTree->SetBranchAddress("mu_tvy",&fMuY);
00139   fTree->SetBranchAddress("mu_tvz",&fMuZ);
00140   fTree->SetBranchAddress("mu_tpx",&fMuPX);
00141   fTree->SetBranchAddress("mu_tpy",&fMuPY);
00142   fTree->SetBranchAddress("mu_tpz",&fMuPZ);
00143   fTree->SetBranchAddress("mu_tptype",&fMuPID);
00144   fTree->SetBranchAddress("mu_tgen",&fMuGen);
00145   if(!fusemini){
00146     fTree->SetBranchAddress("mu_Ndxdz",&fMuNdxdz);
00147     fTree->SetBranchAddress("mu_Ndydz",&fMuNdydz);
00148     fTree->SetBranchAddress("mu_Npz",&fMuNpz);
00149     fTree->SetBranchAddress("mu_Nenergy",&fMuNenergy);
00150     fTree->SetBranchAddress("mu_Ndxdznea",&fMuNdxdznear);
00151     fTree->SetBranchAddress("mu_Ndydznea",&fMuNdydznear);
00152     fTree->SetBranchAddress("mu_Nenergyn",&fMuNenergynear);
00153     fTree->SetBranchAddress("mu_Nwtnear",&fMuNwtnear);
00154     fTree->SetBranchAddress("mu_Ndxdzfar",&fMuNdxdzfar);
00155     fTree->SetBranchAddress("mu_Ndydzfar",&fMuNdydzfar);
00156     fTree->SetBranchAddress("mu_Nenergyf",&fMuNenergyfar);
00157     fTree->SetBranchAddress("mu_Nwtfar",&fMuNwtfar);
00158     fTree->SetBranchAddress("mu_Norig",&fMuNorig);
00159     fTree->SetBranchAddress("mu_Ndecay",&fMuNdecay);
00160     fTree->SetBranchAddress("mu_Ntype",&fMuNtype);
00161     fTree->SetBranchAddress("mu_Vx",&fMuVx);
00162     fTree->SetBranchAddress("mu_Vy",&fMuVy);
00163     fTree->SetBranchAddress("mu_Vz",&fMuVz);
00164     fTree->SetBranchAddress("mu_pdpx",&fMuPdpx);
00165     fTree->SetBranchAddress("mu_pdpy",&fMuPdpy);
00166     fTree->SetBranchAddress("mu_pdpz",&fMuPdpz);  
00167     fTree->SetBranchAddress("mu_ppdxdz",&fMuPpdxdz);
00168     fTree->SetBranchAddress("mu_ppdydz",&fMuPpdydz);
00169     fTree->SetBranchAddress("mu_pppz",&fMuPppz);  
00170     fTree->SetBranchAddress("mu_ppenergy",&fMuPpenergy);
00171     fTree->SetBranchAddress("mu_ppmedium",&fMuPpmedium);
00172     fTree->SetBranchAddress("mu_ptype",&fMuPtype);
00173     fTree->SetBranchAddress("mu_ppvx",&fMuPpvx);
00174     fTree->SetBranchAddress("mu_ppvy",&fMuPpvy);
00175     fTree->SetBranchAddress("mu_ppvz",&fMuPpvz);
00176     fTree->SetBranchAddress("mu_muparpx",&fMuMuparpx);
00177     fTree->SetBranchAddress("mu_muparpy",&fMuMuparpy);
00178     fTree->SetBranchAddress("mu_muparpz",&fMuMuparpz);
00179     fTree->SetBranchAddress("mu_mupare",&fMuMupare);
00180     fTree->SetBranchAddress("mu_Necm",&fMuNecm);
00181     fTree->SetBranchAddress("mu_Nimpwt",&fMuNimpwt);
00182     fTree->SetBranchAddress("mu_xpoint",&fMuXpoint);
00183     fTree->SetBranchAddress("mu_ypoint",&fMuYpoint);
00184     fTree->SetBranchAddress("mu_zpoint",&fMuZpoint);
00185   }
00186 }

Bool_t MuParentHelper::SetFileDir ( std::string  dir,
bool  usemini = true 
)

Definition at line 42 of file MuParentHelper.cxx.

References fdir, fusemini, OpenFile(), SetAddresses(), and SetVectorEntries().

Referenced by NueModule::Analyze().

00043 {
00044   fdir = dir;
00045   fusemini=usemini;
00046   if(OpenFile()) {
00047     SetAddresses();
00048     SetVectorEntries();
00049     return true;
00050   }
00051   return false;
00052 } 

void MuParentHelper::SetUseFullFile (  )  [inline]

Definition at line 135 of file MuParentHelper.h.

References fusemini.

00135 {fusemini=false;}

void MuParentHelper::SetVectorEntries (  )  [private]

Definition at line 189 of file MuParentHelper.cxx.

References fEvtNum, fok, fRunNum, fTree, fVec, and nentries.

Referenced by MuParentHelper(), and SetFileDir().

00190 {
00191   if(!fok) return;
00192   map<Int_t,map<Int_t,Int_t> >::iterator beg = fVec.begin();
00193   map<Int_t,map<Int_t,Int_t> >::iterator end = fVec.end();
00194   while(beg!=end){
00195     beg->second.clear();
00196   }
00197   fVec.clear();
00198   Int_t nentries = fTree->GetEntries();
00199   for(int i=0;i<nentries;i++){
00200     fTree->GetEntry(i);
00201     fVec[fRunNum][fEvtNum] = i;
00202   }
00203 }

Bool_t MuParentHelper::Status (  )  const [inline]

Definition at line 136 of file MuParentHelper.h.

References fok.

00136 {return fok;};


Member Data Documentation

std::string MuParentHelper::fdir [private]

Definition at line 22 of file MuParentHelper.h.

Referenced by MuParentHelper(), OpenFile(), and SetFileDir().

Int_t MuParentHelper::fEvtNum [private]

Definition at line 32 of file MuParentHelper.h.

Referenced by GetMuDaughter(), GetMuParent(), SetAddresses(), and SetVectorEntries().

TFile* MuParentHelper::fFile [private]

Definition at line 19 of file MuParentHelper.h.

Referenced by CloseFile(), MuParentHelper(), and OpenFile().

Int_t MuParentHelper::fGen [private]

Definition at line 40 of file MuParentHelper.h.

Referenced by GetMuDaughter(), GetMuParent(), and SetAddresses().

Int_t MuParentHelper::fMuGen [private]

Definition at line 89 of file MuParentHelper.h.

Referenced by GetMuDaughter(), GetMuParent(), and SetAddresses().

Float_t MuParentHelper::fMuMupare [private]

Definition at line 123 of file MuParentHelper.h.

Referenced by GetMuDaughter(), GetMuParent(), and SetAddresses().

Float_t MuParentHelper::fMuMuparpx [private]

Definition at line 120 of file MuParentHelper.h.

Referenced by GetMuDaughter(), GetMuParent(), and SetAddresses().

Float_t MuParentHelper::fMuMuparpy [private]

Definition at line 121 of file MuParentHelper.h.

Referenced by GetMuDaughter(), GetMuParent(), and SetAddresses().

Float_t MuParentHelper::fMuMuparpz [private]

Definition at line 122 of file MuParentHelper.h.

Referenced by GetMuDaughter(), GetMuParent(), and SetAddresses().

Int_t MuParentHelper::fMuNdecay [private]

Definition at line 103 of file MuParentHelper.h.

Referenced by GetMuDaughter(), GetMuParent(), and SetAddresses().

Float_t MuParentHelper::fMuNdxdz [private]

Definition at line 90 of file MuParentHelper.h.

Referenced by GetMuDaughter(), GetMuParent(), and SetAddresses().

Float_t MuParentHelper::fMuNdxdzfar [private]

Definition at line 98 of file MuParentHelper.h.

Referenced by GetMuDaughter(), GetMuParent(), and SetAddresses().

Float_t MuParentHelper::fMuNdxdznear [private]

Definition at line 94 of file MuParentHelper.h.

Referenced by GetMuDaughter(), GetMuParent(), and SetAddresses().

Float_t MuParentHelper::fMuNdydz [private]

Definition at line 91 of file MuParentHelper.h.

Referenced by GetMuDaughter(), GetMuParent(), and SetAddresses().

Float_t MuParentHelper::fMuNdydzfar [private]

Definition at line 99 of file MuParentHelper.h.

Referenced by GetMuDaughter(), GetMuParent(), and SetAddresses().

Float_t MuParentHelper::fMuNdydznear [private]

Definition at line 95 of file MuParentHelper.h.

Referenced by GetMuDaughter(), GetMuParent(), and SetAddresses().

Float_t MuParentHelper::fMuNecm [private]

Definition at line 124 of file MuParentHelper.h.

Referenced by GetMuDaughter(), GetMuParent(), and SetAddresses().

Float_t MuParentHelper::fMuNenergy [private]

Definition at line 93 of file MuParentHelper.h.

Referenced by GetMuDaughter(), GetMuParent(), and SetAddresses().

Float_t MuParentHelper::fMuNenergyfar [private]

Definition at line 100 of file MuParentHelper.h.

Referenced by GetMuDaughter(), GetMuParent(), and SetAddresses().

Float_t MuParentHelper::fMuNenergynear [private]

Definition at line 96 of file MuParentHelper.h.

Referenced by GetMuDaughter(), GetMuParent(), and SetAddresses().

Float_t MuParentHelper::fMuNimpwt [private]

Definition at line 125 of file MuParentHelper.h.

Referenced by GetMuDaughter(), GetMuParent(), and SetAddresses().

Int_t MuParentHelper::fMuNorig [private]

Definition at line 102 of file MuParentHelper.h.

Referenced by GetMuDaughter(), GetMuParent(), and SetAddresses().

Float_t MuParentHelper::fMuNpz [private]

Definition at line 92 of file MuParentHelper.h.

Referenced by GetMuDaughter(), GetMuParent(), and SetAddresses().

Int_t MuParentHelper::fMuNtype [private]

Definition at line 104 of file MuParentHelper.h.

Referenced by GetMuDaughter(), GetMuParent(), and SetAddresses().

Float_t MuParentHelper::fMuNwtfar [private]

Definition at line 101 of file MuParentHelper.h.

Referenced by GetMuDaughter(), GetMuParent(), and SetAddresses().

Float_t MuParentHelper::fMuNwtnear [private]

Definition at line 97 of file MuParentHelper.h.

Referenced by GetMuDaughter(), GetMuParent(), and SetAddresses().

Float_t MuParentHelper::fMupare [private]

Definition at line 74 of file MuParentHelper.h.

Referenced by GetMuParent(), and SetAddresses().

Float_t MuParentHelper::fMuparpx [private]

Definition at line 71 of file MuParentHelper.h.

Referenced by GetMuParent(), and SetAddresses().

Float_t MuParentHelper::fMuparpy [private]

Definition at line 72 of file MuParentHelper.h.

Referenced by GetMuParent(), and SetAddresses().

Float_t MuParentHelper::fMuparpz [private]

Definition at line 73 of file MuParentHelper.h.

Referenced by GetMuParent(), and SetAddresses().

Float_t MuParentHelper::fMuPdpx [private]

Definition at line 108 of file MuParentHelper.h.

Referenced by GetMuDaughter(), GetMuParent(), and SetAddresses().

Float_t MuParentHelper::fMuPdpy [private]

Definition at line 109 of file MuParentHelper.h.

Referenced by GetMuDaughter(), GetMuParent(), and SetAddresses().

Float_t MuParentHelper::fMuPdpz [private]

Definition at line 110 of file MuParentHelper.h.

Referenced by GetMuDaughter(), GetMuParent(), and SetAddresses().

Int_t MuParentHelper::fMuPID [private]

Definition at line 88 of file MuParentHelper.h.

Referenced by GetMuParent(), and SetAddresses().

Float_t MuParentHelper::fMuPpdxdz [private]

Definition at line 111 of file MuParentHelper.h.

Referenced by GetMuDaughter(), GetMuParent(), and SetAddresses().

Float_t MuParentHelper::fMuPpdydz [private]

Definition at line 112 of file MuParentHelper.h.

Referenced by GetMuDaughter(), GetMuParent(), and SetAddresses().

Float_t MuParentHelper::fMuPpenergy [private]

Definition at line 114 of file MuParentHelper.h.

Referenced by GetMuDaughter(), GetMuParent(), and SetAddresses().

Int_t MuParentHelper::fMuPpmedium [private]

Definition at line 115 of file MuParentHelper.h.

Referenced by GetMuDaughter(), GetMuParent(), and SetAddresses().

Float_t MuParentHelper::fMuPppz [private]

Definition at line 113 of file MuParentHelper.h.

Referenced by GetMuDaughter(), GetMuParent(), and SetAddresses().

Float_t MuParentHelper::fMuPpvx [private]

Definition at line 117 of file MuParentHelper.h.

Referenced by GetMuDaughter(), GetMuParent(), and SetAddresses().

Float_t MuParentHelper::fMuPpvy [private]

Definition at line 118 of file MuParentHelper.h.

Referenced by GetMuDaughter(), GetMuParent(), and SetAddresses().

Float_t MuParentHelper::fMuPpvz [private]

Definition at line 119 of file MuParentHelper.h.

Referenced by GetMuDaughter(), GetMuParent(), and SetAddresses().

Int_t MuParentHelper::fMuPtype [private]

Definition at line 116 of file MuParentHelper.h.

Referenced by GetMuDaughter(), GetMuParent(), and SetAddresses().

Float_t MuParentHelper::fMuPX [private]

Definition at line 85 of file MuParentHelper.h.

Referenced by GetMuDaughter(), GetMuParent(), and SetAddresses().

Float_t MuParentHelper::fMuPY [private]

Definition at line 86 of file MuParentHelper.h.

Referenced by GetMuDaughter(), GetMuParent(), and SetAddresses().

Float_t MuParentHelper::fMuPZ [private]

Definition at line 87 of file MuParentHelper.h.

Referenced by GetMuDaughter(), GetMuParent(), and SetAddresses().

Float_t MuParentHelper::fMuVx [private]

Definition at line 105 of file MuParentHelper.h.

Referenced by GetMuDaughter(), GetMuParent(), and SetAddresses().

Float_t MuParentHelper::fMuVy [private]

Definition at line 106 of file MuParentHelper.h.

Referenced by GetMuDaughter(), GetMuParent(), and SetAddresses().

Float_t MuParentHelper::fMuVz [private]

Definition at line 107 of file MuParentHelper.h.

Referenced by GetMuDaughter(), GetMuParent(), and SetAddresses().

Float_t MuParentHelper::fMuX [private]

Definition at line 82 of file MuParentHelper.h.

Referenced by GetMuDaughter(), GetMuParent(), and SetAddresses().

Float_t MuParentHelper::fMuXpoint [private]

Definition at line 126 of file MuParentHelper.h.

Referenced by GetMuDaughter(), GetMuParent(), and SetAddresses().

Float_t MuParentHelper::fMuY [private]

Definition at line 83 of file MuParentHelper.h.

Referenced by GetMuDaughter(), GetMuParent(), and SetAddresses().

Float_t MuParentHelper::fMuYpoint [private]

Definition at line 127 of file MuParentHelper.h.

Referenced by GetMuDaughter(), GetMuParent(), and SetAddresses().

Float_t MuParentHelper::fMuZ [private]

Definition at line 84 of file MuParentHelper.h.

Referenced by GetMuDaughter(), GetMuParent(), and SetAddresses().

Float_t MuParentHelper::fMuZpoint [private]

Definition at line 128 of file MuParentHelper.h.

Referenced by GetMuDaughter(), GetMuParent(), and SetAddresses().

Int_t MuParentHelper::fNdecay [private]

Definition at line 54 of file MuParentHelper.h.

Referenced by GetMuParent(), and SetAddresses().

Float_t MuParentHelper::fNdxdz [private]

Definition at line 41 of file MuParentHelper.h.

Referenced by GetMuParent(), and SetAddresses().

Float_t MuParentHelper::fNdxdzfar [private]

Definition at line 49 of file MuParentHelper.h.

Referenced by GetMuParent(), and SetAddresses().

Float_t MuParentHelper::fNdxdznear [private]

Definition at line 45 of file MuParentHelper.h.

Referenced by GetMuParent(), and SetAddresses().

Float_t MuParentHelper::fNdydz [private]

Definition at line 42 of file MuParentHelper.h.

Referenced by GetMuParent(), and SetAddresses().

Float_t MuParentHelper::fNdydzfar [private]

Definition at line 50 of file MuParentHelper.h.

Referenced by GetMuParent(), and SetAddresses().

Float_t MuParentHelper::fNdydznear [private]

Definition at line 46 of file MuParentHelper.h.

Referenced by GetMuParent(), and SetAddresses().

Float_t MuParentHelper::fNecm [private]

Definition at line 75 of file MuParentHelper.h.

Referenced by GetMuParent(), and SetAddresses().

Float_t MuParentHelper::fNenergy [private]

Definition at line 44 of file MuParentHelper.h.

Referenced by GetMuParent(), and SetAddresses().

Float_t MuParentHelper::fNenergyfar [private]

Definition at line 51 of file MuParentHelper.h.

Referenced by GetMuParent(), and SetAddresses().

Float_t MuParentHelper::fNenergynear [private]

Definition at line 47 of file MuParentHelper.h.

Referenced by GetMuParent(), and SetAddresses().

Float_t MuParentHelper::fNimpwt [private]

Definition at line 76 of file MuParentHelper.h.

Referenced by GetMuParent(), and SetAddresses().

Int_t MuParentHelper::fNorig [private]

Definition at line 53 of file MuParentHelper.h.

Referenced by GetMuParent(), and SetAddresses().

Float_t MuParentHelper::fNpz [private]

Definition at line 43 of file MuParentHelper.h.

Referenced by GetMuParent(), and SetAddresses().

Int_t MuParentHelper::fNtype [private]

Definition at line 55 of file MuParentHelper.h.

Referenced by GetMuParent(), and SetAddresses().

Float_t MuParentHelper::fNwtfar [private]

Definition at line 52 of file MuParentHelper.h.

Referenced by GetMuParent(), and SetAddresses().

Float_t MuParentHelper::fNwtnear [private]

Definition at line 48 of file MuParentHelper.h.

Referenced by GetMuParent(), and SetAddresses().

Bool_t MuParentHelper::fok [private]
Float_t MuParentHelper::fPdpx [private]

Definition at line 59 of file MuParentHelper.h.

Referenced by GetMuParent(), and SetAddresses().

Float_t MuParentHelper::fPdpy [private]

Definition at line 60 of file MuParentHelper.h.

Referenced by GetMuParent(), and SetAddresses().

Float_t MuParentHelper::fPdpz [private]

Definition at line 61 of file MuParentHelper.h.

Referenced by GetMuParent(), and SetAddresses().

Int_t MuParentHelper::fPID [private]

Definition at line 39 of file MuParentHelper.h.

Referenced by GetMuDaughter(), GetMuParent(), and SetAddresses().

Float_t MuParentHelper::fPpdxdz [private]

Definition at line 62 of file MuParentHelper.h.

Referenced by GetMuParent(), and SetAddresses().

Float_t MuParentHelper::fPpdydz [private]

Definition at line 63 of file MuParentHelper.h.

Referenced by GetMuParent(), and SetAddresses().

Float_t MuParentHelper::fPpenergy [private]

Definition at line 65 of file MuParentHelper.h.

Referenced by GetMuParent(), and SetAddresses().

Int_t MuParentHelper::fPpmedium [private]

Definition at line 66 of file MuParentHelper.h.

Referenced by GetMuParent(), and SetAddresses().

Float_t MuParentHelper::fPppz [private]

Definition at line 64 of file MuParentHelper.h.

Referenced by GetMuParent(), and SetAddresses().

Float_t MuParentHelper::fPpvx [private]

Definition at line 68 of file MuParentHelper.h.

Referenced by GetMuParent(), and SetAddresses().

Float_t MuParentHelper::fPpvy [private]

Definition at line 69 of file MuParentHelper.h.

Referenced by GetMuParent(), and SetAddresses().

Float_t MuParentHelper::fPpvz [private]

Definition at line 70 of file MuParentHelper.h.

Referenced by GetMuParent(), and SetAddresses().

Int_t MuParentHelper::fPtype [private]

Definition at line 67 of file MuParentHelper.h.

Referenced by GetMuParent(), and SetAddresses().

Float_t MuParentHelper::fPX [private]

Definition at line 36 of file MuParentHelper.h.

Referenced by GetMuDaughter(), GetMuParent(), and SetAddresses().

Float_t MuParentHelper::fPY [private]

Definition at line 37 of file MuParentHelper.h.

Referenced by GetMuDaughter(), GetMuParent(), and SetAddresses().

Float_t MuParentHelper::fPZ [private]

Definition at line 38 of file MuParentHelper.h.

Referenced by GetMuDaughter(), GetMuParent(), and SetAddresses().

Int_t MuParentHelper::fRunNum [private]

Definition at line 31 of file MuParentHelper.h.

Referenced by GetMuDaughter(), GetMuParent(), SetAddresses(), and SetVectorEntries().

TTree* MuParentHelper::fTree [private]
Bool_t MuParentHelper::fusemini [private]

Definition at line 29 of file MuParentHelper.h.

Referenced by MuParentHelper(), OpenFile(), SetAddresses(), SetFileDir(), and SetUseFullFile().

std::map<Int_t,std::map<Int_t,Int_t> > MuParentHelper::fVec [private]

Definition at line 21 of file MuParentHelper.h.

Referenced by GetMuDaughter(), GetMuParent(), and SetVectorEntries().

Float_t MuParentHelper::fVx [private]

Definition at line 56 of file MuParentHelper.h.

Referenced by GetMuParent(), and SetAddresses().

Float_t MuParentHelper::fVy [private]

Definition at line 57 of file MuParentHelper.h.

Referenced by GetMuParent(), and SetAddresses().

Float_t MuParentHelper::fVz [private]

Definition at line 58 of file MuParentHelper.h.

Referenced by GetMuParent(), and SetAddresses().

Float_t MuParentHelper::fX [private]

Definition at line 33 of file MuParentHelper.h.

Referenced by GetMuParent(), and SetAddresses().

Float_t MuParentHelper::fXpoint [private]

Definition at line 77 of file MuParentHelper.h.

Referenced by GetMuParent(), and SetAddresses().

Float_t MuParentHelper::fY [private]

Definition at line 34 of file MuParentHelper.h.

Referenced by GetMuParent(), and SetAddresses().

Float_t MuParentHelper::fYpoint [private]

Definition at line 78 of file MuParentHelper.h.

Referenced by GetMuParent(), and SetAddresses().

Float_t MuParentHelper::fZ [private]

Definition at line 35 of file MuParentHelper.h.

Referenced by GetMuParent(), and SetAddresses().

Float_t MuParentHelper::fZpoint [private]

Definition at line 79 of file MuParentHelper.h.

Referenced by GetMuParent(), and SetAddresses().


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

Generated on 2 Nov 2017 for loon by  doxygen 1.6.1