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.17.4.1 2011/05/24 19:03:53 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 522 of file PVFitter.cc.

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

Referenced by readEvent().

523 {
524  //
525  // fill vertex qualities
526  //
527  pvQualities_.resize(pvStore_.size());
528  for ( unsigned int i=0; i<pvStore_.size(); ++i ) pvQualities_[i] = pvQuality(pvStore_[i]);
529  sort(pvQualities_.begin(),pvQualities_.end());
530  //
531  // Set new quality cut to median. This cut will be used to reduce the
532  // number of vertices in the store and also apply to all new vertices
533  // until the next reset
534  //
536  //
537  // remove all vertices failing the cut from the store
538  // (to be moved to a more efficient memory management!)
539  //
540  unsigned int iwrite(0);
541  for ( unsigned int i=0; i<pvStore_.size(); ++i ) {
542  if ( pvQuality(pvStore_[i])>dynamicQualityCut_ ) continue;
543  if ( i!=iwrite ) pvStore_[iwrite] = pvStore_[i];
544  ++iwrite;
545  }
546  pvStore_.resize(iwrite);
547  edm::LogInfo("PVFitter") << "Reduced primary vertex store size to "
548  << pvStore_.size() << " ; new dynamic quality cut = "
549  << dynamicQualityCut_ << std::endl;
550 
551 }
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:554
void PVFitter::dumpTxtFile ( )

Definition at line 479 of file PVFitter.cc.

479  {
480 /*
481  fasciiFile << "Runnumber " << frun << std::endl;
482  fasciiFile << "BeginTimeOfFit " << fbeginTimeOfFit << std::endl;
483  fasciiFile << "EndTimeOfFit " << fendTimeOfFit << std::endl;
484  fasciiFile << "LumiRange " << fbeginLumiOfFit << " - " << fendLumiOfFit << std::endl;
485  fasciiFile << "Type " << fbeamspot.type() << std::endl;
486  fasciiFile << "X0 " << fbeamspot.x0() << std::endl;
487  fasciiFile << "Y0 " << fbeamspot.y0() << std::endl;
488  fasciiFile << "Z0 " << fbeamspot.z0() << std::endl;
489  fasciiFile << "sigmaZ0 " << fbeamspot.sigmaZ() << std::endl;
490  fasciiFile << "dxdz " << fbeamspot.dxdz() << std::endl;
491  fasciiFile << "dydz " << fbeamspot.dydz() << std::endl;
492  if (inputBeamWidth_ > 0 ) {
493  fasciiFile << "BeamWidthX " << inputBeamWidth_ << std::endl;
494  fasciiFile << "BeamWidthY " << inputBeamWidth_ << std::endl;
495  } else {
496  fasciiFile << "BeamWidthX " << fbeamspot.BeamWidthX() << std::endl;
497  fasciiFile << "BeamWidthY " << fbeamspot.BeamWidthY() << std::endl;
498  }
499 
500  for (int i = 0; i<6; ++i) {
501  fasciiFile << "Cov("<<i<<",j) ";
502  for (int j=0; j<7; ++j) {
503  fasciiFile << fbeamspot.covariance(i,j) << " ";
504  }
505  fasciiFile << std::endl;
506  }
507  // beam width error
508  if (inputBeamWidth_ > 0 ) {
509  fasciiFile << "Cov(6,j) 0 0 0 0 0 0 " << "1e-4" << std::endl;
510  } else {
511  fasciiFile << "Cov(6,j) 0 0 0 0 0 0 " << fbeamspot.covariance(6,6) << std::endl;
512  }
513  fasciiFile << "EmittanceX " << fbeamspot.emittanceX() << std::endl;
514  fasciiFile << "EmittanceY " << fbeamspot.emittanceY() << std::endl;
515  fasciiFile << "BetaStar " << fbeamspot.betaStar() << std::endl;
516 
517 */
518 }
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_, python.multivaluedict::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
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 554 of file PVFitter.cc.

References reco::Vertex::covariance().

Referenced by compressStore(), and readEvent().

555 {
556  //
557  // determinant of the transverse part of the PV covariance matrix
558  //
559  return
560  pv.covariance(0,0)*pv.covariance(1,1)-
561  pv.covariance(0,1)*pv.covariance(0,1);
562 }
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 565 of file PVFitter.cc.

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

