CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Attributes
PVFitter Class Reference

#include <PVFitter.h>

Public Member Functions

void compressStore ()
 reduce size of primary vertex cache by increasing quality limit More...
 
void dumpTxtFile ()
 
void FitPerBunchCrossing ()
 
reco::BeamSpot getBeamSpot ()
 
std::map< int, reco::BeamSpotgetBeamSpotMap ()
 
int * getFitLSRange ()
 
int getNPVs ()
 
const std::map< int, int > & getNPVsperBX ()
 
std::vector< BeamSpotFitPVDatagetpvStore ()
 
time_t * getRefTime ()
 
double getWidthX ()
 
double getWidthXerr ()
 
double getWidthY ()
 
double getWidthYerr ()
 
double getWidthZ ()
 
double getWidthZerr ()
 
void initialize (const edm::ParameterSet &iConfig, edm::ConsumesCollector &iColl)
 
bool IsFitPerBunchCrossing ()
 
 PVFitter ()
 
 PVFitter (const edm::ParameterSet &iConfig, edm::ConsumesCollector &&iColl)
 
 PVFitter (const edm::ParameterSet &iConfig, edm::ConsumesCollector &iColl)
 
double pvQuality (const reco::Vertex &pv) const
 vertex quality measure More...
 
double pvQuality (const BeamSpotFitPVData &pv) const
 vertex quality measure More...
 
void readEvent (const edm::Event &iEvent)
 
void resetAll ()
 
void resetLSRange ()
 
void resetRefTime ()
 
void resizepvStore (unsigned int rmSize)
 
bool runBXFitter ()
 
bool runFitter ()
 
void setFitLSRange (int ls0, int ls1)
 
void setRefTime (std::time_t t0, std::time_t t1)
 
void setTree (TTree *tree)
 
virtual ~PVFitter ()
 

Static Public Member Functions

static void fillDescription (edm::ParameterSetDescription &)
 

Private Attributes

std::map< int, std::vector< BeamSpotFitPVData > > bxMap_
 
bool debug_
 
bool do3DFit_
 
double dynamicQualityCut_
 
double errorScale_
 
std::ofstream fasciiFile
 
reco::BeamSpot fbeamspot
 
int fbeginLumiOfFit
 
std::map< int, reco::BeamSpotfbspotMap
 
int fendLumiOfFit
 
bool fFitPerBunchCrossing
 
std::time_t freftime [2]
 
TTree * ftree_
 
double fwidthX
 
double fwidthXerr
 
double fwidthY
 
double fwidthYerr
 
double fwidthZ
 
double fwidthZerr
 
std::unique_ptr< TH2F > hPVx
 
std::unique_ptr< TH2F > hPVy
 
unsigned int maxNrVertices_
 
double maxVtxNormChi2_
 
double maxVtxR_
 
double maxVtxZ_
 
unsigned int minNrVertices_
 
double minSumPt_
 
double minVtxNdf_
 
unsigned int minVtxTracks_
 
double minVtxWgt_
 
std::map< int, int > npvsmap_
 
std::string outputTxt_
 
std::vector< double > pvQualities_
 
std::vector< BeamSpotFitPVDatapvStore_
 
double sigmaCut_
 
BeamSpotTreeData theBeamSpotTreeData_
 
bool useOnlyFirstPV_
 
edm::EDGetTokenT< reco::VertexCollectionvertexToken_
 

Detailed Description

Definition at line 45 of file PVFitter.h.

Constructor & Destructor Documentation

◆ PVFitter() [1/3]

PVFitter::PVFitter ( )
inline

Definition at line 47 of file PVFitter.h.

47 {}

◆ PVFitter() [2/3]

PVFitter::PVFitter ( const edm::ParameterSet iConfig,
edm::ConsumesCollector &&  iColl 
)

Definition at line 48 of file PVFitter.cc.

References initialize().

48  : ftree_(nullptr) {
49  initialize(iConfig, iColl);
50 }
void initialize(const edm::ParameterSet &iConfig, edm::ConsumesCollector &iColl)
Definition: PVFitter.cc:56
TTree * ftree_
Definition: PVFitter.h:164

◆ PVFitter() [3/3]

PVFitter::PVFitter ( const edm::ParameterSet iConfig,
edm::ConsumesCollector iColl 
)

Definition at line 52 of file PVFitter.cc.

References initialize().

52  : ftree_(nullptr) {
53  initialize(iConfig, iColl);
54 }
void initialize(const edm::ParameterSet &iConfig, edm::ConsumesCollector &iColl)
Definition: PVFitter.cc:56
TTree * ftree_
Definition: PVFitter.h:164

◆ ~PVFitter()

PVFitter::~PVFitter ( )
virtual

Definition at line 95 of file PVFitter.cc.

95 {}

Member Function Documentation

◆ compressStore()

void PVFitter::compressStore ( )

reduce size of primary vertex cache by increasing quality limit

Definition at line 487 of file PVFitter.cc.

References dynamicQualityCut_, mps_fire::i, pvQualities_, pvQuality(), pvStore_, and jetUpdater_cfi::sort.

Referenced by readEvent().

487  {
488  //
489  // fill vertex qualities
490  //
491  pvQualities_.resize(pvStore_.size());
492  for (unsigned int i = 0; i < pvStore_.size(); ++i)
494  sort(pvQualities_.begin(), pvQualities_.end());
495  //
496  // Set new quality cut to median. This cut will be used to reduce the
497  // number of vertices in the store and also apply to all new vertices
498  // until the next reset
499  //
501  //
502  // remove all vertices failing the cut from the store
503  // (to be moved to a more efficient memory management!)
504  //
505  unsigned int iwrite(0);
506  for (unsigned int i = 0; i < pvStore_.size(); ++i) {
508  continue;
509  if (i != iwrite)
510  pvStore_[iwrite] = pvStore_[i];
511  ++iwrite;
512  }
513  pvStore_.resize(iwrite);
514  edm::LogInfo("PVFitter") << "Reduced primary vertex store size to " << pvStore_.size()
515  << " ; new dynamic quality cut = " << dynamicQualityCut_ << std::endl;
516 }
std::vector< double > pvQualities_
Definition: PVFitter.h:179
double dynamicQualityCut_
Definition: PVFitter.h:178
double pvQuality(const reco::Vertex &pv) const
vertex quality measure
Definition: PVFitter.cc:518
std::vector< BeamSpotFitPVData > pvStore_
Definition: PVFitter.h:176
Log< level::Info, false > LogInfo

◆ dumpTxtFile()

void PVFitter::dumpTxtFile ( )

