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 
5 // system include files
6 #include <memory>
7 #include <sstream>
8 #include <string>
9 #include <vector>
10 
11 // user include files
14 
17 
20 
24 
26  public:
29 
30  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
31 
32  private:
33  void beginStream(edm::StreamID) override;
34  void produce(edm::Event&, const edm::EventSetup&) override;
35  void endStream() override;
36 
38  //\{
39  //----------------------------------------------------------------
40 
43 
44 
45 private:
46 
48  void setupGrid(double eta_min, double eta_max);
49  void setupGridJet(const reco::Jet *jet);
50 
52  int tileIndexJet(const reco::PFCandidate *pfCand);
53  int tileIndexEta(const reco::PFCandidate *pfCand);
54  int tileIndexEtaJet(const reco::PFCandidate *pfCand);
55  int tileIndexPhi(const reco::PFCandidate *pfCand);
56 
58  int numJetGridCells( std::vector<std::pair<int, int> >& indices );
59 
63  void calculateGridRho(const edm::Event& iEvent, const edm::EventSetup& iSetup);
64 
66  const double twopi_ = 2*M_PI;
67 
69 
70  //parameters of grid covering the full acceptance
71  double ymin_;
72  double ymax_;
73  double dy_;
74  double dphi_;
75  double tileArea_;
76 
77  //parameters of grid around jets
78  double dyJet_;
79  double yminJet_;
80  double ymaxJet_;
82 
83  //leave bands at boundaries
84  double etaminJet_;
85  double etamaxJet_;
86 
87  //for the grid calculation covering the full acceptance
88  int ny_;
89  int nphi_;
90  int ntotal_;
91 
92  //for the grid calculation around each jet
94  int nyJet_;
95 
97  double gridWidth_;
98  double band_;
99  int hiBinCut_;
102 
103  std::vector<double> rhoVsEta_;
104  std::vector<double> meanRhoVsEta_;
105  std::vector<double> etaMaxGrid_;
106  std::vector<double> etaMinGrid_;
107 
108  int n_tiles() {return ntotal_;}
109 
116 
118 
119 };
120 
121 #endif
122 
edm::EDGetTokenT< std::vector< double > > mapRhoToken_
edm::EDGetTokenT< int > centralityBinToken_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
double ymin_
internal parameters for grid
edm::EDGetTokenT< edm::View< reco::Jet > > jetsToken_
input tokens
int tileIndexEta(const reco::PFCandidate *pfCand)
edm::EDGetTokenT< reco::PFCandidateCollection > pfCandsToken_
Base class for all types of Jets.
Definition: Jet.h:20
void setupGrid(double eta_min, double eta_max)
configure the grid
edm::EDGetTokenT< std::vector< double > > mapRhoMToken_
int tileIndexEtaJet(const reco::PFCandidate *pfCand)
int numJetGridCells(std::vector< std::pair< int, int > > &indices)
number of grid cells that overlap with jet constituents filling in the in between area ...
void setupGridJet(const reco::Jet *jet)
edm::EDGetTokenT< std::vector< double > > mapEtaToken_
int tileIndexPhi(const reco::PFCandidate *pfCand)
int iEvent
Definition: GenABIO.cc:230
void calculateAreaFractionOfJets(const edm::Event &iEvent, const edm::EventSetup &iSetup)
const double twopi_
information about the grid
void beginStream(edm::StreamID) override
#define M_PI
void calculateGridRho(const edm::Event &iEvent, const edm::EventSetup &iSetup)
HiFJGridEmptyAreaCalculator(const edm::ParameterSet &)
void produce(edm::Event &, const edm::EventSetup &) override
Particle reconstructed by the particle flow algorithm.
Definition: PFCandidate.h:40
int tileIndexJet(const reco::PFCandidate *pfCand)
retrieve the grid cell index for a given PseudoJet