CMS 3D CMS Logo

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

#include <BeamFitter.h>

Public Member Functions

 BeamFitter ()
 
 BeamFitter (const edm::ParameterSet &iConfig, edm::ConsumesCollector &&iColl)
 
void dumpBWTxtFile (std::string &)
 
void dumpTxtFile (std::string &, bool)
 
reco::BeamSpot getBeamSpot ()
 
std::map< int, reco::BeamSpotgetBeamSpotMap ()
 
reco::BeamSpot getBeamWidth ()
 
std::vector< BSTrkParametersgetBSvector ()
 
TH1F * getCutFlow ()
 
std::pair< int, int > getFitLSRange ()
 
int getNPVs ()
 
const std::map< int, int > & getNPVsperBX ()
 
int getNTracks ()
 
std::size_t getPVvectorSize ()
 
std::pair< time_t, time_t > getRefTime ()
 
int getRunNumber ()
 
void readEvent (const edm::Event &iEvent)
 
void resetCutFlow ()
 
void resetLSRange ()
 
void resetPVFitter ()
 
void resetRefTime ()
 
void resetTotTrk ()
 
void resetTrkVector ()
 
void resizeBSvector (unsigned int nsize)
 
void resizePVvector (unsigned int npvsize)
 
void runAllFitter ()
 
bool runBeamWidthFitter ()
 
bool runFitter ()
 
bool runFitterNoTxt ()
 
bool runPVandTrkFitter ()
 
void setFitLSRange (int ls0, int ls1)
 
void SetPVInfo (const std::vector< float > &v1_)
 
void setRefTime (time_t t0, time_t t1)
 
void setRun (int run)
 
void subtractFromCutFlow (const TH1F *toSubtract)
 
void write2DB ()
 
virtual ~BeamFitter ()
 

Private Member Functions

void updateBTime ()
 

Private Attributes

std::vector< reco::TrackBase::TrackAlgorithmalgorithm_
 
bool appendRunTxt_
 
edm::EDGetTokenT< reco::BeamSpotbeamSpotToken_
 
double convergence_
 
int countPass [9]
 
bool debug_
 
bool falgo
 
std::ofstream fasciiDIP
 
std::ofstream fasciiFile
 
reco::BeamSpot fbeamspot
 
reco::BeamSpot fbeamWidthFit
 
int fbeginLumiOfFit
 
char fbeginTimeOfFit [32]
 
std::map< int, reco::BeamSpotfbspotPVMap
 
std::vector< BSTrkParametersfBSvector
 
int fcharge
 
double fcov [7][7]
 
double fd0
 
double fd0bs
 
double fdxdz
 
double fdxdzErr
 
double fdydz
 
double fdydzErr
 
int fendLumiOfFit
 
char fendTimeOfFit [32]
 
double feta
 
bool ffilename_changed
 
TFile * file_
 
bool fitted_
 
int flumi
 
double fnormchi2
 
int fnPixelLayerMeas
 
int fnPXBLayerMeas
 
int fnPXFLayerMeas
 
int fnStripLayerMeas
 
int fnTECLayerMeas
 
int fnTIBLayerMeas
 
int fnTIDLayerMeas
 
int fnTOBLayerMeas
 
int fnTotLayerMeas
 
std::vector< float > ForDIPPV_
 
double fphi0
 
double fpt
 
TTree * fPVTree_
 
bool fpvValid
 
double fpvx
 
double fpvy
 
double fpvz
 
bool fquality
 
std::time_t freftime [2]
 
int frun
 
int frunFit
 
double fsigmad0
 
double fsigmaZ
 
double fsigmaz0
 
double fsigmaZErr
 
double ftheta
 
int ftotal_tracks
 
TTree * ftree_
 
TTree * ftreeFit_
 
double fvx
 
double fvy
 
double fwidthX
 
double fwidthXErr
 
double fwidthY
 
double fwidthYErr
 
double fx
 
double fxErr
 
double fy
 
double fyErr
 
double fz
 
double fz0
 
double fzErr
 
TH1F * h1cutFlow
 
TH1F * h1ntrks
 
TH1F * h1vz_event
 
TH1F * h1z
 
double inputBeamWidth_
 
bool isMuon_
 
int min_Ntrks_
 
PVFitterMyPVFitter
 
std::string outputDIPTxt_
 
std::string outputfilename_
 
std::string outputTxt_
 
std::vector< reco::TrackBase::TrackQualityquality_
 
bool saveBeamFit_
 
bool saveNtuple_
 
bool savePVVertices_
 
edm::EDGetTokenT< reco::TrackCollectiontracksToken_
 
std::vector< std::string > trk_Algorithm_
 
double trk_MaxEta_
 
double trk_MaxIP_
 
double trk_MaxNormChi2_
 
double trk_MaxZ_
 
int trk_MinNPixLayers_
 
int trk_MinNTotLayers_
 
double trk_MinpT_
 
std::vector< std::string > trk_Quality_
 
edm::EDGetTokenT< edm::View< reco::Vertex > > vertexToken_
 
bool writeDIPBadFit_
 
bool writeDIPTxt_
 
bool writeTxt_
 

Detailed Description

Definition at line 40 of file BeamFitter.h.

Constructor & Destructor Documentation

◆ BeamFitter() [1/2]

BeamFitter::BeamFitter ( )
inline

Definition at line 42 of file BeamFitter.h.

42 {}

◆ BeamFitter() [2/2]

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

Definition at line 39 of file BeamFitter.cc.

39  : fPVTree_(nullptr) {
40  debug_ = iConfig.getParameter<edm::ParameterSet>("BeamFitter").getUntrackedParameter<bool>("Debug");
42  iConfig.getParameter<edm::ParameterSet>("BeamFitter").getUntrackedParameter<edm::InputTag>("TrackCollection"));
44  iConfig.getUntrackedParameter<edm::InputTag>("primaryVertex", edm::InputTag("offlinePrimaryVertices")));
46  iConfig.getUntrackedParameter<edm::InputTag>("beamSpot", edm::InputTag("offlineBeamSpot")));
47  writeTxt_ = iConfig.getParameter<edm::ParameterSet>("BeamFitter").getUntrackedParameter<bool>("WriteAscii");
48  outputTxt_ =
49  iConfig.getParameter<edm::ParameterSet>("BeamFitter").getUntrackedParameter<std::string>("AsciiFileName");
51  iConfig.getParameter<edm::ParameterSet>("BeamFitter").getUntrackedParameter<bool>("AppendRunToFileName");
52  writeDIPTxt_ = iConfig.getParameter<edm::ParameterSet>("BeamFitter").getUntrackedParameter<bool>("WriteDIPAscii");
53  // Specify whether we want to write the DIP file even if the fit is failed.
55  iConfig.getParameter<edm::ParameterSet>("BeamFitter").getUntrackedParameter<bool>("WriteDIPOnBadFit", true);
57  iConfig.getParameter<edm::ParameterSet>("BeamFitter").getUntrackedParameter<std::string>("DIPFileName");
58  saveNtuple_ = iConfig.getParameter<edm::ParameterSet>("BeamFitter").getUntrackedParameter<bool>("SaveNtuple");
59  saveBeamFit_ = iConfig.getParameter<edm::ParameterSet>("BeamFitter").getUntrackedParameter<bool>("SaveFitResults");
60  savePVVertices_ = iConfig.getParameter<edm::ParameterSet>("BeamFitter").getUntrackedParameter<bool>("SavePVVertices");
61  isMuon_ = iConfig.getParameter<edm::ParameterSet>("BeamFitter").getUntrackedParameter<bool>("IsMuonCollection");
62 
63  trk_MinpT_ = iConfig.getParameter<edm::ParameterSet>("BeamFitter").getUntrackedParameter<double>("MinimumPt");
64  trk_MaxEta_ = iConfig.getParameter<edm::ParameterSet>("BeamFitter").getUntrackedParameter<double>("MaximumEta");
65  trk_MaxIP_ =
66  iConfig.getParameter<edm::ParameterSet>("BeamFitter").getUntrackedParameter<double>("MaximumImpactParameter");
67  trk_MaxZ_ = iConfig.getParameter<edm::ParameterSet>("BeamFitter").getUntrackedParameter<double>("MaximumZ");
69  iConfig.getParameter<edm::ParameterSet>("BeamFitter").getUntrackedParameter<int>("MinimumTotalLayers");
71  iConfig.getParameter<edm::ParameterSet>("BeamFitter").getUntrackedParameter<int>("MinimumPixelLayers");
73  iConfig.getParameter<edm::ParameterSet>("BeamFitter").getUntrackedParameter<double>("MaximumNormChi2");
74  trk_Algorithm_ = iConfig.getParameter<edm::ParameterSet>("BeamFitter")
75  .getUntrackedParameter<std::vector<std::string> >("TrackAlgorithm");
76  trk_Quality_ = iConfig.getParameter<edm::ParameterSet>("BeamFitter")
77  .getUntrackedParameter<std::vector<std::string> >("TrackQuality");
78  min_Ntrks_ = iConfig.getParameter<edm::ParameterSet>("BeamFitter").getUntrackedParameter<int>("MinimumInputTracks");
79  convergence_ =
80  iConfig.getParameter<edm::ParameterSet>("BeamFitter").getUntrackedParameter<double>("FractionOfFittedTrks");
82  iConfig.getParameter<edm::ParameterSet>("BeamFitter").getUntrackedParameter<double>("InputBeamWidth", -1.);
83 
84  for (unsigned int j = 0; j < trk_Algorithm_.size(); j++)
86  for (unsigned int j = 0; j < trk_Quality_.size(); j++)
88 
91  iConfig.getParameter<edm::ParameterSet>("BeamFitter").getUntrackedParameter<std::string>("OutputFileName");
92  file_ = TFile::Open(outputfilename_.c_str(), "RECREATE");
93  }
94  if (saveNtuple_) {
95  ftree_ = new TTree("mytree", "mytree");
96  ftree_->AutoSave();
97 
98  ftree_->Branch("pt", &fpt, "fpt/D");
99  ftree_->Branch("d0", &fd0, "fd0/D");
100  ftree_->Branch("d0bs", &fd0bs, "fd0bs/D");
101  ftree_->Branch("sigmad0", &fsigmad0, "fsigmad0/D");
102  ftree_->Branch("phi0", &fphi0, "fphi0/D");
103  ftree_->Branch("z0", &fz0, "fz0/D");
104  ftree_->Branch("sigmaz0", &fsigmaz0, "fsigmaz0/D");
105  ftree_->Branch("theta", &ftheta, "ftheta/D");
106  ftree_->Branch("eta", &feta, "feta/D");
107  ftree_->Branch("charge", &fcharge, "fcharge/I");
108  ftree_->Branch("normchi2", &fnormchi2, "fnormchi2/D");
109  ftree_->Branch("nTotLayerMeas", &fnTotLayerMeas, "fnTotLayerMeas/i");
110  ftree_->Branch("nStripLayerMeas", &fnStripLayerMeas, "fnStripLayerMeas/i");
111  ftree_->Branch("nPixelLayerMeas", &fnPixelLayerMeas, "fnPixelLayerMeas/i");
112  ftree_->Branch("nTIBLayerMeas", &fnTIBLayerMeas, "fnTIBLayerMeas/i");
113  ftree_->Branch("nTOBLayerMeas", &fnTOBLayerMeas, "fnTOBLayerMeas/i");
114  ftree_->Branch("nTIDLayerMeas", &fnTIDLayerMeas, "fnTIDLayerMeas/i");
115  ftree_->Branch("nTECLayerMeas", &fnTECLayerMeas, "fnTECLayerMeas/i");
116  ftree_->Branch("nPXBLayerMeas", &fnPXBLayerMeas, "fnPXBLayerMeas/i");
117  ftree_->Branch("nPXFLayerMeas", &fnPXFLayerMeas, "fnPXFLayerMeas/i");
118  ftree_->Branch("cov", &fcov, "fcov[7][7]/D");
119  ftree_->Branch("vx", &fvx, "fvx/D");
120  ftree_->Branch("vy", &fvy, "fvy/D");
121  ftree_->Branch("quality", &fquality, "fquality/O");
122  ftree_->Branch("algo", &falgo, "falgo/O");
123  ftree_->Branch("run", &frun, "frun/i");
124  ftree_->Branch("lumi", &flumi, "flumi/i");
125  ftree_->Branch("pvValid", &fpvValid, "fpvValid/O");
126  ftree_->Branch("pvx", &fpvx, "fpvx/D");
127  ftree_->Branch("pvy", &fpvy, "fpvy/D");
128  ftree_->Branch("pvz", &fpvz, "fpvz/D");
129  }
130  if (saveBeamFit_) {
131  ftreeFit_ = new TTree("fitResults", "fitResults");
132  ftreeFit_->AutoSave();
133  ftreeFit_->Branch("run", &frunFit, "frunFit/i");
134  ftreeFit_->Branch("beginLumi", &fbeginLumiOfFit, "fbeginLumiOfFit/i");
135  ftreeFit_->Branch("endLumi", &fendLumiOfFit, "fendLumiOfFit/i");
136  ftreeFit_->Branch("beginTime", fbeginTimeOfFit, "fbeginTimeOfFit/C");
137  ftreeFit_->Branch("endTime", fendTimeOfFit, "fendTimeOfFit/C");
138  ftreeFit_->Branch("x", &fx, "fx/D");
139  ftreeFit_->Branch("y", &fy, "fy/D");
140  ftreeFit_->Branch("z", &fz, "fz/D");
141  ftreeFit_->Branch("sigmaZ", &fsigmaZ, "fsigmaZ/D");
142  ftreeFit_->Branch("dxdz", &fdxdz, "fdxdz/D");
143  ftreeFit_->Branch("dydz", &fdydz, "fdydz/D");
144  ftreeFit_->Branch("xErr", &fxErr, "fxErr/D");
145  ftreeFit_->Branch("yErr", &fyErr, "fyErr/D");
146  ftreeFit_->Branch("zErr", &fzErr, "fzErr/D");
147  ftreeFit_->Branch("sigmaZErr", &fsigmaZErr, "fsigmaZErr/D");
148  ftreeFit_->Branch("dxdzErr", &fdxdzErr, "fdxdzErr/D");
149  ftreeFit_->Branch("dydzErr", &fdydzErr, "fdydzErr/D");
150  ftreeFit_->Branch("widthX", &fwidthX, "fwidthX/D");
151  ftreeFit_->Branch("widthY", &fwidthY, "fwidthY/D");
152  ftreeFit_->Branch("widthXErr", &fwidthXErr, "fwidthXErr/D");
153  ftreeFit_->Branch("widthYErr", &fwidthYErr, "fwidthYErr/D");
154  }
155 
156  fBSvector.clear();
157  ftotal_tracks = 0;
160  frun = flumi = -1;
162  fquality = falgo = true;
163  fpvValid = true;
164  fpvx = fpvy = fpvz = 0;
165  fitted_ = false;
166  resetRefTime();
167 
168  //debug histograms
169  h1ntrks = new TH1F("h1ntrks", "number of tracks per event", 50, 0, 50);
170  h1vz_event = new TH1F("h1vz_event", "track Vz", 50, -30, 30);
171  h1cutFlow = new TH1F("h1cutFlow", "Cut flow table of track selection", 9, 0, 9);
172  h1cutFlow->GetXaxis()->SetBinLabel(1, "No cut");
173  h1cutFlow->GetXaxis()->SetBinLabel(2, "Traker hits");
174  h1cutFlow->GetXaxis()->SetBinLabel(3, "Pixel hits");
175  h1cutFlow->GetXaxis()->SetBinLabel(4, "norm. #chi^{2}");
176  h1cutFlow->GetXaxis()->SetBinLabel(5, "algo");
177  h1cutFlow->GetXaxis()->SetBinLabel(6, "quality");
178  h1cutFlow->GetXaxis()->SetBinLabel(7, "d_{0}");
179  h1cutFlow->GetXaxis()->SetBinLabel(8, "z_{0}");
180  h1cutFlow->GetXaxis()->SetBinLabel(9, "p_{T}");
181  resetCutFlow();
182 
183  // Primary vertex fitter
184  MyPVFitter = new PVFitter(iConfig, iColl);
185  MyPVFitter->resetAll();
186  if (savePVVertices_) {
187  fPVTree_ = new TTree("PrimaryVertices", "PrimaryVertices");
189  }
190 
191  // check filename
192  ffilename_changed = false;
193  if (writeDIPTxt_)
194  fasciiDIP.open(outputDIPTxt_.c_str());
195 }

