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

FillTruth.h

Go to the documentation of this file.
00001 #ifndef ANP_FILLTRUTH_H
00002 #define ANP_FILLTRUTH_H
00003 
00004 // $Id: FillTruth.h,v 1.11 2008/01/31 22:18:17 rustem Exp $
00005 //
00006 // This algorithm fills all Monte-Carlo truth information. It is a 
00007 // most complicated AlgStore algorithm. The following information
00008 // is processed by this algorithm:
00009 //
00010 // 1) Neutrino truth information from beam and detector simulation,
00011 //
00012 // 2) Stdhep truth information for recorded stdhep blocks,
00013 // 
00014 // 3) Mapping between true and reconstructed objects (events and tracks),
00015 // 
00016 // 4) Input parameters for neugen cross section weights
00017 //
00018 
00019 // Local
00020 #include "PhysicsNtuple/AlgStore.h"
00021 #include "PhysicsNtuple/Truth.h"
00022 
00023 class NtpMCTruth;
00024 class NtpStRecord;
00025 class NtpTHEvent;
00026 class NtpTHTrack;
00027 class NtpTHShower;
00028 class TClonesArray;
00029 
00030 namespace Anp
00031 {
00032    class FillTruth : public AlgStore
00033    {
00034    public:
00035       
00036       FillTruth();
00037       virtual ~FillTruth();     
00038       
00039       bool Run(Record &record, TObject *ptr = 0);
00040 
00041       void Config(const Registry &reg);
00042 
00043    private:
00044       
00045       const Truth Fill(const NtpMCTruth &ntptruth) const;
00046 
00047       void FillStdHep(Record &record, const TClonesArray &array) const;
00048 
00049       void Fill(Truth &truth, const vector<const NtpTHEvent *>  &vec);
00050       void Fill(Truth &truth, const vector<const NtpTHTrack *>  &vec);
00051       void Fill(Truth &truth, const vector<const NtpTHShower *> &vec);
00052       
00053       bool IsConsistent(const Record &record) const;
00054 
00055    private:
00056 
00057       bool fStdHep;
00058       bool fCheck;
00059 
00060       int fHepKey;
00061 
00062       mutable unsigned int fNTruth;
00063       mutable unsigned int fNStHep;
00064       mutable unsigned int fNRecoEvent;
00065       mutable unsigned int fNRecoTrack;
00066       mutable unsigned int fNRecoShower;
00067    };
00068 
00069    template<class T> 
00070       std::vector<const T *> FillRecoTruth(const TClonesArray *array);
00071 }
00072 
00073 #endif
00074 
00075 

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