Definition at line 485 of file PVFitter.cc.

485 {}

◆ fillDescription()

void PVFitter::fillDescription ( edm::ParameterSetDescription iDesc)
static

Definition at line 97 of file PVFitter.cc.

References edm::ParameterSetDescription::add(), edm::ParameterSetDescription::addUntracked(), and ProducerED_cfi::InputTag.

Referenced by BeamSpotAnalyzer::fillDescriptions(), and AlcaBeamMonitor::fillDescriptions().

97  {
99 
100  pvFitter.addUntracked<bool>("Debug");
101  pvFitter.addUntracked<edm::InputTag>("VertexCollection", edm::InputTag("offlinePrimaryVertices"));
102  pvFitter.addUntracked<bool>("Apply3DFit");
103  pvFitter.addUntracked<unsigned int>("maxNrStoredVertices");
104  pvFitter.addUntracked<unsigned int>("minNrVerticesForFit");
105  pvFitter.addUntracked<double>("minVertexNdf");
106  pvFitter.addUntracked<double>("maxVertexNormChi2");
107  pvFitter.addUntracked<unsigned int>("minVertexNTracks");
108  pvFitter.addUntracked<double>("minVertexMeanWeight");
109  pvFitter.addUntracked<double>("maxVertexR");
110  pvFitter.addUntracked<double>("maxVertexZ");
111  pvFitter.addUntracked<double>("errorScale");
112  pvFitter.addUntracked<double>("nSigmaCut");
113  pvFitter.addUntracked<bool>("FitPerBunchCrossing");
114  pvFitter.addUntracked<bool>("useOnlyFirstPV");
115  pvFitter.addUntracked<double>("minSumPt");
116 
117  iDesc.add<edm::ParameterSetDescription>("PVFitter", pvFitter);
118 }
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
ParameterDescriptionBase * add(U const &iLabel, T const &value)

◆ FitPerBunchCrossing()

void PVFitter::FitPerBunchCrossing ( )
inline

Definition at line 67 of file PVFitter.h.

References fFitPerBunchCrossing.

67 { fFitPerBunchCrossing = true; }
bool fFitPerBunchCrossing
Definition: PVFitter.h:137

◆ getBeamSpot()

reco::BeamSpot PVFitter::getBeamSpot ( )
inline

Definition at line 94 of file PVFitter.h.

References fbeamspot.

Referenced by BeamFitter::runPVandTrkFitter().

94 { return fbeamspot; }
reco::BeamSpot fbeamspot
Definition: PVFitter.h:135

◆ getBeamSpotMap()

std::map<int, reco::BeamSpot> PVFitter::getBeamSpotMap ( )
inline

Definition at line 95 of file PVFitter.h.

References fbspotMap.

Referenced by BeamFitter::runPVandTrkFitter().

95 { return fbspotMap; }
std::map< int, reco::BeamSpot > fbspotMap
Definition: PVFitter.h:136

◆ getFitLSRange()

int* PVFitter::getFitLSRange ( )
inline

Definition at line 97 of file PVFitter.h.

References fbeginLumiOfFit, fendLumiOfFit, and createJobs::tmp.

97  {
98  int* tmp = new int[2];
99  tmp[0] = fbeginLumiOfFit;
100  tmp[1] = fendLumiOfFit;
101  return tmp;
102  }
int fbeginLumiOfFit
Definition: PVFitter.h:167
int fendLumiOfFit
Definition: PVFitter.h:168
tmp
align.sh
Definition: createJobs.py:716

◆ getNPVs()

int PVFitter::getNPVs ( )
inline

Definition at line 120 of file PVFitter.h.

References pvStore_.

Referenced by BeamFitter::getNPVs().

120 { return pvStore_.size(); }
std::vector< BeamSpotFitPVData > pvStore_
Definition: PVFitter.h:176

◆ getNPVsperBX()

const std::map<int, int>& PVFitter::getNPVsperBX ( )
inline

Definition at line 122 of file PVFitter.h.

References bxMap_, genParticles_cff::map, npvsmap_, and findQualityFiles::size.

Referenced by BeamFitter::getNPVsperBX().

122  {
123  npvsmap_.clear();
124 
125  for (std::map<int, std::vector<BeamSpotFitPVData> >::const_iterator pvStore = bxMap_.begin();
126  pvStore != bxMap_.end();
127  ++pvStore) {
128  npvsmap_[pvStore->first] = (pvStore->second).size();
129  }
130  return npvsmap_;
131  }
size
Write out results.
std::map< int, std::vector< BeamSpotFitPVData > > bxMap_
Definition: PVFitter.h:177
std::map< int, int > npvsmap_
Definition: PVFitter.h:134

◆ getpvStore()

std::vector<BeamSpotFitPVData> PVFitter::getpvStore ( )
inline

Definition at line 65 of file PVFitter.h.

References pvStore_.

Referenced by BeamFitter::getPVvectorSize().

65 { return pvStore_; }
std::vector< BeamSpotFitPVData > pvStore_
Definition: PVFitter.h:176

◆ getRefTime()

time_t* PVFitter::getRefTime ( )
inline

Definition at line 104 of file PVFitter.h.

References freftime.

104  {
105  time_t* tmptime = new time_t[2];
106  tmptime[0] = freftime[0];
107  tmptime[1] = freftime[1];
108  return tmptime;
109  }
std::time_t freftime[2]
Definition: PVFitter.h:159

◆ getWidthX()

double PVFitter::getWidthX ( )
inline

Definition at line 58 of file PVFitter.h.

References fwidthX.

58 { return fwidthX; }
double fwidthX
Definition: PVFitter.h:169

◆ getWidthXerr()

double PVFitter::getWidthXerr ( )
inline

Definition at line 61 of file PVFitter.h.

References fwidthXerr.

Referenced by BeamFitter::runPVandTrkFitter().

61 { return fwidthXerr; }
double fwidthXerr
Definition: PVFitter.h:172

◆ getWidthY()

double PVFitter::getWidthY ( )
inline

Definition at line 59 of file PVFitter.h.

References fwidthY.

59 { return fwidthY; }
double fwidthY
Definition: PVFitter.h:170

◆ getWidthYerr()

double PVFitter::getWidthYerr ( )
inline

Definition at line 62 of file PVFitter.h.

References fwidthYerr.

62 { return fwidthYerr; }
double fwidthYerr
Definition: PVFitter.h:173

◆ getWidthZ()

double PVFitter::getWidthZ ( )
inline

Definition at line 60 of file PVFitter.h.

References fwidthZ.

