Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:32:38

0001 #ifndef TSLToyGen_hh
0002 #define TSLToyGen_hh
0003 
0004 #include <vector>
0005 #include "TObject.h"
0006 #include "TObjArray.h"
0007 #include "PhysicsTools/KinFitter/interface/TKinFitter.h"
0008 #include "TVector3.h"
0009 
0010 class TAbsFitParticle;
0011 
0012 class TSLToyGen : public TObject {
0013 public:
0014   TSLToyGen(const TAbsFitParticle* bReco,
0015             const TAbsFitParticle* lepton,
0016             const TAbsFitParticle* X,
0017             const TAbsFitParticle* neutrino);
0018   ~TSLToyGen() override;
0019   Bool_t doToyExperiments(Int_t nbExperiments = 1000);
0020 
0021   TH1D* _histStatus;
0022   TH1D* _histNIter;
0023   TH1D* _histPChi2;
0024   TH1D* _histChi2;
0025 
0026   TH1D* _histMBrecoTrue;
0027   TH1D* _histMBrecoSmear;
0028   TH1D* _histMBrecoFit;
0029   TH1D* _histMXTrue;
0030   TH1D* _histMXSmear;
0031   TH1D* _histMXFit;
0032   TH1D* _histMXlnuTrue;
0033   TH1D* _histMXlnuSmear;
0034   TH1D* _histMXlnuFit;
0035 
0036   TObjArray _histsParTrue;
0037   TObjArray _histsParSmear;
0038   TObjArray _histsParFit;
0039 
0040   TObjArray _histsPull1;
0041   TObjArray _histsError1;
0042   TObjArray _histsDiff1;
0043   TObjArray _histsPull2;
0044   TObjArray _histsError2;
0045   TObjArray _histsDiff2;
0046 
0047   void setprintPartIni(Bool_t value) { _printPartIni = value; }
0048   void setprintConsIni(Bool_t value) { _printConsIni = value; }
0049   void setprintSmearedPartBefore(Bool_t value) { _printSmearedPartBefore = value; }
0050   void setprintPartAfter(Bool_t value) { _printPartAfter = value; }
0051   void setprintConsBefore(Bool_t value) { _printConsBefore = value; }
0052   void setprintConsAfter(Bool_t value) { _printConsAfter = value; }
0053 
0054   void setMassConstraint(Bool_t value) { _withMassConstraint = value; }
0055   void setMPDGCons(Bool_t value) { _withMPDGCons = value; }
0056   void setCheckConstraintsTruth(Bool_t value) { _doCheckConstraintsTruth = value; }
0057 
0058 protected:
0059   void smearParticles();
0060 
0061   void createHists();
0062 
0063   void fillPull1();
0064   void fillPull2();
0065   void fillPar();
0066   void fillM();
0067 
0068 private:
0069   std::vector<TAbsFitParticle*> _inimeasParticles;    // vector that contains all true measured particles
0070   std::vector<TAbsFitParticle*> _iniunmeasParticles;  // vector that contains all true unmeasured particles
0071   std::vector<TAbsFitParticle*> _measParticles;       // vector that contains all smeared measured particles
0072   std::vector<TAbsFitParticle*> _unmeasParticles;     // vector that contains all smeared unmeasured particles
0073   TVector3 _Y4S;
0074 
0075   TAbsFitParticle* _iniBreco;
0076   TAbsFitParticle* _iniLepton;
0077   TAbsFitParticle* _iniX;
0078   TAbsFitParticle* _iniNeutrino;
0079   TAbsFitParticle* _breco;
0080   TAbsFitParticle* _lepton;
0081   TAbsFitParticle* _X;
0082   TAbsFitParticle* _neutrino;
0083 
0084   Bool_t _printPartIni;
0085   Bool_t _printConsIni;
0086   Bool_t _printSmearedPartBefore;
0087   Bool_t _printConsBefore;
0088   Bool_t _printConsAfter;
0089   Bool_t _printPartAfter;
0090   Bool_t _withMassConstraint;
0091   Bool_t _withMPDGCons;
0092   Bool_t _doCheckConstraintsTruth;
0093 
0094   ClassDefOverride(TSLToyGen, 0)
0095 };
0096 
0097 #endif