CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | 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 ()
 

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
 
TH2F * hPVx
 
TH2F * hPVy
 
unsigned int maxNrVertices_
 
double maxVtxNormChi2_
 
double maxVtxR_
 
double maxVtxZ_
 
unsigned int minNrVertices_
 
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_
 
edm::EDGetTokenT
< reco::VertexCollection
vertexToken_
 

Detailed Description

Definition at line 43 of file PVFitter.h.

Constructor & Destructor Documentation

PVFitter::PVFitter ( )
inline

Definition at line 45 of file PVFitter.h.

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

Definition at line 53 of file PVFitter.cc.

References initialize().

55  : ftree_(0)
56 {
57  initialize(iConfig, iColl);
58 }
void initialize(const edm::ParameterSet &iConfig, edm::ConsumesCollector &iColl)
Definition: PVFitter.cc:67
TTree * ftree_
Definition: PVFitter.h:168
PVFitter::PVFitter ( const edm::ParameterSet iConfig,
edm::ConsumesCollector iColl 
)

Definition at line 60 of file PVFitter.cc.

References initialize().

62  :ftree_(0)
63 {
64  initialize(iConfig, iColl);
65 }
void initialize(const edm::ParameterSet &iConfig, edm::ConsumesCollector &iColl)
Definition: PVFitter.cc:67
TTree * ftree_
Definition: PVFitter.h:168
PVFitter::~PVFitter ( )
virtual

Definition at line 98 of file PVFitter.cc.

98  {
99 
100 }

Member Function Documentation

void PVFitter::compressStore ( )

reduce size of primary vertex cache by increasing quality limit

Definition at line 535 of file PVFitter.cc.

References dynamicQualityCut_, i, pvQualities_, pvQuality(), pvStore_, and python.multivaluedict::sort().

Referenced by readEvent().

536 {
537  //
538  // fill vertex qualities
539  //
540  pvQualities_.resize(pvStore_.size());
541  for ( unsigned int i=0; i<pvStore_.size(); ++i ) pvQualities_[i] = pvQuality(pvStore_[i]);
542  sort(pvQualities_.begin(),pvQualities_.end());
543  //
544  // Set new quality cut to median. This cut will be used to reduce the
545  // number of vertices in the store and also apply to all new vertices
546  // until the next reset
547  //
549  //
550  // remove all vertices failing the cut from the store
551  // (to be moved to a more efficient memory management!)
552  //
553  unsigned int iwrite(0);
554  for ( unsigned int i=0; i<pvStore_.size(); ++i ) {
555  if ( pvQuality(pvStore_[i])>dynamicQualityCut_ ) continue;
556  if ( i!=iwrite ) pvStore_[iwrite] = pvStore_[i];
557  ++iwrite;
558  }
559  pvStore_.resize(iwrite);
560  edm::LogInfo("PVFitter") << "Reduced primary vertex store size to "
561  << pvStore_.size() << " ; new dynamic quality cut = "
562  << dynamicQualityCut_ << std::endl;
563 
564 }
std::vector< double > pvQualities_
Definition: PVFitter.h:205
int i
Definition: DBlmapReader.cc:9
double dynamicQualityCut_
Definition: PVFitter.h:204
std::vector< BeamSpotFitPVData > pvStore_
Definition: PVFitter.h:202
double pvQuality(const reco::Vertex &pv) const
vertex quality measure
Definition: PVFitter.cc:567
void PVFitter::dumpTxtFile ( )

Definition at line 492 of file PVFitter.cc.

492  {
493 /*
494  fasciiFile << "Runnumber " << frun << std::endl;
495  fasciiFile << "BeginTimeOfFit " << fbeginTimeOfFit << std::endl;
496  fasciiFile << "EndTimeOfFit " << fendTimeOfFit << std::endl;
497  fasciiFile << "LumiRange " << fbeginLumiOfFit << " - " << fendLumiOfFit << std::endl;
498  fasciiFile << "Type " << fbeamspot.type() << std::endl;
499  fasciiFile << "X0 " << fbeamspot.x0() << std::endl;
500  fasciiFile << "Y0 " << fbeamspot.y0() << std::endl;
501  fasciiFile << "Z0 " << fbeamspot.z0() << std::endl;
502  fasciiFile << "sigmaZ0 " << fbeamspot.sigmaZ() << std::endl;
503  fasciiFile << "dxdz " << fbeamspot.dxdz() << std::endl;
504  fasciiFile << "dydz " << fbeamspot.dydz() << std::endl;
505  if (inputBeamWidth_ > 0 ) {
506  fasciiFile << "BeamWidthX " << inputBeamWidth_ << std::endl;
507  fasciiFile << "BeamWidthY " << inputBeamWidth_ << std::endl;
508  } else {
509  fasciiFile << "BeamWidthX " << fbeamspot.BeamWidthX() << std::endl;
510  fasciiFile << "BeamWidthY " << fbeamspot.BeamWidthY() << std::endl;
511  }
512 
513  for (int i = 0; i<6; ++i) {
514  fasciiFile << "Cov("<<i<<",j) ";
515  for (int j=0; j<7; ++j) {
516  fasciiFile << fbeamspot.covariance(i,j) << " ";
517  }
518  fasciiFile << std::endl;
519  }
520  // beam width error
521  if (inputBeamWidth_ > 0 ) {
522  fasciiFile << "Cov(6,j) 0 0 0 0 0 0 " << "1e-4" << std::endl;
523  } else {
524  fasciiFile << "Cov(6,j) 0 0 0 0 0 0 " << fbeamspot.covariance(6,6) << std::endl;
525  }
526  fasciiFile << "EmittanceX " << fbeamspot.emittanceX() << std::endl;
527  fasciiFile << "EmittanceY " << fbeamspot.emittanceY() << std::endl;
528  fasciiFile << "BetaStar " << fbeamspot.betaStar() << std::endl;
529 
530 */
531 }
void PVFitter::FitPerBunchCrossing ( )
inline