60 { return fwidthZ; }
double fwidthZ
Definition: PVFitter.h:171

◆ getWidthZerr()

double PVFitter::getWidthZerr ( )
inline

Definition at line 63 of file PVFitter.h.

References fwidthZerr.

63 { return fwidthZerr; }
double fwidthZerr
Definition: PVFitter.h:174

◆ initialize()

void PVFitter::initialize ( const edm::ParameterSet iConfig,
edm::ConsumesCollector iColl 
)

Definition at line 56 of file PVFitter.cc.

References edm::ConsumesCollector::consumes(), debug_, do3DFit_, dynamicQualityCut_, errorScale_, fFitPerBunchCrossing, edm::ParameterSet::getParameter(), hPVx, hPVy, maxNrVertices_, maxVtxNormChi2_, maxVtxR_, maxVtxZ_, minNrVertices_, minSumPt_, minVtxNdf_, minVtxTracks_, minVtxWgt_, sigmaCut_, useOnlyFirstPV_, and vertexToken_.

Referenced by PVFitter().

56  {
57  //In order to make fitting ROOT histograms thread safe
58  // one must call this undocumented function
59  TMinuitMinimizer::UseStaticMinuit(false);
60  debug_ = iConfig.getParameter<edm::ParameterSet>("PVFitter").getUntrackedParameter<bool>("Debug");
62  iConfig.getParameter<edm::ParameterSet>("PVFitter")
63  .getUntrackedParameter<edm::InputTag>("VertexCollection", edm::InputTag("offlinePrimaryVertices")));
64  do3DFit_ = iConfig.getParameter<edm::ParameterSet>("PVFitter").getUntrackedParameter<bool>("Apply3DFit");
65  //writeTxt_ = iConfig.getParameter<edm::ParameterSet>("PVFitter").getUntrackedParameter<bool>("WriteAscii");
66  //outputTxt_ = iConfig.getParameter<edm::ParameterSet>("PVFitter").getUntrackedParameter<std::string>("AsciiFileName");
68  iConfig.getParameter<edm::ParameterSet>("PVFitter").getUntrackedParameter<unsigned int>("maxNrStoredVertices");
70  iConfig.getParameter<edm::ParameterSet>("PVFitter").getUntrackedParameter<unsigned int>("minNrVerticesForFit");
71  minVtxNdf_ = iConfig.getParameter<edm::ParameterSet>("PVFitter").getUntrackedParameter<double>("minVertexNdf");
73  iConfig.getParameter<edm::ParameterSet>("PVFitter").getUntrackedParameter<double>("maxVertexNormChi2");
75  iConfig.getParameter<edm::ParameterSet>("PVFitter").getUntrackedParameter<unsigned int>("minVertexNTracks");
76  minVtxWgt_ = iConfig.getParameter<edm::ParameterSet>("PVFitter").getUntrackedParameter<double>("minVertexMeanWeight");
77  maxVtxR_ = iConfig.getParameter<edm::ParameterSet>("PVFitter").getUntrackedParameter<double>("maxVertexR");
78  maxVtxZ_ = iConfig.getParameter<edm::ParameterSet>("PVFitter").getUntrackedParameter<double>("maxVertexZ");
79  errorScale_ = iConfig.getParameter<edm::ParameterSet>("PVFitter").getUntrackedParameter<double>("errorScale");
80  sigmaCut_ = iConfig.getParameter<edm::ParameterSet>("PVFitter").getUntrackedParameter<double>("nSigmaCut");
82  iConfig.getParameter<edm::ParameterSet>("PVFitter").getUntrackedParameter<bool>("FitPerBunchCrossing");
83  useOnlyFirstPV_ = iConfig.getParameter<edm::ParameterSet>("PVFitter").getUntrackedParameter<bool>("useOnlyFirstPV");
84  minSumPt_ = iConfig.getParameter<edm::ParameterSet>("PVFitter").getUntrackedParameter<double>("minSumPt");
85 
86  // preset quality cut to "infinite"
87  dynamicQualityCut_ = 1.e30;
88 
89  hPVx = std::make_unique<TH2F>("hPVx", "PVx vs PVz distribution", 200, -maxVtxR_, maxVtxR_, 200, -maxVtxZ_, maxVtxZ_);
90  hPVy = std::make_unique<TH2F>("hPVy", "PVy vs PVz distribution", 200, -maxVtxR_, maxVtxR_, 200, -maxVtxZ_, maxVtxZ_);
91  hPVx->SetDirectory(nullptr);
92  hPVy->SetDirectory(nullptr);
93 }
double minSumPt_
Definition: PVFitter.h:157
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
bool debug_
Definition: PVFitter.h:142
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
double maxVtxNormChi2_
Definition: PVFitter.h:150
double minVtxWgt_
Definition: PVFitter.h:152
bool useOnlyFirstPV_
Definition: PVFitter.h:138
double minVtxNdf_
Definition: PVFitter.h:149
std::vector< Vertex > VertexCollection
collection of Vertex objects
Definition: VertexFwd.h:9
double errorScale_
Definition: PVFitter.h:155
bool do3DFit_
Definition: PVFitter.h:143
double dynamicQualityCut_
Definition: PVFitter.h:178
std::unique_ptr< TH2F > hPVx
Definition: PVFitter.h:161
bool fFitPerBunchCrossing
Definition: PVFitter.h:137
edm::EDGetTokenT< reco::VertexCollection > vertexToken_
Definition: PVFitter.h:144
double maxVtxR_
Definition: PVFitter.h:153
double maxVtxZ_
Definition: PVFitter.h:154
unsigned int maxNrVertices_
Definition: PVFitter.h:147
unsigned int minVtxTracks_
Definition: PVFitter.h:151
std::unique_ptr< TH2F > hPVy
Definition: PVFitter.h:162
unsigned int minNrVertices_
Definition: PVFitter.h:148
double sigmaCut_
Definition: PVFitter.h:156

◆ IsFitPerBunchCrossing()

bool PVFitter::IsFitPerBunchCrossing ( )
inline

Definition at line 96 of file PVFitter.h.

References fFitPerBunchCrossing.

Referenced by BeamFitter::dumpTxtFile(), and BeamFitter::runPVandTrkFitter().

96 { return fFitPerBunchCrossing; }
bool fFitPerBunchCrossing
Definition: PVFitter.h:137

◆ pvQuality() [1/2]

double PVFitter::pvQuality ( const reco::Vertex pv) const

vertex quality measure

Definition at line 518 of file PVFitter.cc.

Referenced by compressStore(), and readEvent().

