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

ANtpInfoObjectFiller.h

Go to the documentation of this file.
00001 
00002 // $Id: ANtpInfoObjectFiller.h,v 1.29 2009/11/13 14:59:13 rodriges Exp $
00003 //
00004 // A class to easily get at the SR ntuple information
00005 //
00006 // B. Rebel 02/2005
00008 #ifndef ANTPINFOOBJECTFILLER_H
00009 #define ANTPINFOOBJECTFILLER_H
00010 
00011 #include "TObjArray.h"
00012 #include "Conventions/Detector.h"
00013 #include "Conventions/SimFlag.h"
00014 #include "Validity/VldContext.h"
00015 #include "TClonesArray.h"
00016 
00017 class NtpSREvent;
00018 class NtpSREventSummary;
00019 class NtpSRCosmicRay;
00020 class NtpSRShower;
00021 class NtpSRTrack;
00022 class NtpMCTruth;
00023 class NtpMCRecord;
00024 class NtpSRRecord;
00025 class NtpStRecord;
00026 
00027 class ANtpEventInfo;
00028 class ANtpHeaderInfo;
00029 class ANtpShowerInfo;
00030 class ANtpTrackInfo;
00031 class ANtpTruthInfo;
00032 class ANtpRecoNtpManipulator;
00033 
00034 class ANtpInfoObjectFiller
00035 {
00036 
00037  public:
00038   ANtpInfoObjectFiller();
00039   ANtpInfoObjectFiller(Detector::Detector_t detector);
00040   ANtpInfoObjectFiller(TClonesArray *strips);
00041   virtual ~ANtpInfoObjectFiller();
00042   
00043   //methods to fill the appropriate info objects
00044   void FillHeaderInformation(ANtpRecoNtpManipulator *ntpManip, 
00045                              Detector::Detector_t det,
00046                              SimFlag::SimFlag_t dataType, 
00047                              ANtpHeaderInfo *headerInfo);
00048   void FillEventInformation(ANtpRecoNtpManipulator *ntpManip, 
00049                             NtpSREvent *ntpEvent, 
00050                             ANtpEventInfo *eventInfo);
00051   void FillTrackInformation(NtpSRTrack *ntpTrack, 
00052                             ANtpTrackInfo *trackInfo);
00053   void FillShowerInformation(NtpSRShower *ntpShower, 
00054                              ANtpShowerInfo *showerInfo);
00055   // (PAR 2009-11-13) This is static because I want to call it from
00056   // ANtpInfoObjectFillerMRCC without an object. That's based on a
00057   // massive hack anyway, but this is the easiest way to deal with it in the short term
00058   static void FillMCTruthInformation(NtpMCTruth *ntpMCTruth, 
00059                                      ANtpTruthInfo *truthInfo);
00060   void SetDetector(Detector::Detector_t detector);
00061   void SetStripArray(TClonesArray *strips);
00062 
00063   Float_t MetersToBeam(Detector::Detector_t det,
00064                        Float_t x, 
00065                        Float_t y, 
00066                        Float_t z);
00067   Float_t MetersToCoil(Detector::Detector_t det,
00068                        Float_t x, 
00069                        Float_t y);
00070   Float_t MetersToCloseEdge(Detector::Detector_t det, 
00071                             Float_t x,
00072                             Float_t y, 
00073                             Bool_t NDUseFullPlane = 0);
00074 
00075  protected:
00076 
00077   void FillFiducialInformation(ANtpTrackInfo *trackInfo);
00078   void FillFiducialInformation(ANtpEventInfo *eventInfo);
00079 
00080   VldContext fVldc; // for use by derived classes
00081   TClonesArray *fStripArray;
00082   Detector::Detector_t fDetector;
00083 
00084  private:
00085   
00086   double Sqr(double x);
00087   int    Sqr(int x);
00088   float  Sqr(float x);
00089 
00090   void GetTrackTrace(NtpSRTrack *ntpTrack, ANtpTrackInfo *trackInfo, 
00091                      Int_t direction);
00092 
00093   Long64_t fRowNum;  // this holds the current row number in the sntp ntuple
00094   
00095     
00096   ClassDef(ANtpInfoObjectFiller, 6) //ANtpInfoObjectFiller
00097 };
00098 
00099 #endif // ANTPINFOOBECTFILLER_H
00100 
00101 

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