566 {
567  //
568  // determinant of the transverse part of the PV covariance matrix
569  //
570  double ex = pv.posError[0];
571  double ey = pv.posError[1];
572  return ex*ex*ey*ey*(1-pv.posCorr[0]*pv.posCorr[0]);
573 }
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, edm::Handle< T >::product(), 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  //------ Beam Spot in current event
120  edm::Handle<reco::BeamSpot> recoBeamSpotHandle;
121  const reco::BeamSpot *refBS = 0;
122  if ( iEvent.getByLabel("offlineBeamSpot",recoBeamSpotHandle) )
123  refBS = recoBeamSpotHandle.product();
124  //-------
125 
126 
127  if ( hasPVs ) {
128 
129  for (reco::VertexCollection::const_iterator pv = PVCollection->begin(); pv != PVCollection->end(); ++pv ) {
130 
131 
132  //for ( size_t ipv=0; ipv != pv.size(); ++ipv ) {
133 
134  //--- vertex selection
135  if ( pv->isFake() || pv->tracksSize()==0 ) continue;
136  if ( pv->ndof() < minVtxNdf_ || (pv->ndof()+3.)/pv->tracksSize()<2*minVtxWgt_ ) continue;
137  //---
138 
139  hPVx->Fill( pv->x(), pv->z() );
140  hPVy->Fill( pv->y(), pv->z() );
141 
142  //
143  // 3D fit section
144  //
145  // apply additional quality cut
146  if ( pvQuality(*pv)>dynamicQualityCut_ ) continue;
147  // if store exceeds max. size: reduce size and apply new quality cut
148  if ( pvStore_.size()>=maxNrVertices_ ) {
149  compressStore();
150  if ( pvQuality(*pv)>dynamicQualityCut_ ) continue;
151  }
152  //
153  // copy PV to store
154  //
155  int bx = iEvent.bunchCrossing();
156  BeamSpotFitPVData pvData;
157  pvData.bunchCrossing = bx;
158  pvData.position[0] = pv->x();
159  pvData.position[1] = pv->y();
160  pvData.position[2] = pv->z();
161  pvData.posError[0] = pv->xError();
162  pvData.posError[1] = pv->yError();
163  pvData.posError[2] = pv->zError();
164  pvData.posCorr[0] = pv->covariance(0,1)/pv->xError()/pv->yError();
165  pvData.posCorr[1] = pv->covariance(0,2)/pv->xError()/pv->zError();
166  pvData.posCorr[2] = pv->covariance(1,2)/pv->yError()/pv->zError();
167  pvStore_.push_back(pvData);
168 
169  if(ftree_ != 0){
170  theBeamSpotTreeData_.run(iEvent.id().run());
174  ftree_->Fill();
175  }
176 
177  if (fFitPerBunchCrossing) bxMap_[bx].push_back(pvData);
178 
179  }
180 
181  }
182 
183 
184 
185 
186 }
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:522
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:554
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:355
unsigned int maxNrVertices_
Definition: PVFitter.h:145
void pvData(BeamSpotFitPVData pvData)
TH2F * hPVx
Definition: PVFitter.h:160
T const * product() const
Definition: Handle.h:74
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 193 of file PVFitter.cc.

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

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

References align::BeamSpot, do3DFit_, errorScale_, fbeamspot, fcn(), fwidthX, fwidthXerr, fwidthY, fwidthYerr, fwidthZ, fwidthZerr, hPVx, hPVy, edm::detail::isnan(), 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().

