CMS 3D CMS Logo

PhotonIsolationCalculator.cc
Go to the documentation of this file.
1 
23 
29 
36 
39 
40 #include <string>
41 #include <TMath.h>
42 
44  std::vector<int> const& flagsEB,
45  std::vector<int> const& flagsEE,
46  std::vector<int> const& severitiesEB,
47  std::vector<int> const& severitiesEE,
49  trackInputTag_ = iC.consumes<reco::TrackCollection>(conf.getParameter<edm::InputTag>("trackProducer"));
50  beamSpotProducerTag_ = iC.consumes<reco::BeamSpot>(conf.getParameter<edm::InputTag>("beamSpotProducer"));
52  iC.consumes<EcalRecHitCollection>(conf.getParameter<edm::InputTag>("barrelEcalRecHitCollection"));
54  iC.consumes<EcalRecHitCollection>(conf.getParameter<edm::InputTag>("endcapEcalRecHitCollection"));
55  auto hcRHC = conf.getParameter<edm::InputTag>("HcalRecHitCollection");
56  if (not hcRHC.label().empty())
57  hcalCollection_ = iC.consumes<CaloTowerCollection>(hcRHC);
58 
59  // gsfRecoInputTag_ = conf.getParameter<edm::InputTag>("GsfRecoCollection");
60  modulePhiBoundary_ = conf.getParameter<double>("modulePhiBoundary");
61  moduleEtaBoundary_ = conf.getParameter<std::vector<double> >("moduleEtaBoundary");
62  //
63  vetoClusteredEcalHits_ = conf.getParameter<bool>("vetoClustered");
64  useNumCrystals_ = conf.getParameter<bool>("useNumCrystals");
65 
67  int i = 0;
68  trkIsoBarrelRadiusA_[i++] = (conf.getParameter<double>("TrackConeOuterRadiusA_Barrel"));
69  trkIsoBarrelRadiusA_[i++] = (conf.getParameter<double>("TrackConeInnerRadiusA_Barrel"));
70  trkIsoBarrelRadiusA_[i++] = (conf.getParameter<double>("isolationtrackThresholdA_Barrel"));
71  trkIsoBarrelRadiusA_[i++] = (conf.getParameter<double>("longImpactParameterA_Barrel"));
72  trkIsoBarrelRadiusA_[i++] = (conf.getParameter<double>("transImpactParameterA_Barrel"));
73  trkIsoBarrelRadiusA_[i++] = (conf.getParameter<double>("isolationtrackEtaSliceA_Barrel"));
74 
75  i = 0;
76  ecalIsoBarrelRadiusA_[i++] = (conf.getParameter<double>("EcalRecHitInnerRadiusA_Barrel"));
77  ecalIsoBarrelRadiusA_[i++] = (conf.getParameter<double>("EcalRecHitOuterRadiusA_Barrel"));
78  ecalIsoBarrelRadiusA_[i++] = (conf.getParameter<double>("EcalRecHitEtaSliceA_Barrel"));
79  ecalIsoBarrelRadiusA_[i++] = (conf.getParameter<double>("EcalRecHitThreshEA_Barrel"));
80  ecalIsoBarrelRadiusA_[i++] = (conf.getParameter<double>("EcalRecHitThreshEtA_Barrel"));
81 
82  i = 0;
83  hcalIsoBarrelRadiusA_[i++] = (conf.getParameter<double>("HcalTowerInnerRadiusA_Barrel"));
84  hcalIsoBarrelRadiusA_[i++] = (conf.getParameter<double>("HcalTowerOuterRadiusA_Barrel"));
85  hcalIsoBarrelRadiusA_[i++] = (conf.getParameter<double>("HcalTowerThreshEA_Barrel"));
86  hcalIsoBarrelRadiusA_[i++] = (conf.getParameter<double>("HcalDepth1TowerInnerRadiusA_Barrel"));
87  hcalIsoBarrelRadiusA_[i++] = (conf.getParameter<double>("HcalDepth1TowerOuterRadiusA_Barrel"));
88  hcalIsoBarrelRadiusA_[i++] = (conf.getParameter<double>("HcalDepth1TowerThreshEA_Barrel"));
89  hcalIsoBarrelRadiusA_[i++] = (conf.getParameter<double>("HcalDepth2TowerInnerRadiusA_Barrel"));
90  hcalIsoBarrelRadiusA_[i++] = (conf.getParameter<double>("HcalDepth2TowerOuterRadiusA_Barrel"));
91  hcalIsoBarrelRadiusA_[i++] = (conf.getParameter<double>("HcalDepth2TowerThreshEA_Barrel"));
92 
93  i = 0;
94  trkIsoBarrelRadiusB_[i++] = (conf.getParameter<double>("TrackConeOuterRadiusB_Barrel"));
95  trkIsoBarrelRadiusB_[i++] = (conf.getParameter<double>("TrackConeInnerRadiusB_Barrel"));
96  trkIsoBarrelRadiusB_[i++] = (conf.getParameter<double>("isolationtrackThresholdB_Barrel"));
97  trkIsoBarrelRadiusB_[i++] = (conf.getParameter<double>("longImpactParameterB_Barrel"));
98  trkIsoBarrelRadiusB_[i++] = (conf.getParameter<double>("transImpactParameterB_Barrel"));
99  trkIsoBarrelRadiusB_[i++] = (conf.getParameter<double>("isolationtrackEtaSliceB_Barrel"));
100 
101  i = 0;
102  ecalIsoBarrelRadiusB_[i++] = (conf.getParameter<double>("EcalRecHitInnerRadiusB_Barrel"));
103  ecalIsoBarrelRadiusB_[i++] = (conf.getParameter<double>("EcalRecHitOuterRadiusB_Barrel"));
104  ecalIsoBarrelRadiusB_[i++] = (conf.getParameter<double>("EcalRecHitEtaSliceB_Barrel"));
105  ecalIsoBarrelRadiusB_[i++] = (conf.getParameter<double>("EcalRecHitThreshEB_Barrel"));
106  ecalIsoBarrelRadiusB_[i++] = (conf.getParameter<double>("EcalRecHitThreshEtB_Barrel"));
107 
108  i = 0;
109  hcalIsoBarrelRadiusB_[i++] = (conf.getParameter<double>("HcalTowerInnerRadiusB_Barrel"));
110  hcalIsoBarrelRadiusB_[i++] = (conf.getParameter<double>("HcalTowerOuterRadiusB_Barrel"));
111  hcalIsoBarrelRadiusB_[i++] = (conf.getParameter<double>("HcalTowerThreshEB_Barrel"));
112  hcalIsoBarrelRadiusB_[i++] = (conf.getParameter<double>("HcalDepth1TowerInnerRadiusB_Barrel"));
113  hcalIsoBarrelRadiusB_[i++] = (conf.getParameter<double>("HcalDepth1TowerOuterRadiusB_Barrel"));
114  hcalIsoBarrelRadiusB_[i++] = (conf.getParameter<double>("HcalDepth1TowerThreshEB_Barrel"));
115  hcalIsoBarrelRadiusB_[i++] = (conf.getParameter<double>("HcalDepth2TowerInnerRadiusB_Barrel"));
116  hcalIsoBarrelRadiusB_[i++] = (conf.getParameter<double>("HcalDepth2TowerOuterRadiusB_Barrel"));
117  hcalIsoBarrelRadiusB_[i++] = (conf.getParameter<double>("HcalDepth2TowerThreshEB_Barrel"));
118 
120  i = 0;
121  trkIsoEndcapRadiusA_[i++] = (conf.getParameter<double>("TrackConeOuterRadiusA_Endcap"));
122  trkIsoEndcapRadiusA_[i++] = (conf.getParameter<double>("TrackConeInnerRadiusA_Endcap"));
123  trkIsoEndcapRadiusA_[i++] = (conf.getParameter<double>("isolationtrackThresholdA_Endcap"));
124  trkIsoEndcapRadiusA_[i++] = (conf.getParameter<double>("longImpactParameterA_Endcap"));
125  trkIsoEndcapRadiusA_[i++] = (conf.getParameter<double>("transImpactParameterA_Endcap"));
126  trkIsoEndcapRadiusA_[i++] = (conf.getParameter<double>("isolationtrackEtaSliceA_Endcap"));
127 
128  i = 0;
129  ecalIsoEndcapRadiusA_[i++] = (conf.getParameter<double>("EcalRecHitInnerRadiusA_Endcap"));
130  ecalIsoEndcapRadiusA_[i++] = (conf.getParameter<double>("EcalRecHitOuterRadiusA_Endcap"));
131  ecalIsoEndcapRadiusA_[i++] = (conf.getParameter<double>("EcalRecHitEtaSliceA_Endcap"));
132  ecalIsoEndcapRadiusA_[i++] = (conf.getParameter<double>("EcalRecHitThreshEA_Endcap"));
133  ecalIsoEndcapRadiusA_[i++] = (conf.getParameter<double>("EcalRecHitThreshEtA_Endcap"));
134 
135  i = 0;
136  hcalIsoEndcapRadiusA_[i++] = (conf.getParameter<double>("HcalTowerInnerRadiusA_Endcap"));
137  hcalIsoEndcapRadiusA_[i++] = (conf.getParameter<double>("HcalTowerOuterRadiusA_Endcap"));
138  hcalIsoEndcapRadiusA_[i++] = (conf.getParameter<double>("HcalTowerThreshEA_Endcap"));
139  hcalIsoEndcapRadiusA_[i++] = (conf.getParameter<double>("HcalDepth1TowerInnerRadiusA_Endcap"));
140  hcalIsoEndcapRadiusA_[i++] = (conf.getParameter<double>("HcalDepth1TowerOuterRadiusA_Endcap"));
141  hcalIsoEndcapRadiusA_[i++] = (conf.getParameter<double>("HcalDepth1TowerThreshEA_Endcap"));
142  hcalIsoEndcapRadiusA_[i++] = (conf.getParameter<double>("HcalDepth2TowerInnerRadiusA_Endcap"));
143  hcalIsoEndcapRadiusA_[i++] = (conf.getParameter<double>("HcalDepth2TowerOuterRadiusA_Endcap"));
144  hcalIsoEndcapRadiusA_[i++] = (conf.getParameter<double>("HcalDepth2TowerThreshEA_Endcap"));
145 
146  i = 0;
147  trkIsoEndcapRadiusB_[i++] = (conf.getParameter<double>("TrackConeOuterRadiusB_Endcap"));
148  trkIsoEndcapRadiusB_[i++] = (conf.getParameter<double>("TrackConeInnerRadiusB_Endcap"));
149  trkIsoEndcapRadiusB_[i++] = (conf.getParameter<double>("isolationtrackThresholdB_Endcap"));
150  trkIsoEndcapRadiusB_[i++] = (conf.getParameter<double>("longImpactParameterB_Endcap"));
151  trkIsoEndcapRadiusB_[i++] = (conf.getParameter<double>("transImpactParameterB_Endcap"));
152  trkIsoEndcapRadiusB_[i++] = (conf.getParameter<double>("isolationtrackEtaSliceB_Endcap"));
153 
154  i = 0;
155  ecalIsoEndcapRadiusB_[i++] = (conf.getParameter<double>("EcalRecHitInnerRadiusB_Endcap"));
156  ecalIsoEndcapRadiusB_[i++] = (conf.getParameter<double>("EcalRecHitOuterRadiusB_Endcap"));
157  ecalIsoEndcapRadiusB_[i++] = (conf.getParameter<double>("EcalRecHitEtaSliceB_Endcap"));
158  ecalIsoEndcapRadiusB_[i++] = (conf.getParameter<double>("EcalRecHitThreshEB_Endcap"));
159  ecalIsoEndcapRadiusB_[i++] = (conf.getParameter<double>("EcalRecHitThreshEtB_Endcap"));
160 
161  i = 0;
162  hcalIsoEndcapRadiusB_[i++] = (conf.getParameter<double>("HcalTowerInnerRadiusB_Endcap"));
163  hcalIsoEndcapRadiusB_[i++] = (conf.getParameter<double>("HcalTowerOuterRadiusB_Endcap"));
164  hcalIsoEndcapRadiusB_[i++] = (conf.getParameter<double>("HcalTowerThreshEB_Endcap"));
165  hcalIsoEndcapRadiusB_[i++] = (conf.getParameter<double>("HcalDepth1TowerInnerRadiusB_Endcap"));
166  hcalIsoEndcapRadiusB_[i++] = (conf.getParameter<double>("HcalDepth1TowerOuterRadiusB_Endcap"));
167  hcalIsoEndcapRadiusB_[i++] = (conf.getParameter<double>("HcalDepth1TowerThreshEB_Endcap"));
168  hcalIsoEndcapRadiusB_[i++] = (conf.getParameter<double>("HcalDepth2TowerInnerRadiusB_Endcap"));
169  hcalIsoEndcapRadiusB_[i++] = (conf.getParameter<double>("HcalDepth2TowerOuterRadiusB_Endcap"));
170  hcalIsoEndcapRadiusB_[i++] = (conf.getParameter<double>("HcalDepth2TowerThreshEB_Endcap"));
171 
172  //Pick up the variables for the spike removal
173  flagsEB_ = flagsEB;
174  flagsEE_ = flagsEE;
175  severityExclEB_ = severitiesEB;
176  severityExclEE_ = severitiesEE;
177 }
178 
180  const edm::Event& e,
181  const edm::EventSetup& es,
184  reco::Photon::IsolationVariables& phoisolR2) const {
185  //Get fiducial flags. This does not really belong here
186  bool isEBPho = false;
187  bool isEEPho = false;
188  bool isEBEtaGap = false;
189  bool isEBPhiGap = false;
190  bool isEERingGap = false;
191  bool isEEDeeGap = false;
192  bool isEBEEGap = false;
193  classify(pho, isEBPho, isEEPho, isEBEtaGap, isEBPhiGap, isEERingGap, isEEDeeGap, isEBEEGap);
194  phofid.isEB = isEBPho;
195  phofid.isEE = isEEPho;
196  phofid.isEBEtaGap = isEBEtaGap;
197  phofid.isEBPhiGap = isEBPhiGap;
198  phofid.isEERingGap = isEERingGap;
199  phofid.isEEDeeGap = isEEDeeGap;
200  phofid.isEBEEGap = isEBEEGap;
201 
202  // Calculate isolation variables. cone sizes and thresholds
203  // are set for Barrel and endcap separately
204 
205  reco::SuperClusterRef scRef = pho->superCluster();
206  const reco::BasicCluster& seedCluster = *(scRef->seed());
207  DetId seedXtalId = seedCluster.hitsAndFractions()[0].first;
208  int detector = seedXtalId.subdetId();
209 
210  //Isolation parameters variables
211  double photonEcalRecHitConeInnerRadiusA_;
212  double photonEcalRecHitConeOuterRadiusA_;
213  double photonEcalRecHitEtaSliceA_;
214  double photonEcalRecHitThreshEA_;
215  double photonEcalRecHitThreshEtA_;
216  double photonHcalTowerConeInnerRadiusA_;
217  double photonHcalTowerConeOuterRadiusA_;
218  double photonHcalTowerThreshEA_;
219  double photonHcalDepth1TowerConeInnerRadiusA_;
220  double photonHcalDepth1TowerConeOuterRadiusA_;
221  double photonHcalDepth1TowerThreshEA_;
222  double photonHcalDepth2TowerConeInnerRadiusA_;
223  double photonHcalDepth2TowerConeOuterRadiusA_;
224  double photonHcalDepth2TowerThreshEA_;
225  double trackConeOuterRadiusA_;
226  double trackConeInnerRadiusA_;
227  double isolationtrackThresholdA_;
228  double isolationtrackEtaSliceA_;
229  double trackLipRadiusA_;
230  double trackD0RadiusA_;
231  double photonEcalRecHitConeInnerRadiusB_;
232  double photonEcalRecHitConeOuterRadiusB_;
233  double photonEcalRecHitEtaSliceB_;
234  double photonEcalRecHitThreshEB_;
235  double photonEcalRecHitThreshEtB_;
236  double photonHcalTowerConeInnerRadiusB_;
237  double photonHcalTowerConeOuterRadiusB_;
238  double photonHcalTowerThreshEB_;
239  double photonHcalDepth1TowerConeInnerRadiusB_;
240  double photonHcalDepth1TowerConeOuterRadiusB_;
241  double photonHcalDepth1TowerThreshEB_;
242  double photonHcalDepth2TowerConeInnerRadiusB_;
243  double photonHcalDepth2TowerConeOuterRadiusB_;
244  double photonHcalDepth2TowerThreshEB_;
245  double trackConeOuterRadiusB_;
246  double trackConeInnerRadiusB_;
247  double isolationtrackThresholdB_;
248  double isolationtrackEtaSliceB_;
249  double trackLipRadiusB_;
250  double trackD0RadiusB_;
251 
252  if (detector == EcalBarrel) {
253  trackConeOuterRadiusA_ = trkIsoBarrelRadiusA_[0];
254  trackConeInnerRadiusA_ = trkIsoBarrelRadiusA_[1];
255  isolationtrackThresholdA_ = trkIsoBarrelRadiusA_[2];
256  trackLipRadiusA_ = trkIsoBarrelRadiusA_[3];
257  trackD0RadiusA_ = trkIsoBarrelRadiusA_[4];
258  isolationtrackEtaSliceA_ = trkIsoBarrelRadiusA_[5];
259 
260  photonEcalRecHitConeInnerRadiusA_ = ecalIsoBarrelRadiusA_[0];
261  photonEcalRecHitConeOuterRadiusA_ = ecalIsoBarrelRadiusA_[1];
262  photonEcalRecHitEtaSliceA_ = ecalIsoBarrelRadiusA_[2];
263  photonEcalRecHitThreshEA_ = ecalIsoBarrelRadiusA_[3];
264  photonEcalRecHitThreshEtA_ = ecalIsoBarrelRadiusA_[4];
265 
266  photonHcalTowerConeInnerRadiusA_ = hcalIsoBarrelRadiusA_[0];
267  photonHcalTowerConeOuterRadiusA_ = hcalIsoBarrelRadiusA_[1];
268  photonHcalTowerThreshEA_ = hcalIsoBarrelRadiusA_[2];
269  photonHcalDepth1TowerConeInnerRadiusA_ = hcalIsoBarrelRadiusA_[3];
270  photonHcalDepth1TowerConeOuterRadiusA_ = hcalIsoBarrelRadiusA_[4];
271  photonHcalDepth1TowerThreshEA_ = hcalIsoBarrelRadiusA_[5];
272  photonHcalDepth2TowerConeInnerRadiusA_ = hcalIsoBarrelRadiusA_[6];
273  photonHcalDepth2TowerConeOuterRadiusA_ = hcalIsoBarrelRadiusA_[7];
274  photonHcalDepth2TowerThreshEA_ = hcalIsoBarrelRadiusA_[8];
275 
276  trackConeOuterRadiusB_ = trkIsoBarrelRadiusB_[0];
277  trackConeInnerRadiusB_ = trkIsoBarrelRadiusB_[1];
278  isolationtrackThresholdB_ = trkIsoBarrelRadiusB_[2];
279  trackLipRadiusB_ = trkIsoBarrelRadiusB_[3];
280  trackD0RadiusB_ = trkIsoBarrelRadiusB_[4];
281  isolationtrackEtaSliceB_ = trkIsoBarrelRadiusB_[5];
282 
283  photonEcalRecHitConeInnerRadiusB_ = ecalIsoBarrelRadiusB_[0];
284  photonEcalRecHitConeOuterRadiusB_ = ecalIsoBarrelRadiusB_[1];
285  photonEcalRecHitEtaSliceB_ = ecalIsoBarrelRadiusB_[2];
286  photonEcalRecHitThreshEB_ = ecalIsoBarrelRadiusB_[3];
287  photonEcalRecHitThreshEtB_ = ecalIsoBarrelRadiusB_[4];
288 
289  photonHcalTowerConeInnerRadiusB_ = hcalIsoBarrelRadiusB_[0];
290  photonHcalTowerConeOuterRadiusB_ = hcalIsoBarrelRadiusB_[1];
291  photonHcalTowerThreshEB_ = hcalIsoBarrelRadiusB_[2];
292  photonHcalDepth1TowerConeInnerRadiusB_ = hcalIsoBarrelRadiusB_[3];
293  photonHcalDepth1TowerConeOuterRadiusB_ = hcalIsoBarrelRadiusB_[4];
294  photonHcalDepth1TowerThreshEB_ = hcalIsoBarrelRadiusB_[5];
295  photonHcalDepth2TowerConeInnerRadiusB_ = hcalIsoBarrelRadiusB_[6];
296  photonHcalDepth2TowerConeOuterRadiusB_ = hcalIsoBarrelRadiusB_[7];
297  photonHcalDepth2TowerThreshEB_ = hcalIsoBarrelRadiusB_[8];
298 
299  } else {
300  // detector==EcalEndcap
301 
302  trackConeOuterRadiusA_ = trkIsoEndcapRadiusA_[0];
303  trackConeInnerRadiusA_ = trkIsoEndcapRadiusA_[1];
304  isolationtrackThresholdA_ = trkIsoEndcapRadiusA_[2];
305  trackLipRadiusA_ = trkIsoEndcapRadiusA_[3];
306  trackD0RadiusA_ = trkIsoEndcapRadiusA_[4];
307  isolationtrackEtaSliceA_ = trkIsoEndcapRadiusA_[5];
308 
309  photonEcalRecHitConeInnerRadiusA_ = ecalIsoEndcapRadiusA_[0];
310  photonEcalRecHitConeOuterRadiusA_ = ecalIsoEndcapRadiusA_[1];
311  photonEcalRecHitEtaSliceA_ = ecalIsoEndcapRadiusA_[2];
312  photonEcalRecHitThreshEA_ = ecalIsoEndcapRadiusA_[3];
313  photonEcalRecHitThreshEtA_ = ecalIsoEndcapRadiusA_[4];
314 
315  photonHcalTowerConeInnerRadiusA_ = hcalIsoEndcapRadiusA_[0];
316  photonHcalTowerConeOuterRadiusA_ = hcalIsoEndcapRadiusA_[1];
317  photonHcalTowerThreshEA_ = hcalIsoEndcapRadiusA_[2];
318  photonHcalDepth1TowerConeInnerRadiusA_ = hcalIsoEndcapRadiusA_[3];
319  photonHcalDepth1TowerConeOuterRadiusA_ = hcalIsoEndcapRadiusA_[4];
320  photonHcalDepth1TowerThreshEA_ = hcalIsoEndcapRadiusA_[5];
321  photonHcalDepth2TowerConeInnerRadiusA_ = hcalIsoEndcapRadiusA_[6];
322  photonHcalDepth2TowerConeOuterRadiusA_ = hcalIsoEndcapRadiusA_[7];
323  photonHcalDepth2TowerThreshEA_ = hcalIsoEndcapRadiusA_[8];
324 
325  trackConeOuterRadiusB_ = trkIsoEndcapRadiusB_[0];
326  trackConeInnerRadiusB_ = trkIsoEndcapRadiusB_[1];
327  isolationtrackThresholdB_ = trkIsoEndcapRadiusB_[2];
328  trackLipRadiusB_ = trkIsoEndcapRadiusB_[3];
329  trackD0RadiusB_ = trkIsoEndcapRadiusB_[4];
330  isolationtrackEtaSliceB_ = trkIsoEndcapRadiusB_[5];
331 
332  photonEcalRecHitConeInnerRadiusB_ = ecalIsoEndcapRadiusB_[0];
333  photonEcalRecHitConeOuterRadiusB_ = ecalIsoEndcapRadiusB_[1];
334  photonEcalRecHitEtaSliceB_ = ecalIsoEndcapRadiusB_[2];
335  photonEcalRecHitThreshEB_ = ecalIsoEndcapRadiusB_[3];
336  photonEcalRecHitThreshEtB_ = ecalIsoEndcapRadiusB_[4];
337 
338  photonHcalTowerConeInnerRadiusB_ = hcalIsoEndcapRadiusB_[0];
339  photonHcalTowerConeOuterRadiusB_ = hcalIsoEndcapRadiusB_[1];
340  photonHcalTowerThreshEB_ = hcalIsoEndcapRadiusB_[2];
341  photonHcalDepth1TowerConeInnerRadiusB_ = hcalIsoEndcapRadiusB_[3];
342  photonHcalDepth1TowerConeOuterRadiusB_ = hcalIsoEndcapRadiusB_[4];
343  photonHcalDepth1TowerThreshEB_ = hcalIsoEndcapRadiusB_[5];
344  photonHcalDepth2TowerConeInnerRadiusB_ = hcalIsoEndcapRadiusB_[6];
345  photonHcalDepth2TowerConeOuterRadiusB_ = hcalIsoEndcapRadiusB_[7];
346  photonHcalDepth2TowerThreshEB_ = hcalIsoEndcapRadiusB_[8];
347  }
348 
349  //Calculate hollow cone track isolation, CONE A
350  int ntrkA = 0;
351  double trkisoA = 0;
352  calculateTrackIso(pho,
353  e,
354  trkisoA,
355  ntrkA,
356  isolationtrackThresholdA_,
357  trackConeOuterRadiusA_,
358  trackConeInnerRadiusA_,
359  isolationtrackEtaSliceA_,
360  trackLipRadiusA_,
361  trackD0RadiusA_);
362 
363  //Calculate solid cone track isolation, CONE A
364  int sntrkA = 0;
365  double strkisoA = 0;
366  calculateTrackIso(pho,
367  e,
368  strkisoA,
369  sntrkA,
370  isolationtrackThresholdA_,
371  trackConeOuterRadiusA_,
372  0.,
373  isolationtrackEtaSliceA_,
374  trackLipRadiusA_,
375  trackD0RadiusA_);
376 
377  phoisolR1.nTrkHollowCone = ntrkA;
378  phoisolR1.trkSumPtHollowCone = trkisoA;
379  phoisolR1.nTrkSolidCone = sntrkA;
380  phoisolR1.trkSumPtSolidCone = strkisoA;
381 
382  //Calculate hollow cone track isolation, CONE B
383  int ntrkB = 0;
384  double trkisoB = 0;
385  calculateTrackIso(pho,
386  e,
387  trkisoB,
388  ntrkB,
389  isolationtrackThresholdB_,
390  trackConeOuterRadiusB_,
391  trackConeInnerRadiusB_,
392  isolationtrackEtaSliceB_,
393  trackLipRadiusB_,
394  trackD0RadiusB_);
395 
396  //Calculate solid cone track isolation, CONE B
397  int sntrkB = 0;
398  double strkisoB = 0;
399  calculateTrackIso(pho,
400  e,
401  strkisoB,
402  sntrkB,
403  isolationtrackThresholdB_,
404  trackConeOuterRadiusB_,
405  0.,
406  isolationtrackEtaSliceB_,
407  trackLipRadiusB_,
408  trackD0RadiusB_);
409 
410  phoisolR2.nTrkHollowCone = ntrkB;
411  phoisolR2.trkSumPtHollowCone = trkisoB;
412  phoisolR2.nTrkSolidCone = sntrkB;
413  phoisolR2.trkSumPtSolidCone = strkisoB;
414 
415  // std::cout << "Output from solid cone track isolation: ";
416  // std::cout << " Sum pT: " << strkiso << " ntrk: " << sntrk << std::endl;
417 
418  double EcalRecHitIsoA = calculateEcalRecHitIso(pho,
419  e,
420  es,
421  photonEcalRecHitConeOuterRadiusA_,
422  photonEcalRecHitConeInnerRadiusA_,
423  photonEcalRecHitEtaSliceA_,
424  photonEcalRecHitThreshEA_,
425  photonEcalRecHitThreshEtA_,
428  phoisolR1.ecalRecHitSumEt = EcalRecHitIsoA;
429 
430  double EcalRecHitIsoB = calculateEcalRecHitIso(pho,
431  e,
432  es,
433  photonEcalRecHitConeOuterRadiusB_,
434  photonEcalRecHitConeInnerRadiusB_,
435  photonEcalRecHitEtaSliceB_,
436  photonEcalRecHitThreshEB_,
437  photonEcalRecHitThreshEtB_,
440  phoisolR2.ecalRecHitSumEt = EcalRecHitIsoB;
441 
442  double HcalTowerIsoA = calculateHcalTowerIso(
443  pho, e, es, photonHcalTowerConeOuterRadiusA_, photonHcalTowerConeInnerRadiusA_, photonHcalTowerThreshEA_, -1);
444  phoisolR1.hcalTowerSumEt = HcalTowerIsoA;
445 
446  double HcalTowerIsoB = calculateHcalTowerIso(
447  pho, e, es, photonHcalTowerConeOuterRadiusB_, photonHcalTowerConeInnerRadiusB_, photonHcalTowerThreshEB_, -1);
448  phoisolR2.hcalTowerSumEt = HcalTowerIsoB;
449 
451 
452  double HcalDepth1TowerIsoA = calculateHcalTowerIso(pho,
453  e,
454  es,
455  photonHcalDepth1TowerConeOuterRadiusA_,
456  photonHcalDepth1TowerConeInnerRadiusA_,
457  photonHcalDepth1TowerThreshEA_,
458  1);
459  phoisolR1.hcalDepth1TowerSumEt = HcalDepth1TowerIsoA;
460 
461  double HcalDepth1TowerIsoB = calculateHcalTowerIso(pho,
462  e,
463  es,
464  photonHcalDepth1TowerConeOuterRadiusB_,
465  photonHcalDepth1TowerConeInnerRadiusB_,
466  photonHcalDepth1TowerThreshEB_,
467  1);
468  phoisolR2.hcalDepth1TowerSumEt = HcalDepth1TowerIsoB;
469 
471 
472  double HcalDepth2TowerIsoA = calculateHcalTowerIso(pho,
473  e,
474  es,
475  photonHcalDepth2TowerConeOuterRadiusA_,
476  photonHcalDepth2TowerConeInnerRadiusA_,
477  photonHcalDepth2TowerThreshEA_,
478  2);
479  phoisolR1.hcalDepth2TowerSumEt = HcalDepth2TowerIsoA;
480 
481  double HcalDepth2TowerIsoB = calculateHcalTowerIso(pho,
482  e,
483  es,
484  photonHcalDepth2TowerConeOuterRadiusB_,
485  photonHcalDepth2TowerConeInnerRadiusB_,
486  photonHcalDepth2TowerThreshEB_,
487  2);
488  phoisolR2.hcalDepth2TowerSumEt = HcalDepth2TowerIsoB;
489 
490  // New Hcal isolation based on the new H/E definition (towers behind the BCs in the SC are used to evaluated H)
491  double HcalTowerBcIsoA =
492  calculateHcalTowerIso(pho, e, es, photonHcalTowerConeOuterRadiusA_, photonHcalTowerThreshEA_, -1);
493  phoisolR1.hcalTowerSumEtBc = HcalTowerBcIsoA;
494 
495  double HcalTowerBcIsoB =
496  calculateHcalTowerIso(pho, e, es, photonHcalTowerConeOuterRadiusB_, photonHcalTowerThreshEB_, -1);
497  phoisolR2.hcalTowerSumEtBc = HcalTowerBcIsoB;
498 
500 
501  double HcalDepth1TowerBcIsoA =
502  calculateHcalTowerIso(pho, e, es, photonHcalDepth1TowerConeOuterRadiusA_, photonHcalDepth1TowerThreshEA_, 1);
503  phoisolR1.hcalDepth1TowerSumEtBc = HcalDepth1TowerBcIsoA;
504 
505  double HcalDepth1TowerBcIsoB =
506  calculateHcalTowerIso(pho, e, es, photonHcalDepth1TowerConeOuterRadiusB_, photonHcalDepth1TowerThreshEB_, 1);
507  phoisolR2.hcalDepth1TowerSumEtBc = HcalDepth1TowerBcIsoB;
508 
510 
511  double HcalDepth2TowerBcIsoA =
512  calculateHcalTowerIso(pho, e, es, photonHcalDepth2TowerConeOuterRadiusA_, photonHcalDepth2TowerThreshEA_, 2);
513  phoisolR1.hcalDepth2TowerSumEtBc = HcalDepth2TowerBcIsoA;
514 
515  double HcalDepth2TowerBcIsoB =
516  calculateHcalTowerIso(pho, e, es, photonHcalDepth2TowerConeOuterRadiusB_, photonHcalDepth2TowerThreshEB_, 2);
517  phoisolR2.hcalDepth2TowerSumEtBc = HcalDepth2TowerBcIsoB;
518 }
519 
521  bool& isEBPho,
522  bool& isEEPho,
523  bool& isEBEtaGap,
524  bool& isEBPhiGap,
525  bool& isEERingGap,
526  bool& isEEDeeGap,
527  bool& isEBEEGap) {
528  const reco::CaloCluster& seedCluster = *(photon->superCluster()->seed());
529  // following line is temporary until the D. Evans or F. Ferri submit the new tag for ClusterAlgos
530  // DEfinitive will be
531  // DetId seedXtalId = scRef->seed()->seed();
532  DetId seedXtalId = seedCluster.hitsAndFractions()[0].first;
533  int detector = seedXtalId.subdetId();
534 
535  //Set fiducial flags for this photon.
536  double eta = photon->superCluster()->position().eta();
537  double feta = fabs(eta);
538 
539  if (detector == EcalBarrel) {
540  isEBPho = true;
541  if (EBDetId::isNextToEtaBoundary(EBDetId(seedXtalId))) {
542  if (fabs(feta - 1.479) < .1)
543  isEBEEGap = true;
544  else
545  isEBEtaGap = true;
546  }
547 
548  if (EBDetId::isNextToPhiBoundary(EBDetId(seedXtalId)))
549  isEBPhiGap = true;
550 
551  } else if (detector == EcalEndcap) {
552  isEEPho = true;
553  if (EEDetId::isNextToRingBoundary(EEDetId(seedXtalId))) {
554  if (fabs(feta - 1.479) < .1)
555  isEBEEGap = true;
556  else
557  isEERingGap = true;
558  }
559 
560  if (EEDetId::isNextToDBoundary(EEDetId(seedXtalId)))
561  isEEDeeGap = true;
562  }
563 }
564 
566  const edm::Event& e,
567  double& trkCone,
568  int& ntrkCone,
569  double pTThresh,
570  double RCone,
571  double RinnerCone,
572  double etaSlice,
573  double lip,
574  double d0) const {
575  ntrkCone = 0;
576  trkCone = 0;
577  //get the tracks
579  e.getByToken(trackInputTag_, tracks);
580  if (!tracks.isValid()) {
581  return;
582  }
583  const reco::TrackCollection* trackCollection = tracks.product();
584  //Photon Eta and Phi. Hope these are correct.
585  reco::BeamSpot vertexBeamSpot;
586  edm::Handle<reco::BeamSpot> recoBeamSpotHandle;
587  e.getByToken(beamSpotProducerTag_, recoBeamSpotHandle);
588  vertexBeamSpot = *recoBeamSpotHandle;
589 
590  PhotonTkIsolation phoIso(RCone,
591  RinnerCone,
592  etaSlice,
593  pTThresh,
594  lip,
595  d0,
597  math::XYZPoint(vertexBeamSpot.x0(), vertexBeamSpot.y0(), vertexBeamSpot.z0()));
598 
599  std::pair<int, double> res = phoIso.getIso(photon);
600  ntrkCone = res.first;
601  trkCone = res.second;
602 }
603 
605  const edm::Event& iEvent,
606  const edm::EventSetup& iSetup,
607  double RCone,
608  double RConeInner,
609  double etaSlice,
610  double eMin,
611  double etMin,
612  bool vetoClusteredHits,
613  bool useNumXtals) const {
614  edm::Handle<EcalRecHitCollection> ecalhitsCollEB;
615  edm::Handle<EcalRecHitCollection> ecalhitsCollEE;
616  iEvent.getByToken(endcapecalCollection_, ecalhitsCollEE);
617 
618  iEvent.getByToken(barrelecalCollection_, ecalhitsCollEB);
619 
620  const EcalRecHitCollection* rechitsCollectionEE_ = ecalhitsCollEE.product();
621  const EcalRecHitCollection* rechitsCollectionEB_ = ecalhitsCollEB.product();
622 
624  iSetup.get<EcalSeverityLevelAlgoRcd>().get(sevlv);
625  const EcalSeverityLevelAlgo* sevLevel = sevlv.product();
626 
627  edm::ESHandle<CaloGeometry> geoHandle;
628  iSetup.get<CaloGeometryRecord>().get(geoHandle);
629 
630  EgammaRecHitIsolation phoIsoEB(
631  RCone, RConeInner, etaSlice, etMin, eMin, geoHandle, *rechitsCollectionEB_, sevLevel, DetId::Ecal);
632 
634  phoIsoEB.setUseNumCrystals(useNumXtals);
635  phoIsoEB.doSeverityChecks(ecalhitsCollEB.product(), severityExclEB_);
636  phoIsoEB.doFlagChecks(flagsEB_);
637  double ecalIsolEB = phoIsoEB.getEtSum(photon);
638 
639  EgammaRecHitIsolation phoIsoEE(
640  RCone, RConeInner, etaSlice, etMin, eMin, geoHandle, *rechitsCollectionEE_, sevLevel, DetId::Ecal);
641 
643  phoIsoEE.setUseNumCrystals(useNumXtals);
644  phoIsoEE.doSeverityChecks(ecalhitsCollEE.product(), severityExclEE_);
645  phoIsoEE.doFlagChecks(flagsEE_);
646 
647  double ecalIsolEE = phoIsoEE.getEtSum(photon);
648  // delete phoIso;
649  double ecalIsol = ecalIsolEB + ecalIsolEE;
650 
651  return ecalIsol;
652 }
653 
655  const edm::Event& iEvent,
656  const edm::EventSetup& iSetup,
657  double RCone,
658  double RConeInner,
659  double eMin,
660  signed int depth) const {
661  double hcalIsol = 0.;
662 
663  if (not hcalCollection_.isUninitialized()) {
664  edm::Handle<CaloTowerCollection> hcalhitsCollH;
665  iEvent.getByToken(hcalCollection_, hcalhitsCollH);
666 
667  const CaloTowerCollection* toww = hcalhitsCollH.product();
668 
669  //std::cout << "before iso call" << std::endl;
670  EgammaTowerIsolation phoIso(RCone, RConeInner, eMin, depth, toww);
671  hcalIsol = phoIso.getTowerEtSum(photon);
672  // delete phoIso;
673  //std::cout << "after call" << std::endl;
674  }
675 
676  return hcalIsol;
677 }
678 
680  const edm::Event& iEvent,
681  const edm::EventSetup& iSetup,
682  double RCone,
683  double eMin,
684  signed int depth) const {
685  double hcalIsol = 0.;
686 
687  if (not hcalCollection_.isUninitialized()) {
688  edm::Handle<CaloTowerCollection> hcalhitsCollH;
689  iEvent.getByToken(hcalCollection_, hcalhitsCollH);
690 
691  const CaloTowerCollection* toww = hcalhitsCollH.product();
692 
693  //std::cout << "before iso call" << std::endl;
694  EgammaTowerIsolation phoIso(RCone, 0., eMin, depth, toww);
695  hcalIsol = phoIso.getTowerEtSum(photon, &(photon->hcalTowersBehindClusters()));
696  // delete phoIso;
697  //std::cout << "after call" << std::endl;
698  }
699 
700  return hcalIsol;
701 }
PhotonIsolationCalculator::vetoClusteredEcalHits_
bool vetoClusteredEcalHits_
Definition: PhotonIsolationCalculator.h:93
PhotonIsolationCalculator.h
edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
PhotonTkIsolation
Definition: PhotonTkIsolation.h:20
EcalSeverityLevelAlgo
Definition: EcalSeverityLevelAlgo.h:33
PhotonIsolationCalculator::flagsEB_
std::vector< int > flagsEB_
Definition: PhotonIsolationCalculator.h:110
muons2muons_cfi.photon
photon
Definition: muons2muons_cfi.py:28
EBDetId::isNextToEtaBoundary
static bool isNextToEtaBoundary(EBDetId id)
Definition: EBDetId.cc:108
PhotonIsolationCalculator::setup
void setup(const edm::ParameterSet &conf, std::vector< int > const &flagsEB_, std::vector< int > const &flagsEE_, std::vector< int > const &severitiesEB_, std::vector< int > const &severitiesEE_, edm::ConsumesCollector &&iC)
Definition: PhotonIsolationCalculator.cc:43
photonAnalyzer_cfi.etMin
etMin
Definition: photonAnalyzer_cfi.py:54
PDWG_EXOHSCP_cff.tracks
tracks
Definition: PDWG_EXOHSCP_cff.py:28
reco::Photon::IsolationVariables::hcalTowerSumEtBc
float hcalTowerSumEtBc
Definition: Photon.h:370
mps_fire.i
i
Definition: mps_fire.py:428
reco::Photon::superCluster
reco::SuperClusterRef superCluster() const override
Ref to SuperCluster.
EgammaEcalIsolation.h
edm::Handle::product
T const * product() const
Definition: Handle.h:70
PhotonIsolationCalculator::ecalIsoBarrelRadiusB_
double ecalIsoBarrelRadiusB_[5]
Definition: PhotonIsolationCalculator.h:100
EcalSeverityLevelAlgoRcd.h
reco::BeamSpot::z0
double z0() const
z coordinate
Definition: BeamSpot.h:65
reco::Photon::FiducialFlags::isEE
bool isEE
Definition: Photon.h:96
BasicCluster.h
PhotonIsolationCalculator::hcalIsoEndcapRadiusA_
double hcalIsoEndcapRadiusA_[9]
Definition: PhotonIsolationCalculator.h:105
CaloGeometryRecord
Definition: CaloGeometryRecord.h:30
EBDetId
Definition: EBDetId.h:17
EBDetId.h
EEDetId.h
reco::Photon::IsolationVariables::ecalRecHitSumEt
float ecalRecHitSumEt
Definition: Photon.h:362
EgammaRecHitIsolation::setUseNumCrystals
void setUseNumCrystals(bool b=true)
Definition: EgammaRecHitIsolation.h:45
PhotonIsolationCalculator::trkIsoBarrelRadiusB_
double trkIsoBarrelRadiusB_[6]
Definition: PhotonIsolationCalculator.h:99
EcalBarrelTopology.h
edm::SortedCollection< EcalRecHit >
PhotonIsolationCalculator::ecalIsoEndcapRadiusB_
double ecalIsoEndcapRadiusB_[5]
Definition: PhotonIsolationCalculator.h:107
PhotonIsolationCalculator::flagsEE_
std::vector< int > flagsEE_
Definition: PhotonIsolationCalculator.h:111
PhotonIsolationCalculator::hcalIsoEndcapRadiusB_
double hcalIsoEndcapRadiusB_[9]
Definition: PhotonIsolationCalculator.h:108
EgammaRecHitIsolation::setVetoClustered
void setVetoClustered(bool b=true)
Definition: EgammaRecHitIsolation.h:46
EgammaRecHitIsolation
Definition: EgammaRecHitIsolation.h:26
edm::Handle< reco::TrackCollection >
PhotonIsolationCalculator::moduleEtaBoundary_
std::vector< double > moduleEtaBoundary_
Definition: PhotonIsolationCalculator.h:92
EcalBarrel
Definition: EcalSubdetector.h:10
EcalRecHitCollections.h
BasicClusterFwd.h
PhotonIsolationCalculator::trkIsoEndcapRadiusA_
double trkIsoEndcapRadiusA_[6]
Definition: PhotonIsolationCalculator.h:103
edm::Ref< SuperClusterCollection >
qcdUeDQM_cfi.lip
lip
Definition: qcdUeDQM_cfi.py:25
DetId
Definition: DetId.h:17
PhotonIsolationCalculator::hcalIsoBarrelRadiusA_
double hcalIsoBarrelRadiusA_[9]
Definition: PhotonIsolationCalculator.h:98
PhotonIsolationCalculator::beamSpotProducerTag_
edm::EDGetToken beamSpotProducerTag_
Definition: PhotonIsolationCalculator.h:90
PhotonIsolationCalculator::hcalIsoBarrelRadiusB_
double hcalIsoBarrelRadiusB_[9]
Definition: PhotonIsolationCalculator.h:101
EgammaRecHitIsolation::getEtSum
double getEtSum(const reco::Candidate *emObject) const
Definition: EgammaRecHitIsolation.h:39
Track.h
edm::EventSetup::get
T get() const
Definition: EventSetup.h:80
TrackFwd.h
reco::Photon::IsolationVariables::hcalDepth1TowerSumEtBc
float hcalDepth1TowerSumEtBc
Definition: Photon.h:372
BeamSpot.h
reco::Photon::FiducialFlags::isEBEEGap
bool isEBEEGap
Definition: Photon.h:101
reco::Photon::IsolationVariables::hcalTowerSumEt
float hcalTowerSumEt
Definition: Photon.h:364
reco::Photon::FiducialFlags::isEB
bool isEB
Definition: Photon.h:95
PhotonTkIsolation::getIso
std::pair< int, float > getIso(const reco::Candidate *) const
Definition: PhotonTkIsolation.cc:52
PVValHelper::eta
Definition: PVValidationHelpers.h:69
reco::Photon::FiducialFlags::isEEDeeGap
bool isEEDeeGap
Definition: Photon.h:100
reco::CaloCluster
Definition: CaloCluster.h:31
photonAnalyzer_cfi.eMin
eMin
Definition: photonAnalyzer_cfi.py:50
PhotonIsolationCalculator::ecalIsoBarrelRadiusA_
double ecalIsoBarrelRadiusA_[5]
Definition: PhotonIsolationCalculator.h:97
PhotonIsolationCalculator::calculateHcalTowerIso
double calculateHcalTowerIso(const reco::Photon *photon, const edm::Event &iEvent, const edm::EventSetup &iSetup, double RCone, double RConeInner, double eMin, signed int depth) const
Definition: PhotonIsolationCalculator.cc:654
reco::BeamSpot
Definition: BeamSpot.h:21
edm::ESHandle< EcalSeverityLevelAlgo >
EcalSeverityLevelAlgoRcd
Definition: EcalSeverityLevelAlgoRcd.h:12
StringToEnumValue.h
EgammaTowerIsolation.h
GsfElectron.h
reco::Photon::FiducialFlags::isEERingGap
bool isEERingGap
Definition: Photon.h:99
EgammaRecHitIsolation::doSeverityChecks
void doSeverityChecks(const EcalRecHitCollection *const recHits, const std::vector< int > &v)
Definition: EgammaRecHitIsolation.h:47
LEDCalibrationChannels.depth
depth
Definition: LEDCalibrationChannels.py:65
DetId::subdetId
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum)
Definition: DetId.h:48
EEDetId
Definition: EEDetId.h:14
reco::Photon::IsolationVariables::trkSumPtSolidCone
float trkSumPtSolidCone
Definition: Photon.h:376
CaloGeometryRecord.h
reco::Photon::IsolationVariables::hcalDepth2TowerSumEtBc
float hcalDepth2TowerSumEtBc
Definition: Photon.h:374
EcalEndcap
Definition: EcalSubdetector.h:10
PhotonIsolationCalculator::hcalCollection_
edm::EDGetToken hcalCollection_
Definition: PhotonIsolationCalculator.h:87
JetMETHLTOfflineSource_cfi.feta
feta
Definition: JetMETHLTOfflineSource_cfi.py:30
GsfElectronFwd.h
edm::ParameterSet
Definition: ParameterSet.h:47
math::XYZPoint
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
reco::Photon::IsolationVariables::nTrkSolidCone
int nTrkSolidCone
Definition: Photon.h:380
duplicaterechits_cfi.trackCollection
trackCollection
Definition: duplicaterechits_cfi.py:4
reco::CaloCluster::hitsAndFractions
const std::vector< std::pair< DetId, float > > & hitsAndFractions() const
Definition: CaloCluster.h:210
EEDetId::isNextToRingBoundary
static bool isNextToRingBoundary(EEDetId id)
Definition: EEDetId.cc:284
EcalEndcapTopology.h
PhotonIsolationCalculator::trackInputTag_
edm::EDGetToken trackInputTag_
Definition: PhotonIsolationCalculator.h:89
reco::Photon::FiducialFlags::isEBPhiGap
bool isEBPhiGap
Definition: Photon.h:98
PhotonIsolationCalculator::calculateEcalRecHitIso
double calculateEcalRecHitIso(const reco::Photon *photon, const edm::Event &iEvent, const edm::EventSetup &iSetup, double RCone, double RConeInner, double etaSlice, double eMin, double etMin, bool vetoClusteredHits, bool useNumCrystals) const
Definition: PhotonIsolationCalculator.cc:604
CaloTopologyRecord.h
reco::Photon::FiducialFlags
Definition: Photon.h:93
EgammaTowerIsolation
Definition: EgammaTowerIsolation.h:197
iEvent
int iEvent
Definition: GenABIO.cc:224
PhotonIsolationCalculator::severityExclEE_
std::vector< int > severityExclEE_
Definition: PhotonIsolationCalculator.h:113
PhotonIsolationCalculator::classify
static void classify(const reco::Photon *photon, bool &isEBPho, bool &isEEPho, bool &isEBEtaGap, bool &isEBPhiGap, bool &isEERingGap, bool &isEEDeeGap, bool &isEBEEGap)
Definition: PhotonIsolationCalculator.cc:520
PhotonIsolationCalculator::calculateTrackIso
void calculateTrackIso(const reco::Photon *photon, const edm::Event &e, double &trkCone, int &ntrkCone, double pTThresh=0, double RCone=.4, double RinnerCone=.1, double etaSlice=0.015, double lip=0.2, double d0=0.1) const
Definition: PhotonIsolationCalculator.cc:565
edm::EventSetup
Definition: EventSetup.h:57
EgammaRecHitIsolation::doFlagChecks
void doFlagChecks(const std::vector< int > &v)
Definition: EgammaRecHitIsolation.h:54
DetId::Ecal
Definition: DetId.h:27
get
#define get
res
Definition: Electron.h:6
reco::Photon::IsolationVariables
Definition: Photon.h:358
reco::Photon::IsolationVariables::trkSumPtHollowCone
float trkSumPtHollowCone
Definition: Photon.h:378
EcalRecHit.h
CaloTopology.h
reco::Photon::FiducialFlags::isEBEtaGap
bool isEBEtaGap
Definition: Photon.h:97
EBDetId::isNextToPhiBoundary
static bool isNextToPhiBoundary(EBDetId id)
Definition: EBDetId.cc:113
PhotonTkIsolation.h
reco::Photon
Definition: Photon.h:21
PhotonIsolationCalculator::endcapecalCollection_
edm::EDGetToken endcapecalCollection_
Definition: PhotonIsolationCalculator.h:86
reco::BeamSpot::x0
double x0() const
x coordinate
Definition: BeamSpot.h:61
edm::EDGetToken::isUninitialized
constexpr bool isUninitialized() const noexcept
Definition: EDGetToken.h:51
PhotonIsolationCalculator::ecalIsoEndcapRadiusA_
double ecalIsoEndcapRadiusA_[5]
Definition: PhotonIsolationCalculator.h:104
reco::Photon::IsolationVariables::nTrkHollowCone
int nTrkHollowCone
Definition: Photon.h:382
DetId.h
EEDetId::isNextToDBoundary
static bool isNextToDBoundary(EEDetId id)
Definition: EEDetId.cc:279
EgammaRecHitIsolation.h
SuperCluster.h
CaloGeometry.h
PhotonIsolationCalculator::trkIsoBarrelRadiusA_
double trkIsoBarrelRadiusA_[6]
Definition: PhotonIsolationCalculator.h:96
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
HcalRecHitCollections.h
EgammaTowerIsolation::getTowerEtSum
double getTowerEtSum(const reco::Candidate *cand, const std::vector< CaloTowerDetId > *detIdToExclude=nullptr) const
Definition: EgammaTowerIsolation.h:205
PhotonIsolationCalculator::modulePhiBoundary_
double modulePhiBoundary_
Definition: PhotonIsolationCalculator.h:91
hgcalTestNeighbor_cfi.detector
detector
Definition: hgcalTestNeighbor_cfi.py:6
PhotonIsolationCalculator::calculate
void calculate(const reco::Photon *, const edm::Event &, const edm::EventSetup &es, reco::Photon::FiducialFlags &phofid, reco::Photon::IsolationVariables &phoisolR03, reco::Photon::IsolationVariables &phoisolR04) const
Definition: PhotonIsolationCalculator.cc:179
reco::Photon::IsolationVariables::hcalDepth1TowerSumEt
float hcalDepth1TowerSumEt
Definition: Photon.h:366
PhotonIsolationCalculator::severityExclEB_
std::vector< int > severityExclEB_
Definition: PhotonIsolationCalculator.h:112
reco::Photon::IsolationVariables::hcalDepth2TowerSumEt
float hcalDepth2TowerSumEt
Definition: Photon.h:368
reco::BeamSpot::y0
double y0() const
y coordinate
Definition: BeamSpot.h:63
edm::Event
Definition: Event.h:73
d0
static constexpr float d0
Definition: L1EGammaCrystalsEmulatorProducer.cc:84
edm::InputTag
Definition: InputTag.h:15
reco::TrackCollection
std::vector< Track > TrackCollection
collection of Tracks
Definition: TrackFwd.h:14
edm::ConsumesCollector
Definition: ConsumesCollector.h:45
EcalChannelStatusRcd.h
PhotonIsolationCalculator::trkIsoEndcapRadiusB_
double trkIsoEndcapRadiusB_[6]
Definition: PhotonIsolationCalculator.h:106
PhotonIsolationCalculator::useNumCrystals_
bool useNumCrystals_
Definition: PhotonIsolationCalculator.h:94
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37
EgammaHcalIsolation.h
conversionTrackCandidates_cfi.vetoClusteredHits
vetoClusteredHits
Definition: conversionTrackCandidates_cfi.py:58
PhotonIsolationCalculator::barrelecalCollection_
edm::EDGetToken barrelecalCollection_
Definition: PhotonIsolationCalculator.h:85