Skip to content

Commit

Permalink
Merge pull request #10425 from sushilchauhan/vtxhisto_dipLHC_cmssw_74…
Browse files Browse the repository at this point in the history
…7patch2

new vtx hist and updated dip file for LHC pub
  • Loading branch information
cmsbuild committed Aug 1, 2015
2 parents 12a1710 + 9b795f7 commit 90f7bf8
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 5 deletions.
19 changes: 17 additions & 2 deletions DQM/BeamMonitor/plugins/BeamMonitor.cc
Expand Up @@ -151,9 +151,19 @@ void BeamMonitor::beginJob() {
// create and cd into new folder
dbe_->setCurrentFolder(monitorName_+"Fit");

h_nTrk_lumi=dbe_->book1D("nTrk_lumi","Num. of selected tracks vs lumi",20,0.5,20.5);
h_nTrk_lumi=dbe_->book1D("nTrk_lumi","Num. of selected tracks vs lumi (Fit)",20,0.5,20.5);
h_nTrk_lumi->setAxisTitle("Lumisection",1);
h_nTrk_lumi->setAxisTitle("Num of Tracks",2);
h_nTrk_lumi->setAxisTitle("Num of Tracks for Fit",2);

//store vtx vs lumi for monitoring why fits fail
h_nVtx_lumi=dbe_->book1D("nVtx_lumi","Num. of selected Vtx vs lumi (Fit)",20,0.5,20.5);
h_nVtx_lumi->setAxisTitle("Lumisection",1);
h_nVtx_lumi->setAxisTitle("Num of Vtx for Fit",2);

h_nVtx_lumi_all=dbe_->book1D("nVtx_lumi_all","Num. of selected Vtx vs lumi (Fit) all",20,0.5,20.5);
h_nVtx_lumi_all->getTH1()->SetCanExtend(TH1::kAllAxes);
h_nVtx_lumi_all->setAxisTitle("Lumisection",1);
h_nVtx_lumi_all->setAxisTitle("Num of Vtx for Fit",2);

h_d0_phi0 = dbe_->bookProfile("d0_phi0","d_{0} vs. #phi_{0} (Selected Tracks)",phiBin,phiMin,phiMax,dxBin,dxMin,dxMax,"");
h_d0_phi0->setAxisTitle("#phi_{0} (rad)",1);
Expand Down Expand Up @@ -811,6 +821,7 @@ void BeamMonitor::FitAndFill(const LuminosityBlock& lumiSeg,int &lastlumi,int &n
hs["sigmaX0_lumi"]->ShiftFillLast( 0., 0., fitNLumi_ );
hs["sigmaY0_lumi"]->ShiftFillLast( 0., 0., fitNLumi_ );
hs["sigmaZ0_lumi"]->ShiftFillLast( 0., 0., fitNLumi_ );
h_nVtx_lumi->ShiftFillLast( 0., 0., fitNLumi_ );
}
for (int ig = 0; ig < LSgap_pv; ig++) {
hs["PVx_lumi"]->ShiftFillLast( 0., 0., fitPVNLumi_ );
Expand Down Expand Up @@ -1085,6 +1096,10 @@ void BeamMonitor::FitAndFill(const LuminosityBlock& lumiSeg,int &lastlumi,int &n
edm::LogInfo("BeamMonitor") << "FitAndFill:: [DebugTime] refBStime[1] = " << refBStime[1]
<< "; address = " << &refBStime[1] << std::endl;

//Fill for all LS even if fit fails
h_nVtx_lumi->ShiftFillLast( (theBeamFitter->getPVvectorSize()), 0., fitNLumi_ );
h_nVtx_lumi_all->setBinContent(currentlumi,(theBeamFitter->getPVvectorSize()));

if (countFitting) {
nFits_++;
std::pair<int,int> fitLS = theBeamFitter->getFitLSRange();
Expand Down
2 changes: 2 additions & 0 deletions DQM/BeamMonitor/plugins/BeamMonitor.h
Expand Up @@ -117,6 +117,8 @@ class BeamMonitor : public edm::EDAnalyzer {

// MonitorElements:
MonitorElement * h_nTrk_lumi;
MonitorElement * h_nVtx_lumi;
MonitorElement * h_nVtx_lumi_all;
MonitorElement * h_d0_phi0;
MonitorElement * h_trk_z0;
MonitorElement * h_vx_vy;
Expand Down
6 changes: 3 additions & 3 deletions DQM/BeamMonitor/test/dip/BeamSpotDipServer.java
Expand Up @@ -450,21 +450,21 @@ private boolean readRcd(BufferedReader file_)
private void CMS2LHCRF_POS(float x, float y, float z)
{
if (x != 0) {//Rotation + Translation + Inversion + Scaling
double tmpx = x*rotY[0]*rotZ[0] + y*rotY[0]*rotZ[1] - z*rotY[1] + trans[0];
double tmpx = x; //*rotY[0]*rotZ[0] + y*rotY[0]*rotZ[1] - z*rotY[1] + trans[0];
Centroid[0] = new Float(tmpx);
Centroid[0] *= -1.0*cm2um;
}
else
Centroid[0] = x;
if (y != 0) {// Rotation + Translation + Scaling
double tmpy = x*(rotX[1]*rotY[1]*rotZ[0] - rotX[0]*rotZ[1]) + y*(rotX[0]*rotZ[0] + rotX[1]*rotY[1]*rotZ[1]) + z*rotX[1]*rotY[0] + trans[1];
double tmpy = y; //x*(rotX[1]*rotY[1]*rotZ[0] - rotX[0]*rotZ[1]) + y*(rotX[0]*rotZ[0] + rotX[1]*rotY[1]*rotZ[1]) + z*rotX[1]*rotY[0] + trans[1];
Centroid[1] = new Float(tmpy);
Centroid[1] *= cm2um;
}
else
Centroid[1] = y;
if (z != 0) {//Rotation + Translation + Inversion + Scaling
double tmpz = x*(rotX[0]*rotY[1]*rotZ[0] + rotX[1]*rotZ[1]) + y*(rotX[0]*rotY[1]*rotZ[1] - rotX[1]*rotZ[0]) + z*rotX[0]*rotY[0] + trans[2];
double tmpz = z; //x*(rotX[0]*rotY[1]*rotZ[0] + rotX[1]*rotZ[1]) + y*(rotX[0]*rotY[1]*rotZ[1] - rotX[1]*rotZ[0]) + z*rotX[0]*rotY[0] + trans[2];
Centroid[2] = new Float(tmpz);
Centroid[2] *= -1.0*cm2mm;
}
Expand Down

0 comments on commit 90f7bf8

Please sign in to comment.