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 |
|
|
#include "FWCore/ParameterSet/interface/ParameterSet.h"
|
10 |
|
|
#include "FWCore/Framework/interface/ESHandle.h"
|
11 |
|
|
|
12 |
|
|
#include "DataFormats/HcalRecHit/interface/HcalRecHitCollections.h"
|
13 |
|
|
//#include "DataFormats/EcalRecHit/interface/EcalRecHitCollections.h"
|
14 |
|
|
//#include "Geometry/CaloGeometry/interface/CaloCellGeometry.h"
|
15 |
|
|
#include "Geometry/CaloGeometry/interface/CaloGeometry.h"
|
16 |
|
|
//#include "Geometry/Records/interface/IdealGeometryRecord.h"
|
17 |
|
|
|
18 |
|
|
#include "UserCode/Morgan/interface/TRootPhoton.h"
|
19 |
|
|
#include "UserCode/Morgan/interface/TRootSuperCluster.h"
|
20 |
|
|
#include "UserCode/Morgan/interface/TRootCluster.h"
|
21 |
|
|
|
22 |
|
|
#include "TClonesArray.h"
|
23 |
|
|
|
24 |
|
|
#define PI 3.141592654
|
25 |
|
|
#define TWOPI 6.283185308
|
26 |
|
|
|
27 |
|
|
class PhotonIsolator{
|
28 |
|
|
|
29 |
|
|
public:
|
30 |
|
|
|
31 |
|
|
PhotonIsolator():config_(0), verbosity_(0) {;}
|
32 |
|
|
PhotonIsolator(edm::ParameterSet * aConfig):config_(aConfig)
|
33 |
|
|
{
|
34 |
|
|
verbosity_ = (*config_).getUntrackedParameter<int>("verbosity", 0);
|
35 |
|
|
ecalIslandIsolation_DRmax_ = (*config_).getParameter<double>("ecalIslandIsolation_DRmax");
|
36 |
|
|
ecalIslandIsolation_ClusterEt_threshold_ = (*config_).getParameter<double>("ecalIslandIsolation_ClusterEt_threshold");
|
37 |
|
|
ecalDoubleConeIsolation_DRmin_ = (*config_).getParameter<double>("ecalDoubleConeIsolation_DRmin");
|
38 |
|
|
ecalDoubleConeIsolation_DRmax_ = (*config_).getParameter<double>("ecalDoubleConeIsolation_DRmax");
|
39 |
|
|
ecalDoubleConeIsolation_ClusterEt_threshold_ = (*config_).getParameter<double>("ecalDoubleConeIsolation_ClusterEt_threshold");
|
40 |
|
|
HcalRecHitIsolation_DRmax_ = (*config_).getParameter<double>("HcalRecHitIsolation_DRmax");
|
41 |
|
|
HcalRecHitIsolation_HitEt_threshold_ = (*config_).getParameter<double>("HcalRecHitIsolation_HitEt_threshold");
|
42 |
|
|
}
|
43 |
|
|
|
44 |
|
|
~PhotonIsolator() {;}
|
45 |
|
|
|
46 |
|
|
float DeltaPhi(float phi1, float phi2);
|
47 |
|
|
float DeltaR(float phi1, float phi2, float eta1, float eta2);
|
48 |
|
|
void SetVerbosity(int verbosity) {verbosity_ = verbosity; };
|
49 |
|
|
Double_t EcalIslandIsolation(TRootPhoton* photon, TClonesArray* superClusters, TClonesArray* basicClusters);
|
50 |
|
|
Double_t EcalDoubleConeIsolation(TRootPhoton* photon, TClonesArray* superClusters, TClonesArray* basicClusters);
|
51 |
|
|
Double_t HcalRecHitIsolation(TRootPhoton* photon, const HBHERecHitCollection* hbhe, const HORecHitCollection* ho, const HFRecHitCollection* hf, const CaloGeometry* geometry);
|
52 |
|
|
|
53 |
|
|
|
54 |
|
|
private:
|
55 |
|
|
edm::ParameterSet * config_;
|
56 |
|
|
int verbosity_;
|
57 |
|
|
double ecalIslandIsolation_DRmax_;
|
58 |
|
|
double ecalIslandIsolation_ClusterEt_threshold_;
|
59 |
|
|
double ecalDoubleConeIsolation_DRmin_;
|
60 |
|
|
double ecalDoubleConeIsolation_DRmax_;
|
61 |
|
|
double ecalDoubleConeIsolation_ClusterEt_threshold_;
|
62 |
|
|
double HcalRecHitIsolation_DRmax_;
|
63 |
|
|
double HcalRecHitIsolation_HitEt_threshold_;
|
64 |
|
|
|
65 |
|
|
};
|
66 |
|
|
|
67 |
|
|
#endif
|