File indexing completed on 2024-04-06 12:09:22
0001 #ifndef PiZeroAnalyzer_H
0002 #define PiZeroAnalyzer_H
0003
0004 #include "FWCore/ServiceRegistry/interface/Service.h"
0005 #include "CommonTools/UtilAlgos/interface/TFileService.h"
0006
0007 #include "FWCore/Framework/interface/Frameworkfwd.h"
0008 #include "FWCore/Framework/interface/MakerMacros.h"
0009 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0010 #include "FWCore/Utilities/interface/Exception.h"
0011
0012
0013 #include "DataFormats/EgammaReco/interface/SuperCluster.h"
0014 #include "DataFormats/EcalDetId/interface/EBDetId.h"
0015 #include "DataFormats/EcalDetId/interface/EEDetId.h"
0016 #include "DataFormats/EcalRecHit/interface/EcalRecHit.h"
0017 #include "DataFormats/RecoCandidate/interface/RecoEcalCandidate.h"
0018 #include "DataFormats/RecoCandidate/interface/RecoEcalCandidateFwd.h"
0019
0020 #include "RecoEcal/EgammaCoreTools/interface/PositionCalc.h"
0021 #include "RecoEcal/EgammaCoreTools/interface/EcalClusterTools.h"
0022
0023 #include "Geometry/Records/interface/CaloTopologyRecord.h"
0024 #include "Geometry/CaloTopology/interface/CaloTopology.h"
0025 #include "Geometry/CaloTopology/interface/CaloSubdetectorTopology.h"
0026 #include "Geometry/Records/interface/IdealGeometryRecord.h"
0027 #include "Geometry/CaloGeometry/interface/CaloSubdetectorGeometry.h"
0028 #include "Geometry/CaloGeometry/interface/CaloCellGeometry.h"
0029 #include "Geometry/CaloGeometry/interface/CaloGeometry.h"
0030 #include "Geometry/CaloTopology/interface/EcalEndcapTopology.h"
0031 #include "Geometry/CaloTopology/interface/EcalBarrelTopology.h"
0032
0033 #include "TFile.h"
0034 #include "TH1.h"
0035 #include "TH2.h"
0036 #include "TTree.h"
0037 #include "TVector3.h"
0038 #include "TProfile.h"
0039
0040 #include "Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h"
0041 #include "Geometry/CaloGeometry/interface/CaloGeometry.h"
0042 #include "Geometry/CaloTopology/interface/CaloTopology.h"
0043 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0044 #include "FWCore/Framework/interface/Event.h"
0045 #include "FWCore/Framework/interface/EventSetup.h"
0046 #include "FWCore/Framework/interface/ESHandle.h"
0047 #include "DataFormats/EcalRecHit/interface/EcalRecHitCollections.h"
0048
0049
0050 #include <DQMServices/Core/interface/DQMStore.h>
0051 #include <DQMServices/Core/interface/DQMEDAnalyzer.h>
0052
0053 #include <map>
0054 #include <vector>
0055
0056
0057
0058
0059
0060
0061
0062
0063
0064
0065
0066
0067 class TFile;
0068 class TH1F;
0069 class TH2F;
0070 class TProfile;
0071 class TTree;
0072 class SimVertex;
0073 class SimTrack;
0074
0075 class PiZeroAnalyzer : public DQMEDAnalyzer {
0076 public:
0077 explicit PiZeroAnalyzer(const edm::ParameterSet&);
0078 ~PiZeroAnalyzer() override;
0079 void bookHistograms(DQMStore::IBooker&, edm::Run const&, edm::EventSetup const&) override;
0080 void analyze(const edm::Event&, const edm::EventSetup&) override;
0081
0082 private:
0083 void makePizero(const edm::EventSetup& es,
0084 const edm::Handle<EcalRecHitCollection> eb,
0085 const edm::Handle<EcalRecHitCollection> ee);
0086
0087 std::string fName_;
0088 unsigned int prescaleFactor_;
0089
0090 int nEvt_;
0091
0092 edm::ParameterSet posCalcParameters_;
0093
0094 edm::EDGetTokenT<edm::SortedCollection<EcalRecHit, edm::StrictWeakOrdering<EcalRecHit> > > barrelEcalHits_token_;
0095 edm::EDGetTokenT<edm::SortedCollection<EcalRecHit, edm::StrictWeakOrdering<EcalRecHit> > > endcapEcalHits_token_;
0096
0097 const edm::ESGetToken<CaloGeometry, CaloGeometryRecord> caloGeometryToken_;
0098 const edm::ESGetToken<CaloTopology, CaloTopologyRecord> caloTopologyToken_;
0099
0100 double minPhoEtCut_;
0101
0102 double cutStep_;
0103 int numberOfSteps_;
0104
0105
0106 double clusSeedThr_;
0107 int clusEtaSize_;
0108 int clusPhiSize_;
0109
0110 double seleXtalMinEnergy_;
0111
0112 bool ParameterLogWeighted_;
0113 double ParameterX0_;
0114 double ParameterT0_barl_;
0115 double ParameterW0_;
0116
0117 double selePtGammaOne_;
0118 double selePtGammaTwo_;
0119 double selePtPi0_;
0120 double seleS4S9GammaOne_;
0121 double seleS4S9GammaTwo_;
0122 double selePi0BeltDR_;
0123 double selePi0BeltDeta_;
0124 double selePi0Iso_;
0125 double seleMinvMaxPi0_;
0126 double seleMinvMinPi0_;
0127
0128 std::stringstream currentFolder_;
0129
0130 MonitorElement* hMinvPi0EB_;
0131 MonitorElement* hPt1Pi0EB_;
0132 MonitorElement* hPt2Pi0EB_;
0133 MonitorElement* hIsoPi0EB_;
0134 MonitorElement* hPtPi0EB_;
0135 };
0136
0137 #endif