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 ()
 
bool IsFitPerBunchCrossing ()
 
 PVFitter ()
 
 PVFitter (const edm::ParameterSet &iConfig)
 
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
 
char fbeginTimeOfFit [32]
 
std::map< int, reco::BeamSpotfbspotMap
 
double fdxdz
 
double fdxdzErr
 
double fdydz
 
double fdydzErr
 
int fendLumiOfFit
 
char fendTimeOfFit [32]
 
bool fFitPerBunchCrossing
 
int flumi
 
std::time_t freftime [2]
 
int frun
 
int frunFit
 
double fsigmaZ
 
double fsigmaZErr
 
TTree * ftree_
 
double fwidthX
 
double fwidthXerr
 
double fwidthY
 
double fwidthYerr
 
double fwidthZ
 
double fwidthZerr
 
double fx
 
double fxErr
 
double fy
 
double fyErr
 
double fz
 
double fzErr
 
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::InputTag vertexLabel_
 
bool writeTxt_
 

Detailed Description

Definition at line 39 of file PVFitter.h.

Constructor & Destructor Documentation

PVFitter::PVFitter ( )
inline

Definition at line 41 of file PVFitter.h.

41 {}
PVFitter::PVFitter ( const edm::ParameterSet iConfig)

class: PVFitter.cc package: RecoVertex/BeamSpotProducer

author: Francisco Yumiceva, Fermilab (yumic.nosp@m.eva@.nosp@m.fnal..nosp@m.gov) Geng-Yuan Jeng, UC Riverside (Geng-.nosp@m.Yuan.nosp@m..Jeng.nosp@m.@cer.nosp@m.n.ch)

version

Id:
PVFitter.cc,v 1.19 2011/12/05 23:14:31 burkett Exp

Definition at line 50 of file PVFitter.cc.

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

50  : ftree_(0)
51 {
52 
53  debug_ = iConfig.getParameter<edm::ParameterSet>("PVFitter").getUntrackedParameter<bool>("Debug");
54  vertexLabel_ = iConfig.getParameter<edm::ParameterSet>("PVFitter").getUntrackedParameter<edm::InputTag>("VertexCollection", edm::InputTag("offlinePrimaryVertices"));
55  do3DFit_ = iConfig.getParameter<edm::ParameterSet>("PVFitter").getUntrackedParameter<bool>("Apply3DFit");
56  //writeTxt_ = iConfig.getParameter<edm::ParameterSet>("PVFitter").getUntrackedParameter<bool>("WriteAscii");
57  //outputTxt_ = iConfig.getParameter<edm::ParameterSet>("PVFitter").getUntrackedParameter<std::string>("AsciiFileName");
58 
59  maxNrVertices_ = iConfig.getParameter<edm::ParameterSet>("PVFitter").getUntrackedParameter<unsigned int>("maxNrStoredVertices");
60  minNrVertices_ = iConfig.getParameter<edm::ParameterSet>("PVFitter").getUntrackedParameter<unsigned int>("minNrVerticesForFit");
61  minVtxNdf_ = iConfig.getParameter<edm::ParameterSet>("PVFitter").getUntrackedParameter<double>("minVertexNdf");
62  maxVtxNormChi2_ = iConfig.getParameter<edm::ParameterSet>("PVFitter").getUntrackedParameter<double>("maxVertexNormChi2");
63  minVtxTracks_ = iConfig.getParameter<edm::ParameterSet>("PVFitter").getUntrackedParameter<unsigned int>("minVertexNTracks");
64  minVtxWgt_ = iConfig.getParameter<edm::ParameterSet>("PVFitter").getUntrackedParameter<double>("minVertexMeanWeight");
65  maxVtxR_ = iConfig.getParameter<edm::ParameterSet>("PVFitter").getUntrackedParameter<double>("maxVertexR");
66  maxVtxZ_ = iConfig.getParameter<edm::ParameterSet>("PVFitter").getUntrackedParameter<double>("maxVertexZ");
67  errorScale_ = iConfig.getParameter<edm::ParameterSet>("PVFitter").getUntrackedParameter<double>("errorScale");
68  sigmaCut_ = iConfig.getParameter<edm::ParameterSet>("PVFitter").getUntrackedParameter<double>("nSigmaCut");
69  fFitPerBunchCrossing=iConfig.getParameter<edm::ParameterSet>("PVFitter").getUntrackedParameter<bool>("FitPerBunchCrossing");
70 
71  // preset quality cut to "infinite"
72  dynamicQualityCut_ = 1.e30;
73 
74  hPVx = new TH2F("hPVx","PVx vs PVz distribution",200,-maxVtxR_, maxVtxR_, 200, -maxVtxZ_, maxVtxZ_);
75  hPVy = new TH2F("hPVy","PVy vs PVz distribution",200,-maxVtxR_, maxVtxR_, 200, -maxVtxZ_, maxVtxZ_);
76 }
T getParameter(std::string const &) const
bool debug_
Definition: PVFitter.h:139
double maxVtxNormChi2_
Definition: PVFitter.h:148
edm::InputTag vertexLabel_
Definition: PVFitter.h:141
double minVtxWgt_
Definition: PVFitter.h:150
double minVtxNdf_
Definition: PVFitter.h:147
double errorScale_
Definition: PVFitter.h:153
bool do3DFit_
Definition: PVFitter.h:140
double dynamicQualityCut_
Definition: PVFitter.h:198
bool fFitPerBunchCrossing
Definition: PVFitter.h:135
TH2F * hPVy
Definition: PVFitter.h:160
TTree * ftree_
Definition: PVFitter.h:162
double maxVtxR_
Definition: PVFitter.h:151
double maxVtxZ_
Definition: PVFitter.h:152
unsigned int maxNrVertices_
Definition: PVFitter.h:145
unsigned int minVtxTracks_
Definition: PVFitter.h:149
TH2F * hPVx
Definition: PVFitter.h:160
unsigned int minNrVertices_
Definition: PVFitter.h:146
double sigmaCut_
Definition: PVFitter.h:154
PVFitter::~PVFitter ( )
virtual

