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

infid_sr_interface.h

Go to the documentation of this file.
00001 
00002 // $Id: infid_sr_interface.h,v 1.3 2008/02/04 18:11:14 rhatcher Exp $
00003 //
00004 // infid_sr_interface
00005 //
00006 // SR interface for Fiducial volume cuts
00007 //
00008 // Author:  J. Hartnell & R. Hatcher
00009 //
00011 
00012 #ifndef INFID_SR_INTERFACE_H
00013 #define INFID_SR_INTERFACE_H
00014 
00015 #if !defined(__CINT__) || defined(__MAKECINT__)
00016 #include <iostream>
00017 #endif
00018 
00019 #include "CandNtupleSR/NtpSREvent.h"
00020 #include "CandNtupleSR/NtpSRTrack.h"
00021 #include "CandNtupleSR/NtpSRShower.h"
00022 #include "StandardNtuple/NtpStRecord.h"
00023 
00024 #include "Conventions/Detector.h"
00025 #include "Conventions/SimFlag.h"
00026 
00027 #include "DataUtil/infid.h"
00028 
00029 //
00030 // Standard user interface
00031 //
00032 
00033 bool infid(const NtpStRecord& ntp,const NtpSREvent& evt);
00034 bool infid(const NtpStRecord& ntp,const NtpSRTrack& trk);
00035 bool infid(const NtpStRecord& ntp,const NtpSRShower& shw);
00036 
00037 //
00038 // Actual definitions
00039 //
00040 
00041 //......................................................................
00042 
00043 inline bool infid(const NtpStRecord& ntp,const NtpSREvent& evt)
00044 {
00045   //get the header
00046   const RecCandHeader& rec=ntp.GetHeader();
00047 
00048   //call the fiducial volume function with appropriate offset
00049   return infid(rec.GetVldContext().GetDetector(),
00050                rec.GetVldContext().GetSimFlag(),
00051                evt.vtx.x,
00052                evt.vtx.y,
00053                evt.vtx.z-FidVol::getEvtVtxZOffset());
00054 }
00055 
00056 //......................................................................
00057 
00058 inline bool infid(const NtpStRecord& ntp,const NtpSRTrack& trk)
00059 {
00060   //get the header
00061   const RecCandHeader& rec=ntp.GetHeader();
00062 
00063   //call the fiducial volume function with appropriate offset
00064   return infid(rec.GetVldContext().GetDetector(),
00065                rec.GetVldContext().GetSimFlag(),
00066                trk.vtx.x,
00067                trk.vtx.y,
00068                trk.vtx.z-FidVol::getTrkVtxZOffset());
00069 }
00070 
00071 //......................................................................
00072 
00073 inline bool infid(const NtpStRecord& ntp,const NtpSRShower& shw)
00074 {
00075   //get the header
00076   const RecCandHeader& rec=ntp.GetHeader();
00077 
00078   //call the fiducial volume function with appropriate offset
00079   return infid(rec.GetVldContext().GetDetector(),
00080                rec.GetVldContext().GetSimFlag(),
00081                shw.vtx.x,
00082                shw.vtx.y,
00083                shw.vtx.z-FidVol::getShwVtxZOffset());
00084 }
00085 
00086 //......................................................................
00087 
00088 #endif // INFID_SR_INTERFACE_H

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