518  {
519  //
520  // determinant of the transverse part of the PV covariance matrix
521  //
522  return pv.covariance(0, 0) * pv.covariance(1, 1) - pv.covariance(0, 1) * pv.covariance(0, 1);
523 }

◆ pvQuality() [2/2]

double PVFitter::pvQuality ( const BeamSpotFitPVData pv) const

vertex quality measure

Definition at line 525 of file PVFitter.cc.

525  {
526  //
527  // determinant of the transverse part of the PV covariance matrix
528  //
529  double ex = pv.posError[0];
530  double ey = pv.posError[1];
531  return ex * ex * ey * ey * (1 - pv.posCorr[0] * pv.posCorr[0]);
532 }

◆ readEvent()

void PVFitter::readEvent ( const edm::Event iEvent)

Definition at line 120 of file PVFitter.cc.

References BeamSpotFitPVData::bunchCrossing, BeamSpotTreeData::bunchCrossing(), simKBmtfDigis_cfi::bx, bxMap_, compressStore(), dynamicQualityCut_, fFitPerBunchCrossing, ftree_, hPVx, hPVy, iEvent, BeamSpotTreeData::lumi(), maxNrVertices_, minSumPt_, minVtxNdf_, minVtxTracks_, minVtxWgt_, BeamSpotFitPVData::posCorr, BeamSpotFitPVData::posError, BeamSpotFitPVData::position, DiDispStaMuonMonitor_cfi::pt, MetAnalyzer::pv(), L1TEGammaOffline_cfi::PVCollection, BeamSpotTreeData::pvData(), pvQuality(), pvStore_, BeamSpotTreeData::run(), TtFullHadEvtBuilder_cfi::sumPt, theBeamSpotTreeData_, useOnlyFirstPV_, and vertexToken_.

Referenced by BeamFitter::readEvent().

120  {
121  //------ Primary Vertices
123  bool hasPVs = false;
124 
125  if (iEvent.getByToken(vertexToken_, PVCollection)) {
126  hasPVs = true;
127  }
128  //------
129 
130  if (hasPVs) {
131  for (reco::VertexCollection::const_iterator pv = PVCollection->begin(); pv != PVCollection->end(); ++pv) {
132  if (useOnlyFirstPV_) {
133  if (pv != PVCollection->begin())
134  break;
135  }
136 
137  //--- vertex selection
138  if (pv->isFake() || pv->tracksSize() == 0)
139  continue;
140  if (pv->ndof() < minVtxNdf_ || (pv->ndof() + 3.) / pv->tracksSize() < 2 * minVtxWgt_)
141  continue;
142  //---
143 
144  if (pv->tracksSize() < minVtxTracks_)
145  continue;
146 
147  const auto& testTrack = pv->trackRefAt(0);
148  if (testTrack.isNull() || !testTrack.isAvailable()) {
149  edm::LogInfo("") << "Track collection not found. Skipping cut on sumPt.";
150  } else {
151  double sumPt = 0;
152  for (auto iTrack = pv->tracks_begin(); iTrack != pv->tracks_end(); ++iTrack) {
153  const auto pt = (*iTrack)->pt();
154  sumPt += pt;
155  }
156  if (sumPt < minSumPt_)
157  continue;
158  }
159 
160  hPVx->Fill(pv->x(), pv->z());
161  hPVy->Fill(pv->y(), pv->z());
162 
163  //
164  // 3D fit section
165  //
166  // apply additional quality cut
168  continue;
169  // if store exceeds max. size: reduce size and apply new quality cut
170  if (pvStore_.size() >= maxNrVertices_) {
171  compressStore();
173  continue;
174  }
175  //
176  // copy PV to store
177  //
178  int bx = iEvent.bunchCrossing();
179  BeamSpotFitPVData pvData;
180  pvData.bunchCrossing = bx;
181  pvData.position[0] = pv->x();
182  pvData.position[1] = pv->y();
183  pvData.position[2] = pv->z();
184  pvData.posError[0] = pv->xError();
185  pvData.posError[1] = pv->yError();
186  pvData.posError[2] = pv->zError();
187  pvData.posCorr[0] = pv->covariance(0, 1) / pv->xError() / pv->yError();
188  pvData.posCorr[1] = pv->covariance(0, 2) / pv->xError() / pv->zError();
189  pvData.posCorr[2] = pv->covariance(1, 2) / pv->yError() / pv->zError();
190  pvStore_.push_back(pvData);
191 
192  if (ftree_ != nullptr) {
193  theBeamSpotTreeData_.run(iEvent.id().run());
194  theBeamSpotTreeData_.lumi(iEvent.luminosityBlock());
197  ftree_->Fill();
198  }
199 
201  bxMap_[bx].push_back(pvData);
202  }
203  }
204 }
double minSumPt_
Definition: PVFitter.h:157
void run(unsigned int run)
std::map< int, std::vector< BeamSpotFitPVData > > bxMap_
Definition: PVFitter.h:177
void compressStore()
reduce size of primary vertex cache by increasing quality limit
Definition: PVFitter.cc:487
double minVtxWgt_
Definition: PVFitter.h:152
bool useOnlyFirstPV_
Definition: PVFitter.h:138
double minVtxNdf_
Definition: PVFitter.h:149
double dynamicQualityCut_
Definition: PVFitter.h:178
void bunchCrossing(unsigned int bunchCrossing)
double pvQuality(const reco::Vertex &pv) const
vertex quality measure
Definition: PVFitter.cc:518
void lumi(unsigned int lumi)
int iEvent
Definition: GenABIO.cc:224
std::vector< BeamSpotFitPVData > pvStore_
Definition: PVFitter.h:176
std::unique_ptr< TH2F > hPVx
Definition: PVFitter.h:161
BeamSpotTreeData theBeamSpotTreeData_
Definition: PVFitter.h:181
bool fFitPerBunchCrossing
Definition: PVFitter.h:137
def pv(vc)
Definition: MetAnalyzer.py:7
void pvData(const BeamSpotFitPVData &pvData)
TTree * ftree_
Definition: PVFitter.h:164
edm::EDGetTokenT< reco::VertexCollection > vertexToken_
Definition: PVFitter.h:144
unsigned int maxNrVertices_
Definition: PVFitter.h:147
Log< level::Info, false > LogInfo
unsigned int minVtxTracks_
Definition: PVFitter.h:151
std::unique_ptr< TH2F > hPVy
Definition: PVFitter.h:162

◆ resetAll()

void PVFitter::resetAll ( )
inline

Definition at line 83 of file PVFitter.h.

