Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new vtx hist and updated dip file for LHC pub #10428

Merged
merged 1 commit into from
Jul 30, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
19 changes: 17 additions & 2 deletions DQM/BeamMonitor/plugins/BeamMonitor.cc
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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