Definition at line 78 of file PVFitter.cc.

78  {
79 
80 }

Member Function Documentation

void PVFitter::compressStore ( )

reduce size of primary vertex cache by increasing quality limit

Definition at line 514 of file PVFitter.cc.

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

Referenced by readEvent().

515 {
516  //
517  // fill vertex qualities
518  //
519  pvQualities_.resize(pvStore_.size());
520  for ( unsigned int i=0; i<pvStore_.size(); ++i ) pvQualities_[i] = pvQuality(pvStore_[i]);
521  sort(pvQualities_.begin(),pvQualities_.end());
522  //
523  // Set new quality cut to median. This cut will be used to reduce the
524  // number of vertices in the store and also apply to all new vertices
525  // until the next reset
526  //
528  //
529  // remove all vertices failing the cut from the store
530  // (to be moved to a more efficient memory management!)
531  //
532  unsigned int iwrite(0);
533  for ( unsigned int i=0; i<pvStore_.size(); ++i ) {
534  if ( pvQuality(pvStore_[i])>dynamicQualityCut_ ) continue;
535  if ( i!=iwrite ) pvStore_[iwrite] = pvStore_[i];
536  ++iwrite;
537  }
538  pvStore_.resize(iwrite);
539  edm::LogInfo("PVFitter") << "Reduced primary vertex store size to "
540  << pvStore_.size() << " ; new dynamic quality cut = "
541  << dynamicQualityCut_ << std::endl;
542 
543 }
std::vector< double > pvQualities_
Definition: PVFitter.h:199
int i
Definition: DBlmapReader.cc:9
double dynamicQualityCut_
Definition: PVFitter.h:198
std::vector< BeamSpotFitPVData > pvStore_
Definition: PVFitter.h:196
double pvQuality(const reco::Vertex &pv) const
vertex quality measure
Definition: PVFitter.cc:546
void PVFitter::dumpTxtFile ( )

Definition at line 471 of file PVFitter.cc.

471  {
472 /*
473  fasciiFile << "Runnumber " << frun << std::endl;
474  fasciiFile << "BeginTimeOfFit " << fbeginTimeOfFit << std::endl;
475  fasciiFile << "EndTimeOfFit " << fendTimeOfFit << std::endl;
476  fasciiFile << "LumiRange " << fbeginLumiOfFit << " - " << fendLumiOfFit << std::endl;
477  fasciiFile << "Type " << fbeamspot.type() << std::endl;
478  fasciiFile << "X0 " << fbeamspot.x0() << std::endl;
479  fasciiFile << "Y0 " << fbeamspot.y0() << std::endl;
480  fasciiFile << "Z0 " << fbeamspot.z0() << std::endl;
481  fasciiFile << "sigmaZ0 " << fbeamspot.sigmaZ() << std::endl;
482  fasciiFile << "dxdz " << fbeamspot.dxdz() << std::endl;
483  fasciiFile << "dydz " << fbeamspot.dydz() << std::endl;
484  if (inputBeamWidth_ > 0 ) {
485  fasciiFile << "BeamWidthX " << inputBeamWidth_ << std::endl;
486  fasciiFile << "BeamWidthY " << inputBeamWidth_ << std::endl;
487  } else {
488  fasciiFile << "BeamWidthX " << fbeamspot.BeamWidthX() << std::endl;
489  fasciiFile << "BeamWidthY " << fbeamspot.BeamWidthY() << std::endl;
490  }
491 
492  for (int i = 0; i<6; ++i) {
493  fasciiFile << "Cov("<<i<<",j) ";
494  for (int j=0; j<7; ++j) {
495  fasciiFile << fbeamspot.covariance(i,j) << " ";
496  }
497  fasciiFile << std::endl;
498  }
499  // beam width error
500  if (inputBeamWidth_ > 0 ) {
501  fasciiFile << "Cov(6,j) 0 0 0 0 0 0 " << "1e-4" << std::endl;
502  } else {
503  fasciiFile << "Cov(6,j) 0 0 0 0 0 0 " << fbeamspot.covariance(6,6) << std::endl;
504  }
505  fasciiFile << "EmittanceX " << fbeamspot.emittanceX() << std::endl;
506  fasciiFile << "EmittanceY " << fbeamspot.emittanceY() << std::endl;
507  fasciiFile << "BetaStar " << fbeamspot.betaStar() << std::endl;
508 
509 */
510 }
void PVFitter::FitPerBunchCrossing ( )
inline

Definition at line 57 of file PVFitter.h.

References fFitPerBunchCrossing.

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

Definition at line 85 of file PVFitter.h.

References fbeamspot.

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

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

Definition at line 86 of file PVFitter.h.

References fbspotMap.

Referenced by BeamFitter::runPVandTrkFitter().

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

Definition at line 88 of file PVFitter.h.

References fbeginLumiOfFit, fendLumiOfFit, and tmp.

88  {
89  int *tmp=new int[2];
90  tmp[0] = fbeginLumiOfFit;
91  tmp[1] = fendLumiOfFit;
92  return tmp;
93  }
int fbeginLumiOfFit
Definition: PVFitter.h:172
int fendLumiOfFit
Definition: PVFitter.h:173
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
int PVFitter::getNPVs ( )
inline

Definition at line 114 of file PVFitter.h.

References pvStore_.

Referenced by BeamFitter::getNPVs().