References reco::TrackBase::algoByName(), algorithm_, appendRunTxt_, beamSpotToken_, convergence_, debug_, falgo, fasciiDIP, fbeginLumiOfFit, fbeginTimeOfFit, fBSvector, fcharge, fcov, fd0, fd0bs, fdxdz, fdxdzErr, fdydz, fdydzErr, fendLumiOfFit, fendTimeOfFit, feta, ffilename_changed, file_, fitted_, flumi, fnormchi2, fnPixelLayerMeas, fnPXBLayerMeas, fnPXFLayerMeas, fnStripLayerMeas, fnTECLayerMeas, fnTIBLayerMeas, fnTIDLayerMeas, fnTOBLayerMeas, fnTotLayerMeas, fphi0, fpt, fPVTree_, fpvValid, fpvx, fpvy, fpvz, fquality, frun, frunFit, fsigmad0, fsigmaZ, fsigmaz0, fsigmaZErr, ftheta, ftotal_tracks, ftree_, ftreeFit_, fvx, fvy, fwidthX, fwidthXErr, fwidthY, fwidthYErr, fx, fxErr, fy, fyErr, fz, fz0, fzErr, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), h1cutFlow, h1ntrks, h1vz_event, inputBeamWidth_, HLT_2018_cff::InputTag, isMuon_, dqmiolumiharvest::j, min_Ntrks_, MyPVFitter, outputDIPTxt_, outputfilename_, outputTxt_, AlcaBeamMonitor_cfi::PVFitter, quality_, reco::TrackBase::qualityByName(), PVFitter::resetAll(), resetCutFlow(), resetRefTime(), saveBeamFit_, saveNtuple_, savePVVertices_, PVFitter::setTree(), tracksToken_, trk_Algorithm_, trk_MaxEta_, trk_MaxIP_, trk_MaxNormChi2_, trk_MaxZ_, trk_MinNPixLayers_, trk_MinNTotLayers_, trk_MinpT_, trk_Quality_, vertexToken_, writeDIPBadFit_, writeDIPTxt_, and writeTxt_.

◆ ~BeamFitter()

BeamFitter::~BeamFitter ( )
virtual

Definition at line 197 of file BeamFitter.cc.

197  {
198  if (saveNtuple_) {
199  file_->cd();
200  if (fitted_ && h1z)
201  h1z->Write();
202  h1ntrks->Write();
203  h1vz_event->Write();
204  if (h1cutFlow)
205  h1cutFlow->Write();
206  ftree_->Write();
207  }
208  if (saveBeamFit_) {
209  file_->cd();
210  ftreeFit_->Write();
211  }
212  if (savePVVertices_) {
213  file_->cd();
214  fPVTree_->Write();
215  }
216 
218  file_->Close();
219  delete file_;
220  }
221  delete MyPVFitter;
222 }

References file_, fitted_, fPVTree_, ftree_, ftreeFit_, h1cutFlow, h1ntrks, h1vz_event, h1z, MyPVFitter, saveBeamFit_, saveNtuple_, and savePVVertices_.

Member Function Documentation

◆ dumpBWTxtFile()

void BeamFitter::dumpBWTxtFile ( std::string &  fileName)

Definition at line 619 of file BeamFitter.cc.

619  {
620  std::ofstream outFile;
621  outFile.open(fileName.c_str(), std::ios::app);
622  outFile << "---------------------------------------------------------------------------------------------------------"
623  "----------------------------------------------------"
624  << std::endl;
625  outFile << "Beam width(in cm) from Log-likelihood fit (Here we assume a symmetric beam(SigmaX=SigmaY)!)" << std::endl;
626  outFile << " " << std::endl;
627  outFile << "BeamWidth = " << fbeamWidthFit.BeamWidthX() << " +/- " << fbeamWidthFit.BeamWidthXError() << std::endl;
628  outFile.close();
629 }

References reco::BeamSpot::BeamWidthX(), reco::BeamSpot::BeamWidthXError(), fbeamWidthFit, MillePedeFileConverter_cfg::fileName, and L1TdeCSCTF_cfi::outFile.

Referenced by runBeamWidthFitter().

◆ dumpTxtFile()

void BeamFitter::dumpTxtFile ( std::string &  fileName,
bool  append 
)

Definition at line 631 of file BeamFitter.cc.

631  {
632  std::ofstream outFile;
633 
634  std::string tmpname = outputTxt_;
635  char index[15];
637  sprintf(index, "%s%i", "_Run", frun);
638  tmpname.insert(outputTxt_.length() - 4, index);
639  fileName = tmpname;
640  ffilename_changed = true;
641  }
642 
643  if (!append)
644  outFile.open(fileName.c_str());
645  else
646  outFile.open(fileName.c_str(), std::ios::app);
647 
649  for (std::map<int, reco::BeamSpot>::const_iterator abspot = fbspotPVMap.begin(); abspot != fbspotPVMap.end();
650  ++abspot) {
651  reco::BeamSpot beamspottmp = abspot->second;
652  int bx = abspot->first;
653 
654  outFile << "Runnumber " << frun << " bx " << bx << std::endl;
655  outFile << "BeginTimeOfFit " << fbeginTimeOfFit << " " << freftime[0] << std::endl;
656  outFile << "EndTimeOfFit " << fendTimeOfFit << " " << freftime[1] << std::endl;
657  outFile << "LumiRange " << fbeginLumiOfFit << " - " << fendLumiOfFit << std::endl;
658  outFile << "Type " << beamspottmp.type() << std::endl;
659  outFile << "X0 " << beamspottmp.x0() << std::endl;
660  outFile << "Y0 " << beamspottmp.y0() << std::endl;
661  outFile << "Z0 " << beamspottmp.z0() << std::endl;
662  outFile << "sigmaZ0 " << beamspottmp.sigmaZ() << std::endl;
663  outFile << "dxdz " << beamspottmp.dxdz() << std::endl;
664  outFile << "dydz " << beamspottmp.dydz() << std::endl;
665  outFile << "BeamWidthX " << beamspottmp.BeamWidthX() << std::endl;
666  outFile << "BeamWidthY " << beamspottmp.BeamWidthY() << std::endl;
667  for (int i = 0; i < 6; ++i) {
668  outFile << "Cov(" << i << ",j) ";
669  for (int j = 0; j < 7; ++j) {
670  outFile << beamspottmp.covariance(i, j) << " ";
671  }
672  outFile << std::endl;
673  }
674  outFile << "Cov(6,j) 0 0 0 0 0 0 " << beamspottmp.covariance(6, 6) << std::endl;
675  //}
676  outFile << "EmittanceX " << beamspottmp.emittanceX() << std::endl;
677  outFile << "EmittanceY " << beamspottmp.emittanceY() << std::endl;
678  outFile << "BetaStar " << beamspottmp.betaStar() << std::endl;
679  }
680  } //if bx results needed
681  else {
682  beamspot::BeamSpotContainer currentBS;
683 
684  currentBS.beamspot = fbeamspot;
685  currentBS.run = frun;
688  currentBS.beginLumiOfFit = fbeginLumiOfFit;
689  currentBS.endLumiOfFit = fendLumiOfFit;
690  std::copy(freftime, freftime + 2, currentBS.reftime);
691 
693 
694  //write here Pv info for DIP only: This added only if append is false, which happen for DIP only :)
695  if (!append) {
696  outFile << "events " << (int)ForDIPPV_[0] << std::endl;
697  outFile << "meanPV " << ForDIPPV_[1] << std::endl;
698  outFile << "meanErrPV " << ForDIPPV_[2] << std::endl;
699  outFile << "rmsPV " << ForDIPPV_[3] << std::endl;
700  outFile << "rmsErrPV " << ForDIPPV_[4] << std::endl;
701  outFile << "maxPV " << (int)ForDIPPV_[5] << std::endl;
702  outFile << "nPV " << (int)ForDIPPV_[6] << std::endl;
703  } //writeDIPPVInfo_
704  } //else end here
705 
706  outFile.close();
707 }

References mps_setup::append, appendRunTxt_, beamspot::BeamSpotContainer::beamspot, reco::BeamSpot::BeamWidthX(), reco::BeamSpot::BeamWidthY(), beamspot::BeamSpotContainer::beginLumiOfFit, beamspot::BeamSpotContainer::beginTimeOfFit, reco::BeamSpot::betaStar(), l1GtPatternGenerator_cfi::bx, filterCSVwithJSON::copy, reco::BeamSpot::covariance(), beamspot::dumpBeamSpotTxt(), reco::BeamSpot::dxdz(), reco::BeamSpot::dydz(), reco::BeamSpot::emittanceX(), reco::BeamSpot::emittanceY(), beamspot::BeamSpotContainer::endLumiOfFit, beamspot::BeamSpotContainer::endTimeOfFit, fbeamspot, fbeginLumiOfFit, fbeginTimeOfFit, fbspotPVMap, fendLumiOfFit, fendTimeOfFit, ffilename_changed, MillePedeFileConverter_cfg::fileName, ForDIPPV_, freftime, frun, mps_fire::i, createfilelist::int, PVFitter::IsFitPerBunchCrossing(), dqmiolumiharvest::j, MyPVFitter, L1TdeCSCTF_cfi::outFile, outputTxt_, beamspot::BeamSpotContainer::reftime, beamspot::BeamSpotContainer::run, reco::BeamSpot::sigmaZ(), AlCaHLTBitMon_QueryRunRegistry::string, reco::BeamSpot::type(), writeTxt_, reco::BeamSpot::x0(), reco::BeamSpot::y0(), and reco::BeamSpot::z0().

