ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/Morgan/interface/PhotonIsolator.h
Revision: 1.5
Committed: Thu Apr 16 12:36:22 2009 UTC (16 years ago) by lethuill
Content type: text/plain
Branch: MAIN
CVS Tags: JeSuisBeaucoupPlusGrosQunReco_2_2_7_01, RecoPhoton_2_2_7_02, pat_2_2_7_01, RecoPhoton_2_2_7_01
Changes since 1.4: +2 -2 lines
Log Message:
Replace number of valid pixel and tracker hits with number of pixel and strip layers with measurements

File Contents

# User Rev Content
1 mlethuil 1.1 #ifndef PhotonIsolator_h
2     #define PhotonIsolator_h
3    
4     #include <memory>
5     #include <string>
6     #include <iostream>
7     #include <map>
8    
9 lethuill 1.3 #include "FWCore/Framework/interface/Event.h"
10     #include "FWCore/Framework/interface/EventSetup.h"
11 mlethuil 1.1 #include "FWCore/ParameterSet/interface/ParameterSet.h"
12     #include "FWCore/Framework/interface/ESHandle.h"
13    
14     #include "DataFormats/HcalRecHit/interface/HcalRecHitCollections.h"
15     //#include "DataFormats/EcalRecHit/interface/EcalRecHitCollections.h"
16     //#include "Geometry/CaloGeometry/interface/CaloCellGeometry.h"
17     #include "Geometry/CaloGeometry/interface/CaloGeometry.h"
18     //#include "Geometry/Records/interface/IdealGeometryRecord.h"
19 lethuill 1.3 #include "Geometry/Records/interface/CaloGeometryRecord.h"
20 mlethuil 1.1
21 lethuill 1.4 #include "../interface/TRootPhoton.h"
22     #include "../interface/TRootSuperCluster.h"
23     #include "../interface/TRootCluster.h"
24     #include "../interface/TRootTrack.h"
25 mlethuil 1.1
26     #include "TClonesArray.h"
27    
28     #define PI 3.141592654
29     #define TWOPI 6.283185308
30    
31     class PhotonIsolator{
32    
33     public:
34    
35 lethuill 1.3 PhotonIsolator():config_(0), producersNames_(0), verbosity_(0) {;}
36     PhotonIsolator(edm::ParameterSet * config, edm::ParameterSet * producersNames):config_(config), producersNames_(producersNames)
37 mlethuil 1.1 {
38     verbosity_ = (*config_).getUntrackedParameter<int>("verbosity", 0);
39 lethuill 1.3 ecalIsolation_BarrelBC_type_ = (*config_).getParameter<int>("ecalIsolation_BarrelBC_type");
40     ecalIsolation_EndcapBC_type_ = (*config_).getParameter<int>("ecalIsolation_EndcapBC_type");
41 mlethuil 1.1 ecalIslandIsolation_DRmax_ = (*config_).getParameter<double>("ecalIslandIsolation_DRmax");
42     ecalIslandIsolation_ClusterEt_threshold_ = (*config_).getParameter<double>("ecalIslandIsolation_ClusterEt_threshold");
43     ecalDoubleConeIsolation_DRmin_ = (*config_).getParameter<double>("ecalDoubleConeIsolation_DRmin");
44     ecalDoubleConeIsolation_DRmax_ = (*config_).getParameter<double>("ecalDoubleConeIsolation_DRmax");
45     ecalDoubleConeIsolation_ClusterEt_threshold_ = (*config_).getParameter<double>("ecalDoubleConeIsolation_ClusterEt_threshold");
46 mlethuil 1.2 hcalRecHitIsolation_DRmax_ = (*config_).getParameter<double>("hcalRecHitIsolation_DRmax");
47     hcalRecHitIsolation_HitEt_threshold_ = (*config_).getParameter<double>("hcalRecHitIsolation_HitEt_threshold");
48     trackerIsolation_DRmax_ = (*config_).getParameter<double>("trackerIsolation_DRmax");
49     trackerIsolation_pt_threshold_ = (*config_).getParameter<double>("trackerIsolation_pt_threshold");
50 lethuill 1.5 trackerIsolation_pixelLayers_threshold_ = (*config_).getParameter<int>("trackerIsolation_pixelLayers_threshold");
51 mlethuil 1.1 }
52    
53     ~PhotonIsolator() {;}
54    
55     float DeltaPhi(float phi1, float phi2);
56     float DeltaR(float phi1, float phi2, float eta1, float eta2);
57     void SetVerbosity(int verbosity) {verbosity_ = verbosity; };
58 lethuill 1.3 void LoadHcalRecHits(const edm::Event& iEvent, const edm::EventSetup& iSetup);
59 mlethuil 1.1 Double_t EcalIslandIsolation(TRootPhoton* photon, TClonesArray* superClusters, TClonesArray* basicClusters);
60     Double_t EcalDoubleConeIsolation(TRootPhoton* photon, TClonesArray* superClusters, TClonesArray* basicClusters);
61 lethuill 1.3 Double_t HcalRecHitIsolation(TRootPhoton* photon);
62 mlethuil 1.2 Double_t TrackerIsolation(TRootPhoton* photon, TClonesArray* tracks, Int_t &nTracks);
63 mlethuil 1.1
64    
65     private:
66 lethuill 1.3
67 mlethuil 1.1 edm::ParameterSet * config_;
68 lethuill 1.3 edm::ParameterSet * producersNames_;
69 mlethuil 1.1 int verbosity_;
70 lethuill 1.3 int ecalIsolation_BarrelBC_type_;
71     int ecalIsolation_EndcapBC_type_;
72 mlethuil 1.1 double ecalIslandIsolation_DRmax_;
73     double ecalIslandIsolation_ClusterEt_threshold_;
74     double ecalDoubleConeIsolation_DRmin_;
75     double ecalDoubleConeIsolation_DRmax_;
76     double ecalDoubleConeIsolation_ClusterEt_threshold_;
77 mlethuil 1.2 double hcalRecHitIsolation_DRmax_;
78     double hcalRecHitIsolation_HitEt_threshold_;
79     double trackerIsolation_DRmax_;
80     double trackerIsolation_pt_threshold_;
81 lethuill 1.5 int trackerIsolation_pixelLayers_threshold_;
82 lethuill 1.3
83     const HBHERecHitCollection* hbheHits_;
84     const HORecHitCollection* hoHits_;
85     const HFRecHitCollection* hfHits_;
86     const CaloGeometry* geometry_;
87    
88 mlethuil 1.1 };
89    
90     #endif