Definition at line 63 of file PVFitter.h.

References fFitPerBunchCrossing.

63 { fFitPerBunchCrossing = true; }
bool fFitPerBunchCrossing
Definition: PVFitter.h:141
reco::BeamSpot PVFitter::getBeamSpot ( )
inline

Definition at line 91 of file PVFitter.h.

References fbeamspot.

Referenced by AlcaBeamMonitor::endLuminosityBlock(), and BeamFitter::runPVandTrkFitter().

91 { return fbeamspot; }
reco::BeamSpot fbeamspot
Definition: PVFitter.h:139
std::map<int, reco::BeamSpot> PVFitter::getBeamSpotMap ( )
inline

Definition at line 92 of file PVFitter.h.

References fbspotMap.

Referenced by BeamFitter::runPVandTrkFitter().

92 { return fbspotMap; }
std::map< int, reco::BeamSpot > fbspotMap
Definition: PVFitter.h:140
int* PVFitter::getFitLSRange ( )
inline

Definition at line 94 of file PVFitter.h.

References fbeginLumiOfFit, fendLumiOfFit, and tmp.

94  {
95  int *tmp=new int[2];
96  tmp[0] = fbeginLumiOfFit;
97  tmp[1] = fendLumiOfFit;
98  return tmp;
99  }
int fbeginLumiOfFit
Definition: PVFitter.h:178
int fendLumiOfFit
Definition: PVFitter.h:179
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
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:202
const std::map<int, int>& PVFitter::getNPVsperBX ( )
inline

Definition at line 122 of file PVFitter.h.

References bxMap_, python.multivaluedict::map(), npvsmap_, and findQualityFiles::size.

Referenced by BeamFitter::getNPVsperBX().

122  {
123 
124  npvsmap_.clear();
125 
126  for ( std::map<int,std::vector<BeamSpotFitPVData> >::const_iterator pvStore = bxMap_.begin();
127  pvStore!=bxMap_.end(); ++pvStore) {
128 
129  //std::cout << "bx " << pvStore->first << " NPVs = " << (pvStore->second).size() << std::endl;
130  npvsmap_[ pvStore->first ] = (pvStore->second).size();
131 
132  }
133  return npvsmap_;
134  }
std::map< int, std::vector< BeamSpotFitPVData > > bxMap_
Definition: PVFitter.h:203
std::map< int, int > npvsmap_
Definition: PVFitter.h:138
tuple size
Write out results.
std::vector<BeamSpotFitPVData> PVFitter::getpvStore ( )
inline

Definition at line 61 of file PVFitter.h.

References pvStore_.

Referenced by BeamFitter::getPVvectorSize().

61 { return pvStore_; }
std::vector< BeamSpotFitPVData > pvStore_
Definition: PVFitter.h:202
time_t* PVFitter::getRefTime ( )
inline

Definition at line 101 of file PVFitter.h.

References freftime.

101  {
102  time_t *tmptime=new time_t[2];
103  tmptime[0]=freftime[0];
104  tmptime[1]=freftime[1];
105  return tmptime;
106  }
std::time_t freftime[2]
Definition: PVFitter.h:164
double PVFitter::getWidthX ( )
inline

Definition at line 54 of file PVFitter.h.

References fwidthX.

54 { return fwidthX; }
double fwidthX
Definition: PVFitter.h:182
double PVFitter::getWidthXerr ( )
inline

Definition at line 57 of file PVFitter.h.

References fwidthXerr.

Referenced by BeamFitter::runPVandTrkFitter().

57 { return fwidthXerr; }
double fwidthXerr
Definition: PVFitter.h:185
double PVFitter::getWidthY ( )
inline

