CMS 3D CMS Logo

PFCandConnector.h
Go to the documentation of this file.
1 #ifndef PFProducer_PFCandConnector_H_
2 #define PFProducer_PFCandConnector_H_
3 
9 
10 // \author : M. Gouzevitch
11 // \date : May 2010
12 
14 
16 public:
18  bCorrect_ = false;
19  bCalibPrimary_ = false;
20 
21  fConst_.push_back(1), fConst_.push_back(0);
22  fNorm_.push_back(0), fNorm_.push_back(0);
23  fExp_.push_back(0);
24 
27  ptErrorSecondary_ = 0.;
28  }
29 
32  const auto& bCorrect = iCfgCandConnector.getParameter<bool>("bCorrect");
34  const auto& bCalibPrimary = iCfgCandConnector.getParameter<bool>("bCalibPrimary");
35  const auto& dptRel_PrimaryTrack = iCfgCandConnector.getParameter<double>("dptRel_PrimaryTrack");
36  const auto& dptRel_MergedTrack = iCfgCandConnector.getParameter<double>("dptRel_MergedTrack");
37  const auto& ptErrorSecondary = iCfgCandConnector.getParameter<double>("ptErrorSecondary");
38  const auto& nuclCalibFactors = iCfgCandConnector.getParameter<std::vector<double> >("nuclCalibFactors");
39 
41  }
42 
43  void setParameters(bool bCorrect,
44  bool bCalibPrimary,
45  double dptRel_PrimaryTrack,
46  double dptRel_MergedTrack,
47  double ptErrorSecondary,
48  const std::vector<double>& nuclCalibFactors);
49 
51 
53 
54 private:
56  void analyseNuclearWPrim(reco::PFCandidateCollection&, std::vector<bool>&, unsigned int) const;
57 
59  void analyseNuclearWSec(reco::PFCandidateCollection&, std::vector<bool>&, unsigned int) const;
60 
61  bool isPrimaryNucl(const reco::PFCandidate& pf) const;
62 
63  bool isSecondaryNucl(const reco::PFCandidate& pf) const;
64 
66  double rescaleFactor(const double pt, const double cFrac) const;
67 
69  bool bCorrect_;
70 
73  std::vector<double> fConst_;
74  std::vector<double> fNorm_;
75  std::vector<double> fExp_;
76 
77  // Maximal accepatble uncertainty on primary tracks to usem them as MC truth for calibration
81 
83  static const double pion_mass2;
86 };
87 
88 #endif
bool isPrimaryNucl(const reco::PFCandidate &pf) const
static const reco::PFCandidate::Flags fT_FROM_DISP_
static const reco::PFCandidate::Flags fT_TO_DISP_
void analyseNuclearWPrim(reco::PFCandidateCollection &, std::vector< bool > &, unsigned int) const
Analyse nuclear interactions where a primary or merged track is present.
std::vector< double > fExp_
void analyseNuclearWSec(reco::PFCandidateCollection &, std::vector< bool > &, unsigned int) const
Analyse nuclear interactions where a secondary track is present.
Based on a class from : V. Roberfroid, February 2008.
double ptErrorSecondary_
std::vector< double > fNorm_
static const double pion_mass2
Useful constants.
std::vector< double > fConst_
static void fillPSetDescription(edm::ParameterSetDescription &iDesc)
std::vector< reco::PFCandidate > PFCandidateCollection
collection of PFCandidates
double dptRel_PrimaryTrack_
bool bCalibPrimary_
Calibration parameters for the reconstructed nuclear interactions.
reco::PFCandidateCollection connect(reco::PFCandidateCollection &pfCand) const
Particle reconstructed by the particle flow algorithm.
Definition: PFCandidate.h:41
bool bCorrect_
Parameters.
void setParameters(const edm::ParameterSet &iCfgCandConnector)
bool isSecondaryNucl(const reco::PFCandidate &pf) const
double dptRel_MergedTrack_
double rescaleFactor(const double pt, const double cFrac) const
Return a calibration factor for a reconstructed nuclear interaction.