Referenced by runFitter(), and runPVandTrkFitter().

◆ getBeamSpot()

reco::BeamSpot BeamFitter::getBeamSpot ( )
inline

◆ getBeamSpotMap()

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

Definition at line 91 of file BeamFitter.h.

91 { return fbspotPVMap; }

References fbspotPVMap.

Referenced by BeamMonitorBx::FitAndFill().

◆ getBeamWidth()

reco::BeamSpot BeamFitter::getBeamWidth ( )
inline

Definition at line 53 of file BeamFitter.h.

53 { return fbeamWidthFit; }

References fbeamWidthFit.

Referenced by BeamSpotAnalyzer::endJob().

◆ getBSvector()

std::vector<BSTrkParameters> BeamFitter::getBSvector ( )
inline

Definition at line 92 of file BeamFitter.h.

92 { return fBSvector; }

References fBSvector.

Referenced by BeamSpotAnalyzer::endLuminosityBlock(), and AlcaBeamSpotProducer::endLuminosityBlockProduce().

◆ getCutFlow()

TH1F* BeamFitter::getCutFlow ( )
inline

Definition at line 93 of file BeamFitter.h.

93 { return h1cutFlow; }

References h1cutFlow.

◆ getFitLSRange()

std::pair<int, int> BeamFitter::getFitLSRange ( )
inline

◆ getNPVs()

int BeamFitter::getNPVs ( )
inline

Definition at line 119 of file BeamFitter.h.

119 { return MyPVFitter->getNPVs(); }

References PVFitter::getNPVs(), and MyPVFitter.

Referenced by BeamSpotAnalyzer::endLuminosityBlock().

◆ getNPVsperBX()

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

Definition at line 120 of file BeamFitter.h.

120 { return MyPVFitter->getNPVsperBX(); }

References PVFitter::getNPVsperBX(), and MyPVFitter.

Referenced by BeamMonitorBx::FitAndFill().

◆ getNTracks()

int BeamFitter::getNTracks ( )
inline

Definition at line 118 of file BeamFitter.h.

118 { return fBSvector.size(); }

References fBSvector.

Referenced by BeamSpotAnalyzer::endLuminosityBlock().

◆ getPVvectorSize()

std::size_t BeamFitter::getPVvectorSize ( )
inline

Definition at line 72 of file BeamFitter.h.

72 { return (MyPVFitter->getpvStore()).size(); }

References PVFitter::getpvStore(), MyPVFitter, and findQualityFiles::size.

◆ getRefTime()

std::pair<time_t, time_t> BeamFitter::getRefTime ( )
inline

Definition at line 67 of file BeamFitter.h.

67 { return std::make_pair(freftime[0], freftime[1]); }

References freftime.

◆ getRunNumber()

int BeamFitter::getRunNumber ( )
inline

Definition at line 109 of file BeamFitter.h.

109 { return frun; }

References frun.

◆ readEvent()

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

Definition at line 224 of file BeamFitter.cc.

224  {
225  frun = iEvent.id().run();
226  const edm::TimeValue_t ftimestamp = iEvent.time().value();
227  const std::time_t ftmptime = ftimestamp >> 32;
228 
229  if (fbeginLumiOfFit == -1)
230  freftime[0] = freftime[1] = ftmptime;
231  if (freftime[0] == 0 || ftmptime < freftime[0])
232  freftime[0] = ftmptime;
233  if (freftime[1] == 0 || ftmptime > freftime[1])
234  freftime[1] = ftmptime;
235  // Update the human-readable string versions of the time
236  updateBTime();
237 
238  flumi = iEvent.luminosityBlock();
239  frunFit = frun;
240  if (fbeginLumiOfFit == -1 || fbeginLumiOfFit > flumi)
242  if (fendLumiOfFit == -1 || fendLumiOfFit < flumi)
244 
246  iEvent.getByToken(tracksToken_, TrackCollection);
247 
248  //------ Primary Vertices
250  bool hasPVs = false;
252  if (iEvent.getByToken(vertexToken_, PVCollection)) {
253  pv = *PVCollection;
254  hasPVs = true;
255  }
256  //------
257 
258  //------ Beam Spot in current event
259  edm::Handle<reco::BeamSpot> recoBeamSpotHandle;
260  const reco::BeamSpot *refBS = nullptr;
261  if (iEvent.getByToken(beamSpotToken_, recoBeamSpotHandle))
262  refBS = recoBeamSpotHandle.product();
263  //-------
264 
265  const reco::TrackCollection *tracks = TrackCollection.product();
266 
267  double eventZ = 0;
268  double averageZ = 0;
269 
270  for (reco::TrackCollection::const_iterator track = tracks->begin(); track != tracks->end(); ++track) {
271  if (!isMuon_) {
272  const reco::HitPattern &trkHP = track->hitPattern();
273 
283  } else {
284  fnTotLayerMeas = track->numberOfValidHits();
285  }
286 
287  fpt = track->pt();
288  feta = track->eta();
289  fphi0 = track->phi();
290  fcharge = track->charge();
291  fnormchi2 = track->normalizedChi2();
292  fd0 = track->d0();
293  if (refBS)
294  fd0bs = -1 * track->dxy(refBS->position());
295  else
296  fd0bs = 0.;
297 
298  fsigmad0 = track->d0Error();
299  fz0 = track->dz();
300  fsigmaz0 = track->dzError();
301  ftheta = track->theta();
302  fvx = track->vx();
303  fvy = track->vy();
304 
305  for (int i = 0; i < 5; ++i) {
306  for (int j = 0; j < 5; ++j) {
307  fcov[i][j] = track->covariance(i, j);
308  }
309  }
310 
311  fquality = true;
312  falgo = true;
313 
314  if (!isMuon_) {
315  if (!quality_.empty()) {
316  fquality = false;
317  for (unsigned int i = 0; i < quality_.size(); ++i) {
318  if (debug_)
319  edm::LogInfo("BeamFitter") << "quality_[" << i << "] = " << track->qualityName(quality_[i]) << std::endl;
320  if (track->quality(quality_[i])) {
321  fquality = true;
322  break;
323  }
324  }
325  }
326 
327  // Track algorithm
328 
329  if (!algorithm_.empty()) {
330  if (std::find(algorithm_.begin(), algorithm_.end(), track->algo()) == algorithm_.end())
331  falgo = false;
332  }
333  }
334 
335  // check if we have a valid PV
336  fpvValid = false;
337 
338  if (hasPVs) {
339  for (size_t ipv = 0; ipv != pv.size(); ++ipv) {
340  if (!pv[ipv].isFake())
341  fpvValid = true;
342 
343  if (ipv == 0 && !pv[0].isFake()) {
344  fpvx = pv[0].x();
345  fpvy = pv[0].y();
346  fpvz = pv[0].z();
347  } // fix this later
348  }
349  }
350 
351  if (saveNtuple_)
352  ftree_->Fill();
353  ftotal_tracks++;
354 
356  // Track selection
358  countPass[1] += 1;
360  countPass[2] += 1;
361  if (fnormchi2 < trk_MaxNormChi2_) {
362  countPass[3] += 1;
363  if (falgo) {
364  countPass[4] += 1;
365  if (fquality) {
366  countPass[5] += 1;
367  if (std::abs(fd0) < trk_MaxIP_) {
368  countPass[6] += 1;
369  if (std::abs(fz0) < trk_MaxZ_) {
370  countPass[7] += 1;
371  if (fpt > trk_MinpT_) {
372  countPass[8] += 1;
373  if (std::abs(feta) < trk_MaxEta_
374  //&& fpvValid
375  ) {
376  if (debug_) {
377  edm::LogInfo("BeamFitter") << "Selected track quality = " << track->qualityMask()
378  << "; track algorithm = " << track->algoName()
379  << "= TrackAlgorithm: " << track->algo() << std::endl;
380  }
381  BSTrkParameters BSTrk(fz0, fsigmaz0, fd0, fsigmad0, fphi0, fpt, 0., 0.);
382  BSTrk.setVx(fvx);
383  BSTrk.setVy(fvy);
384  fBSvector.push_back(BSTrk);
385  averageZ += fz0;
386  }
387  }
388  }
389  }
390  }
391  }
392  }
393  }
394  } // track selection
395 
396  } // tracks
397 
398  averageZ = averageZ / (float)(fBSvector.size());
399 
400  for (std::vector<BSTrkParameters>::const_iterator iparam = fBSvector.begin(); iparam != fBSvector.end(); ++iparam) {
401  eventZ += fabs(iparam->z0() - averageZ);
402  }
403 
404  h1ntrks->Fill(fBSvector.size());
405  h1vz_event->Fill(eventZ / (float)(fBSvector.size()));
406  for (unsigned int i = 0; i < sizeof(countPass) / sizeof(countPass[0]); i++)
407  h1cutFlow->SetBinContent(i + 1, countPass[i]);
408 
410 }

References funct::abs(), algorithm_, beamSpotToken_, countPass, debug_, falgo, fbeginLumiOfFit, fBSvector, fcharge, fcov, fd0, fd0bs, fendLumiOfFit, feta, spr::find(), dqmMemoryStats::float, flumi, fnormchi2, fnPixelLayerMeas, fnPXBLayerMeas, fnPXFLayerMeas, fnStripLayerMeas, fnTECLayerMeas, fnTIBLayerMeas, fnTIDLayerMeas, fnTOBLayerMeas, fnTotLayerMeas, fphi0, fpt, fpvValid, fpvx, fpvy, fpvz, fquality, freftime, frun, frunFit, fsigmad0, fsigmaz0, ftheta, ftotal_tracks, ftree_, fvx, fvy, fz0, h1cutFlow, h1ntrks, h1vz_event, mps_fire::i, iEvent, isMuon_, dqmiolumiharvest::j, MyPVFitter, reco::HitPattern::pixelBarrelLayersWithMeasurement(), reco::HitPattern::pixelEndcapLayersWithMeasurement(), reco::HitPattern::pixelLayersWithMeasurement(), reco::BeamSpot::position(), edm::Handle< T >::product(), MetAnalyzer::pv(), L1TEGammaOffline_cfi::PVCollection, quality_, PVFitter::readEvent(), saveNtuple_, BSTrkParameters::setVx(), BSTrkParameters::setVy(), reco::HitPattern::stripLayersWithMeasurement(), reco::HitPattern::stripTECLayersWithMeasurement(), reco::HitPattern::stripTIBLayersWithMeasurement(), reco::HitPattern::stripTIDLayersWithMeasurement(), reco::HitPattern::stripTOBLayersWithMeasurement(), HLT_2018_cff::track, reco::HitPattern::trackerLayersWithMeasurement(), PDWG_EXOHSCP_cff::tracks, tracksToken_, trk_MaxEta_, trk_MaxIP_, trk_MaxNormChi2_, trk_MaxZ_, trk_MinNPixLayers_, trk_MinNTotLayers_, trk_MinpT_, updateBTime(), and vertexToken_.

Referenced by BeamSpotAnalyzer::analyze(), AlcaBeamMonitor::analyze(), BeamMonitorBx::analyze(), and AlcaBeamSpotProducer::produce().

◆ resetCutFlow()

void BeamFitter::resetCutFlow ( )
inline

◆ resetLSRange()

void BeamFitter::resetLSRange ( )
inline

◆ resetPVFitter()

void BeamFitter::resetPVFitter ( )
inline

◆ resetRefTime()

void BeamFitter::resetRefTime ( )
inline

◆ resetTotTrk()

void BeamFitter::resetTotTrk ( )
inline

Definition at line 56 of file BeamFitter.h.

56 { ftotal_tracks = 0; }

References ftotal_tracks.

◆ resetTrkVector()

void BeamFitter::resetTrkVector ( )
inline

◆ resizeBSvector()

void BeamFitter::resizeBSvector ( unsigned int  nsize)
inline

Definition at line 74 of file BeamFitter.h.

74 { fBSvector.erase(fBSvector.begin(), fBSvector.begin() + nsize); }

References fBSvector.

◆ resizePVvector()

void BeamFitter::resizePVvector ( unsigned int  npvsize)
inline

Definition at line 77 of file BeamFitter.h.

77 { MyPVFitter->resizepvStore(npvsize); }

References MyPVFitter, and PVFitter::resizepvStore().

◆ runAllFitter()

void BeamFitter::runAllFitter ( )