114 { return pvStore_.size(); }
std::vector< BeamSpotFitPVData > pvStore_
Definition: PVFitter.h:196
const std::map<int, int>& PVFitter::getNPVsperBX ( )
inline

Definition at line 116 of file PVFitter.h.

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

Referenced by BeamFitter::getNPVsperBX().

116  {
117 
118  npvsmap_.clear();
119 
120  for ( std::map<int,std::vector<BeamSpotFitPVData> >::const_iterator pvStore = bxMap_.begin();
121  pvStore!=bxMap_.end(); ++pvStore) {
122 
123  //std::cout << "bx " << pvStore->first << " NPVs = " << (pvStore->second).size() << std::endl;
124  npvsmap_[ pvStore->first ] = (pvStore->second).size();
125 
126  }
127  return npvsmap_;
128  }
std::map< int, std::vector< BeamSpotFitPVData > > bxMap_
Definition: PVFitter.h:197
dictionary map
Definition: Association.py:205
std::map< int, int > npvsmap_
Definition: PVFitter.h:132
tuple size
Write out results.
std::vector<BeamSpotFitPVData> PVFitter::getpvStore ( )
inline

Definition at line 55 of file PVFitter.h.

References pvStore_.

Referenced by BeamFitter::getPVvectorSize().

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

Definition at line 95 of file PVFitter.h.

References freftime.

95  {
96  time_t *tmptime=new time_t[2];
97  tmptime[0]=freftime[0];
98  tmptime[1]=freftime[1];
99  return tmptime;
100  }
std::time_t freftime[2]
Definition: PVFitter.h:158
double PVFitter::getWidthX ( )
inline

Definition at line 48 of file PVFitter.h.

References fwidthX.

48 { return fwidthX; }
double fwidthX
Definition: PVFitter.h:176
double PVFitter::getWidthXerr ( )
inline

Definition at line 51 of file PVFitter.h.

References fwidthXerr.

Referenced by BeamFitter::runPVandTrkFitter().

51 { return fwidthXerr; }
double fwidthXerr
Definition: PVFitter.h:179
double PVFitter::getWidthY ( )
inline

Definition at line 49 of file PVFitter.h.

References fwidthY.

49 { return fwidthY; }
double fwidthY
Definition: PVFitter.h:177
double PVFitter::getWidthYerr ( )
inline

Definition at line 52 of file PVFitter.h.

References fwidthYerr.

52 { return fwidthYerr; }
double fwidthYerr
Definition: PVFitter.h:180
double PVFitter::getWidthZ ( )
inline

Definition at line 50 of file PVFitter.h.

References fwidthZ.

50 { return fwidthZ; }
double fwidthZ
Definition: PVFitter.h:178
double PVFitter::getWidthZerr ( )
inline

Definition at line 53 of file PVFitter.h.

References fwidthZerr.

53 { return fwidthZerr; }
double fwidthZerr
Definition: PVFitter.h:181
bool PVFitter::IsFitPerBunchCrossing ( )
inline

Definition at line 87 of file PVFitter.h.

References fFitPerBunchCrossing.

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

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

vertex quality measure

Definition at line 546 of file PVFitter.cc.

References reco::Vertex::covariance().

Referenced by compressStore(), and readEvent().

547 {
548  //
549  // determinant of the transverse part of the PV covariance matrix
550  //
551  return
552  pv.covariance(0,0)*pv.covariance(1,1)-
553  pv.covariance(0,1)*pv.covariance(0,1);
554 }
double covariance(int i, int j) const
(i, j)-th element of error matrix, i, j = 0, ... 2
Definition: Vertex.h:110
double PVFitter::pvQuality ( const BeamSpotFitPVData pv) const

vertex quality measure

Definition at line 557 of file PVFitter.cc.

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

558 {
559  //
560  // determinant of the transverse part of the PV covariance matrix
561  //
562  double ex = pv.posError[0];
563  double ey = pv.posError[1];
564  return ex*ex*ey*ey*(1-pv.posCorr[0]*pv.posCorr[0]);
565 }
void PVFitter::readEvent ( const edm::Event iEvent)

Definition at line 83 of file PVFitter.cc.

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

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

