00001 00002 using namespace std; 00003 00004 #ifndef TSLToyGen_hh 00005 #define TSLToyGen_hh 00006 00007 00008 #include <vector> 00009 #include "TObject.h" 00010 #include "TObjArray.h" 00011 #include "PhysicsTools/KinFitter/interface/TKinFitter.h" 00012 #include "TVector3.h" 00013 00014 class TAbsFitParticle; 00015 00016 class TSLToyGen : public TObject { 00017 00018 public : 00019 00020 TSLToyGen( const TAbsFitParticle* bReco, const TAbsFitParticle* lepton, const TAbsFitParticle* X, const TAbsFitParticle* neutrino); 00021 virtual ~TSLToyGen(); 00022 Bool_t doToyExperiments( Int_t nbExperiments = 1000 ); 00023 00024 TH1D* _histStatus; 00025 TH1D* _histNIter; 00026 TH1D* _histPChi2; 00027 TH1D* _histChi2; 00028 00029 TH1D* _histMBrecoTrue; 00030 TH1D* _histMBrecoSmear; 00031 TH1D* _histMBrecoFit; 00032 TH1D* _histMXTrue; 00033 TH1D* _histMXSmear; 00034 TH1D* _histMXFit; 00035 TH1D* _histMXlnuTrue; 00036 TH1D* _histMXlnuSmear; 00037 TH1D* _histMXlnuFit; 00038 00039 TObjArray _histsParTrue; 00040 TObjArray _histsParSmear; 00041 TObjArray _histsParFit; 00042 00043 TObjArray _histsPull1; 00044 TObjArray _histsError1; 00045 TObjArray _histsDiff1; 00046 TObjArray _histsPull2; 00047 TObjArray _histsError2; 00048 TObjArray _histsDiff2; 00049 00050 void setprintPartIni(Bool_t value) { _printPartIni = value; } 00051 void setprintConsIni(Bool_t value) { _printConsIni = value; } 00052 void setprintSmearedPartBefore(Bool_t value) { _printSmearedPartBefore = value; } 00053 void setprintPartAfter(Bool_t value) { _printPartAfter = value; } 00054 void setprintConsBefore(Bool_t value) { _printConsBefore = value; } 00055 void setprintConsAfter(Bool_t value) { _printConsAfter = value; } 00056 00057 void setMassConstraint(Bool_t value) { _withMassConstraint = value; } 00058 void setMPDGCons(Bool_t value) { _withMPDGCons = value; } 00059 void setCheckConstraintsTruth(Bool_t value) { _doCheckConstraintsTruth = value; } 00060 00061 protected: 00062 00063 void smearParticles(); 00064 00065 void createHists(); 00066 00067 void fillPull1(); 00068 void fillPull2(); 00069 void fillPar(); 00070 void fillM(); 00071 00072 private : 00073 00074 vector<TAbsFitParticle*> _inimeasParticles; // vector that contains all true measured particles 00075 vector<TAbsFitParticle*> _iniunmeasParticles; // vector that contains all true unmeasured particles 00076 vector<TAbsFitParticle*> _measParticles; // vector that contains all smeared measured particles 00077 vector<TAbsFitParticle*> _unmeasParticles; // vector that contains all smeared unmeasured particles 00078 TVector3 _Y4S; 00079 00080 TAbsFitParticle* _iniBreco; 00081 TAbsFitParticle* _iniLepton; 00082 TAbsFitParticle* _iniX; 00083 TAbsFitParticle* _iniNeutrino; 00084 TAbsFitParticle* _breco; 00085 TAbsFitParticle* _lepton; 00086 TAbsFitParticle* _X; 00087 TAbsFitParticle* _neutrino; 00088 00089 Bool_t _printPartIni; 00090 Bool_t _printConsIni; 00091 Bool_t _printSmearedPartBefore ; 00092 Bool_t _printConsBefore; 00093 Bool_t _printConsAfter; 00094 Bool_t _printPartAfter; 00095 Bool_t _withMassConstraint; 00096 Bool_t _withMPDGCons; 00097 Bool_t _doCheckConstraintsTruth; 00098 00099 ClassDef(TSLToyGen, 1) 00100 }; 00101 00102 #endif