Definition at line 747 of file BeamFitter.cc.

747  {
748  if (!fBSvector.empty()) {
749  BSFitter *myalgo = new BSFitter(fBSvector);
750  fbeamspot = myalgo->Fit_d0phi();
751 
752  // iterative
753  if (debug_)
754  std::cout << " d0-phi Iterative:" << std::endl;
755  BSFitter *myitealgo = new BSFitter(fBSvector);
756  myitealgo->Setd0Cut_d0phi(4.0);
757  reco::BeamSpot beam_ite = myitealgo->Fit_ited0phi();
758  if (debug_) {
759  std::cout << beam_ite << std::endl;
760  std::cout << "\n Now run tests of the different fits\n";
761  }
762  // from here are just tests
763  std::string fit_type = "chi2";
764  myalgo->SetFitVariable(std::string("z"));
765  myalgo->SetFitType(std::string("chi2"));
766  reco::BeamSpot beam_fit_z_chi2 = myalgo->Fit();
767  if (debug_) {
768  std::cout << " z Chi2 Fit ONLY:" << std::endl;
769  std::cout << beam_fit_z_chi2 << std::endl;
770  }
771 
772  fit_type = "combined";
773  myalgo->SetFitVariable("z");
774  myalgo->SetFitType("combined");
775  reco::BeamSpot beam_fit_z_lh = myalgo->Fit();
776  if (debug_) {
777  std::cout << " z Log-Likelihood Fit ONLY:" << std::endl;
778  std::cout << beam_fit_z_lh << std::endl;
779  }
780 
781  myalgo->SetFitVariable("d");
782  myalgo->SetFitType("d0phi");
783  reco::BeamSpot beam_fit_dphi = myalgo->Fit();
784  if (debug_) {
785  std::cout << " d0-phi0 Fit ONLY:" << std::endl;
786  std::cout << beam_fit_dphi << std::endl;
787  }
788  /*
789  myalgo->SetFitVariable(std::string("d*z"));
790  myalgo->SetFitType(std::string("likelihood"));
791  reco::BeamSpot beam_fit_dz_lh = myalgo->Fit();
792  if (debug_){
793  std::cout << " Log-Likelihood Fit:" << std::endl;
794  std::cout << beam_fit_dz_lh << std::endl;
795  }
796 
797  myalgo->SetFitVariable(std::string("d*z"));
798  myalgo->SetFitType(std::string("resolution"));
799  reco::BeamSpot beam_fit_dresz_lh = myalgo->Fit();
800  if(debug_){
801  std::cout << " IP Resolution Fit" << std::endl;
802  std::cout << beam_fit_dresz_lh << std::endl;
803 
804  std::cout << "c0 = " << myalgo->GetResPar0() << " +- " << myalgo->GetResPar0Err() << std::endl;
805  std::cout << "c1 = " << myalgo->GetResPar1() << " +- " << myalgo->GetResPar1Err() << std::endl;
806  }
807  */
808  } else if (debug_)
809  std::cout << "No good track selected! No beam fit!" << std::endl;
810 }

References gather_cfg::cout, debug_, fbeamspot, fBSvector, BSFitter::Fit(), BSFitter::Fit_d0phi(), BSFitter::Fit_ited0phi(), BSFitter::Setd0Cut_d0phi(), BSFitter::SetFitType(), BSFitter::SetFitVariable(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by BeamSpotAnalyzer::endJob().

◆ runBeamWidthFitter()

bool BeamFitter::runBeamWidthFitter ( )

Definition at line 583 of file BeamFitter.cc.

583  {
584  bool widthfit_ok = false;
585  // default fit to extract beam spot info
586  if (fBSvector.size() > 1) {
587  edm::LogInfo("BeamFitter") << "Calculating beam spot positions('d0-phi0' method) and width using llh Fit"
588  << std::endl
589  << "We will use " << fBSvector.size() << " good tracks out of " << ftotal_tracks
590  << std::endl;
591 
592  BSFitter *myalgo = new BSFitter(fBSvector);
593  myalgo->SetMaximumZ(trk_MaxZ_);
594  myalgo->SetConvergence(convergence_);
595  myalgo->SetMinimumNTrks(min_Ntrks_);
596  if (inputBeamWidth_ > 0)
598 
599  myalgo->SetFitVariable(std::string("d*z"));
600  myalgo->SetFitType(std::string("likelihood"));
601  fbeamWidthFit = myalgo->Fit();
602 
603  //Add to .txt file
604  if (writeTxt_)
606 
607  delete myalgo;
608 
609  // not fake
610  if (fbeamspot.type() != 0)
611  widthfit_ok = true;
612  } else {
614  edm::LogWarning("BeamFitter") << "Not enough good tracks selected! No beam fit!" << std::endl;
615  }
616  return widthfit_ok;
617 }

References convergence_, dumpBWTxtFile(), reco::BeamSpot::Fake, fbeamspot, fbeamWidthFit, fBSvector, BSFitter::Fit(), ftotal_tracks, inputBeamWidth_, min_Ntrks_, outputTxt_, BSFitter::SetConvergence(), BSFitter::SetFitType(), BSFitter::SetFitVariable(), BSFitter::SetInputBeamWidth(), BSFitter::SetMaximumZ(), BSFitter::SetMinimumNTrks(), reco::BeamSpot::setType(), AlCaHLTBitMon_QueryRunRegistry::string, trk_MaxZ_, reco::BeamSpot::type(), and writeTxt_.

Referenced by BeamSpotAnalyzer::endJob().

◆ runFitter()

bool BeamFitter::runFitter ( )

Definition at line 572 of file BeamFitter.cc.

572  {
573  bool fit_ok = runFitterNoTxt();
574 
575  if (writeTxt_)
576  dumpTxtFile(outputTxt_, true); // all reaults
577  if (writeDIPTxt_ && (fit_ok || writeDIPBadFit_)) {
578  dumpTxtFile(outputDIPTxt_, false); // for DQM/DIP
579  }
580  return fit_ok;
581 }

References dumpTxtFile(), outputDIPTxt_, outputTxt_, runFitterNoTxt(), writeDIPBadFit_, writeDIPTxt_, and writeTxt_.

◆ runFitterNoTxt()

bool BeamFitter::runFitterNoTxt ( )

Definition at line 509 of file BeamFitter.cc.

509  {
510  edm::LogInfo("BeamFitter") << " [BeamFitterDebugTime] freftime[0] = " << freftime[0]
511  << "; address = " << &freftime[0] << " = " << fbeginTimeOfFit << std::endl;
512  edm::LogInfo("BeamFitter") << " [BeamFitterDebugTime] freftime[1] = " << freftime[1]
513  << "; address = " << &freftime[1] << " = " << fendTimeOfFit << std::endl;
514 
515  if (fbeginLumiOfFit == -1 || fendLumiOfFit == -1) {
516  edm::LogWarning("BeamFitter") << "No event read! No Fitting!" << std::endl;
517  return false;
518  }
519 
520  bool fit_ok = false;
521  // default fit to extract beam spot info
522  if (fBSvector.size() > 1) {
523  edm::LogInfo("BeamFitter") << "Calculating beam spot..." << std::endl
524  << "We will use " << fBSvector.size() << " good tracks out of " << ftotal_tracks
525  << std::endl;
526 
527  BSFitter *myalgo = new BSFitter(fBSvector);
528  myalgo->SetMaximumZ(trk_MaxZ_);
529  myalgo->SetConvergence(convergence_);
530  myalgo->SetMinimumNTrks(min_Ntrks_);
531  if (inputBeamWidth_ > 0)
533 
534  fbeamspot = myalgo->Fit();
535 
536  // retrieve histogram for Vz
537  h1z = (TH1F *)myalgo->GetVzHisto();
538 
539  delete myalgo;
540  if (fbeamspot.type() > 0) { // save all results except for Fake and Unknown (all 0.)
541  fit_ok = true;
542  if (saveBeamFit_) {
543  fx = fbeamspot.x0();
544  fy = fbeamspot.y0();
545  fz = fbeamspot.z0();
547  fdxdz = fbeamspot.dxdz();
548  fdydz = fbeamspot.dydz();
551  fxErr = fbeamspot.x0Error();
552  fyErr = fbeamspot.y0Error();
553  fzErr = fbeamspot.z0Error();
559  ftreeFit_->Fill();
560  }
561  }
562  } else { // tracks <= 1
563  reco::BeamSpot tmpbs;
564  fbeamspot = tmpbs;
566  edm::LogInfo("BeamFitter") << "Not enough good tracks selected! No beam fit!" << std::endl;
567  }
568  fitted_ = true;
569  return fit_ok;
570 }

References reco::BeamSpot::BeamWidthX(), reco::BeamSpot::BeamWidthXError(), reco::BeamSpot::BeamWidthY(), reco::BeamSpot::BeamWidthYError(), convergence_, reco::BeamSpot::dxdz(), reco::BeamSpot::dxdzError(), reco::BeamSpot::dydz(), reco::BeamSpot::dydzError(), reco::BeamSpot::Fake, fbeamspot, fbeginLumiOfFit, fbeginTimeOfFit, fBSvector, fdxdz, fdxdzErr, fdydz, fdydzErr, fendLumiOfFit, fendTimeOfFit, BSFitter::Fit(), fitted_, freftime, fsigmaZ, fsigmaZErr, ftotal_tracks, ftreeFit_, fwidthX, fwidthXErr, fwidthY, fwidthYErr, fx, fxErr, fy, fyErr, fz, fzErr, BSFitter::GetVzHisto(), h1z, inputBeamWidth_, min_Ntrks_, saveBeamFit_, BSFitter::SetConvergence(), BSFitter::SetInputBeamWidth(), BSFitter::SetMaximumZ(), BSFitter::SetMinimumNTrks(), reco::BeamSpot::setType(), reco::BeamSpot::sigmaZ(), reco::BeamSpot::sigmaZ0Error(), trk_MaxZ_, reco::BeamSpot::type(), reco::BeamSpot::x0(), reco::BeamSpot::x0Error(), reco::BeamSpot::y0(), reco::BeamSpot::y0Error(), reco::BeamSpot::z0(), and reco::BeamSpot::z0Error().

Referenced by runFitter(), and runPVandTrkFitter().

◆ runPVandTrkFitter()

bool BeamFitter::runPVandTrkFitter ( )

Definition at line 412 of file BeamFitter.cc.

412  {
413  // run both PV and track fitters
414  bool fit_ok = false;
415  bool pv_fit_ok = false;
416  reco::BeamSpot bspotPV;
417  reco::BeamSpot bspotTrk;
418 
419  // First run PV fitter
421  edm::LogInfo("BeamFitter") << " [BeamFitterBxDebugTime] freftime[0] = " << freftime[0]
422  << "; address = " << &freftime[0] << " = " << fbeginTimeOfFit << std::endl;
423  edm::LogInfo("BeamFitter") << " [BeamFitterBxDebugTime] freftime[1] = " << freftime[1]
424  << "; address = " << &freftime[1] << " = " << fendTimeOfFit << std::endl;
425 
426  if (MyPVFitter->runBXFitter()) {
428  pv_fit_ok = true;
429  }
430  if (writeTxt_)
431  dumpTxtFile(outputTxt_, true); // all reaults
432  if (writeDIPTxt_ && (pv_fit_ok || writeDIPBadFit_)) {
433  dumpTxtFile(outputDIPTxt_, false); // for DQM/DIP
434  }
435  return pv_fit_ok;
436  }
437 
438  if (MyPVFitter->runFitter()) {
439  bspotPV = MyPVFitter->getBeamSpot();
440 
441  // take beam width from PV fit and pass it to track fitter
442  // assume circular transverse beam width
443  inputBeamWidth_ = sqrt(pow(bspotPV.BeamWidthX(), 2) + pow(bspotPV.BeamWidthY(), 2)) / sqrt(2);
444  pv_fit_ok = true;
445 
446  } else {
447  // problems with PV fit
449  bspotTrk.setType(reco::BeamSpot::Unknown); //propagate error to trk beam spot
450  }
451 
452  if (runFitterNoTxt()) {
453  bspotTrk = fbeamspot;
454  fit_ok = true;
455  } else {
456  // beamfit failed, flagged as empty beam spot
457  bspotTrk.setType(reco::BeamSpot::Fake);
458  fit_ok = false;
459  }
460 
461  // combined results into one single beam spot
462 
463  // to pass errors I have to create another beam spot object
465  for (int j = 0; j < 7; ++j) {
466  for (int k = j; k < 7; ++k) {
467  matrix(j, k) = bspotTrk.covariance(j, k);
468  }
469  }
470  // change beam width error to one from PV
471  if (pv_fit_ok && fit_ok) {
473 
474  // get Z and sigmaZ from PV fit
475  matrix(2, 2) = bspotPV.covariance(2, 2);
476  matrix(3, 3) = bspotPV.covariance(3, 3);
477  reco::BeamSpot tmpbs(reco::BeamSpot::Point(bspotTrk.x0(), bspotTrk.y0(), bspotPV.z0()),
478  bspotPV.sigmaZ(),
479  bspotTrk.dxdz(),
480  bspotTrk.dydz(),
481  bspotPV.BeamWidthX(),
482  matrix,
483  bspotPV.type());
484  tmpbs.setBeamWidthY(bspotPV.BeamWidthY());
485  // overwrite beam spot result
486  fbeamspot = tmpbs;
487  }
488  if (pv_fit_ok && fit_ok) {
489  fbeamspot.setType(bspotPV.type());
490  } else if (!pv_fit_ok && fit_ok) {
492  } else if (pv_fit_ok && !fit_ok) {
494  } else if (!pv_fit_ok && !fit_ok) {
496  }
497 
498  if (writeTxt_)
499  dumpTxtFile(outputTxt_, true); // all reaults
500  if (writeDIPTxt_ && ((fit_ok && pv_fit_ok) || writeDIPBadFit_)) {
501  dumpTxtFile(outputDIPTxt_, false); // for DQM/DIP
502  for (size_t i = 0; i < 7; i++)
503  ForDIPPV_.push_back(0.0);
504  }
505 
506  return fit_ok && pv_fit_ok;
507 }