84 {
85 
86 // frun = iEvent.id().run();
87 // const edm::TimeValue_t ftimestamp = iEvent.time().value();
88 // const std::time_t ftmptime = ftimestamp >> 32;
89 
90 // if (fbeginLumiOfFit == -1) freftime[0] = freftime[1] = ftmptime;
91 // if (freftime[0] == 0 || ftmptime < freftime[0]) freftime[0] = ftmptime;
92 // const char* fbeginTime = formatTime(freftime[0]);
93 // sprintf(fbeginTimeOfFit,"%s",fbeginTime);
94 
95 // if (freftime[1] == 0 || ftmptime > freftime[1]) freftime[1] = ftmptime;
96 // const char* fendTime = formatTime(freftime[1]);
97 // sprintf(fendTimeOfFit,"%s",fendTime);
98 
99 // flumi = iEvent.luminosityBlock();
100 // frunFit = frun;
101 
102 // if (fbeginLumiOfFit == -1 || fbeginLumiOfFit > flumi) fbeginLumiOfFit = flumi;
103 // if (fendLumiOfFit == -1 || fendLumiOfFit < flumi) fendLumiOfFit = flumi;
104 // std::cout << "flumi = " <<flumi<<"; fbeginLumiOfFit = " << fbeginLumiOfFit <<"; fendLumiOfFit = "<<fendLumiOfFit<<std::endl;
105 
106  //------ Primary Vertices
108  bool hasPVs = false;
109  //edm::View<reco::Vertex> vertices;
110  //const reco::VertexCollection & vertices = 0;
111 
112  if ( iEvent.getByLabel(vertexLabel_, PVCollection ) ) {
113  //pv = *PVCollection;
114  //vertices = *PVCollection;
115  hasPVs = true;
116  }
117  //------
118 
119  if ( hasPVs ) {
120 
121  for (reco::VertexCollection::const_iterator pv = PVCollection->begin(); pv != PVCollection->end(); ++pv ) {
122 
123 
124  //for ( size_t ipv=0; ipv != pv.size(); ++ipv ) {
125 
126  //--- vertex selection
127  if ( pv->isFake() || pv->tracksSize()==0 ) continue;
128  if ( pv->ndof() < minVtxNdf_ || (pv->ndof()+3.)/pv->tracksSize()<2*minVtxWgt_ ) continue;
129  //---
130 
131  hPVx->Fill( pv->x(), pv->z() );
132  hPVy->Fill( pv->y(), pv->z() );
133 
134  //
135  // 3D fit section
136  //
137  // apply additional quality cut
138  if ( pvQuality(*pv)>dynamicQualityCut_ ) continue;
139  // if store exceeds max. size: reduce size and apply new quality cut
140  if ( pvStore_.size()>=maxNrVertices_ ) {
141  compressStore();
142  if ( pvQuality(*pv)>dynamicQualityCut_ ) continue;
143  }
144  //
145  // copy PV to store
146  //
147  int bx = iEvent.bunchCrossing();
148  BeamSpotFitPVData pvData;
149  pvData.bunchCrossing = bx;
150  pvData.position[0] = pv->x();
151  pvData.position[1] = pv->y();
152  pvData.position[2] = pv->z();
153  pvData.posError[0] = pv->xError();
154  pvData.posError[1] = pv->yError();
155  pvData.posError[2] = pv->zError();
156  pvData.posCorr[0] = pv->covariance(0,1)/pv->xError()/pv->yError();
157  pvData.posCorr[1] = pv->covariance(0,2)/pv->xError()/pv->zError();
158  pvData.posCorr[2] = pv->covariance(1,2)/pv->yError()/pv->zError();
159  pvStore_.push_back(pvData);
160 
161  if(ftree_ != 0){
162  theBeamSpotTreeData_.run(iEvent.id().run());
166  ftree_->Fill();
167  }
168 
169  if (fFitPerBunchCrossing) bxMap_[bx].push_back(pvData);
170 
171  }
172 
173  }
174 
175 
176 
177 
178 }
RunNumber_t run() const
Definition: EventID.h:42
std::map< int, std::vector< BeamSpotFitPVData > > bxMap_
Definition: PVFitter.h:197
void run(unsigned int run)
edm::InputTag vertexLabel_
Definition: PVFitter.h:141
void compressStore()
reduce size of primary vertex cache by increasing quality limit
Definition: PVFitter.cc:514
double minVtxWgt_
Definition: PVFitter.h:150
double minVtxNdf_
Definition: PVFitter.h:147
int bunchCrossing() const
Definition: EventBase.h:62
edm::LuminosityBlockNumber_t luminosityBlock() const
Definition: EventBase.h:59
double dynamicQualityCut_
Definition: PVFitter.h:198
void bunchCrossing(unsigned int bunchCrossing)
void lumi(unsigned int lumi)
std::vector< BeamSpotFitPVData > pvStore_
Definition: PVFitter.h:196
BeamSpotTreeData theBeamSpotTreeData_
Definition: PVFitter.h:201
bool fFitPerBunchCrossing
Definition: PVFitter.h:135
TH2F * hPVy
Definition: PVFitter.h:160
TTree * ftree_
Definition: PVFitter.h:162
double pvQuality(const reco::Vertex &pv) const
vertex quality measure
Definition: PVFitter.cc:546
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:356
unsigned int maxNrVertices_
Definition: PVFitter.h:145
void pvData(BeamSpotFitPVData pvData)
TH2F * hPVx
Definition: PVFitter.h:160
edm::EventID id() const
Definition: EventBase.h:56
void PVFitter::resetAll ( )
inline

Definition at line 74 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().

74  {
75  resetLSRange();
76  resetRefTime();
77  pvStore_.clear();
78  bxMap_.clear();
79  dynamicQualityCut_ = 1.e30;
80  hPVx->Reset();
81  hPVy->Reset();
83  fbspotMap.clear();
84  };
std::map< int, std::vector< BeamSpotFitPVData > > bxMap_
Definition: PVFitter.h:197
double dynamicQualityCut_
Definition: PVFitter.h:198
reco::BeamSpot fbeamspot
Definition: PVFitter.h:133
std::vector< BeamSpotFitPVData > pvStore_
Definition: PVFitter.h:196
void resetLSRange()
Definition: PVFitter.h:60
TH2F * hPVy
Definition: PVFitter.h:160
std::map< int, reco::BeamSpot > fbspotMap
Definition: PVFitter.h:134
void resetRefTime()
Definition: PVFitter.h:61
TH2F * hPVx
Definition: PVFitter.h:160
void PVFitter::resetLSRange ( )
inline

Definition at line 60 of file PVFitter.h.

References fbeginLumiOfFit, and fendLumiOfFit.

Referenced by resetAll().

int fbeginLumiOfFit
Definition: PVFitter.h:172
int fendLumiOfFit
Definition: PVFitter.h:173
void PVFitter::resetRefTime ( )
inline

Definition at line 61 of file PVFitter.h.

References freftime.

Referenced by resetAll().

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

Definition at line 103 of file PVFitter.h.

References pvStore_.

Referenced by BeamFitter::resizePVvector().

103  {
104  pvStore_.erase(pvStore_.begin(), pvStore_.begin()+rmSize);
105  }
std::vector< BeamSpotFitPVData > pvStore_
Definition: PVFitter.h:196
bool PVFitter::runBXFitter ( )

Definition at line 185 of file PVFitter.cc.

