Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:21:48

0001 
0002 #ifndef jhugon_EffHistogramList_h
0003 #define jhugon_EffHistogramList_h
0004 // system include files
0005 #include <vector>
0006 #include <string>
0007 #include <fstream>
0008 // user include files
0009 #include "FWCore/Framework/interface/Frameworkfwd.h"
0010 #include "FWCore/Framework/interface/EDAnalyzer.h"
0011 #include "FWCore/Framework/interface/Event.h"
0012 #include "FWCore/Framework/interface/MakerMacros.h"
0013 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0014 #include "FWCore/ServiceRegistry/interface/Service.h"
0015 #include "CommonTools/UtilAlgos/interface/TFileService.h"
0016 #include <TCanvas.h>
0017 #include <TStyle.h>
0018 #include <TLegend.h>
0019 #include <TLatex.h>
0020 #include <TF1.h>
0021 #include <TH2.h>
0022 #include "L1Trigger/CSCTrackFinder/test/src/TrackHistogramList.h"
0023 #include <TMath.h>
0024 
0025 namespace csctf_analysis
0026 {
0027   class  EffHistogramList
0028   {
0029     public:
0030     EffHistogramList(const std::string dirname, const edm::ParameterSet* parameters);
0031         void ComputeEff(TrackHistogramList*);
0032         void Print();
0033     TH1F* EffPhi_mod_10_Q3_endcap1, *EffPhi_mod_10_Q2_endcap1;
0034     TH1F* EffPhi_mod_10_Q3_endcap2, *EffPhi_mod_10_Q2_endcap2;
0035     TH1F* modeOcc;
0036     TH1F* EffEtaAll, *EffEtaQ3, *EffEtaQ2, *EffEtaQ1;
0037     TH1F* EffSignedEtaAll, *EffSignedEtaQ3, *EffSignedEtaQ2, *EffSignedEtaQ1;
0038     TH1F* EffPhiQ3, *EffPhiQ2, *EffPhiQ1, *EffPhi;
0039     TH1F* EffPtOverall, *EffPtCSCOnly, *EffPtOverlap, *EffPtHighEta, *EffPtDTOnly, *EffPtCSCRestricted;
0040     TH1F* EffTFPt10Overall, *EffTFPt12Overall,*EffTFPt16Overall, *EffTFPt20Overall, *EffTFPt40Overall,*EffTFPt60Overall;
0041     TH1F* EffTFPt10CSCOnly,*EffTFPt12CSCOnly,*EffTFPt16CSCOnly,*EffTFPt20CSCOnly, *EffTFPt40CSCOnly, *EffTFPt60CSCOnly;
0042     TH1F* EffTFPt10CSCRestricted,*EffTFPt12CSCRestricted,*EffTFPt16CSCRestricted, *EffTFPt20CSCRestricted, *EffTFPt40CSCRestricted, *EffTFPt60CSCRestricted;
0043     TH1F* EffTFPt10DTOnly,*EffTFPt12DTOnly,*EffTFPt16DTOnly, *EffTFPt20DTOnly, *EffTFPt40DTOnly, *EffTFPt60DTOnly;
0044     TH1F* EffTFPt10Overlap,*EffTFPt12Overlap,*EffTFPt16Overlap, *EffTFPt20Overlap, *EffTFPt40Overlap, *EffTFPt60Overlap;
0045     TH1F* EffTFPt10HighEta,*EffTFPt12HighEta,*EffTFPt16HighEta, *EffTFPt20HighEta, *EffTFPt40HighEta, *EffTFPt60HighEta;
0046     TLegend* TrackerLeg1, *TrackerLeg2, *TrackerLeg3;
0047     TLegend* TrackerLeg1CSCOnly, *TrackerLeg1Overlap, *TrackerLeg1HighEta, *TrackerLeg1DTOnly, *TrackerLeg1CSCRestricted, *TrackerLeg1Overall;
0048     TCanvas* PhiEff, *EtaEff, *SignedEtaEff, *PtEffAllOverall, *PtEffAllCSCOnly, *PtEffAllOverlap, *PtEffAllHighEta, *PtEffAllDTOnly, *PtEffAllCSCRestricted;
0049     TF1* fitThreshOverall, *fitThreshCSCOnly,*fitThreshDTOnly, *fitThreshCSCRestricted, *fitThreshOverlap, *fitThreshHighEta;
0050     private:
0051     edm::Service<TFileService> fs;
0052     std::string PtEffStatsFilename;
0053     void DrawPtEffHists(std::string region, TCanvas* canvas, TF1* fit, TLegend* legend, std::vector<std::string> thresholds, std::vector<TH1F*> PtEffHists);
0054     void computeErrors(TrackHistogramList*);
0055     void divideHistograms(TrackHistogramList*);
0056     void computePtPlateauEff(std::ofstream* PtStats, std::vector<double> PlateauDefinitions, std::vector<std::string> thresholds, std::vector<TH1F*> PtEffHists);
0057     TLatex* latexDescription;
0058   };
0059   Double_t thresh(Double_t* pt, Double_t* par);
0060 }
0061 #endif