Definition at line 55 of file PVFitter.h.

References fwidthY.

55 { return fwidthY; }
double fwidthY
Definition: PVFitter.h:183
double PVFitter::getWidthYerr ( )
inline

Definition at line 58 of file PVFitter.h.

References fwidthYerr.

58 { return fwidthYerr; }
double fwidthYerr
Definition: PVFitter.h:186
double PVFitter::getWidthZ ( )
inline

Definition at line 56 of file PVFitter.h.

References fwidthZ.

56 { return fwidthZ; }
double fwidthZ
Definition: PVFitter.h:184
double PVFitter::getWidthZerr ( )
inline

Definition at line 59 of file PVFitter.h.

References fwidthZerr.

59 { return fwidthZerr; }
double fwidthZerr
Definition: PVFitter.h:187
void PVFitter::initialize ( const edm::ParameterSet iConfig,
edm::ConsumesCollector iColl 
)

Definition at line 67 of file PVFitter.cc.

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

Referenced by PVFitter().

69 {
70  debug_ = iConfig.getParameter<edm::ParameterSet>("PVFitter").getUntrackedParameter<bool>("Debug");
72  iConfig.getParameter<edm::ParameterSet>("PVFitter")
73  .getUntrackedParameter<edm::InputTag>("VertexCollection",
74  edm::InputTag("offlinePrimaryVertices")));
75  do3DFit_ = iConfig.getParameter<edm::ParameterSet>("PVFitter").getUntrackedParameter<bool>("Apply3DFit");
76  //writeTxt_ = iConfig.getParameter<edm::ParameterSet>("PVFitter").getUntrackedParameter<bool>("WriteAscii");
77  //outputTxt_ = iConfig.getParameter<edm::ParameterSet>("PVFitter").getUntrackedParameter<std::string>("AsciiFileName");
78 
79  maxNrVertices_ = iConfig.getParameter<edm::ParameterSet>("PVFitter").getUntrackedParameter<unsigned int>("maxNrStoredVertices");
80  minNrVertices_ = iConfig.getParameter<edm::ParameterSet>("PVFitter").getUntrackedParameter<unsigned int>("minNrVerticesForFit");
81  minVtxNdf_ = iConfig.getParameter<edm::ParameterSet>("PVFitter").getUntrackedParameter<double>("minVertexNdf");
82  maxVtxNormChi2_ = iConfig.getParameter<edm::ParameterSet>("PVFitter").getUntrackedParameter<double>("maxVertexNormChi2");
83  minVtxTracks_ = iConfig.getParameter<edm::ParameterSet>("PVFitter").getUntrackedParameter<unsigned int>("minVertexNTracks");
84  minVtxWgt_ = iConfig.getParameter<edm::ParameterSet>("PVFitter").getUntrackedParameter<double>("minVertexMeanWeight");
85  maxVtxR_ = iConfig.getParameter<edm::ParameterSet>("PVFitter").getUntrackedParameter<double>("maxVertexR");
86  maxVtxZ_ = iConfig.getParameter<edm::ParameterSet>("PVFitter").getUntrackedParameter<double>("maxVertexZ");
87  errorScale_ = iConfig.getParameter<edm::ParameterSet>("PVFitter").getUntrackedParameter<double>("errorScale");
88  sigmaCut_ = iConfig.getParameter<edm::ParameterSet>("PVFitter").getUntrackedParameter<double>("nSigmaCut");
89  fFitPerBunchCrossing=iConfig.getParameter<edm::ParameterSet>("PVFitter").getUntrackedParameter<bool>("FitPerBunchCrossing");
90 
91  // preset quality cut to "infinite"
92  dynamicQualityCut_ = 1.e30;
93 
94  hPVx = new TH2F("hPVx","PVx vs PVz distribution",200,-maxVtxR_, maxVtxR_, 200, -maxVtxZ_, maxVtxZ_);
95  hPVy = new TH2F("hPVy","PVy vs PVz distribution",200,-maxVtxR_, maxVtxR_, 200, -maxVtxZ_, maxVtxZ_);
96 }
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
T getParameter(std::string const &) const
bool debug_
Definition: PVFitter.h:145
double maxVtxNormChi2_
Definition: PVFitter.h:154
double minVtxWgt_
Definition: PVFitter.h:156
double minVtxNdf_
Definition: PVFitter.h:153
std::vector< Vertex > VertexCollection
collection of Vertex objects
Definition: VertexFwd.h:9
double errorScale_
Definition: PVFitter.h:159
bool do3DFit_
Definition: PVFitter.h:146
double dynamicQualityCut_
Definition: PVFitter.h:204
bool fFitPerBunchCrossing
Definition: PVFitter.h:141
TH2F * hPVy
Definition: PVFitter.h:166
edm::EDGetTokenT< reco::VertexCollection > vertexToken_
Definition: PVFitter.h:147
double maxVtxR_
Definition: PVFitter.h:157
double maxVtxZ_
Definition: PVFitter.h:158
unsigned int maxNrVertices_
Definition: PVFitter.h:151
unsigned int minVtxTracks_
Definition: PVFitter.h:155
TH2F * hPVx
Definition: PVFitter.h:166
unsigned int minNrVertices_
Definition: PVFitter.h:152
double sigmaCut_
Definition: PVFitter.h:160
bool PVFitter::IsFitPerBunchCrossing ( )
inline

