00001
00002
00003
00004
00005
00006
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
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
00056
00057
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;
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;
00094
00095
00096 ClassDef(ANtpInfoObjectFiller, 6)
00097 };
00098
00099 #endif // ANTPINFOOBECTFILLER_H
00100
00101