References reco::BeamSpot::BeamWidthX(), reco::BeamSpot::BeamWidthY(), reco::BeamSpot::covariance(), dumpTxtFile(), reco::BeamSpot::dxdz(), reco::BeamSpot::dydz(), reco::BeamSpot::Fake, fbeamspot, fbeginTimeOfFit, fbspotPVMap, fendTimeOfFit, ForDIPPV_, freftime, PVFitter::getBeamSpot(), PVFitter::getBeamSpotMap(), PVFitter::getWidthXerr(), mps_fire::i, inputBeamWidth_, PVFitter::IsFitPerBunchCrossing(), dqmiolumiharvest::j, dqmdumpme::k, makeMuonMisalignmentScenario::matrix, MyPVFitter, outputDIPTxt_, outputTxt_, funct::pow(), PVFitter::runBXFitter(), PVFitter::runFitter(), runFitterNoTxt(), reco::BeamSpot::setBeamWidthY(), reco::BeamSpot::setType(), reco::BeamSpot::sigmaZ(), mathSSE::sqrt(), reco::BeamSpot::type(), reco::BeamSpot::Unknown, writeDIPBadFit_, writeDIPTxt_, writeTxt_, reco::BeamSpot::x0(), reco::BeamSpot::y0(), and reco::BeamSpot::z0().

Referenced by AlcaBeamMonitor::dqmEndLuminosityBlock(), BeamSpotAnalyzer::endJob(), BeamSpotAnalyzer::endLuminosityBlock(), AlcaBeamSpotProducer::endLuminosityBlockProduce(), and BeamMonitorBx::FitAndFill().

◆ setFitLSRange()

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

Definition at line 112 of file BeamFitter.h.

112  {
113  fbeginLumiOfFit = ls0;
114  fendLumiOfFit = ls1;
115  }

References fbeginLumiOfFit, and fendLumiOfFit.

Referenced by BeamSpotAnalyzer::endLuminosityBlock(), and AlcaBeamSpotProducer::endLuminosityBlockProduce().

◆ SetPVInfo()

void BeamFitter::SetPVInfo ( const std::vector< float > &  v1_)
inline

Definition at line 80 of file BeamFitter.h.

80  {
81  ForDIPPV_.clear();
82  ForDIPPV_.assign(v1_.begin(), v1_.end());
83  }

References ForDIPPV_.

◆ setRefTime()

void BeamFitter::setRefTime ( time_t  t0,
time_t  t1 
)
inline

Definition at line 59 of file BeamFitter.h.

59  {
60  freftime[0] = t0;
61  freftime[1] = t1;
62  // Make sure the string representation of the time
63  // is up-to-date
64  updateBTime();
65  }

References freftime, FrontierCondition_GT_autoExpress_cfi::t0, RandomServiceHelper::t1, and updateBTime().

Referenced by BeamSpotAnalyzer::endLuminosityBlock(), and AlcaBeamSpotProducer::endLuminosityBlockProduce().

◆ setRun()

void BeamFitter::setRun ( int  run)
inline

◆ subtractFromCutFlow()

void BeamFitter::subtractFromCutFlow ( const TH1F *  toSubtract)
inline

Definition at line 94 of file BeamFitter.h.

94  {
95  h1cutFlow->Add(toSubtract, -1.0);
96  for (unsigned int i = 0; i < sizeof(countPass) / sizeof(countPass[0]); i++) {
97  countPass[i] = h1cutFlow->GetBinContent(i + 1);
98  }
99  }

References countPass, h1cutFlow, and mps_fire::i.

◆ updateBTime()

void BeamFitter::updateBTime ( )
private

class: BeamFitter.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)


Definition at line 29 of file BeamFitter.cc.

29  {
30  char ts[] = "yyyy.mn.dd hh:mm:ss zzz ";
31  char *fbeginTime = ts;
32  strftime(fbeginTime, sizeof(ts), "%Y.%m.%d %H:%M:%S GMT", gmtime(&freftime[0]));
33  sprintf(fbeginTimeOfFit, "%s", fbeginTime);
34  char *fendTime = ts;
35  strftime(fendTime, sizeof(ts), "%Y.%m.%d %H:%M:%S GMT", gmtime(&freftime[1]));
36  sprintf(fendTimeOfFit, "%s", fendTime);
37 }

References fbeginTimeOfFit, fendTimeOfFit, and freftime.

Referenced by readEvent(), and setRefTime().

◆ write2DB()

void BeamFitter::write2DB ( )

Definition at line 709 of file BeamFitter.cc.

709  {
710  BeamSpotObjects *pBSObjects = new BeamSpotObjects();
711 
712  pBSObjects->SetPosition(fbeamspot.position().X(), fbeamspot.position().Y(), fbeamspot.position().Z());
713  //std::cout << " wrote: x= " << fbeamspot.position().X() << " y= "<< fbeamspot.position().Y() << " z= " << fbeamspot.position().Z() << std::endl;
714  pBSObjects->SetSigmaZ(fbeamspot.sigmaZ());
715  pBSObjects->Setdxdz(fbeamspot.dxdz());
716  pBSObjects->Setdydz(fbeamspot.dydz());
717  //if (inputBeamWidth_ > 0 ) {
718  // std::cout << " beam width value forced to be " << inputBeamWidth_ << std::endl;
719  // pBSObjects->SetBeamWidthX(inputBeamWidth_);
720  // pBSObjects->SetBeamWidthY(inputBeamWidth_);
721  //} else {
722  // need to fix this
723  //std::cout << " using default value, 15e-4, for beam width!!!"<<std::endl;
724  pBSObjects->SetBeamWidthX(fbeamspot.BeamWidthX());
725  pBSObjects->SetBeamWidthY(fbeamspot.BeamWidthY());
726  //}
727 
728  for (int i = 0; i < 7; ++i) {
729  for (int j = 0; j < 7; ++j) {
730  pBSObjects->SetCovariance(i, j, fbeamspot.covariance(i, j));
731  }
732  }
734  if (poolDbService.isAvailable()) {
735  std::cout << "poolDBService available" << std::endl;
736  if (poolDbService->isNewTagRequest("BeamSpotObjectsRcd")) {
737  std::cout << "new tag requested" << std::endl;
738  poolDbService->createNewIOV<BeamSpotObjects>(
739  pBSObjects, poolDbService->beginOfTime(), poolDbService->endOfTime(), "BeamSpotObjectsRcd");
740  } else {
741  std::cout << "no new tag requested" << std::endl;
742  poolDbService->appendSinceTime<BeamSpotObjects>(pBSObjects, poolDbService->currentTime(), "BeamSpotObjectsRcd");
743  }
744  }
745 }

References cond::service::PoolDBOutputService::appendSinceTime(), reco::BeamSpot::BeamWidthX(), reco::BeamSpot::BeamWidthY(), cond::service::PoolDBOutputService::beginOfTime(), gather_cfg::cout, reco::BeamSpot::covariance(), cond::service::PoolDBOutputService::createNewIOV(), cond::service::PoolDBOutputService::currentTime(), reco::BeamSpot::dxdz(), reco::BeamSpot::dydz(), cond::service::PoolDBOutputService::endOfTime(), fbeamspot, mps_fire::i, edm::Service< T >::isAvailable(), cond::service::PoolDBOutputService::isNewTagRequest(), dqmiolumiharvest::j, reco::BeamSpot::position(), BeamSpotObjects::SetBeamWidthX(), BeamSpotObjects::SetBeamWidthY(), BeamSpotObjects::SetCovariance(), BeamSpotObjects::Setdxdz(), BeamSpotObjects::Setdydz(), BeamSpotObjects::SetPosition(), BeamSpotObjects::SetSigmaZ(), and reco::BeamSpot::sigmaZ().

Referenced by BeamSpotAnalyzer::endJob().

Member Data Documentation

◆ algorithm_

std::vector<reco::TrackBase::TrackAlgorithm> BeamFitter::algorithm_
private

Definition at line 153 of file BeamFitter.h.

Referenced by BeamFitter(), and readEvent().

◆ appendRunTxt_

bool BeamFitter::appendRunTxt_
private

Definition at line 134 of file BeamFitter.h.

Referenced by BeamFitter(), and dumpTxtFile().

◆ beamSpotToken_

edm::EDGetTokenT<reco::BeamSpot> BeamFitter::beamSpotToken_
private

Definition at line 137 of file BeamFitter.h.

Referenced by BeamFitter(), and readEvent().

◆ convergence_

double BeamFitter::convergence_
private

Definition at line 155 of file BeamFitter.h.

Referenced by BeamFitter(), runBeamWidthFitter(), and runFitterNoTxt().

◆ countPass

int BeamFitter::countPass[9]
private

Definition at line 233 of file BeamFitter.h.

Referenced by readEvent(), resetCutFlow(), and subtractFromCutFlow().

◆ debug_

bool BeamFitter::debug_
private

Definition at line 133 of file BeamFitter.h.

Referenced by BeamFitter(), readEvent(), and runAllFitter().

◆ falgo

bool BeamFitter::falgo
private

Definition at line 201 of file BeamFitter.h.

Referenced by BeamFitter(), and readEvent().

◆ fasciiDIP

std::ofstream BeamFitter::fasciiDIP
private

Definition at line 131 of file BeamFitter.h.

Referenced by BeamFitter().

◆ fasciiFile

std::ofstream BeamFitter::fasciiFile
private

Definition at line 130 of file BeamFitter.h.

◆ fbeamspot

reco::BeamSpot BeamFitter::fbeamspot
private

◆ fbeamWidthFit

reco::BeamSpot BeamFitter::fbeamWidthFit
private

Definition at line 127 of file BeamFitter.h.

Referenced by dumpBWTxtFile(), getBeamWidth(), and runBeamWidthFitter().

◆ fbeginLumiOfFit

int BeamFitter::fbeginLumiOfFit
private

◆ fbeginTimeOfFit

char BeamFitter::fbeginTimeOfFit[32]
private

Definition at line 211 of file BeamFitter.h.

Referenced by BeamFitter(), dumpTxtFile(), runFitterNoTxt(), runPVandTrkFitter(), and updateBTime().

◆ fbspotPVMap

std::map<int, reco::BeamSpot> BeamFitter::fbspotPVMap
private

Definition at line 128 of file BeamFitter.h.

Referenced by dumpTxtFile(), getBeamSpotMap(), and runPVandTrkFitter().

◆ fBSvector

std::vector<BSTrkParameters> BeamFitter::fBSvector
private

◆ fcharge

int BeamFitter::fcharge
private

Definition at line 176 of file BeamFitter.h.

Referenced by BeamFitter(), and readEvent().

◆ fcov

double BeamFitter::fcov[7][7]
private

Definition at line 195 of file BeamFitter.h.

Referenced by BeamFitter(), and readEvent().

◆ fd0

double BeamFitter::fd0
private

Definition at line 179 of file BeamFitter.h.

Referenced by BeamFitter(), and readEvent().

◆ fd0bs

double BeamFitter::fd0bs
private

Definition at line 180 of file BeamFitter.h.

Referenced by BeamFitter(), and readEvent().

◆ fdxdz

double BeamFitter::fdxdz
private

Definition at line 217 of file BeamFitter.h.

Referenced by BeamFitter(), and runFitterNoTxt().

◆ fdxdzErr

double BeamFitter::fdxdzErr
private

Definition at line 223 of file BeamFitter.h.

Referenced by BeamFitter(), and runFitterNoTxt().

◆ fdydz