References align::BeamSpot, bxMap_, errorScale_, fbeamspot, fbspotMap, fcn(), fwidthX, fwidthXerr, fwidthY, fwidthYerr, fwidthZ, fwidthZerr, Association::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().

185  {
186 
187  edm::LogInfo("PVFitter") << " Number of bunch crossings: " << bxMap_.size() << std::endl;
188 
189  bool fit_ok = true;
190 
191  for ( std::map<int,std::vector<BeamSpotFitPVData> >::const_iterator pvStore = bxMap_.begin();
192  pvStore!=bxMap_.end(); ++pvStore) {
193 
194  // first set null beam spot in case
195  // fit fails
196  fbspotMap[pvStore->first] = reco::BeamSpot();
197 
198  edm::LogInfo("PVFitter") << " Number of PVs collected for PVFitter: " << (pvStore->second).size() << " in bx: " << pvStore->first << std::endl;
199 
200  if ( (pvStore->second).size() <= minNrVertices_ ) {
201  edm::LogWarning("PVFitter") << " not enough PVs, continue" << std::endl;
202  fit_ok = false;
203  continue;
204  }
205 
206  //bool fit_ok = false;
207  edm::LogInfo("PVFitter") << "Calculating beam spot with PVs ..." << std::endl;
208 
209  //
210  // LL function and fitter
211  //
212  FcnBeamSpotFitPV* fcn = new FcnBeamSpotFitPV(pvStore->second);
213  TFitterMinuit minuitx;
214  minuitx.SetMinuitFCN(fcn);
215  //
216  // fit parameters: positions, widths, x-y correlations, tilts in xz and yz
217  //
218  minuitx.SetParameter(0,"x",0.,0.02,-10.,10.);
219  minuitx.SetParameter(1,"y",0.,0.02,-10.,10.);
220  minuitx.SetParameter(2,"z",0.,0.20,-30.,30.);
221  minuitx.SetParameter(3,"ex",0.015,0.01,0.,10.);
222  minuitx.SetParameter(4,"corrxy",0.,0.02,-1.,1.);
223  minuitx.SetParameter(5,"ey",0.015,0.01,0.,10.);
224  minuitx.SetParameter(6,"dxdz",0.,0.0002,-0.1,0.1);
225  minuitx.SetParameter(7,"dydz",0.,0.0002,-0.1,0.1);
226  minuitx.SetParameter(8,"ez",1.,0.1,0.,30.);
227  minuitx.SetParameter(9,"scale",errorScale_,errorScale_/10.,errorScale_/2.,errorScale_*2.);
228  //
229  // first iteration without correlations
230  //
231  int ierr(0);
232  minuitx.FixParameter(4);
233  minuitx.FixParameter(6);
234  minuitx.FixParameter(7);
235  minuitx.FixParameter(9);
236  minuitx.SetMaxIterations(100);
237  // minuitx.SetPrintLevel(3);
238  minuitx.SetPrintLevel(0);
239  minuitx.CreateMinimizer();
240  ierr = minuitx.Minimize();
241  if ( ierr ) {
242  edm::LogInfo("PVFitter") << "3D beam spot fit failed in 1st iteration" << std::endl;
243  fit_ok = false;
244  continue;
245  }
246  //
247  // refit with harder selection on vertices
248  //
249  fcn->setLimits(minuitx.GetParameter(0)-sigmaCut_*minuitx.GetParameter(3),
250  minuitx.GetParameter(0)+sigmaCut_*minuitx.GetParameter(3),
251  minuitx.GetParameter(1)-sigmaCut_*minuitx.GetParameter(5),
252  minuitx.GetParameter(1)+sigmaCut_*minuitx.GetParameter(5),
253  minuitx.GetParameter(2)-sigmaCut_*minuitx.GetParameter(8),
254  minuitx.GetParameter(2)+sigmaCut_*minuitx.GetParameter(8));
255  ierr = minuitx.Minimize();
256  if ( ierr ) {
257  edm::LogInfo("PVFitter") << "3D beam spot fit failed in 2nd iteration" << std::endl;
258  fit_ok = false;
259  continue;
260  }
261  //
262  // refit with correlations
263  //
264  minuitx.ReleaseParameter(4);
265  minuitx.ReleaseParameter(6);
266  minuitx.ReleaseParameter(7);
267 
268  ierr = minuitx.Minimize();
269  if ( ierr ) {
270  edm::LogInfo("PVFitter") << "3D beam spot fit failed in 3rd iteration" << std::endl;
271  fit_ok = false;
272  continue;
273  }
274  // refit with floating scale factor
275  // minuitx.ReleaseParameter(9);
276  // minuitx.Minimize();
277 
278  //minuitx.PrintResults(0,0);
279 
280  fwidthX = minuitx.GetParameter(3);
281  fwidthY = minuitx.GetParameter(5);
282  fwidthZ = minuitx.GetParameter(8);
283  fwidthXerr = minuitx.GetParError(3);
284  fwidthYerr = minuitx.GetParError(5);
285  fwidthZerr = minuitx.GetParError(8);
286 
288  // need to get the full cov matrix
289  matrix(0,0) = pow( minuitx.GetParError(0), 2);
290  matrix(1,1) = pow( minuitx.GetParError(1), 2);
291  matrix(2,2) = pow( minuitx.GetParError(2), 2);
292  matrix(3,3) = fwidthZerr * fwidthZerr;
293  matrix(4,4) = pow( minuitx.GetParError(6), 2);
294  matrix(5,5) = pow( minuitx.GetParError(7), 2);
295  matrix(6,6) = fwidthXerr * fwidthXerr;
296 
297  fbeamspot = reco::BeamSpot( reco::BeamSpot::Point(minuitx.GetParameter(0),
298  minuitx.GetParameter(1),
299  minuitx.GetParameter(2) ),
300  fwidthZ,
301  minuitx.GetParameter(6), minuitx.GetParameter(7),
302  fwidthX,
303  matrix );
307 
308  fbspotMap[pvStore->first] = fbeamspot;
309  edm::LogInfo("PVFitter") << "3D PV fit done for this bunch crossing."<<std::endl;
310  minuitx.Clear();
311  //delete fcn;
312  fit_ok = fit_ok & true;
313  }
314 
315  return fit_ok;
316 }
math::Error< dimension >::type CovarianceMatrix
Definition: BeamSpot.h:32
std::map< int, std::vector< BeamSpotFitPVData > > bxMap_
Definition: PVFitter.h:197
math::XYZPoint Point
point in the space
Definition: BeamSpot.h:30
double fwidthY
Definition: PVFitter.h:177
double errorScale_
Definition: PVFitter.h:153
double fwidthYerr
Definition: PVFitter.h:180
double fwidthZ
Definition: PVFitter.h:178
double fwidthXerr
Definition: PVFitter.h:179
dictionary map
Definition: Association.py:205
void setType(BeamType type)
set beam type
Definition: BeamSpot.h:132
reco::BeamSpot fbeamspot
Definition: PVFitter.h:133
void setBeamWidthY(double v)
Definition: BeamSpot.h:110
std::map< int, reco::BeamSpot > fbspotMap
Definition: PVFitter.h:134
double fwidthZerr
Definition: PVFitter.h:181
void fcn(int &, double *, double &, double *, int)
unsigned int minNrVertices_
Definition: PVFitter.h:146
void setLimits(float xmin, float xmax, float ymin, float ymax, float zmin, float zmax)
double sigmaCut_
Definition: PVFitter.h:154
void setBeamWidthX(double v)
Definition: BeamSpot.h:109
double fwidthX
Definition: PVFitter.h:176
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 319 of file PVFitter.cc.

