CMS 3D CMS Logo

HiFJGridEmptyAreaCalculator.h
Go to the documentation of this file.
1 #ifndef HiJetBackground_HiFJGridEmptyAreaCalculator_h
2 #define HiJetBackground_HiFJGridEmptyAreaCalculator_h
3 
4 // system include files
5 #include <memory>
6 #include <sstream>
7 #include <string>
8 #include <vector>
9 
10 // user include files
13 
16 
19 
23 
25 public:
28 
29  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
30 
31 private:
32  void beginStream(edm::StreamID) override;
33  void produce(edm::Event&, const edm::EventSetup&) override;
34  void endStream() override;
35 
37  //\{
38  //----------------------------------------------------------------
39 
42 
43 private:
45  void setupGrid(double eta_min, double eta_max);
46  void setupGridJet(const reco::Jet* jet);
47 
49  int tileIndexJet(const reco::PFCandidate* pfCand);
50  int tileIndexEta(const reco::PFCandidate* pfCand);
51  int tileIndexEtaJet(const reco::PFCandidate* pfCand);
52  int tileIndexPhi(const reco::PFCandidate* pfCand);
53 
55  int numJetGridCells(std::vector<std::pair<int, int>>& indices);
56 
60  void calculateGridRho(const edm::Event& iEvent, const edm::EventSetup& iSetup);
61 
63  const double twopi_ = 2 * M_PI;
64 
66 
67  //parameters of grid covering the full acceptance
68  double ymin_;
69  double ymax_;
70  double dy_;
71  double dphi_;
72  double tileArea_;
73 
74  //parameters of grid around jets
75  double dyJet_;
76  double yminJet_;
77  double ymaxJet_;
79 
80  //leave bands at boundaries
81  double etaminJet_;
82  double etamaxJet_;
83 
84  //for the grid calculation covering the full acceptance
85  int ny_;
86  int nphi_;
87  int ntotal_;
88 
89  //for the grid calculation around each jet
91  int nyJet_;
92 
94  double gridWidth_;
95  double band_;
96  int hiBinCut_;
99 
100  std::vector<double> rhoVsEta_;
101  std::vector<double> meanRhoVsEta_;
102  std::vector<double> etaMaxGrid_;
103  std::vector<double> etaMinGrid_;
104 
105  int n_tiles() { return ntotal_; }
106 
113 
115 };
116 
117 #endif
bTagCombinedSVVariables_cff.indices
indices
Definition: bTagCombinedSVVariables_cff.py:67
edm::StreamID
Definition: StreamID.h:30
HiFJGridEmptyAreaCalculator::ny_
int ny_
Definition: HiFJGridEmptyAreaCalculator.h:85
HiFJGridEmptyAreaCalculator::n_tiles
int n_tiles()
Definition: HiFJGridEmptyAreaCalculator.h:105
HiFJGridEmptyAreaCalculator::ymaxJet_
double ymaxJet_
Definition: HiFJGridEmptyAreaCalculator.h:77
HiFJGridEmptyAreaCalculator::centralityBinToken_
edm::EDGetTokenT< int > centralityBinToken_
Definition: HiFJGridEmptyAreaCalculator.h:114
Handle.h
reco::Jet
Base class for all types of Jets.
Definition: Jet.h:20
HiFJGridEmptyAreaCalculator::numJetGridCells
int numJetGridCells(std::vector< std::pair< int, int >> &indices)
number of grid cells that overlap with jet constituents filling in the in between area
Definition: HiFJGridEmptyAreaCalculator.cc:416
HiFJGridEmptyAreaCalculator::etaMinGrid_
std::vector< double > etaMinGrid_
Definition: HiFJGridEmptyAreaCalculator.h:103
HiFJGridEmptyAreaCalculator::beginStream
void beginStream(edm::StreamID) override
Definition: HiFJGridEmptyAreaCalculator.cc:444
PFCandidate.h
HiFJGridEmptyAreaCalculator::nyJet_
int nyJet_
Definition: HiFJGridEmptyAreaCalculator.h:91
HiFJGridEmptyAreaCalculator::endStream
void endStream() override
Definition: HiFJGridEmptyAreaCalculator.cc:446
HiFJGridEmptyAreaCalculator::hiBinCut_
int hiBinCut_
Definition: HiFJGridEmptyAreaCalculator.h:96
edm::EDGetTokenT
Definition: EDGetToken.h:33
egammaIdentification.eta_min
eta_min
Definition: egammaIdentification.py:19
HiFJGridEmptyAreaCalculator::dy_
double dy_
Definition: HiFJGridEmptyAreaCalculator.h:70
HiFJGridEmptyAreaCalculator::rhoVsEta_
std::vector< double > rhoVsEta_
Definition: HiFJGridEmptyAreaCalculator.h:100
EDProducer.h
HiFJGridEmptyAreaCalculator::mapRhoToken_
edm::EDGetTokenT< std::vector< double > > mapRhoToken_
Definition: HiFJGridEmptyAreaCalculator.h:111
HiFJGridEmptyAreaCalculator::~HiFJGridEmptyAreaCalculator
~HiFJGridEmptyAreaCalculator() override
Definition: HiFJGridEmptyAreaCalculator.cc:64
HiFJGridEmptyAreaCalculator::ntotal_
int ntotal_
Definition: HiFJGridEmptyAreaCalculator.h:87
HiFJGridEmptyAreaCalculator::band_
double band_
Definition: HiFJGridEmptyAreaCalculator.h:95
HiFJGridEmptyAreaCalculator
Definition: HiFJGridEmptyAreaCalculator.h:24
MakerMacros.h
HiFJGridEmptyAreaCalculator::calculateAreaFractionOfJets
void calculateAreaFractionOfJets(const edm::Event &iEvent, const edm::EventSetup &iSetup)
Definition: HiFJGridEmptyAreaCalculator.cc:227
HiFJGridEmptyAreaCalculator::etaminJet_
double etaminJet_
Definition: HiFJGridEmptyAreaCalculator.h:81
HiFJGridEmptyAreaCalculator::dphi_
double dphi_
Definition: HiFJGridEmptyAreaCalculator.h:71
HiFJGridEmptyAreaCalculator::HiFJGridEmptyAreaCalculator
HiFJGridEmptyAreaCalculator(const edm::ParameterSet &)
Definition: HiFJGridEmptyAreaCalculator.cc:16
edm::ConfigurationDescriptions
Definition: ConfigurationDescriptions.h:28
HiFJGridEmptyAreaCalculator::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition: HiFJGridEmptyAreaCalculator.cc:448
HiFJGridEmptyAreaCalculator::pfCandsToken_
edm::EDGetTokenT< reco::PFCandidateCollection > pfCandsToken_
Definition: HiFJGridEmptyAreaCalculator.h:109
HiFJGridEmptyAreaCalculator::keepGridInfo_
bool keepGridInfo_
Definition: HiFJGridEmptyAreaCalculator.h:98
HiFJGridEmptyAreaCalculator::doCentrality_
bool doCentrality_
Definition: HiFJGridEmptyAreaCalculator.h:97
HiFJGridEmptyAreaCalculator::twopi_
const double twopi_
information about the grid
Definition: HiFJGridEmptyAreaCalculator.h:63
HiFJGridEmptyAreaCalculator::jetsToken_
edm::EDGetTokenT< edm::View< reco::Jet > > jetsToken_
input tokens
Definition: HiFJGridEmptyAreaCalculator.h:108
edm::ParameterSet
Definition: ParameterSet.h:47
Event.h
HiFJGridEmptyAreaCalculator::produce
void produce(edm::Event &, const edm::EventSetup &) override
Definition: HiFJGridEmptyAreaCalculator.cc:69
HiFJGridEmptyAreaCalculator::totalInboundArea_
double totalInboundArea_
Definition: HiFJGridEmptyAreaCalculator.h:78
distMuonTCMETValueMapProducer_cff.eta_max
eta_max
Definition: distMuonTCMETValueMapProducer_cff.py:9
iEvent
int iEvent
Definition: GenABIO.cc:224
HiFJGridEmptyAreaCalculator::gridWidth_
double gridWidth_
input parameters
Definition: HiFJGridEmptyAreaCalculator.h:94
M_PI
#define M_PI
Definition: BXVectorInputProducer.cc:49
trackerHitRTTI::vector
Definition: trackerHitRTTI.h:21
edm::stream::EDProducer
Definition: EDProducer.h:38
HiFJGridEmptyAreaCalculator::tileArea_
double tileArea_
Definition: HiFJGridEmptyAreaCalculator.h:72
edm::EventSetup
Definition: EventSetup.h:57
HiFJGridEmptyAreaCalculator::setupGrid
void setupGrid(double eta_min, double eta_max)
configure the grid
Definition: HiFJGridEmptyAreaCalculator.cc:291
Jet.h
HiFJGridEmptyAreaCalculator::tileIndexEta
int tileIndexEta(const reco::PFCandidate *pfCand)
Definition: HiFJGridEmptyAreaCalculator.cc:348
HiFJGridEmptyAreaCalculator::setupGridJet
void setupGridJet(const reco::Jet *jet)
Definition: HiFJGridEmptyAreaCalculator.cc:373
HiFJGridEmptyAreaCalculator::nphi_
int nphi_
Definition: HiFJGridEmptyAreaCalculator.h:86
HiFJGridEmptyAreaCalculator::tileIndexJet
int tileIndexJet(const reco::PFCandidate *pfCand)
retrieve the grid cell index for a given PseudoJet
HiFJGridEmptyAreaCalculator::ymax_
double ymax_
Definition: HiFJGridEmptyAreaCalculator.h:69
HiFJGridEmptyAreaCalculator::etaMaxGrid_
std::vector< double > etaMaxGrid_
Definition: HiFJGridEmptyAreaCalculator.h:102
HiFJGridEmptyAreaCalculator::tileIndexPhi
int tileIndexPhi(const reco::PFCandidate *pfCand)
Definition: HiFJGridEmptyAreaCalculator.cc:326
Frameworkfwd.h
metsig::jet
Definition: SignAlgoResolutions.h:47
HiFJGridEmptyAreaCalculator::mapRhoMToken_
edm::EDGetTokenT< std::vector< double > > mapRhoMToken_
Definition: HiFJGridEmptyAreaCalculator.h:112
reco::PFCandidate
Particle reconstructed by the particle flow algorithm.
Definition: PFCandidate.h:41
HiFJGridEmptyAreaCalculator::ntotalJet_
int ntotalJet_
Definition: HiFJGridEmptyAreaCalculator.h:90
ParameterSet.h
HiFJGridEmptyAreaCalculator::calculateGridRho
void calculateGridRho(const edm::Event &iEvent, const edm::EventSetup &iSetup)
Definition: HiFJGridEmptyAreaCalculator.cc:171
edm::Event
Definition: Event.h:73
HiFJGridEmptyAreaCalculator::etamaxJet_
double etamaxJet_
Definition: HiFJGridEmptyAreaCalculator.h:82
StreamID.h
HiFJGridEmptyAreaCalculator::dyJet_
double dyJet_
Definition: HiFJGridEmptyAreaCalculator.h:75
HiFJGridEmptyAreaCalculator::ymin_
double ymin_
internal parameters for grid
Definition: HiFJGridEmptyAreaCalculator.h:68
HiFJGridEmptyAreaCalculator::tileIndexEtaJet
int tileIndexEtaJet(const reco::PFCandidate *pfCand)
Definition: HiFJGridEmptyAreaCalculator.cc:396
HiFJGridEmptyAreaCalculator::meanRhoVsEta_
std::vector< double > meanRhoVsEta_
Definition: HiFJGridEmptyAreaCalculator.h:101
HiFJGridEmptyAreaCalculator::yminJet_
double yminJet_
Definition: HiFJGridEmptyAreaCalculator.h:76
HiFJGridEmptyAreaCalculator::mapEtaToken_
edm::EDGetTokenT< std::vector< double > > mapEtaToken_
Definition: HiFJGridEmptyAreaCalculator.h:110