Definition at line 93 of file PVFitter.h.

References fFitPerBunchCrossing.

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

93 { return fFitPerBunchCrossing; }
bool fFitPerBunchCrossing
Definition: PVFitter.h:141
double PVFitter::pvQuality ( const reco::Vertex pv) const

vertex quality measure

Definition at line 567 of file PVFitter.cc.

References reco::Vertex::covariance().

Referenced by compressStore(), and readEvent().

568 {
569  //
570  // determinant of the transverse part of the PV covariance matrix
571  //
572  return
573  pv.covariance(0,0)*pv.covariance(1,1)-
574  pv.covariance(0,1)*pv.covariance(0,1);
575 }
double covariance(int i, int j) const
(i, j)-th element of error matrix, i, j = 0, ... 2
Definition: Vertex.h:123
double PVFitter::pvQuality ( const BeamSpotFitPVData pv) const

vertex quality measure

Definition at line 578 of file PVFitter.cc.

References BeamSpotFitPVData::posCorr, and BeamSpotFitPVData::posError.

579 {
580  //
581  // determinant of the transverse part of the PV covariance matrix
582  //
583  double ex = pv.posError[0];
584  double ey = pv.posError[1];
585  return ex*ex*ey*ey*(1-pv.posCorr[0]*pv.posCorr[0]);
586 }
void PVFitter::readEvent ( const edm::Event iEvent)

Definition at line 103 of file PVFitter.cc.

References BeamSpotFitPVData::bunchCrossing, BeamSpotTreeData::bunchCrossing(), edm::EventBase::bunchCrossing(), bxMap_, compressStore(), dynamicQualityCut_, fFitPerBunchCrossing, ftree_, edm::Event::getByToken(), hPVx, hPVy, edm::EventBase::id(), BeamSpotTreeData::lumi(), edm::EventBase::luminosityBlock(), maxNrVertices_, minVtxNdf_, minVtxWgt_, BeamSpotFitPVData::posCorr, BeamSpotFitPVData::posError, BeamSpotFitPVData::position, MetAnalyzer::pv(), BeamSpotTreeData::pvData(), pvQuality(), pvStore_, BeamSpotTreeData::run(), edm::EventID::run(), theBeamSpotTreeData_, and vertexToken_.

Referenced by AlcaBeamMonitor::analyze(), and BeamFitter::readEvent().