References align::BeamSpot, do3DFit_, errorScale_, fbeamspot, fcn(), fwidthX, fwidthXerr, fwidthY, fwidthYerr, fwidthZ, fwidthZerr, hPVx, hPVy, edm::detail::isnan(), makeMuonMisalignmentScenario::matrix, minNrVertices_, funct::pow(), pvStore_, reco::BeamSpot::setBeamWidthX(), reco::BeamSpot::setBeamWidthY(), FcnBeamSpotFitPV::setLimits(), reco::BeamSpot::setType(), sigmaCut_, and reco::BeamSpot::Tracker.

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

319  {
320 
321  edm::LogInfo("PVFitter") << " Number of PVs collected for PVFitter: " << pvStore_.size() << std::endl;
322 
323  if ( pvStore_.size() <= minNrVertices_ ) return false;
324 
325  //bool fit_ok = false;
326 
327  if ( ! do3DFit_ ) {
328  TH1F *h1PVx = (TH1F*) hPVx->ProjectionX("h1PVx", 0, -1, "e");
329  TH1F *h1PVy = (TH1F*) hPVy->ProjectionX("h1PVy", 0, -1, "e");
330  TH1F *h1PVz = (TH1F*) hPVx->ProjectionY("h1PVz", 0, -1, "e");
331 
332  h1PVx->Fit("gaus","QLM0");
333  h1PVy->Fit("gaus","QLM0");
334  h1PVz->Fit("gaus","QLM0");
335 
336  TF1 *gausx = h1PVx->GetFunction("gaus");
337  TF1 *gausy = h1PVy->GetFunction("gaus");
338  TF1 *gausz = h1PVz->GetFunction("gaus");
339 
340  fwidthX = gausx->GetParameter(2);
341  fwidthY = gausy->GetParameter(2);
342  fwidthZ = gausz->GetParameter(2);
343  fwidthXerr = gausx->GetParError(2);
344  fwidthYerr = gausy->GetParError(2);
345  fwidthZerr = gausz->GetParError(2);
346 
348  matrix(2,2) = gausz->GetParError(1) * gausz->GetParError(1);
349  matrix(3,3) = fwidthZerr * fwidthZerr;
350  matrix(6,6) = fwidthXerr * fwidthXerr;
351 
352  fbeamspot = reco::BeamSpot( reco::BeamSpot::Point(gausx->GetParameter(1),
353  gausy->GetParameter(1),
354  gausz->GetParameter(1) ),
355  fwidthZ,
356  0., 0.,
357  fwidthX,
358  matrix );
362 
363  }
364  else { // do 3D fit
365  //
366  // LL function and fitter
367  //
369  TFitterMinuit minuitx;
370  minuitx.SetMinuitFCN(fcn);
371  //
372  // fit parameters: positions, widths, x-y correlations, tilts in xz and yz
373  //
374  minuitx.SetParameter(0,"x",0.,0.02,-10.,10.);
375  minuitx.SetParameter(1,"y",0.,0.02,-10.,10.);
376  minuitx.SetParameter(2,"z",0.,0.20,-30.,30.);
377  //minuitx.SetParameter(3,"ex",0.015,0.01,0.,10.);
378  minuitx.SetParameter(3,"ex",0.015,0.01,0.0001,10.);
379  minuitx.SetParameter(4,"corrxy",0.,0.02,-1.,1.);
380  //minuitx.SetParameter(5,"ey",0.015,0.01,0.,10.);
381  minuitx.SetParameter(5,"ey",0.015,0.01,0.0001,10.);
382  minuitx.SetParameter(6,"dxdz",0.,0.0002,-0.1,0.1);
383  minuitx.SetParameter(7,"dydz",0.,0.0002,-0.1,0.1);
384  //minuitx.SetParameter(8,"ez",1.,0.1,0.,30.);
385  minuitx.SetParameter(8,"ez",1.,0.1,1.0,30.);
386  minuitx.SetParameter(9,"scale",errorScale_,errorScale_/10.,errorScale_/2.,errorScale_*2.);
387  //
388  // first iteration without correlations
389  //
390  int ierr(0);
391  minuitx.FixParameter(4);
392  minuitx.FixParameter(6);
393  minuitx.FixParameter(7);
394  minuitx.FixParameter(9);
395  minuitx.SetMaxIterations(100);
396 // minuitx.SetPrintLevel(3);
397  minuitx.SetPrintLevel(0);
398  minuitx.CreateMinimizer();
399  ierr = minuitx.Minimize();
400  if ( ierr ) {
401  edm::LogWarning("PVFitter") << "3D beam spot fit failed in 1st iteration" << std::endl;
402  return false;
403  }
404  //
405  // refit with harder selection on vertices
406  //
407  fcn->setLimits(minuitx.GetParameter(0)-sigmaCut_*minuitx.GetParameter(3),
408  minuitx.GetParameter(0)+sigmaCut_*minuitx.GetParameter(3),
409  minuitx.GetParameter(1)-sigmaCut_*minuitx.GetParameter(5),
410  minuitx.GetParameter(1)+sigmaCut_*minuitx.GetParameter(5),
411  minuitx.GetParameter(2)-sigmaCut_*minuitx.GetParameter(8),
412  minuitx.GetParameter(2)+sigmaCut_*minuitx.GetParameter(8));
413  ierr = minuitx.Minimize();
414  if ( ierr ) {
415  edm::LogWarning("PVFitter") << "3D beam spot fit failed in 2nd iteration" << std::endl;
416  return false;
417  }
418  //
419  // refit with correlations
420  //
421  minuitx.ReleaseParameter(4);
422  minuitx.ReleaseParameter(6);
423  minuitx.ReleaseParameter(7);
424  ierr = minuitx.Minimize();
425  if ( ierr ) {
426  edm::LogWarning("PVFitter") << "3D beam spot fit failed in 3rd iteration" << std::endl;
427  return false;
428  }
429  // refit with floating scale factor
430  // minuitx.ReleaseParameter(9);
431  // minuitx.Minimize();
432 
433  //minuitx.PrintResults(0,0);
434 
435  fwidthX = minuitx.GetParameter(3);
436  fwidthY = minuitx.GetParameter(5);
437  fwidthZ = minuitx.GetParameter(8);
438  fwidthXerr = minuitx.GetParError(3);
439  fwidthYerr = minuitx.GetParError(5);
440  fwidthZerr = minuitx.GetParError(8);
441 
442  // check errors on widths and sigmaZ for nan
443  if ( isnan(fwidthXerr) || isnan(fwidthYerr) || isnan(fwidthZerr) ) {
444  edm::LogWarning("PVFitter") << "3D beam spot fit returns nan in 3rd iteration" << std::endl;
445  return false;
446  }
447 
449  // need to get the full cov matrix
450  matrix(0,0) = pow( minuitx.GetParError(0), 2);
451  matrix(1,1) = pow( minuitx.GetParError(1), 2);
452  matrix(2,2) = pow( minuitx.GetParError(2), 2);
453  matrix(3,3) = fwidthZerr * fwidthZerr;
454  matrix(6,6) = fwidthXerr * fwidthXerr;
455 
456  fbeamspot = reco::BeamSpot( reco::BeamSpot::Point(minuitx.GetParameter(0),
457  minuitx.GetParameter(1),
458  minuitx.GetParameter(2) ),
459  fwidthZ,
460  minuitx.GetParameter(6), minuitx.GetParameter(7),
461  fwidthX,
462  matrix );
466  }
467 
468  return true; //FIXME: Need to add quality test for the fit results!
469 }
math::Error< dimension >::type CovarianceMatrix
Definition: BeamSpot.h:32
math::XYZPoint Point
point in the space
Definition: BeamSpot.h:30
double fwidthY
Definition: PVFitter.h:177
double errorScale_
Definition: PVFitter.h:153
bool do3DFit_
Definition: PVFitter.h:140
double fwidthYerr
Definition: PVFitter.h:180
double fwidthZ
Definition: PVFitter.h:178
double fwidthXerr
Definition: PVFitter.h:179
void setType(BeamType type)
set beam type
Definition: BeamSpot.h:132
reco::BeamSpot fbeamspot
Definition: PVFitter.h:133
std::vector< BeamSpotFitPVData > pvStore_
Definition: PVFitter.h:196
void setBeamWidthY(double v)
Definition: BeamSpot.h:110
bool isnan(float x)
Definition: math.h:13
TH2F * hPVy
Definition: PVFitter.h:160
double fwidthZerr
Definition: PVFitter.h:181
void fcn(int &, double *, double &, double *, int)
TH2F * hPVx
Definition: PVFitter.h:160
unsigned int minNrVertices_
Definition: PVFitter.h:146
void setLimits(float xmin, float xmax, float ymin, float ymax, float zmin, float zmax)
double sigmaCut_
Definition: PVFitter.h:154
void setBeamWidthX(double v)
Definition: BeamSpot.h:109
double fwidthX
Definition: PVFitter.h:176
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 67 of file PVFitter.h.