References align::BeamSpot, bxMap_, dynamicQualityCut_, fbeamspot, fbspotMap, hPVx, hPVy, pvStore_, resetLSRange(), and resetRefTime().

Referenced by BeamFitter::BeamFitter(), and BeamFitter::resetPVFitter().

83  {
84  resetLSRange();
85  resetRefTime();
86  pvStore_.clear();
87  bxMap_.clear();
88  dynamicQualityCut_ = 1.e30;
89  hPVx->Reset();
90  hPVy->Reset();
92  fbspotMap.clear();
93  };
std::map< int, std::vector< BeamSpotFitPVData > > bxMap_
Definition: PVFitter.h:177
double dynamicQualityCut_
Definition: PVFitter.h:178
reco::BeamSpot fbeamspot
Definition: PVFitter.h:135
std::vector< BeamSpotFitPVData > pvStore_
Definition: PVFitter.h:176
std::unique_ptr< TH2F > hPVx
Definition: PVFitter.h:161
void resetLSRange()
Definition: PVFitter.h:70
std::map< int, reco::BeamSpot > fbspotMap
Definition: PVFitter.h:136
void resetRefTime()
Definition: PVFitter.h:71
std::unique_ptr< TH2F > hPVy
Definition: PVFitter.h:162

◆ resetLSRange()

void PVFitter::resetLSRange ( )
inline

Definition at line 70 of file PVFitter.h.

References fbeginLumiOfFit, and fendLumiOfFit.

Referenced by resetAll().

int fbeginLumiOfFit
Definition: PVFitter.h:167
int fendLumiOfFit
Definition: PVFitter.h:168

◆ resetRefTime()

void PVFitter::resetRefTime ( )
inline

Definition at line 71 of file PVFitter.h.

References freftime.

Referenced by resetAll().

71 { freftime[0] = freftime[1] = 0; }
std::time_t freftime[2]
Definition: PVFitter.h:159

◆ resizepvStore()

void PVFitter::resizepvStore ( unsigned int  rmSize)
inline

Definition at line 112 of file PVFitter.h.

References pvStore_.

Referenced by BeamFitter::resizePVvector().

112 { pvStore_.erase(pvStore_.begin(), pvStore_.begin() + rmSize); }
std::vector< BeamSpotFitPVData > pvStore_
Definition: PVFitter.h:176

◆ runBXFitter()

bool PVFitter::runBXFitter ( )

Definition at line 211 of file PVFitter.cc.

References align::BeamSpot, bxMap_, errorScale_, fbeamspot, fbspotMap, fcn(), fwidthX, fwidthXerr, fwidthY, fwidthYerr, fwidthZ, fwidthZerr, genParticles_cff::map, makeMuonMisalignmentScenario::matrix, minNrVertices_, funct::pow(), reco::BeamSpot::setBeamWidthX(), reco::BeamSpot::setBeamWidthY(), reco::BeamSpot::setType(), sigmaCut_, findQualityFiles::size, and reco::BeamSpot::Tracker.

Referenced by BeamFitter::runPVandTrkFitter().

211  {
212  using namespace ROOT::Minuit2;
213  edm::LogInfo("PVFitter") << " Number of bunch crossings: " << bxMap_.size() << std::endl;
214 
215  bool fit_ok = true;
216 
217  for (std::map<int, std::vector<BeamSpotFitPVData> >::const_iterator pvStore = bxMap_.begin(); pvStore != bxMap_.end();
218  ++pvStore) {
219  // first set null beam spot in case
220  // fit fails
221  fbspotMap[pvStore->first] = reco::BeamSpot();
222 
223  edm::LogInfo("PVFitter") << " Number of PVs collected for PVFitter: " << (pvStore->second).size()
224  << " in bx: " << pvStore->first << std::endl;
225 
226  if ((pvStore->second).size() <= minNrVertices_) {
227  edm::LogWarning("PVFitter") << " not enough PVs, continue" << std::endl;
228  fit_ok = false;
229  continue;
230  }
231 
232  edm::LogInfo("PVFitter") << "Calculating beam spot with PVs ..." << std::endl;
233 
234  //
235  // LL function and fitter
236  //
237  FcnBeamSpotFitPV fcn(pvStore->second);
238  //
239  // fit parameters: positions, widths, x-y correlations, tilts in xz and yz
240  //
241  MnUserParameters upar;
242  upar.Add("x", 0., 0.02, -10., 10.); // 0
243  upar.Add("y", 0., 0.02, -10., 10.); // 1
244  upar.Add("z", 0., 0.20, -30., 30.); // 2
245  upar.Add("ex", 0.015, 0.01, 0., 10.); // 3
246  upar.Add("corrxy", 0., 0.02, -1., 1.); // 4
247  upar.Add("ey", 0.015, 0.01, 0., 10.); // 5
248  upar.Add("dxdz", 0., 0.0002, -0.1, 0.1); // 6
249  upar.Add("dydz", 0., 0.0002, -0.1, 0.1); // 7
250  upar.Add("ez", 1., 0.1, 0., 30.); // 8
251  upar.Add("scale", errorScale_, errorScale_ / 10., errorScale_ / 2., errorScale_ * 2.); // 9
252  MnMigrad migrad(fcn, upar);
253 
254  //
255  // first iteration without correlations
256  //
257  upar.Fix(4);
258  upar.Fix(6);
259  upar.Fix(7);
260  upar.Fix(9);
261  FunctionMinimum ierr = migrad(0, 1.);
262  if (!ierr.IsValid()) {
263  edm::LogInfo("PVFitter") << "3D beam spot fit failed in 1st iteration" << std::endl;
264  fit_ok = false;
265  continue;
266  }
267  //
268  // refit with harder selection on vertices
269  //
270  fcn.setLimits(upar.Value(0) - sigmaCut_ * upar.Value(3),
271  upar.Value(0) + sigmaCut_ * upar.Value(3),
272  upar.Value(1) - sigmaCut_ * upar.Value(5),
273  upar.Value(1) + sigmaCut_ * upar.Value(5),
274  upar.Value(2) - sigmaCut_ * upar.Value(8),
275  upar.Value(2) + sigmaCut_ * upar.Value(8));
276  ierr = migrad(0, 1.);
277  if (!ierr.IsValid()) {
278  edm::LogInfo("PVFitter") << "3D beam spot fit failed in 2nd iteration" << std::endl;
279  fit_ok = false;
280  continue;
281  }
282  //
283  // refit with correlations
284  //
285  upar.Release(4);
286  upar.Release(6);
287  upar.Release(7);
288  ierr = migrad(0, 1.);
289  if (!ierr.IsValid()) {
290  edm::LogInfo("PVFitter") << "3D beam spot fit failed in 3rd iteration" << std::endl;
291  fit_ok = false;
292  continue;
293  }
294 
295  fwidthX = upar.Value(3);
296  fwidthY = upar.Value(5);
297  fwidthZ = upar.Value(8);
298  fwidthXerr = upar.Error(3);
299  fwidthYerr = upar.Error(5);
300  fwidthZerr = upar.Error(8);
301 
303  // need to get the full cov matrix
304  matrix(0, 0) = pow(upar.Error(0), 2);
305  matrix(1, 1) = pow(upar.Error(1), 2);
306  matrix(2, 2) = pow(upar.Error(2), 2);
307  matrix(3, 3) = fwidthZerr * fwidthZerr;
308  matrix(4, 4) = pow(upar.Error(6), 2);
309  matrix(5, 5) = pow(upar.Error(7), 2);
310  matrix(6, 6) = fwidthXerr * fwidthXerr;
311 
312  fbeamspot = reco::BeamSpot(reco::BeamSpot::Point(upar.Value(0), upar.Value(1), upar.Value(2)),
313  fwidthZ,
314  upar.Value(6),
315  upar.Value(7),
316  fwidthX,
317  matrix);
321 
322  fbspotMap[pvStore->first] = fbeamspot;
323  edm::LogInfo("PVFitter") << "3D PV fit done for this bunch crossing." << std::endl;
324  fit_ok = fit_ok & true;
325  }
326 
327  return fit_ok;
328 }
size
Write out results.
math::Error< dimension >::type CovarianceMatrix
Definition: BeamSpot.h:29
std::map< int, std::vector< BeamSpotFitPVData > > bxMap_
Definition: PVFitter.h:177
math::XYZPoint Point
point in the space
Definition: BeamSpot.h:27
double fwidthY
Definition: PVFitter.h:170
double errorScale_
Definition: PVFitter.h:155
double fwidthYerr
Definition: PVFitter.h:173
double fwidthZ
Definition: PVFitter.h:171
double fwidthXerr
Definition: PVFitter.h:172
void setType(BeamType type)
set beam type
Definition: BeamSpot.h:124
reco::BeamSpot fbeamspot
Definition: PVFitter.h:135
void setBeamWidthY(double v)
Definition: BeamSpot.h:105
std::map< int, reco::BeamSpot > fbspotMap
Definition: PVFitter.h:136
double fwidthZerr
Definition: PVFitter.h:174
Log< level::Info, false > LogInfo
void fcn(int &, double *, double &, double *, int)
unsigned int minNrVertices_
Definition: PVFitter.h:148
double sigmaCut_
Definition: PVFitter.h:156
void setBeamWidthX(double v)
Definition: BeamSpot.h:104
double fwidthX
Definition: PVFitter.h:169
Log< level::Warning, false > LogWarning
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:29