double BeamFitter::fdydz
private

Definition at line 218 of file BeamFitter.h.

Referenced by BeamFitter(), and runFitterNoTxt().

◆ fdydzErr

double BeamFitter::fdydzErr
private

Definition at line 224 of file BeamFitter.h.

Referenced by BeamFitter(), and runFitterNoTxt().

◆ fendLumiOfFit

int BeamFitter::fendLumiOfFit
private

◆ fendTimeOfFit

char BeamFitter::fendTimeOfFit[32]
private

Definition at line 212 of file BeamFitter.h.

Referenced by BeamFitter(), dumpTxtFile(), runFitterNoTxt(), runPVandTrkFitter(), and updateBTime().

◆ feta

double BeamFitter::feta
private

Definition at line 175 of file BeamFitter.h.

Referenced by BeamFitter(), and readEvent().

◆ ffilename_changed

bool BeamFitter::ffilename_changed
private

Definition at line 160 of file BeamFitter.h.

Referenced by BeamFitter(), and dumpTxtFile().

◆ file_

TFile* BeamFitter::file_
private

Definition at line 171 of file BeamFitter.h.

Referenced by BeamFitter(), and ~BeamFitter().

◆ fitted_

bool BeamFitter::fitted_
private

Definition at line 159 of file BeamFitter.h.

Referenced by BeamFitter(), runFitterNoTxt(), and ~BeamFitter().

◆ flumi

int BeamFitter::flumi
private

Definition at line 199 of file BeamFitter.h.

Referenced by BeamFitter(), and readEvent().

◆ fnormchi2

double BeamFitter::fnormchi2
private

Definition at line 177 of file BeamFitter.h.

Referenced by BeamFitter(), and readEvent().

◆ fnPixelLayerMeas

int BeamFitter::fnPixelLayerMeas
private

Definition at line 185 of file BeamFitter.h.

Referenced by BeamFitter(), and readEvent().

◆ fnPXBLayerMeas

int BeamFitter::fnPXBLayerMeas
private

Definition at line 191 of file BeamFitter.h.

Referenced by BeamFitter(), and readEvent().

◆ fnPXFLayerMeas

int BeamFitter::fnPXFLayerMeas
private

Definition at line 192 of file BeamFitter.h.

Referenced by BeamFitter(), and readEvent().

◆ fnStripLayerMeas

int BeamFitter::fnStripLayerMeas
private

Definition at line 186 of file BeamFitter.h.

Referenced by BeamFitter(), and readEvent().

◆ fnTECLayerMeas

int BeamFitter::fnTECLayerMeas
private

Definition at line 190 of file BeamFitter.h.

Referenced by BeamFitter(), and readEvent().

◆ fnTIBLayerMeas

int BeamFitter::fnTIBLayerMeas
private

Definition at line 187 of file BeamFitter.h.

Referenced by BeamFitter(), and readEvent().

◆ fnTIDLayerMeas

int BeamFitter::fnTIDLayerMeas
private

Definition at line 188 of file BeamFitter.h.

Referenced by BeamFitter(), and readEvent().

◆ fnTOBLayerMeas

int BeamFitter::fnTOBLayerMeas
private

Definition at line 189 of file BeamFitter.h.

Referenced by BeamFitter(), and readEvent().

◆ fnTotLayerMeas

int BeamFitter::fnTotLayerMeas
private

Definition at line 184 of file BeamFitter.h.

Referenced by BeamFitter(), and readEvent().

◆ ForDIPPV_

std::vector<float> BeamFitter::ForDIPPV_
private

Definition at line 163 of file BeamFitter.h.

Referenced by dumpTxtFile(), runPVandTrkFitter(), and SetPVInfo().

◆ fphi0

double BeamFitter::fphi0
private

Definition at line 178 of file BeamFitter.h.

Referenced by BeamFitter(), and readEvent().

◆ fpt

double BeamFitter::fpt
private

Definition at line 174 of file BeamFitter.h.

Referenced by BeamFitter(), and readEvent().

◆ fPVTree_

TTree* BeamFitter::fPVTree_
private

Definition at line 236 of file BeamFitter.h.

Referenced by BeamFitter(), and ~BeamFitter().

◆ fpvValid

bool BeamFitter::fpvValid
private

Definition at line 202 of file BeamFitter.h.

Referenced by BeamFitter(), and readEvent().

◆ fpvx

double BeamFitter::fpvx
private

Definition at line 203 of file BeamFitter.h.

Referenced by BeamFitter(), and readEvent().

◆ fpvy

double BeamFitter::fpvy
private

Definition at line 203 of file BeamFitter.h.

Referenced by BeamFitter(), and readEvent().

◆ fpvz

double BeamFitter::fpvz
private

Definition at line 203 of file BeamFitter.h.

Referenced by BeamFitter(), and readEvent().

◆ fquality

bool BeamFitter::fquality
private

Definition at line 200 of file BeamFitter.h.

Referenced by BeamFitter(), and readEvent().

◆ freftime

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

◆ frun

int BeamFitter::frun
private

Definition at line 198 of file BeamFitter.h.

Referenced by BeamFitter(), dumpTxtFile(), getRunNumber(), readEvent(), and setRun().

◆ frunFit

int BeamFitter::frunFit
private

Definition at line 208 of file BeamFitter.h.

Referenced by BeamFitter(), and readEvent().

◆ fsigmad0

double BeamFitter::fsigmad0
private

Definition at line 181 of file BeamFitter.h.

Referenced by BeamFitter(), and readEvent().

◆ fsigmaZ

double BeamFitter::fsigmaZ
private

Definition at line 216 of file BeamFitter.h.

Referenced by BeamFitter(), and runFitterNoTxt().

◆ fsigmaz0

double BeamFitter::fsigmaz0
private

Definition at line 183 of file BeamFitter.h.

Referenced by BeamFitter(), and readEvent().

◆ fsigmaZErr

double BeamFitter::fsigmaZErr
private

Definition at line 222 of file BeamFitter.h.

Referenced by BeamFitter(), and runFitterNoTxt().

◆ ftheta

double BeamFitter::ftheta
private

Definition at line 173 of file BeamFitter.h.

Referenced by BeamFitter(), and readEvent().

◆ ftotal_tracks

int BeamFitter::ftotal_tracks
private

◆ ftree_

TTree* BeamFitter::ftree_
private

Definition at line 172 of file BeamFitter.h.

Referenced by BeamFitter(), readEvent(), and ~BeamFitter().

◆ ftreeFit_

TTree* BeamFitter::ftreeFit_
private

Definition at line 207 of file BeamFitter.h.

Referenced by BeamFitter(), runFitterNoTxt(), and ~BeamFitter().

◆ fvx

double BeamFitter::fvx
private

Definition at line 196 of file BeamFitter.h.

Referenced by BeamFitter(), and readEvent().

◆ fvy

double BeamFitter::fvy
private

Definition at line 197 of file BeamFitter.h.

Referenced by BeamFitter(), and readEvent().

◆ fwidthX

double BeamFitter::fwidthX
private

Definition at line 225 of file BeamFitter.h.

Referenced by BeamFitter(), and runFitterNoTxt().

◆ fwidthXErr

double BeamFitter::fwidthXErr
private

Definition at line 227 of file BeamFitter.h.

Referenced by BeamFitter(), and runFitterNoTxt().

◆ fwidthY

double BeamFitter::fwidthY
private

Definition at line 226 of file BeamFitter.h.

Referenced by BeamFitter(), and runFitterNoTxt().

◆ fwidthYErr

double BeamFitter::fwidthYErr
private

Definition at line 228 of file BeamFitter.h.

Referenced by BeamFitter(), and runFitterNoTxt().

◆ fx

double BeamFitter::fx
private

Definition at line 213 of file BeamFitter.h.

Referenced by BeamFitter(), and runFitterNoTxt().

◆ fxErr

double BeamFitter::fxErr
private

Definition at line 219 of file BeamFitter.h.

Referenced by BeamFitter(), and runFitterNoTxt().

◆ fy

double BeamFitter::fy
private

Definition at line 214 of file BeamFitter.h.

Referenced by BeamFitter(), and runFitterNoTxt().

◆ fyErr

double BeamFitter::fyErr
private

Definition at line 220 of file BeamFitter.h.

Referenced by BeamFitter(), and runFitterNoTxt().

◆ fz

double BeamFitter::fz
private

Definition at line 215 of file BeamFitter.h.

Referenced by BeamFitter(), and runFitterNoTxt().

◆ fz0

double BeamFitter::fz0
private

Definition at line 182 of file BeamFitter.h.

Referenced by BeamFitter(), and readEvent().

◆ fzErr

double BeamFitter::fzErr
private

Definition at line 221 of file BeamFitter.h.

Referenced by BeamFitter(), and runFitterNoTxt().

◆ h1cutFlow

TH1F* BeamFitter::h1cutFlow
private

◆ h1ntrks

TH1F* BeamFitter::h1ntrks
private

Definition at line 230 of file BeamFitter.h.

Referenced by BeamFitter(), readEvent(), and ~BeamFitter().

◆ h1vz_event

TH1F* BeamFitter::h1vz_event
private

Definition at line 231 of file BeamFitter.h.

Referenced by BeamFitter(), readEvent(), and ~BeamFitter().

◆ h1z

TH1F* BeamFitter::h1z
private

Definition at line 166 of file BeamFitter.h.

Referenced by runFitterNoTxt(), and ~BeamFitter().

◆ inputBeamWidth_

double BeamFitter::inputBeamWidth_
private

Definition at line 154 of file BeamFitter.h.

Referenced by BeamFitter(), runBeamWidthFitter(), runFitterNoTxt(), and runPVandTrkFitter().

◆ isMuon_

bool BeamFitter::isMuon_
private

Definition at line 158 of file BeamFitter.h.

Referenced by BeamFitter(), and readEvent().

◆ min_Ntrks_

int BeamFitter::min_Ntrks_
private

Definition at line 157 of file BeamFitter.h.

Referenced by BeamFitter(), runBeamWidthFitter(), and runFitterNoTxt().

◆ MyPVFitter

PVFitter* BeamFitter::MyPVFitter
private

◆ outputDIPTxt_

std::string BeamFitter::outputDIPTxt_
private

Definition at line 142 of file BeamFitter.h.

Referenced by BeamFitter(), runFitter(), and runPVandTrkFitter().

◆ outputfilename_

std::string BeamFitter::outputfilename_
private

Definition at line 170 of file BeamFitter.h.

Referenced by BeamFitter().

◆ outputTxt_

std::string BeamFitter::outputTxt_
private

◆ quality_

std::vector<reco::TrackBase::TrackQuality> BeamFitter::quality_
private

Definition at line 152 of file BeamFitter.h.

Referenced by BeamFitter(), and readEvent().

◆ saveBeamFit_

bool BeamFitter::saveBeamFit_
private

Definition at line 168 of file BeamFitter.h.

Referenced by BeamFitter(), runFitterNoTxt(), and ~BeamFitter().

◆ saveNtuple_

bool BeamFitter::saveNtuple_
private

Definition at line 167 of file BeamFitter.h.

Referenced by BeamFitter(), readEvent(), and ~BeamFitter().

◆ savePVVertices_

bool BeamFitter::savePVVertices_
private

Definition at line 169 of file BeamFitter.h.

Referenced by BeamFitter(), and ~BeamFitter().

◆ tracksToken_

edm::EDGetTokenT<reco::TrackCollection> BeamFitter::tracksToken_
private

Definition at line 135 of file BeamFitter.h.

Referenced by BeamFitter(), and readEvent().

◆ trk_Algorithm_

std::vector<std::string> BeamFitter::trk_Algorithm_
private

Definition at line 150 of file BeamFitter.h.

Referenced by BeamFitter().

◆ trk_MaxEta_

double BeamFitter::trk_MaxEta_
private

Definition at line 145 of file BeamFitter.h.

Referenced by BeamFitter(), and readEvent().

◆ trk_MaxIP_

double BeamFitter::trk_MaxIP_
private

Definition at line 146 of file BeamFitter.h.

Referenced by BeamFitter(), and readEvent().

◆ trk_MaxNormChi2_

double BeamFitter::trk_MaxNormChi2_
private

Definition at line 149 of file BeamFitter.h.

Referenced by BeamFitter(), and readEvent().

◆ trk_MaxZ_

double BeamFitter::trk_MaxZ_
private

Definition at line 144 of file BeamFitter.h.

Referenced by BeamFitter(), readEvent(), runBeamWidthFitter(), and runFitterNoTxt().

◆ trk_MinNPixLayers_

int BeamFitter::trk_MinNPixLayers_
private

Definition at line 148 of file BeamFitter.h.

Referenced by BeamFitter(), and readEvent().

◆ trk_MinNTotLayers_

int BeamFitter::trk_MinNTotLayers_
private