104 {
105 
106 // frun = iEvent.id().run();
107 // const edm::TimeValue_t ftimestamp = iEvent.time().value();
108 // const std::time_t ftmptime = ftimestamp >> 32;
109 
110 // if (fbeginLumiOfFit == -1) freftime[0] = freftime[1] = ftmptime;
111 // if (freftime[0] == 0 || ftmptime < freftime[0]) freftime[0] = ftmptime;
112 // const char* fbeginTime = formatTime(freftime[0]);
113 // sprintf(fbeginTimeOfFit,"%s",fbeginTime);
114 
115 // if (freftime[1] == 0 || ftmptime > freftime[1]) freftime[1] = ftmptime;
116 // const char* fendTime = formatTime(freftime[1]);
117 // sprintf(fendTimeOfFit,"%s",fendTime);
118 
119 // flumi = iEvent.luminosityBlock();
120 // frunFit = frun;
121 
122 // if (fbeginLumiOfFit == -1 || fbeginLumiOfFit > flumi) fbeginLumiOfFit = flumi;
123 // if (fendLumiOfFit == -1 || fendLumiOfFit < flumi) fendLumiOfFit = flumi;
124 // std::cout << "flumi = " <<flumi<<"; fbeginLumiOfFit = " << fbeginLumiOfFit <<"; fendLumiOfFit = "<<fendLumiOfFit<<std::endl;
125 
126  //------ Primary Vertices
128  bool hasPVs = false;
129  //edm::View<reco::Vertex> vertices;
130  //const reco::VertexCollection & vertices = 0;
131 
132  if ( iEvent.getByToken(vertexToken_, PVCollection ) ) {
133  //pv = *PVCollection;
134  //vertices = *PVCollection;
135  hasPVs = true;
136  }
137  //------
138 
139  if ( hasPVs ) {
140 
141  for (reco::VertexCollection::const_iterator pv = PVCollection->begin(); pv != PVCollection->end(); ++pv ) {
142 
143 
144  //for ( size_t ipv=0; ipv != pv.size(); ++ipv ) {
145 
146  //--- vertex selection
147  if ( pv->isFake() || pv->tracksSize()==0 ) continue;
148  if ( pv->ndof() < minVtxNdf_ || (pv->ndof()+3.)/pv->tracksSize()<2*minVtxWgt_ ) continue;
149  //---
150 
151  hPVx->Fill( pv->x(), pv->z() );
152  hPVy->Fill( pv->y(), pv->z() );
153 
154  //
155  // 3D fit section
156  //
157  // apply additional quality cut
158  if ( pvQuality(*pv)>dynamicQualityCut_ ) continue;
159  // if store exceeds max. size: reduce size and apply new quality cut
160  if ( pvStore_.size()>=maxNrVertices_ ) {
161  compressStore();
162  if ( pvQuality(*pv)>dynamicQualityCut_ ) continue;
163  }
164  //
165  // copy PV to store
166  //
167  int bx = iEvent.bunchCrossing();
168  BeamSpotFitPVData pvData;
169  pvData.bunchCrossing = bx;
170  pvData.position[0] = pv->x();
171  pvData.position[1] = pv->y();
172  pvData.position[2] = pv->z();
173  pvData.posError[0] = pv->xError();
174  pvData.posError[1] = pv->yError();
175  pvData.posError[2] = pv->zError();
176  pvData.posCorr[0] = pv->covariance(0,1)/pv->xError()/pv->yError();
177  pvData.posCorr[1] = pv->covariance(0,2)/pv->xError()/pv->zError();
178  pvData.posCorr[2] = pv->covariance(1,2)/pv->yError()/pv->zError();
179  pvStore_.push_back(pvData);
180 
181  if(ftree_ != 0){
182  theBeamSpotTreeData_.run(iEvent.id().run());
186  ftree_->Fill();
187  }
188 
189  if (fFitPerBunchCrossing) bxMap_[bx].push_back(pvData);
190 
191  }
192 
193  }
194 
195 
196 
197 
198 }
RunNumber_t run() const
Definition: EventID.h:39
std::map< int, std::vector< BeamSpotFitPVData > > bxMap_
Definition: PVFitter.h:203
void run(unsigned int run)
void compressStore()
reduce size of primary vertex cache by increasing quality limit
Definition: PVFitter.cc:535
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:449
double minVtxWgt_
Definition: PVFitter.h:156
double minVtxNdf_
Definition: PVFitter.h:153
int bunchCrossing() const
Definition: EventBase.h:66
edm::LuminosityBlockNumber_t luminosityBlock() const
Definition: EventBase.h:63
double dynamicQualityCut_
Definition: PVFitter.h:204
void bunchCrossing(unsigned int bunchCrossing)
void lumi(unsigned int lumi)
std::vector< BeamSpotFitPVData > pvStore_
Definition: PVFitter.h:202
BeamSpotTreeData theBeamSpotTreeData_
Definition: PVFitter.h:207
bool fFitPerBunchCrossing
Definition: PVFitter.h:141
TH2F * hPVy
Definition: PVFitter.h:166
void pvData(const BeamSpotFitPVData &pvData)
TTree * ftree_
Definition: PVFitter.h:168
edm::EDGetTokenT< reco::VertexCollection > vertexToken_
Definition: PVFitter.h:147
double pvQuality(const reco::Vertex &pv) const
vertex quality measure
Definition: PVFitter.cc:567
unsigned int maxNrVertices_
Definition: PVFitter.h:151
TH2F * hPVx
Definition: PVFitter.h:166
edm::EventID id() const
Definition: EventBase.h:60
void PVFitter::resetAll ( )
inline

Definition at line 80 of file PVFitter.h.

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

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

80  {
81  resetLSRange();
82  resetRefTime();
83  pvStore_.clear();
84  bxMap_.clear();
85  dynamicQualityCut_ = 1.e30;
86  hPVx->Reset();
87  hPVy->Reset();
89  fbspotMap.clear();
90  };
std::map< int, std::vector< BeamSpotFitPVData > > bxMap_
Definition: PVFitter.h:203
double dynamicQualityCut_
Definition: PVFitter.h:204
reco::BeamSpot fbeamspot
Definition: PVFitter.h:139
std::vector< BeamSpotFitPVData > pvStore_
Definition: PVFitter.h:202
void resetLSRange()
Definition: PVFitter.h:66
TH2F * hPVy
Definition: PVFitter.h:166
std::map< int, reco::BeamSpot > fbspotMap
Definition: PVFitter.h:140
void resetRefTime()
Definition: PVFitter.h:67
TH2F * hPVx
Definition: PVFitter.h:166
void PVFitter::resetLSRange ( )
inline