◆ runFitter()

bool PVFitter::runFitter ( )

Definition at line 330 of file PVFitter.cc.

References align::BeamSpot, do3DFit_, debug_messages_cfi::errors, errorScale_, fftjetvertexadder_cfi::errX, fftjetvertexadder_cfi::errY, fftjetvertexadder_cfi::errZ, fbeamspot, fcn(), fwidthX, fwidthXerr, fwidthY, fwidthYerr, fwidthZ, fwidthZerr, hPVx, hPVy, edm::isNotFinite(), makeMuonMisalignmentScenario::matrix, minNrVertices_, funct::pow(), pvStore_, mysort::results, reco::BeamSpot::setBeamWidthX(), reco::BeamSpot::setBeamWidthY(), reco::BeamSpot::setType(), sigmaCut_, str, AlCaHLTBitMon_QueryRunRegistry::string, and reco::BeamSpot::Tracker.

Referenced by BeamFitter::runPVandTrkFitter().

330  {
331  using namespace ROOT::Minuit2;
332  edm::LogInfo("PVFitter") << " Number of PVs collected for PVFitter: " << pvStore_.size() << std::endl;
333 
334  if (pvStore_.size() <= minNrVertices_)
335  return false;
336 
337  //need to create a unique histogram name to avoid ROOT trying to re-use one
338  // also tell ROOT to hide its global state
339  TDirectory::TContext guard{nullptr};
340  std::ostringstream str;
341  str << this;
342  std::unique_ptr<TH1D> h1PVx{hPVx->ProjectionX((std::string("h1PVx") + str.str()).c_str(), 0, -1, "e")};
343  std::unique_ptr<TH1D> h1PVy{hPVy->ProjectionX((std::string("h1PVy") + str.str()).c_str(), 0, -1, "e")};
344  std::unique_ptr<TH1D> h1PVz{hPVx->ProjectionY((std::string("h1PVz") + str.str()).c_str(), 0, -1, "e")};
345 
346  //Use our own copy for thread safety
347  // also do not add to global list of functions
348  TF1 gausx("localGausX", "gaus", 0., 1., TF1::EAddToList::kNo);
349  TF1 gausy("localGausY", "gaus", 0., 1., TF1::EAddToList::kNo);
350  TF1 gausz("localGausZ", "gaus", 0., 1., TF1::EAddToList::kNo);
351 
352  h1PVx->Fit(&gausx, "QLMN0 SERIAL");
353  h1PVy->Fit(&gausy, "QLMN0 SERIAL");
354  h1PVz->Fit(&gausz, "QLMN0 SERIAL");
355 
356  fwidthX = gausx.GetParameter(2);
357  fwidthY = gausy.GetParameter(2);
358  fwidthZ = gausz.GetParameter(2);
359  fwidthXerr = gausx.GetParError(2);
360  fwidthYerr = gausy.GetParError(2);
361  fwidthZerr = gausz.GetParError(2);
362 
363  double estX = gausx.GetParameter(1);
364  double estY = gausy.GetParameter(1);
365  double estZ = gausz.GetParameter(1);
366  double errX = fwidthX * 3.;
367  double errY = fwidthY * 3.;
368  double errZ = fwidthZ * 3.;
369 
370  if (!do3DFit_) {
372  matrix(2, 2) = gausz.GetParError(1) * gausz.GetParError(1);
373  matrix(3, 3) = fwidthZerr * fwidthZerr;
374  matrix(6, 6) = fwidthXerr * fwidthXerr;
375 
376  fbeamspot =
377  reco::BeamSpot(reco::BeamSpot::Point(gausx.GetParameter(1), gausy.GetParameter(1), gausz.GetParameter(1)),
378  fwidthZ,
379  0.,
380  0.,
381  fwidthX,
382  matrix);
386 
387  } else { // do 3D fit
388  //
389  // LL function and fitter
390  //
392  //
393  // fit parameters: positions, widths, x-y correlations, tilts in xz and yz
394  //
395  MnUserParameters upar;
396  upar.Add("x", estX, errX, -10., 10.); // 0
397  upar.Add("y", estY, errY, -10., 10.); // 1
398  upar.Add("z", estZ, errZ, -30., 30.); // 2
399  upar.Add("ex", 0.015, 0.01, 0., 10.); // 3
400  upar.Add("corrxy", 0., 0.02, -1., 1.); // 4
401  upar.Add("ey", 0.015, 0.01, 0., 10.); // 5
402  upar.Add("dxdz", 0., 0.0002, -0.1, 0.1); // 6
403  upar.Add("dydz", 0., 0.0002, -0.1, 0.1); // 7
404  upar.Add("ez", 1., 0.1, 0., 30.); // 8
405  upar.Add("scale", errorScale_, errorScale_ / 10., errorScale_ / 2., errorScale_ * 2.); // 9
406  MnMigrad migrad(fcn, upar);
407  //
408  // first iteration without correlations
409  //
410  migrad.Fix(4);
411  migrad.Fix(6);
412  migrad.Fix(7);
413  migrad.Fix(9);
414  FunctionMinimum ierr = migrad(0, 1.);
415  if (!ierr.IsValid()) {
416  edm::LogWarning("PVFitter") << "3D beam spot fit failed in 1st iteration" << std::endl;
417  return false;
418  }
419  //
420  // refit with harder selection on vertices
421  //
422 
423  vector<double> results;
424  vector<double> errors;
425  results = ierr.UserParameters().Params();
426  errors = ierr.UserParameters().Errors();
427 
428  fcn.setLimits(results[0] - sigmaCut_ * results[3],
429  results[0] + sigmaCut_ * results[3],
430  results[1] - sigmaCut_ * results[5],
431  results[1] + sigmaCut_ * results[5],
432  results[2] - sigmaCut_ * results[8],
433  results[2] + sigmaCut_ * results[8]);
434  ierr = migrad(0, 1.);
435  if (!ierr.IsValid()) {
436  edm::LogWarning("PVFitter") << "3D beam spot fit failed in 2nd iteration" << std::endl;
437  return false;
438  }
439  //
440  // refit with correlations
441  //
442  migrad.Release(4);
443  migrad.Release(6);
444  migrad.Release(7);
445  ierr = migrad(0, 1.);
446  if (!ierr.IsValid()) {
447  edm::LogWarning("PVFitter") << "3D beam spot fit failed in 3rd iteration" << std::endl;
448  return false;
449  }
450 
451  results = ierr.UserParameters().Params();
452  errors = ierr.UserParameters().Errors();
453 
454  fwidthX = results[3];
455  fwidthY = results[5];
456  fwidthZ = results[8];
457  fwidthXerr = errors[3];
458  fwidthYerr = errors[5];
459  fwidthZerr = errors[8];
460 
461  // check errors on widths and sigmaZ for nan
463  edm::LogWarning("PVFitter") << "3D beam spot fit returns nan in 3rd iteration" << std::endl;
464  return false;
465  }
466 
468  // need to get the full cov matrix
469  matrix(0, 0) = pow(errors[0], 2);
470  matrix(1, 1) = pow(errors[1], 2);
471  matrix(2, 2) = pow(errors[2], 2);
472  matrix(3, 3) = fwidthZerr * fwidthZerr;
473  matrix(6, 6) = fwidthXerr * fwidthXerr;
474 
480  }
481 
482  return true;
483 }
math::Error< dimension >::type CovarianceMatrix
Definition: BeamSpot.h:29
constexpr bool isNotFinite(T x)
Definition: isFinite.h:9
math::XYZPoint Point
point in the space
Definition: BeamSpot.h:27
double fwidthY
Definition: PVFitter.h:170
double errorScale_
Definition: PVFitter.h:155
bool do3DFit_
Definition: PVFitter.h:143
double fwidthYerr
Definition: PVFitter.h:173
double fwidthZ
Definition: PVFitter.h:171
double fwidthXerr
Definition: PVFitter.h:172
void setType(BeamType type)
set beam type
Definition: BeamSpot.h:124
reco::BeamSpot fbeamspot
Definition: PVFitter.h:135
std::vector< BeamSpotFitPVData > pvStore_
Definition: PVFitter.h:176
void setBeamWidthY(double v)
Definition: BeamSpot.h:105
std::unique_ptr< TH2F > hPVx
Definition: PVFitter.h:161
double fwidthZerr
Definition: PVFitter.h:174
Log< level::Info, false > LogInfo
std::unique_ptr< TH2F > hPVy
Definition: PVFitter.h:162
void fcn(int &, double *, double &, double *, int)
unsigned int minNrVertices_
Definition: PVFitter.h:148
double sigmaCut_
Definition: PVFitter.h:156
void setBeamWidthX(double v)
Definition: BeamSpot.h:104
results
Definition: mysort.py:8
double fwidthX
Definition: PVFitter.h:169
Definition: errors.py:1
Log< level::Warning, false > LogWarning
#define str(s)
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:29