Definition at line 147 of file BeamFitter.h.

Referenced by BeamFitter(), and readEvent().

◆ trk_MinpT_

double BeamFitter::trk_MinpT_
private

Definition at line 143 of file BeamFitter.h.

Referenced by BeamFitter(), and readEvent().

◆ trk_Quality_

std::vector<std::string> BeamFitter::trk_Quality_
private

Definition at line 151 of file BeamFitter.h.

Referenced by BeamFitter().

◆ vertexToken_

edm::EDGetTokenT<edm::View<reco::Vertex> > BeamFitter::vertexToken_
private

Definition at line 136 of file BeamFitter.h.

Referenced by BeamFitter(), and readEvent().

◆ writeDIPBadFit_

bool BeamFitter::writeDIPBadFit_
private

Definition at line 140 of file BeamFitter.h.

Referenced by BeamFitter(), runFitter(), and runPVandTrkFitter().

◆ writeDIPTxt_

bool BeamFitter::writeDIPTxt_
private

Definition at line 139 of file BeamFitter.h.

Referenced by BeamFitter(), runFitter(), and runPVandTrkFitter().

◆ writeTxt_

bool BeamFitter::writeTxt_
private
BeamFitter::beamSpotToken_
edm::EDGetTokenT< reco::BeamSpot > beamSpotToken_
Definition: BeamFitter.h:137
BeamFitter::fd0bs
double fd0bs
Definition: BeamFitter.h:180
PVFitter::resizepvStore
void resizepvStore(unsigned int rmSize)
Definition: PVFitter.h:109
BeamFitter::frunFit
int frunFit
Definition: BeamFitter.h:208
BeamFitter::fnTotLayerMeas
int fnTotLayerMeas
Definition: BeamFitter.h:184
beamspot::BeamSpotContainer::endTimeOfFit
char endTimeOfFit[32]
Definition: BeamSpotWrite2Txt.h:14
BSFitter::Fit_d0phi
reco::BeamSpot Fit_d0phi()
Definition: BSFitter.cc:410
BeamFitter::resetRefTime
void resetRefTime()
Definition: BeamFitter.h:58
PDWG_EXOHSCP_cff.tracks
tracks
Definition: PDWG_EXOHSCP_cff.py:28
BeamFitter::fwidthY
double fwidthY
Definition: BeamFitter.h:226
BeamFitter::trk_MaxIP_
double trk_MaxIP_
Definition: BeamFitter.h:146
mps_fire.i
i
Definition: mps_fire.py:355
reco::BeamSpot::setBeamWidthY
void setBeamWidthY(double v)
Definition: BeamSpot.h:105
BeamFitter::quality_
std::vector< reco::TrackBase::TrackQuality > quality_
Definition: BeamFitter.h:152
reco::BeamSpot::emittanceX
double emittanceX() const
additional information
Definition: BeamSpot.h:129
BeamFitter::fz0
double fz0
Definition: BeamFitter.h:182
dqmMemoryStats.float
float
Definition: dqmMemoryStats.py:127
BeamFitter::updateBTime
void updateBTime()
Definition: BeamFitter.cc:29
reco::BeamSpot::BeamWidthXError
double BeamWidthXError() const
error on beam width X, assume error in X = Y
Definition: BeamSpot.h:99
reco::HitPattern::pixelEndcapLayersWithMeasurement
int pixelEndcapLayersWithMeasurement() const
Definition: HitPattern.cc:566
edm::Handle::product
T const * product() const
Definition: Handle.h:70
BeamFitter::fyErr
double fyErr
Definition: BeamFitter.h:220
BeamFitter::trk_MaxEta_
double trk_MaxEta_
Definition: BeamFitter.h:145
makeMuonMisalignmentScenario.matrix
list matrix
Definition: makeMuonMisalignmentScenario.py:141
cond::service::PoolDBOutputService::beginOfTime
cond::Time_t beginOfTime() const
Definition: PoolDBOutputService.cc:177
reco::HitPattern::stripTOBLayersWithMeasurement
int stripTOBLayersWithMeasurement() const
Definition: HitPattern.cc:597
filterCSVwithJSON.copy
copy
Definition: filterCSVwithJSON.py:36
BeamFitter::ftotal_tracks
int ftotal_tracks
Definition: BeamFitter.h:156
BeamFitter::vertexToken_
edm::EDGetTokenT< edm::View< reco::Vertex > > vertexToken_
Definition: BeamFitter.h:136
reco::BeamSpot::z0
double z0() const
z coordinate
Definition: BeamSpot.h:65
PVFitter::resetAll
void resetAll()
Definition: PVFitter.h:80
BeamFitter::fzErr
double fzErr
Definition: BeamFitter.h:221
BeamFitter::feta
double feta
Definition: BeamFitter.h:175
BeamFitter::fsigmaZ
double fsigmaZ
Definition: BeamFitter.h:216
gather_cfg.cout
cout
Definition: gather_cfg.py:144
BeamFitter::writeTxt_
bool writeTxt_
Definition: BeamFitter.h:138
edm::LogInfo
Definition: MessageLogger.h:254
l1GtPatternGenerator_cfi.bx
bx
Definition: l1GtPatternGenerator_cfi.py:18
BeamFitter::fasciiDIP
std::ofstream fasciiDIP
Definition: BeamFitter.h:131
cond::service::PoolDBOutputService::appendSinceTime
void appendSinceTime(const T *payloadObj, cond::Time_t sinceTime, const std::string &recordName)
Definition: PoolDBOutputService.h:132
BeamFitter::saveBeamFit_
bool saveBeamFit_
Definition: BeamFitter.h:168
BeamFitter::fpvx
double fpvx
Definition: BeamFitter.h:203
reco::BeamSpot::covariance
double covariance(int i, int j) const
(i,j)-th element of error matrix
Definition: BeamSpot.h:108
BeamFitter::fBSvector
std::vector< BSTrkParameters > fBSvector
Definition: BeamFitter.h:125
BeamFitter::fpt
double fpt
Definition: BeamFitter.h:174
BeamSpotObjects::SetBeamWidthY
void SetBeamWidthY(double val)
set average transverse beam width Y
Definition: BeamSpotObjects.h:50
BeamFitter::frun
int frun
Definition: BeamFitter.h:198
beamspot::BeamSpotContainer::reftime
std::time_t reftime[2]
Definition: BeamSpotWrite2Txt.h:17
BeamFitter::fxErr
double fxErr
Definition: BeamFitter.h:219
BeamFitter::h1vz_event
TH1F * h1vz_event
Definition: BeamFitter.h:231
BeamFitter::min_Ntrks_
int min_Ntrks_
Definition: BeamFitter.h:157
BeamFitter::falgo
bool falgo
Definition: BeamFitter.h:201
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
BeamFitter::fbeamWidthFit
reco::BeamSpot fbeamWidthFit
Definition: BeamFitter.h:127
BeamFitter::fdydz
double fdydz
Definition: BeamFitter.h:218
BeamFitter::trk_MinNTotLayers_
int trk_MinNTotLayers_
Definition: BeamFitter.h:147
MillePedeFileConverter_cfg.fileName
fileName
Definition: MillePedeFileConverter_cfg.py:32
reco::BeamSpot::dxdz
double dxdz() const
dxdz slope
Definition: BeamSpot.h:78
BSFitter::SetMaximumZ
void SetMaximumZ(double z)
Definition: BSFitter.h:55
spr::find
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
reco::BeamSpot::dxdzError
double dxdzError() const
error on dxdz
Definition: BeamSpot.h:94
BeamFitter::fphi0
double fphi0
Definition: BeamFitter.h:178
BeamFitter::outputfilename_
std::string outputfilename_
Definition: BeamFitter.h:170
edm::Handle< reco::TrackCollection >
edm::Service::isAvailable
bool isAvailable() const
Definition: Service.h:40
BeamFitter::fbeginLumiOfFit
int fbeginLumiOfFit
Definition: BeamFitter.h:209
beamspot::BeamSpotContainer::beginLumiOfFit
int beginLumiOfFit
Definition: BeamSpotWrite2Txt.h:15
BeamFitter::fbeginTimeOfFit
char fbeginTimeOfFit[32]
Definition: BeamFitter.h:211
BeamFitter::flumi
int flumi
Definition: BeamFitter.h:199
reco::HitPattern::pixelLayersWithMeasurement
int pixelLayersWithMeasurement() const
Definition: HitPattern.cc:492
BeamSpotObjects::SetSigmaZ
void SetSigmaZ(double val)
set sigma Z, RMS bunch length
Definition: BeamSpotObjects.h:42
BeamFitter::ftree_
TTree * ftree_
Definition: BeamFitter.h:172
PVFitter::getNPVsperBX
const std::map< int, int > & getNPVsperBX()
Definition: PVFitter.h:119
BeamFitter::countPass
int countPass[9]
Definition: BeamFitter.h:233
reco::BeamSpot::y0Error
double y0Error() const
error on y
Definition: BeamSpot.h:88
reco::HitPattern::pixelBarrelLayersWithMeasurement
int pixelBarrelLayersWithMeasurement() const
Definition: HitPattern.cc:555
PVFitter::getpvStore
std::vector< BeamSpotFitPVData > getpvStore()
Definition: PVFitter.h:62
reco::BeamSpot::sigmaZ
double sigmaZ() const
sigma z
Definition: BeamSpot.h:76
BeamFitter::MyPVFitter
PVFitter * MyPVFitter
Definition: BeamFitter.h:235
BSFitter::SetInputBeamWidth
void SetInputBeamWidth(double val)
Definition: BSFitter.h:60
beamspot::BeamSpotContainer::beamspot
reco::BeamSpot beamspot
Definition: BeamSpotWrite2Txt.h:11
reco::HitPattern
Definition: HitPattern.h:147
BeamFitter::outputTxt_
std::string outputTxt_
Definition: BeamFitter.h:141
RandomServiceHelper.t1
t1
Definition: RandomServiceHelper.py:256
reco::HitPattern::stripLayersWithMeasurement
int stripLayersWithMeasurement() const
Definition: HitPattern.h:974
BeamFitter::file_
TFile * file_
Definition: BeamFitter.h:171
BSFitter::Fit
reco::BeamSpot Fit()
Definition: BSFitter.cc:102
beamspot::BeamSpotContainer::endLumiOfFit
int endLumiOfFit
Definition: BeamSpotWrite2Txt.h:16
BeamFitter::dumpBWTxtFile
void dumpBWTxtFile(std::string &)
Definition: BeamFitter.cc:619
beamspot::dumpBeamSpotTxt
void dumpBeamSpotTxt(std::ofstream &outFile, BeamSpotContainer const &bsContainer)
Definition: BeamSpotWrite2Txt.h:20
reco::HitPattern::trackerLayersWithMeasurement
int trackerLayersWithMeasurement() const
Definition: HitPattern.cc:513
BeamFitter::saveNtuple_
bool saveNtuple_
Definition: BeamFitter.h:167
BeamFitter::convergence_
double convergence_
Definition: BeamFitter.h:155
reco::BeamSpot::dydzError
double dydzError() const
error on dydz
Definition: BeamSpot.h:96
FrontierCondition_GT_autoExpress_cfi.t0
t0
Definition: FrontierCondition_GT_autoExpress_cfi.py:148
cond::service::PoolDBOutputService::createNewIOV
void createNewIOV(const T *firstPayloadObj, cond::Time_t firstSinceTime, cond::Time_t, const std::string &recordName)
Definition: PoolDBOutputService.h:107
BeamFitter::fbeamspot
reco::BeamSpot fbeamspot
Definition: BeamFitter.h:126
BeamFitter::ffilename_changed
bool ffilename_changed
Definition: BeamFitter.h:160
reco::BeamSpot::type
BeamType type() const
return beam type
Definition: BeamSpot.h:122
L1TEGammaOffline_cfi.PVCollection
PVCollection
Definition: L1TEGammaOffline_cfi.py:34
BeamFitter::fd0
double fd0
Definition: BeamFitter.h:179
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
PVFitter::readEvent
void readEvent(const edm::Event &iEvent)
Definition: PVFitter.cc:97
PVFitter::getBeamSpotMap
std::map< int, reco::BeamSpot > getBeamSpotMap()
Definition: PVFitter.h:92
reco::BeamSpot
Definition: BeamSpot.h:21
BeamFitter::fcharge
int fcharge
Definition: BeamFitter.h:176
BeamFitter::fquality
bool fquality
Definition: BeamFitter.h:200
BeamFitter::fvy
double fvy
Definition: BeamFitter.h:197
BeamFitter::h1z
TH1F * h1z
Definition: BeamFitter.h:166
BeamFitter::trk_Quality_
std::vector< std::string > trk_Quality_
Definition: BeamFitter.h:151
BeamFitter::savePVVertices_
bool savePVVertices_
Definition: BeamFitter.h:169
edm::ConsumesCollector::consumes
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
Definition: ConsumesCollector.h:49
reco::BeamSpot::Fake
Definition: BeamSpot.h:24
PVFitter::getWidthXerr
double getWidthXerr()
Definition: PVFitter.h:58
dqmdumpme.k
k
Definition: dqmdumpme.py:60
reco::BeamSpot::position
const Point & position() const
position
Definition: BeamSpot.h:59
BeamFitter::fnPXBLayerMeas
int fnPXBLayerMeas
Definition: BeamFitter.h:191
BSFitter::Fit_ited0phi
reco::BeamSpot Fit_ited0phi()
Definition: BSFitter.cc:360
BeamFitter::outputDIPTxt_
std::string outputDIPTxt_
Definition: BeamFitter.h:142
BeamSpotObjects::SetPosition
void SetPosition(double x, double y, double z)
set XYZ position
Definition: BeamSpotObjects.h:36
L1TdeCSCTF_cfi.outFile
outFile
Definition: L1TdeCSCTF_cfi.py:5
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
reco::BeamSpot::Unknown
Definition: BeamSpot.h:24
BeamFitter::fx
double fx
Definition: BeamFitter.h:213
edm::LogWarning
Definition: MessageLogger.h:141
reco::HitPattern::stripTIBLayersWithMeasurement
int stripTIBLayersWithMeasurement() const
Definition: HitPattern.cc:577
BeamFitter::appendRunTxt_
bool appendRunTxt_
Definition: BeamFitter.h:134
AlcaBeamMonitor_cfi.PVFitter
PVFitter
Definition: AlcaBeamMonitor_cfi.py:39
BeamFitter::fitted_
bool fitted_
Definition: BeamFitter.h:159
BeamFitter::fnStripLayerMeas
int fnStripLayerMeas
Definition: BeamFitter.h:186
edm::View
Definition: CaloClusterFwd.h:14
BeamFitter::writeDIPTxt_
bool writeDIPTxt_
Definition: BeamFitter.h:139
HLT_2018_cff.InputTag
InputTag
Definition: HLT_2018_cff.py:79016
BeamFitter::h1ntrks
TH1F * h1ntrks
Definition: BeamFitter.h:230
edm::ParameterSet
Definition: ParameterSet.h:36
BeamFitter::fdydzErr
double fdydzErr
Definition: BeamFitter.h:224
PVFitter::getNPVs
int getNPVs()
Definition: PVFitter.h:117
reco::BeamSpot::betaStar
double betaStar() const
Definition: BeamSpot.h:131
BeamFitter::fPVTree_
TTree * fPVTree_
Definition: BeamFitter.h:236
BSFitter::SetConvergence
void SetConvergence(double val)
Definition: BSFitter.h:56
BeamSpotObjects::SetCovariance
void SetCovariance(int i, int j, double val)
set i,j element of the full covariance matrix 7x7
Definition: BeamSpotObjects.h:56
BeamFitter::fpvy
double fpvy
Definition: BeamFitter.h:203
BeamFitter::trk_MaxNormChi2_
double trk_MaxNormChi2_
Definition: BeamFitter.h:149
mps_setup.append
append
Definition: mps_setup.py:85
BeamFitter::fsigmaZErr
double fsigmaZErr
Definition: BeamFitter.h:222
BeamFitter::fwidthX
double fwidthX
Definition: BeamFitter.h:225
BeamFitter::fz
double fz
Definition: BeamFitter.h:215
BeamFitter::fdxdz
double fdxdz
Definition: BeamFitter.h:217
BeamFitter::freftime
std::time_t freftime[2]
Definition: BeamFitter.h:204
edm::Service< cond::service::PoolDBOutputService >
createfilelist.int
int
Definition: createfilelist.py:10
MetAnalyzer.pv
def pv(vc)
Definition: MetAnalyzer.py:7
iEvent
int iEvent
Definition: GenABIO.cc:224
BeamFitter::algorithm_
std::vector< reco::TrackBase::TrackAlgorithm > algorithm_
Definition: BeamFitter.h:153
PVFitter::runBXFitter
bool runBXFitter()
Definition: PVFitter.cc:188
reco::BeamSpot::z0Error
double z0Error() const
error on z
Definition: BeamSpot.h:90
BSFitter::Setd0Cut_d0phi
void Setd0Cut_d0phi(double d0cut)
Definition: BSFitter.cc:576
BeamFitter::runFitterNoTxt
bool runFitterNoTxt()
Definition: BeamFitter.cc:509
BeamSpotObjects
Definition: BeamSpotObjects.h:20
BeamFitter::dumpTxtFile
void dumpTxtFile(std::string &, bool)
Definition: BeamFitter.cc:631
reco::BeamSpot::BeamWidthYError
double BeamWidthYError() const
error on beam width Y, assume error in X = Y
Definition: BeamSpot.h:101
beamspot::BeamSpotContainer::run
int run
Definition: BeamSpotWrite2Txt.h:12
reco::BeamSpot::CovarianceMatrix
math::Error< dimension >::type CovarianceMatrix
Definition: BeamSpot.h:29
reco::BeamSpot::BeamWidthX
double BeamWidthX() const
beam width X
Definition: BeamSpot.h:82
BSTrkParameters
Definition: BSTrkParameters.h:15
BSFitter::SetMinimumNTrks
void SetMinimumNTrks(int n)
Definition: BSFitter.h:57
BeamSpotObjects::Setdxdz
void Setdxdz(double val)
set dxdz slope, crossing angle
Definition: BeamSpotObjects.h:44
BeamFitter::fnTIDLayerMeas
int fnTIDLayerMeas
Definition: BeamFitter.h:188
BeamFitter::resetCutFlow
void resetCutFlow()
Definition: BeamFitter.h:101
BeamFitter::tracksToken_
edm::EDGetTokenT< reco::TrackCollection > tracksToken_
Definition: BeamFitter.h:135
BeamFitter::trk_Algorithm_
std::vector< std::string > trk_Algorithm_
Definition: BeamFitter.h:150
BeamFitter::fsigmad0
double fsigmad0
Definition: BeamFitter.h:181
BeamFitter::fnTIBLayerMeas
int fnTIBLayerMeas
Definition: BeamFitter.h:187
BeamFitter::fnormchi2
double fnormchi2
Definition: BeamFitter.h:177
reco::BeamSpot::dydz
double dydz() const
dydz slope
Definition: BeamSpot.h:80
cond::service::PoolDBOutputService::endOfTime
cond::Time_t endOfTime() const
Definition: PoolDBOutputService.cc:175
BeamFitter::fy
double fy
Definition: BeamFitter.h:214
reco::TrackBase::qualityByName
static TrackQuality qualityByName(const std::string &name)
Definition: TrackBase.cc:126
BeamFitter::h1cutFlow
TH1F * h1cutFlow
Definition: BeamFitter.h:232
BeamFitter::debug_
bool debug_
Definition: BeamFitter.h:133
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
reco::BeamSpot::x0
double x0() const
x coordinate
Definition: BeamSpot.h:61
BeamFitter::ftheta
double ftheta
Definition: BeamFitter.h:173
BeamFitter::fpvValid
bool fpvValid
Definition: BeamFitter.h:202
PVFitter::IsFitPerBunchCrossing
bool IsFitPerBunchCrossing()
Definition: PVFitter.h:93
BeamFitter::fnPixelLayerMeas
int fnPixelLayerMeas
Definition: BeamFitter.h:185
BeamFitter::isMuon_
bool isMuon_
Definition: BeamFitter.h:158
BeamFitter::fnTOBLayerMeas
int fnTOBLayerMeas
Definition: BeamFitter.h:189
reco::HitPattern::stripTIDLayersWithMeasurement
int stripTIDLayersWithMeasurement() const
Definition: HitPattern.cc:587
writedatasetfile.run
run
Definition: writedatasetfile.py:27
BeamFitter::fvx
double fvx
Definition: BeamFitter.h:196
BeamFitter::fcov
double fcov[7][7]
Definition: BeamFitter.h:195
BeamFitter::fsigmaz0
double fsigmaz0
Definition: BeamFitter.h:183
BeamFitter::trk_MaxZ_
double trk_MaxZ_
Definition: BeamFitter.h:144
BeamFitter::fendTimeOfFit
char fendTimeOfFit[32]
Definition: BeamFitter.h:212
reco::BeamSpot::x0Error
double x0Error() const
error on x
Definition: BeamSpot.h:86
reco::BeamSpot::sigmaZ0Error
double sigmaZ0Error() const
error on sigma z
Definition: BeamSpot.h:92
BeamFitter::trk_MinNPixLayers_
int trk_MinNPixLayers_
Definition: BeamFitter.h:148
BeamFitter::fnPXFLayerMeas
int fnPXFLayerMeas
Definition: BeamFitter.h:192
BeamSpotObjects::SetBeamWidthX
void SetBeamWidthX(double val)
set average transverse beam width X
Definition: BeamSpotObjects.h:48
BeamFitter::fnTECLayerMeas
int fnTECLayerMeas
Definition: BeamFitter.h:190
BSFitter::SetFitVariable
void SetFitVariable(std::string name)
Definition: BSFitter.h:41
BeamFitter::ForDIPPV_
std::vector< float > ForDIPPV_
Definition: BeamFitter.h:163
cond::service::PoolDBOutputService::isNewTagRequest
bool isNewTagRequest(const std::string &recordName)
Definition: PoolDBOutputService.cc:90
BeamFitter::fwidthYErr
double fwidthYErr
Definition: BeamFitter.h:228
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
beamspot::BeamSpotContainer::beginTimeOfFit
char beginTimeOfFit[32]
Definition: BeamSpotWrite2Txt.h:13
HLT_2018_cff.track
track
Definition: HLT_2018_cff.py:10352
funct::pow
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:30
beamspot::BeamSpotContainer
Definition: BeamSpotWrite2Txt.h:10
BeamFitter::fdxdzErr
double fdxdzErr
Definition: BeamFitter.h:223
BSFitter
Definition: BSFitter.h:30
BSFitter::SetFitType
void SetFitType(std::string type)
Definition: BSFitter.h:39
reco::TrackBase::algoByName
static TrackAlgorithm algoByName(const std::string &name)
Definition: TrackBase.cc:137
reco::BeamSpot::Point
math::XYZPoint Point
point in the space
Definition: BeamSpot.h:27
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
reco::HitPattern::stripTECLayersWithMeasurement
int stripTECLayersWithMeasurement() const
Definition: HitPattern.cc:607
PVFitter::runFitter
bool runFitter()
Definition: PVFitter.cc:307
reco::BeamSpot::setType
void setType(BeamType type)
set beam type
Definition: BeamSpot.h:124
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
BeamFitter::trk_MinpT_
double trk_MinpT_
Definition: BeamFitter.h:143
reco::BeamSpot::y0
double y0() const
y coordinate
Definition: BeamSpot.h:63
BeamFitter::fbspotPVMap
std::map< int, reco::BeamSpot > fbspotPVMap
Definition: BeamFitter.h:128
BeamSpotObjects::Setdydz
void Setdydz(double val)
set dydz slope, crossing angle in XZ
Definition: BeamSpotObjects.h:46
reco::BeamSpot::emittanceY
double emittanceY() const
Definition: BeamSpot.h:130
BeamFitter::fendLumiOfFit
int fendLumiOfFit
Definition: BeamFitter.h:210
BeamFitter::inputBeamWidth_
double inputBeamWidth_
Definition: BeamFitter.h:154
edm::InputTag
Definition: InputTag.h:15
reco::TrackCollection
std::vector< Track > TrackCollection
collection of Tracks
Definition: TrackFwd.h:14
cond::service::PoolDBOutputService::currentTime
cond::Time_t currentTime() const
Definition: PoolDBOutputService.cc:179
PVFitter::getBeamSpot
reco::BeamSpot getBeamSpot()
Definition: PVFitter.h:91
BeamFitter::fwidthXErr
double fwidthXErr
Definition: BeamFitter.h:227
reco::BeamSpot::BeamWidthY
double BeamWidthY() const
beam width Y
Definition: BeamSpot.h:84
edm::TimeValue_t
unsigned long long TimeValue_t
Definition: Timestamp.h:28
BeamFitter::fpvz
double fpvz
Definition: BeamFitter.h:203
BSFitter::GetVzHisto
TH1F * GetVzHisto()
Definition: BSFitter.h:87
BeamFitter::ftreeFit_
TTree * ftreeFit_
Definition: BeamFitter.h:207
BeamFitter::writeDIPBadFit_
bool writeDIPBadFit_
Definition: BeamFitter.h:140
findQualityFiles.size
size
Write out results.
Definition: findQualityFiles.py:443
PVFitter::setTree
void setTree(TTree *tree)
Definition: PVFitter.cc:183