327  {
328 
329  edm::LogInfo("PVFitter") << " Number of PVs collected for PVFitter: " << pvStore_.size() << std::endl;
330 
331  if ( pvStore_.size() <= minNrVertices_ ) return false;
332 
333  //bool fit_ok = false;
334 
335  if ( ! do3DFit_ ) {
336  TH1F *h1PVx = (TH1F*) hPVx->ProjectionX("h1PVx", 0, -1, "e");
337  TH1F *h1PVy = (TH1F*) hPVy->ProjectionX("h1PVy", 0, -1, "e");
338  TH1F *h1PVz = (TH1F*) hPVx->ProjectionY("h1PVz", 0, -1, "e");
339 
340  h1PVx->Fit("gaus","QLM0");
341  h1PVy->Fit("gaus","QLM0");
342  h1PVz->Fit("gaus","QLM0");
343 
344  TF1 *gausx = h1PVx->GetFunction("gaus");
345  TF1 *gausy = h1PVy->GetFunction("gaus");
346  TF1 *gausz = h1PVz->GetFunction("gaus");
347 
348  fwidthX = gausx->GetParameter(2);
349  fwidthY = gausy->GetParameter(2);
350  fwidthZ = gausz->GetParameter(2);
351  fwidthXerr = gausx->GetParError(2);
352  fwidthYerr = gausy->GetParError(2);
353  fwidthZerr = gausz->GetParError(2);
354 
356  matrix(2,2) = gausz->GetParError(1) * gausz->GetParError(1);
357  matrix(3,3) = fwidthZerr * fwidthZerr;
358  matrix(6,6) = fwidthXerr * fwidthXerr;
359 
360  fbeamspot = reco::BeamSpot( reco::BeamSpot::Point(gausx->GetParameter(1),
361  gausy->GetParameter(1),
362  gausz->GetParameter(1) ),
363  fwidthZ,
364  0., 0.,
365  fwidthX,
366  matrix );
370 
371  }
372  else { // do 3D fit
373  //
374  // LL function and fitter
375  //
377  TFitterMinuit minuitx;
378  minuitx.SetMinuitFCN(fcn);
379  //
380  // fit parameters: positions, widths, x-y correlations, tilts in xz and yz
381  //
382  minuitx.SetParameter(0,"x",0.,0.02,-10.,10.);
383  minuitx.SetParameter(1,"y",0.,0.02,-10.,10.);
384  minuitx.SetParameter(2,"z",0.,0.20,-30.,30.);
385  //minuitx.SetParameter(3,"ex",0.015,0.01,0.,10.);
386  minuitx.SetParameter(3,"ex",0.015,0.01,0.0001,10.);
387  minuitx.SetParameter(4,"corrxy",0.,0.02,-1.,1.);
388  //minuitx.SetParameter(5,"ey",0.015,0.01,0.,10.);
389  minuitx.SetParameter(5,"ey",0.015,0.01,0.0001,10.);
390  minuitx.SetParameter(6,"dxdz",0.,0.0002,-0.1,0.1);
391  minuitx.SetParameter(7,"dydz",0.,0.0002,-0.1,0.1);
392  //minuitx.SetParameter(8,"ez",1.,0.1,0.,30.);
393  minuitx.SetParameter(8,"ez",1.,0.1,1.0,30.);
394  minuitx.SetParameter(9,"scale",errorScale_,errorScale_/10.,errorScale_/2.,errorScale_*2.);
395  //
396  // first iteration without correlations
397  //
398  int ierr(0);
399  minuitx.FixParameter(4);
400  minuitx.FixParameter(6);
401  minuitx.FixParameter(7);
402  minuitx.FixParameter(9);
403  minuitx.SetMaxIterations(100);
404 // minuitx.SetPrintLevel(3);
405  minuitx.SetPrintLevel(0);
406  minuitx.CreateMinimizer();
407  ierr = minuitx.Minimize();
408  if ( ierr ) {
409  edm::LogWarning("PVFitter") << "3D beam spot fit failed in 1st iteration" << std::endl;
410  return false;
411  }
412  //
413  // refit with harder selection on vertices
414  //
415  fcn->setLimits(minuitx.GetParameter(0)-sigmaCut_*minuitx.GetParameter(3),
416  minuitx.GetParameter(0)+sigmaCut_*minuitx.GetParameter(3),
417  minuitx.GetParameter(1)-sigmaCut_*minuitx.GetParameter(5),
418  minuitx.GetParameter(1)+sigmaCut_*minuitx.GetParameter(5),
419  minuitx.GetParameter(2)-sigmaCut_*minuitx.GetParameter(8),
420  minuitx.GetParameter(2)+sigmaCut_*minuitx.GetParameter(8));
421  ierr = minuitx.Minimize();
422  if ( ierr ) {
423  edm::LogWarning("PVFitter") << "3D beam spot fit failed in 2nd iteration" << std::endl;
424  return false;
425  }
426  //
427  // refit with correlations
428  //
429  minuitx.ReleaseParameter(4);
430  minuitx.ReleaseParameter(6);
431  minuitx.ReleaseParameter(7);
432  ierr = minuitx.Minimize();
433  if ( ierr ) {
434  edm::LogWarning("PVFitter") << "3D beam spot fit failed in 3rd iteration" << std::endl;
435  return false;
436  }
437  // refit with floating scale factor
438  // minuitx.ReleaseParameter(9);
439  // minuitx.Minimize();
440 
441  //minuitx.PrintResults(0,0);
442 
443  fwidthX = minuitx.GetParameter(3);
444  fwidthY = minuitx.GetParameter(5);
445  fwidthZ = minuitx.GetParameter(8);
446  fwidthXerr = minuitx.GetParError(3);
447  fwidthYerr = minuitx.GetParError(5);
448  fwidthZerr = minuitx.GetParError(8);
449 
450  // check errors on widths and sigmaZ for nan
451  if ( isnan(fwidthXerr) || isnan(fwidthYerr) || isnan(fwidthZerr) ) {
452  edm::LogWarning("PVFitter") << "3D beam spot fit returns nan in 3rd iteration" << std::endl;
453  return false;
454  }
455 
457  // need to get the full cov matrix
458  matrix(0,0) = pow( minuitx.GetParError(0), 2);
459  matrix(1,1) = pow( minuitx.GetParError(1), 2);
460  matrix(2,2) = pow( minuitx.GetParError(2), 2);
461  matrix(3,3) = fwidthZerr * fwidthZerr;
462  matrix(6,6) = fwidthXerr * fwidthXerr;
463 
464  fbeamspot = reco::BeamSpot( reco::BeamSpot::Point(minuitx.GetParameter(0),
465  minuitx.GetParameter(1),
466  minuitx.GetParameter(2) ),
467  fwidthZ,
468  minuitx.GetParameter(6), minuitx.GetParameter(7),
469  fwidthX,
470  matrix );
474  }
475 
476  return true; //FIXME: Need to add quality test for the fit results!
477 }
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 188 of file PVFitter.cc.

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

Referenced by BeamFitter::BeamFitter().

188  {
189  ftree_ = tree;
191 }
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.