References fbeginLumiOfFit, and fendLumiOfFit.

67  {
68  fbeginLumiOfFit = ls0;
69  fendLumiOfFit = ls1;
70  }
int fbeginLumiOfFit
Definition: PVFitter.h:172
int fendLumiOfFit
Definition: PVFitter.h:173
void PVFitter::setRefTime ( std::time_t  t0,
std::time_t  t1 
)
inline

Definition at line 63 of file PVFitter.h.

References freftime.

63  {
64  freftime[0] = t0;
65  freftime[1] = t1;
66  }
std::time_t freftime[2]
Definition: PVFitter.h:158
void PVFitter::setTree ( TTree *  tree)

Definition at line 180 of file PVFitter.cc.

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

Referenced by BeamFitter::BeamFitter().

180  {
181  ftree_ = tree;
183 }
BeamSpotTreeData theBeamSpotTreeData_
Definition: PVFitter.h:201
TTree * ftree_
Definition: PVFitter.h:162
void branch(TTree *tree)

Member Data Documentation

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

Definition at line 197 of file PVFitter.h.

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

bool PVFitter::debug_
private

Definition at line 139 of file PVFitter.h.

Referenced by PVFitter().

bool PVFitter::do3DFit_
private

Definition at line 140 of file PVFitter.h.