◆ setFitLSRange()

void PVFitter::setFitLSRange ( int  ls0,
int  ls1 
)
inline

Definition at line 77 of file PVFitter.h.

References fbeginLumiOfFit, and fendLumiOfFit.

77  {
78  fbeginLumiOfFit = ls0;
79  fendLumiOfFit = ls1;
80  }
int fbeginLumiOfFit
Definition: PVFitter.h:167
int fendLumiOfFit
Definition: PVFitter.h:168

◆ setRefTime()

void PVFitter::setRefTime ( std::time_t  t0,
std::time_t  t1 
)
inline

◆ setTree()

void PVFitter::setTree ( TTree *  tree)

Definition at line 206 of file PVFitter.cc.

References BeamSpotTreeData::branch(), ftree_, theBeamSpotTreeData_, and compare::tree.

Referenced by BeamFitter::BeamFitter().

206  {
207  ftree_ = tree;
209 }
BeamSpotTreeData theBeamSpotTreeData_
Definition: PVFitter.h:181
TTree * ftree_
Definition: PVFitter.h:164
void branch(TTree *tree)

Member Data Documentation

◆ bxMap_

std::map<int, std::vector<BeamSpotFitPVData> > PVFitter::bxMap_
private

Definition at line 177 of file PVFitter.h.

Referenced by getNPVsperBX(), readEvent(), resetAll(), and runBXFitter().