Definition at line 66 of file PVFitter.h.

References fbeginLumiOfFit, and fendLumiOfFit.

Referenced by resetAll().

int fbeginLumiOfFit
Definition: PVFitter.h:178
int fendLumiOfFit
Definition: PVFitter.h:179
void PVFitter::resetRefTime ( )
inline

Definition at line 67 of file PVFitter.h.

References freftime.

Referenced by resetAll().

67 { freftime[0] = freftime[1] = 0; }
std::time_t freftime[2]
Definition: PVFitter.h:164
void PVFitter::resizepvStore ( unsigned int  rmSize)
inline

Definition at line 109 of file PVFitter.h.

References pvStore_.

Referenced by BeamFitter::resizePVvector().

109  {
110  pvStore_.erase(pvStore_.begin(), pvStore_.begin()+rmSize);
111  }
std::vector< BeamSpotFitPVData > pvStore_
Definition: PVFitter.h:202
bool PVFitter::runBXFitter ( )

Definition at line 205 of file PVFitter.cc.

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

Referenced by BeamFitter::runPVandTrkFitter().

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

Definition at line 335 of file PVFitter.cc.

References align::BeamSpot, do3DFit_, benchmark_cfg::errors, errorScale_, fbeamspot, fcn(), fwidthX, fwidthXerr, fwidthY, fwidthYerr, fwidthZ, fwidthZerr, hPVx, hPVy, edm::isNotFinite(), makeMuonMisalignmentScenario::matrix, minNrVertices_, funct::pow(), pvStore_, python.entryComment::results, reco::BeamSpot::setBeamWidthX(), reco::BeamSpot::setBeamWidthY(), reco::BeamSpot::setType(), sigmaCut_, and reco::BeamSpot::Tracker.

Referenced by AlcaBeamMonitor::endLuminosityBlock(), and BeamFitter::runPVandTrkFitter().