Referenced by PVFitter(), and runFitter().

double PVFitter::dynamicQualityCut_
private

Definition at line 198 of file PVFitter.h.

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

double PVFitter::errorScale_
private

Definition at line 153 of file PVFitter.h.

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

std::ofstream PVFitter::fasciiFile
private

Definition at line 137 of file PVFitter.h.

reco::BeamSpot PVFitter::fbeamspot
private

Definition at line 133 of file PVFitter.h.

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

int PVFitter::fbeginLumiOfFit
private

Definition at line 172 of file PVFitter.h.

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

char PVFitter::fbeginTimeOfFit[32]
private

Definition at line 174 of file PVFitter.h.

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

Definition at line 134 of file PVFitter.h.

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

double PVFitter::fdxdz
private

Definition at line 187 of file PVFitter.h.

double PVFitter::fdxdzErr
private

Definition at line 193 of file PVFitter.h.

double PVFitter::fdydz
private

Definition at line 188 of file PVFitter.h.

double PVFitter::fdydzErr
private

Definition at line 194 of file PVFitter.h.

int PVFitter::fendLumiOfFit
private

Definition at line 173 of file PVFitter.h.

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

char PVFitter::fendTimeOfFit[32]
private

Definition at line 175 of file PVFitter.h.

bool PVFitter::fFitPerBunchCrossing
private

Definition at line 135 of file PVFitter.h.

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

int PVFitter::flumi
private

Definition at line 157 of file PVFitter.h.

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

Definition at line 158 of file PVFitter.h.

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

int PVFitter::frun
private

Definition at line 156 of file PVFitter.h.

int PVFitter::frunFit
private

Definition at line 171 of file PVFitter.h.

double PVFitter::fsigmaZ
private

Definition at line 186 of file PVFitter.h.

double PVFitter::fsigmaZErr
private

Definition at line 192 of file PVFitter.h.

TTree* PVFitter::ftree_
private

Definition at line 162 of file PVFitter.h.

Referenced by readEvent(), and setTree().

double PVFitter::fwidthX
private

Definition at line 176 of file PVFitter.h.

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

double PVFitter::fwidthXerr
private

Definition at line 179 of file PVFitter.h.

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

double PVFitter::fwidthY
private

Definition at line 177 of file PVFitter.h.

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

double PVFitter::fwidthYerr
private

Definition at line 180 of file PVFitter.h.

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

double PVFitter::fwidthZ
private

Definition at line 178 of file PVFitter.h.

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

double PVFitter::fwidthZerr
private

Definition at line 181 of file PVFitter.h.

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

double PVFitter::fx
private

Definition at line 183 of file PVFitter.h.

double PVFitter::fxErr
private

Definition at line 189 of file PVFitter.h.

double PVFitter::fy
private

Definition at line 184 of file PVFitter.h.

double PVFitter::fyErr
private

Definition at line 190 of file PVFitter.h.

double PVFitter::fz
private

Definition at line 185 of file PVFitter.h.

double PVFitter::fzErr
private

Definition at line 191 of file PVFitter.h.

TH2F* PVFitter::hPVx
private

Definition at line 160 of file PVFitter.h.

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

TH2F* PVFitter::hPVy
private

Definition at line 160 of file PVFitter.h.

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

unsigned int PVFitter::maxNrVertices_
private

Definition at line 145 of file PVFitter.h.

Referenced by PVFitter(), and readEvent().

double PVFitter::maxVtxNormChi2_
private

Definition at line 148 of file PVFitter.h.

Referenced by PVFitter().

double PVFitter::maxVtxR_
private

Definition at line 151 of file PVFitter.h.

Referenced by PVFitter().

double PVFitter::maxVtxZ_
private

Definition at line 152 of file PVFitter.h.

Referenced by PVFitter().

unsigned int PVFitter::minNrVertices_
private

Definition at line 146 of file PVFitter.h.

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

double PVFitter::minVtxNdf_
private

Definition at line 147 of file PVFitter.h.

Referenced by PVFitter(), and readEvent().

unsigned int PVFitter::minVtxTracks_
private

Definition at line 149 of file PVFitter.h.

Referenced by PVFitter().

double PVFitter::minVtxWgt_
private

Definition at line 150 of file PVFitter.h.

Referenced by PVFitter(), and readEvent().

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

Definition at line 132 of file PVFitter.h.

Referenced by getNPVsperBX().

std::string PVFitter::outputTxt_
private

Definition at line 143 of file PVFitter.h.

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

Definition at line 199 of file PVFitter.h.

Referenced by compressStore().

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

Definition at line 154 of file PVFitter.h.

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

BeamSpotTreeData PVFitter::theBeamSpotTreeData_
private

Definition at line 201 of file PVFitter.h.

Referenced by readEvent(), and setTree().

edm::InputTag PVFitter::vertexLabel_
private

Definition at line 141 of file PVFitter.h.

Referenced by PVFitter(), and readEvent().

bool PVFitter::writeTxt_
private

Definition at line 142 of file PVFitter.h.