◆ debug_

bool PVFitter::debug_
private

Definition at line 142 of file PVFitter.h.

Referenced by initialize().

◆ do3DFit_

bool PVFitter::do3DFit_
private

Definition at line 143 of file PVFitter.h.

Referenced by initialize(), and runFitter().

◆ dynamicQualityCut_

double PVFitter::dynamicQualityCut_
private

Definition at line 178 of file PVFitter.h.

Referenced by compressStore(), initialize(), readEvent(), and resetAll().

◆ errorScale_

double PVFitter::errorScale_
private

Definition at line 155 of file PVFitter.h.

Referenced by initialize(), runBXFitter(), and runFitter().

◆ fasciiFile

std::ofstream PVFitter::fasciiFile
private

Definition at line 140 of file PVFitter.h.

◆ fbeamspot

reco::BeamSpot PVFitter::fbeamspot
private

Definition at line 135 of file PVFitter.h.

Referenced by getBeamSpot(), resetAll(), runBXFitter(), and runFitter().

◆ fbeginLumiOfFit

int PVFitter::fbeginLumiOfFit
private

Definition at line 167 of file PVFitter.h.

Referenced by getFitLSRange(), resetLSRange(), and setFitLSRange().

◆ fbspotMap

std::map<int, reco::BeamSpot> PVFitter::fbspotMap
private

Definition at line 136 of file PVFitter.h.

Referenced by getBeamSpotMap(), resetAll(), and runBXFitter().

◆ fendLumiOfFit

int PVFitter::fendLumiOfFit
private

Definition at line 168 of file PVFitter.h.

Referenced by getFitLSRange(), resetLSRange(), and setFitLSRange().

◆ fFitPerBunchCrossing

bool PVFitter::fFitPerBunchCrossing
private

Definition at line 137 of file PVFitter.h.

Referenced by FitPerBunchCrossing(), initialize(), IsFitPerBunchCrossing(), and readEvent().

◆ freftime

std::time_t PVFitter::freftime[2]
private

Definition at line 159 of file PVFitter.h.

Referenced by getRefTime(), resetRefTime(), and setRefTime().

◆ ftree_

TTree* PVFitter::ftree_
private

Definition at line 164 of file PVFitter.h.

Referenced by readEvent(), and setTree().

◆ fwidthX

double PVFitter::fwidthX
private

Definition at line 169 of file PVFitter.h.

Referenced by getWidthX(), runBXFitter(), and runFitter().

◆ fwidthXerr

double PVFitter::fwidthXerr
private

Definition at line 172 of file PVFitter.h.

Referenced by getWidthXerr(), runBXFitter(), and runFitter().

◆ fwidthY

double PVFitter::fwidthY
private

Definition at line 170 of file PVFitter.h.

Referenced by getWidthY(), runBXFitter(), and runFitter().

◆ fwidthYerr

double PVFitter::fwidthYerr
private

Definition at line 173 of file PVFitter.h.

Referenced by getWidthYerr(), runBXFitter(), and runFitter().

◆ fwidthZ

double PVFitter::fwidthZ
private

Definition at line 171 of file PVFitter.h.

Referenced by getWidthZ(), runBXFitter(), and runFitter().

◆ fwidthZerr

double PVFitter::fwidthZerr
private

Definition at line 174 of file PVFitter.h.

Referenced by getWidthZerr(), runBXFitter(), and runFitter().

◆ hPVx

std::unique_ptr<TH2F> PVFitter::hPVx
private

Definition at line 161 of file PVFitter.h.

Referenced by initialize(), readEvent(), resetAll(), and runFitter().

◆ hPVy

std::unique_ptr<TH2F> PVFitter::hPVy
private

Definition at line 162 of file PVFitter.h.

Referenced by initialize(), readEvent(), resetAll(), and runFitter().

◆ maxNrVertices_

unsigned int PVFitter::maxNrVertices_
private

Definition at line 147 of file PVFitter.h.

Referenced by initialize(), and readEvent().

◆ maxVtxNormChi2_

double PVFitter::maxVtxNormChi2_
private

Definition at line 150 of file PVFitter.h.

Referenced by initialize().

◆ maxVtxR_

double PVFitter::maxVtxR_
private

Definition at line 153 of file PVFitter.h.

Referenced by initialize().

◆ maxVtxZ_

double PVFitter::maxVtxZ_
private

Definition at line 154 of file PVFitter.h.

Referenced by initialize().

◆ minNrVertices_

unsigned int PVFitter::minNrVertices_
private

Definition at line 148 of file PVFitter.h.

Referenced by initialize(), runBXFitter(), and runFitter().

◆ minSumPt_

double PVFitter::minSumPt_
private

Definition at line 157 of file PVFitter.h.

Referenced by initialize(), and readEvent().

◆ minVtxNdf_

double PVFitter::minVtxNdf_
private

Definition at line 149 of file PVFitter.h.

Referenced by initialize(), and readEvent().

◆ minVtxTracks_

unsigned int PVFitter::minVtxTracks_
private

Definition at line 151 of file PVFitter.h.

Referenced by initialize(), and readEvent().

◆ minVtxWgt_

double PVFitter::minVtxWgt_
private

Definition at line 152 of file PVFitter.h.

Referenced by initialize(), and readEvent().

◆ npvsmap_

std::map<int, int> PVFitter::npvsmap_
private

Definition at line 134 of file PVFitter.h.

Referenced by getNPVsperBX().

◆ outputTxt_

std::string PVFitter::outputTxt_
private

Definition at line 145 of file PVFitter.h.

◆ pvQualities_

std::vector<double> PVFitter::pvQualities_
private

Definition at line 179 of file PVFitter.h.

Referenced by compressStore().

◆ pvStore_

std::vector<BeamSpotFitPVData> PVFitter::pvStore_
private

◆ sigmaCut_

double PVFitter::sigmaCut_
private

Definition at line 156 of file PVFitter.h.

Referenced by initialize(), runBXFitter(), and runFitter().

◆ theBeamSpotTreeData_

BeamSpotTreeData PVFitter::theBeamSpotTreeData_
private

Definition at line 181 of file PVFitter.h.

Referenced by readEvent(), and setTree().

◆ useOnlyFirstPV_

bool PVFitter::useOnlyFirstPV_
private

Definition at line 138 of file PVFitter.h.

Referenced by initialize(), and readEvent().

◆ vertexToken_

edm::EDGetTokenT<reco::VertexCollection> PVFitter::vertexToken_
private

Definition at line 144 of file PVFitter.h.

Referenced by initialize(), and readEvent().