335  {
336 
337  using namespace ROOT::Minuit2;
338  edm::LogInfo("PVFitter") << " Number of PVs collected for PVFitter: " << pvStore_.size() << std::endl;
339 
340  if ( pvStore_.size() <= minNrVertices_ ) return false;
341 
342  //bool fit_ok = false;
343 
344  if ( ! do3DFit_ ) {
345  TH1F *h1PVx = (TH1F*) hPVx->ProjectionX("h1PVx", 0, -1, "e");
346  TH1F *h1PVy = (TH1F*) hPVy->ProjectionX("h1PVy", 0, -1, "e");
347  TH1F *h1PVz = (TH1F*) hPVx->ProjectionY("h1PVz", 0, -1, "e");
348 
349  //Use our own copy for thread safety
350  TF1 gaus("localGaus","gaus");
351 
352  h1PVx->Fit(&gaus,"QLM0");
353  h1PVy->Fit(&gaus,"QLM0");
354  h1PVz->Fit(&gaus,"QLM0");
355 
356  TF1 *gausx = h1PVx->GetFunction("localGaus");
357  TF1 *gausy = h1PVy->GetFunction("localGaus");
358  TF1 *gausz = h1PVz->GetFunction("localGaus");
359 
360  fwidthX = gausx->GetParameter(2);
361  fwidthY = gausy->GetParameter(2);
362  fwidthZ = gausz->GetParameter(2);
363  fwidthXerr = gausx->GetParError(2);
364  fwidthYerr = gausy->GetParError(2);
365  fwidthZerr = gausz->GetParError(2);
366 
368  matrix(2,2) = gausz->GetParError(1) * gausz->GetParError(1);
369  matrix(3,3) = fwidthZerr * fwidthZerr;
370  matrix(6,6) = fwidthXerr * fwidthXerr;
371 
372  fbeamspot = reco::BeamSpot( reco::BeamSpot::Point(gausx->GetParameter(1),
373  gausy->GetParameter(1),
374  gausz->GetParameter(1) ),
375  fwidthZ,
376  0., 0.,
377  fwidthX,
378  matrix );
382 
383  }
384  else { // do 3D fit
385  //
386  // LL function and fitter
387  //
389  //
390  // fit parameters: positions, widths, x-y correlations, tilts in xz and yz
391  //
392  MnUserParameters upar;
393  upar.Add("x" , 0. , 0.02 , -10. , 10. ); // 0
394  upar.Add("y" , 0. , 0.02 , -10. , 10. ); // 1
395  upar.Add("z" , 0. , 0.20 , -30. , 30. ); // 2
396  upar.Add("ex" , 0.015 , 0.01 , 0. , 10. ); // 3
397  upar.Add("corrxy", 0. , 0.02 , -1. , 1. ); // 4
398  upar.Add("ey" , 0.015 , 0.01 , 0. , 10. ); // 5
399  upar.Add("dxdz" , 0. , 0.0002 , -0.1 , 0.1 ); // 6
400  upar.Add("dydz" , 0. , 0.0002 , -0.1 , 0.1 ); // 7
401  upar.Add("ez" , 1. , 0.1 , 0. , 30. ); // 8
402  upar.Add("scale" , errorScale_, errorScale_/10.,errorScale_/2., errorScale_*2.); // 9
403  MnMigrad migrad(*fcn, upar);
404  //
405  // first iteration without correlations
406  //
407  migrad.Fix(4);
408  migrad.Fix(6);
409  migrad.Fix(7);
410  migrad.Fix(9);
411  FunctionMinimum ierr = migrad(0,1.);
412  if ( !ierr.IsValid() ) {
413  edm::LogWarning("PVFitter") << "3D beam spot fit failed in 1st iteration" << std::endl;
414  return false;
415  }
416  //
417  // refit with harder selection on vertices
418  //
419 
420  vector<double> results ;
421  vector<double> errors ;
422  results = ierr.UserParameters().Params() ; \
423  errors = ierr.UserParameters().Errors() ; \
424 
425  fcn->setLimits(results[0]-sigmaCut_*results[3],
426  results[0]+sigmaCut_*results[3],
427  results[1]-sigmaCut_*results[5],
428  results[1]+sigmaCut_*results[5],
429  results[2]-sigmaCut_*results[8],
430  results[2]+sigmaCut_*results[8]);
431  ierr = migrad(0,1.);
432  if ( !ierr.IsValid() ) {
433  edm::LogWarning("PVFitter") << "3D beam spot fit failed in 2nd iteration" << std::endl;
434  return false;
435  }
436  //
437  // refit with correlations
438  //
439  migrad.Release(4);
440  migrad.Release(6);
441  migrad.Release(7);
442  ierr = migrad(0,1.);
443  if ( !ierr.IsValid() ) {
444  edm::LogWarning("PVFitter") << "3D beam spot fit failed in 3rd iteration" << std::endl;
445  return false;
446  }
447  // refit with floating scale factor
448  // minuitx.ReleaseParameter(9);
449  // minuitx.Minimize();
450 
451  //minuitx.PrintResults(0,0);
452 
453  results = ierr.UserParameters().Params() ; \
454  errors = ierr.UserParameters().Errors() ; \
455 
456  fwidthX = results[3];
457  fwidthY = results[5];
458  fwidthZ = results[8];
459  fwidthXerr = errors[3];
460  fwidthYerr = errors[5];
461  fwidthZerr = errors[8];
462 
463  // check errors on widths and sigmaZ for nan
464  if ( edm::isNotFinite(fwidthXerr) || edm::isNotFinite(fwidthYerr) || edm::isNotFinite(fwidthZerr) ) {
465  edm::LogWarning("PVFitter") << "3D beam spot fit returns nan in 3rd iteration" << std::endl;
466  return false;
467  }
468 
470  // need to get the full cov matrix
471  matrix(0,0) = pow( errors[0], 2);
472  matrix(1,1) = pow( errors[1], 2);
473  matrix(2,2) = pow( errors[2], 2);
474  matrix(3,3) = fwidthZerr * fwidthZerr;
475  matrix(6,6) = fwidthXerr * fwidthXerr;
476 
478  results[1],
479  results[2] ),
480  fwidthZ,
481  results[6], results[7],
482  fwidthX,
483  matrix );
487  }
488 
489  return true; //FIXME: Need to add quality test for the fit results!
490 }
math::Error< dimension >::type CovarianceMatrix
Definition: BeamSpot.h:31
math::XYZPoint Point
point in the space
Definition: BeamSpot.h:29
double fwidthY
Definition: PVFitter.h:183
double errorScale_
Definition: PVFitter.h:159
bool do3DFit_
Definition: PVFitter.h:146
double fwidthYerr
Definition: PVFitter.h:186
double fwidthZ
Definition: PVFitter.h:184
double fwidthXerr
Definition: PVFitter.h:185
void setType(BeamType type)
set beam type
Definition: BeamSpot.h:131
reco::BeamSpot fbeamspot
Definition: PVFitter.h:139
std::vector< BeamSpotFitPVData > pvStore_
Definition: PVFitter.h:202
bool isNotFinite(T x)
Definition: isFinite.h:10
void setBeamWidthY(double v)
Definition: BeamSpot.h:109
TH2F * hPVy
Definition: PVFitter.h:166
double fwidthZerr
Definition: PVFitter.h:187
void fcn(int &, double *, double &, double *, int)
TH2F * hPVx
Definition: PVFitter.h:166
unsigned int minNrVertices_
Definition: PVFitter.h:152
double sigmaCut_
Definition: PVFitter.h:160
void setBeamWidthX(double v)
Definition: BeamSpot.h:108
double fwidthX
Definition: PVFitter.h:182
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:40
void PVFitter::setFitLSRange ( int  ls0,
int  ls1 
)
inline

