327 map<std::string,pair<double,double> > resultsMap;
328 vector<pair<double,double> > vertexResults;
336 resultsMap[itBS->first] = pair<double,double>(itBS->second.x0(),itBS->second.x0Error());
338 else if(*itV ==
"y"){
339 resultsMap[itBS->first] = pair<double,double>(itBS->second.y0(),itBS->second.y0Error());
341 else if(*itV ==
"z"){
342 resultsMap[itBS->first] = pair<double,double>(itBS->second.z0(),itBS->second.z0Error());
344 else if(*itV ==
"sigmaX"){
345 resultsMap[itBS->first] = pair<double,double>(itBS->second.BeamWidthX(),itBS->second.BeamWidthXError());
347 else if(*itV ==
"sigmaY"){
348 resultsMap[itBS->first] = pair<double,double>(itBS->second.BeamWidthY(),itBS->second.BeamWidthYError());
350 else if(*itV ==
"sigmaZ"){
351 resultsMap[itBS->first] = pair<double,double>(itBS->second.sigmaZ(),itBS->second.sigmaZ0Error());
355 <<
"The histosMap_ has been built with the name " << *itV <<
" that I can't recognize!";
360 vertexResults.clear();
361 for(vector<VertexCollection>::iterator itPV =
vertices_.begin(); itPV !=
vertices_.end(); itPV++){
363 for(VertexCollection::const_iterator
pv = itPV->begin();
pv != itPV->end();
pv++) {
364 if (
pv->isFake() ||
pv->tracksSize()<10)
continue;
366 vertexResults.push_back(pair<double,double>(
pv->x(),
pv->xError()));
368 else if(*itV ==
"y"){
369 vertexResults.push_back(pair<double,double>(
pv->y(),
pv->yError()));
371 else if(*itV ==
"z"){
372 vertexResults.push_back(pair<double,double>(
pv->z(),
pv->zError()));
374 else if(*itV !=
"sigmaX" && *itV !=
"sigmaY" && *itV !=
"sigmaZ"){
376 <<
"The histosMap_ has been built with the name " << *itV <<
" that I can't recognize!";
402 if(itM->first ==
"run" && (histo =
histosMap_[*itV][itM->first][itM->second]) ==
nullptr){
405 else if(itM->first !=
"run"){
408 if(itM->second ==
"Coordinate"){
413 else if(itM->second ==
"PrimaryVertex fit-DataBase"){
414 if(resultsMap.find(
"PV") != resultsMap.end() && resultsMap.find(
"DB") != resultsMap.end()){
418 else if(itM->second ==
"PrimaryVertex fit-BeamFit"){
419 if(resultsMap.find(
"PV") != resultsMap.end() && resultsMap.find(
"BF") != resultsMap.end()){
423 else if(itM->second ==
"PrimaryVertex fit-Scalers"){
424 if(resultsMap.find(
"PV") != resultsMap.end() && resultsMap.find(
"SC") != resultsMap.end()){
428 else if(itM->second ==
"PrimaryVertex-DataBase"){
429 if(resultsMap.find(
"PV") != resultsMap.end() && resultsMap.find(
"DB") != resultsMap.end()){
430 for(vector<pair<double,double> >::iterator itPV=vertexResults.begin(); itPV!=vertexResults.end(); itPV++){
431 histo->
Fill(itPV->first-resultsMap[
"DB"].first);
435 else if(itM->second ==
"PrimaryVertex-BeamFit"){
436 if(resultsMap.find(
"PV") != resultsMap.end() && resultsMap.find(
"BF") != resultsMap.end()){
437 for(vector<pair<double,double> >::iterator itPV=vertexResults.begin(); itPV!=vertexResults.end(); itPV++){
438 histo->
Fill(itPV->first-resultsMap[
"BF"].first);
442 else if(itM->second ==
"PrimaryVertex-Scalers"){
443 if(resultsMap.find(
"PV") != resultsMap.end() && resultsMap.find(
"SC") != resultsMap.end()){
444 for(vector<pair<double,double> >::iterator itPV=vertexResults.begin(); itPV!=vertexResults.end(); itPV++){
445 histo->
Fill(itPV->first-resultsMap[
"SC"].first);
449 else if(itM->second ==
"Lumibased BeamSpotFit"){
450 if(resultsMap.find(
"BF") != resultsMap.end()){
456 else if(itM->second ==
"Lumibased PrimaryVertex"){
457 if(resultsMap.find(
"PV") != resultsMap.end()){
463 else if(itM->second ==
"Lumibased DataBase"){
464 if(resultsMap.find(
"DB") != resultsMap.end()){
470 else if(itM->second ==
"Lumibased Scalers"){
471 if(resultsMap.find(
"SC") != resultsMap.end()){
477 else if(itM->second ==
"Lumibased PrimaryVertex-DataBase fit"){
478 if(resultsMap.find(
"PV") != resultsMap.end() && resultsMap.find(
"DB") != resultsMap.end()){
484 else if(itM->second ==
"Lumibased PrimaryVertex-Scalers fit"){
485 if(resultsMap.find(
"PV") != resultsMap.end() && resultsMap.find(
"SC") != resultsMap.end()){
491 else if(itM->second ==
"Lumibased Scalers-DataBase fit"){
492 if(resultsMap.find(
"SC") != resultsMap.end() && resultsMap.find(
"DB") != resultsMap.end()){
498 else if(itM->second ==
"Lumibased PrimaryVertex-DataBase"){
499 if(resultsMap.find(
"DB") != resultsMap.end() && !vertexResults.empty()){
500 for(vector<pair<double,double> >::iterator itPV=vertexResults.begin(); itPV!=vertexResults.end(); itPV++){
518 else if(itM->second ==
"Lumibased PrimaryVertex-Scalers"){
519 if(resultsMap.find(
"SC") != resultsMap.end() && !vertexResults.empty()){
520 for(vector<pair<double,double> >::iterator itPV=vertexResults.begin(); itPV!=vertexResults.end(); itPV++){
545 <<
"The histosMap_ have a histogram named " << itM->second <<
" that I can't recognize in this loop!";
PositionContainer positionsMap_
U second(std::pair< T, U > const &p)
std::vector< std::string > varNamesV_
BeamSpotContainer beamSpotsMap_
BeamFitter * theBeamFitter_
std::multimap< std::string, std::string > histoByCategoryNames_
HistosContainer histosMap_
static int position[264][3]
TProfile * getTProfile(void) const
reco::BeamSpot getBeamSpot()
MonitorElement * theValuesContainer_
reco::BeamSpot getBeamSpot()
Power< A, B >::type pow(const A &a, const B &b)
std::vector< reco::VertexCollection > vertices_