Definition at line 73 of file PVFitter.h.

References fbeginLumiOfFit, and fendLumiOfFit.

73  {
74  fbeginLumiOfFit = ls0;
75  fendLumiOfFit = ls1;
76  }
int fbeginLumiOfFit
Definition: PVFitter.h:178
int fendLumiOfFit
Definition: PVFitter.h:179
void PVFitter::setRefTime ( std::time_t  t0,
std::time_t  t1 
)
inline

Definition at line 69 of file PVFitter.h.

References freftime.

69  {
70  freftime[0] = t0;
71  freftime[1] = t1;
72  }
std::time_t freftime[2]
Definition: PVFitter.h:164
void PVFitter::setTree ( TTree *  tree)

Definition at line 200 of file PVFitter.cc.

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

Referenced by BeamFitter::BeamFitter().

200  {
201  ftree_ = tree;
203 }
BeamSpotTreeData theBeamSpotTreeData_
Definition: PVFitter.h:207
TTree * ftree_
Definition: PVFitter.h:168
void branch(TTree *tree)

Member Data Documentation

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

Definition at line 203 of file PVFitter.h.

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

bool PVFitter::debug_
private

Definition at line 145 of file PVFitter.h.

Referenced by initialize().

bool PVFitter::do3DFit_
private

Definition at line 146 of file PVFitter.h.

Referenced by initialize(), and runFitter().

double PVFitter::dynamicQualityCut_
private

Definition at line 204 of file PVFitter.h.

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

double PVFitter::errorScale_
private

Definition at line 159 of file PVFitter.h.

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

std::ofstream PVFitter::fasciiFile
private

Definition at line 143 of file PVFitter.h.

reco::BeamSpot PVFitter::fbeamspot
private

Definition at line 139 of file PVFitter.h.

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

int PVFitter::fbeginLumiOfFit
private

Definition at line 178 of file PVFitter.h.

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

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

Definition at line 140 of file PVFitter.h.

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

int PVFitter::fendLumiOfFit
private

Definition at line 179 of file PVFitter.h.

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

bool PVFitter::fFitPerBunchCrossing
private

Definition at line 141 of file PVFitter.h.

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

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

Definition at line 164 of file PVFitter.h.

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

TTree* PVFitter::ftree_
private

Definition at line 168 of file PVFitter.h.

Referenced by readEvent(), and setTree().

double PVFitter::fwidthX
private

Definition at line 182 of file PVFitter.h.

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

double PVFitter::fwidthXerr
private

Definition at line 185 of file PVFitter.h.

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

double PVFitter::fwidthY
private

Definition at line 183 of file PVFitter.h.

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

double PVFitter::fwidthYerr
private

Definition at line 186 of file PVFitter.h.

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

double PVFitter::fwidthZ
private

Definition at line 184 of file PVFitter.h.

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

double PVFitter::fwidthZerr
private

Definition at line 187 of file PVFitter.h.

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

TH2F* PVFitter::hPVx
private

Definition at line 166 of file PVFitter.h.

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

TH2F* PVFitter::hPVy
private

Definition at line 166 of file PVFitter.h.

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

unsigned int PVFitter::maxNrVertices_
private

Definition at line 151 of file PVFitter.h.

Referenced by initialize(), and readEvent().

double PVFitter::maxVtxNormChi2_
private

Definition at line 154 of file PVFitter.h.

Referenced by initialize().

double PVFitter::maxVtxR_
private

Definition at line 157 of file PVFitter.h.

Referenced by initialize().

double PVFitter::maxVtxZ_
private

Definition at line 158 of file PVFitter.h.

Referenced by initialize().

unsigned int PVFitter::minNrVertices_
private

Definition at line 152 of file PVFitter.h.

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

double PVFitter::minVtxNdf_
private

Definition at line 153 of file PVFitter.h.

Referenced by initialize(), and readEvent().

unsigned int PVFitter::minVtxTracks_
private

Definition at line 155 of file PVFitter.h.

Referenced by initialize().

double PVFitter::minVtxWgt_
private

Definition at line 156 of file PVFitter.h.

Referenced by initialize(), and readEvent().

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

Definition at line 138 of file PVFitter.h.

Referenced by getNPVsperBX().

std::string PVFitter::outputTxt_
private

Definition at line 149 of file PVFitter.h.

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

Definition at line 205 of file PVFitter.h.

Referenced by compressStore().

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

Definition at line 160 of file PVFitter.h.

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

BeamSpotTreeData PVFitter::theBeamSpotTreeData_
private

Definition at line 207 of file PVFitter.h.

Referenced by readEvent(), and setTree().

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

Definition at line 147 of file PVFitter.h.

Referenced by initialize(), and readEvent().