#include <memory>
#include "FWCore/Framework/interface/Frameworkfwd.h"
#include "FWCore/Framework/interface/EDAnalyzer.h"
#include "FWCore/Framework/interface/Event.h"
#include "FWCore/Framework/interface/MakerMacros.h"
#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include "FWCore/Utilities/interface/InputTag.h"
#include "DQMServices/Core/interface/DQMStore.h"
#include "DQMServices/Core/interface/MonitorElement.h"
#include <TF3.h>
#include <iostream>
#include <fstream>
#include <vector>
Go to the source code of this file.
Classes | |
struct | VertexType |
class | Vx3DHLTAnalyzer |
Defines | |
#define | DIM 3 |
Functions | |
void | Gauss3DFunc (int &, double *, double &fval, double *par, int) |
Variables | |
bool | considerVxCovariance |
unsigned int | counterVx |
double | maxLongLength |
double | maxTransRadius |
double | pi |
std::vector< VertexType > | Vertices |
double | VxErrCorr |
double | xPos |
double | yPos |
double | zPos |
#define DIM 3 |
Definition at line 48 of file Vx3DHLTAnalyzer.h.
Referenced by Vx3DHLTAnalyzer::analyze(), and Gauss3DFunc().
void Gauss3DFunc | ( | int & | , |
double * | , | ||
double & | fval, | ||
double * | par, | ||
int | |||
) |
Definition at line 176 of file Vx3DHLTAnalyzer.cc.
References considerVxCovariance, counterVx, DIM, i, funct::log(), maxLongLength, maxTransRadius, pi, mathSSE::sqrt(), Vertices, VxErrCorr, ExpressReco_HICollisions_FallBack::x, xPos, ExpressReco_HICollisions_FallBack::y, yPos, z, and zPos.
Referenced by Vx3DHLTAnalyzer::MyFit().
{ double K[DIM][DIM]; // Covariance Matrix double M[DIM][DIM]; // K^-1 double det; double sumlog = 0.; // par[0] = K(0,0) --> Var[X] // par[1] = K(1,1) --> Var[Y] // par[2] = K(2,2) --> Var[Z] // par[3] = K(0,1) = K(1,0) --> Cov[X,Y] // par[4] = K(1,2) = K(2,1) --> Cov[Y,Z] --> dy/dz // par[5] = K(0,2) = K(2,0) --> Cov[X,Z] --> dx/dz // par[6] = mean x // par[7] = mean y // par[8] = mean z counterVx = 0; for (unsigned int i = 0; i < Vertices.size(); i++) { if ((std::sqrt((Vertices[i].x-xPos)*(Vertices[i].x-xPos) + (Vertices[i].y-yPos)*(Vertices[i].y-yPos)) <= maxTransRadius) && (std::fabs(Vertices[i].z-zPos) <= maxLongLength)) { if (considerVxCovariance == true) { K[0][0] = std::fabs(par[0]) + VxErrCorr*VxErrCorr * std::fabs(Vertices[i].Covariance[0][0]); K[1][1] = std::fabs(par[1]) + VxErrCorr*VxErrCorr * std::fabs(Vertices[i].Covariance[1][1]); K[2][2] = std::fabs(par[2]) + VxErrCorr*VxErrCorr * std::fabs(Vertices[i].Covariance[2][2]); K[0][1] = K[1][0] = par[3] + VxErrCorr*VxErrCorr * Vertices[i].Covariance[0][1]; K[1][2] = K[2][1] = par[4]*(std::fabs(par[2])-std::fabs(par[1])) - par[5]*par[3] + VxErrCorr*VxErrCorr * Vertices[i].Covariance[1][2]; K[0][2] = K[2][0] = par[5]*(std::fabs(par[2])-std::fabs(par[0])) - par[4]*par[3] + VxErrCorr*VxErrCorr * Vertices[i].Covariance[0][2]; } else { K[0][0] = std::fabs(par[0]); K[1][1] = std::fabs(par[1]); K[2][2] = std::fabs(par[2]); K[0][1] = K[1][0] = par[3]; K[1][2] = K[2][1] = par[4]*(std::fabs(par[2])-std::fabs(par[1])) - par[5]*par[3]; K[0][2] = K[2][0] = par[5]*(std::fabs(par[2])-std::fabs(par[0])) - par[4]*par[3]; } det = K[0][0]*(K[1][1]*K[2][2] - K[1][2]*K[1][2]) - K[0][1]*(K[0][1]*K[2][2] - K[0][2]*K[1][2]) + K[0][2]*(K[0][1]*K[1][2] - K[0][2]*K[1][1]); M[0][0] = (K[1][1]*K[2][2] - K[1][2]*K[1][2]) / det; M[1][1] = (K[0][0]*K[2][2] - K[0][2]*K[0][2]) / det; M[2][2] = (K[0][0]*K[1][1] - K[0][1]*K[0][1]) / det; M[0][1] = M[1][0] = (K[0][2]*K[1][2] - K[0][1]*K[2][2]) / det; M[1][2] = M[2][1] = (K[0][2]*K[0][1] - K[1][2]*K[0][0]) / det; M[0][2] = M[2][0] = (K[0][1]*K[1][2] - K[0][2]*K[1][1]) / det; sumlog += double(DIM)*std::log(2.*pi) + std::log(std::fabs(det)) + (M[0][0]*(Vertices[i].x-par[6])*(Vertices[i].x-par[6]) + M[1][1]*(Vertices[i].y-par[7])*(Vertices[i].y-par[7]) + M[2][2]*(Vertices[i].z-par[8])*(Vertices[i].z-par[8]) + 2.*M[0][1]*(Vertices[i].x-par[6])*(Vertices[i].y-par[7]) + 2.*M[1][2]*(Vertices[i].y-par[7])*(Vertices[i].z-par[8]) + 2.*M[0][2]*(Vertices[i].x-par[6])*(Vertices[i].z-par[8])); counterVx++; } } fval = sumlog; }
bool considerVxCovariance |
Definition at line 58 of file Vx3DHLTAnalyzer.h.
Referenced by Vx3DHLTAnalyzer::beginJob(), and Gauss3DFunc().
unsigned int counterVx |
Definition at line 59 of file Vx3DHLTAnalyzer.h.
Referenced by Vx3DHLTAnalyzer::endLuminosityBlock(), Gauss3DFunc(), and Vx3DHLTAnalyzer::MyFit().
double maxLongLength |
Definition at line 61 of file Vx3DHLTAnalyzer.h.
Referenced by Gauss3DFunc(), and Vx3DHLTAnalyzer::MyFit().
double maxTransRadius |
Definition at line 60 of file Vx3DHLTAnalyzer.h.
Referenced by Gauss3DFunc(), and Vx3DHLTAnalyzer::MyFit().
double pi |
Definition at line 63 of file Vx3DHLTAnalyzer.h.
Referenced by Hector::addPartToHepMC(), ElectronAnalyzer::analyze(), ElectronMcFakeValidator::analyze(), GsfElectronDataAnalyzer::analyze(), PhotonValidator::analyze(), evf::ExceptionGenerator::analyze(), cms::DiJetAnalyzer::analyze(), ElectronMcSignalValidator::analyze(), GsfElectronMCFakeAnalyzer::analyze(), HiBasicGenTest::analyze(), ElectronSeedAnalyzer::analyze(), DTVDriftCalibration::analyze(), ContainmentCorrectionAnalyzer::analyze(), SimplePhotonAnalyzer::analyze(), GsfElectronMCAnalyzer::analyze(), DQMAnalyzer::analyze(), GsfElectronFakeAnalyzer::analyze(), EgammaObjects::analyzeElectrons(), EgammaObjects::analyzePhotons(), cms::DiMuonSeedGeneratorHIC::barrelUpdateSeed(), EwkDQM::beginJob(), Vx3DHLTAnalyzer::beginJob(), HiggsDQM::beginJob(), MaterialBudgetCastorHistos::book(), MaterialBudgetForward::book(), MaterialBudgetHcalHistos::book(), stor::HLTInfo::buildClassCache(), MagGeoBuilderFromDDD::buildInterpolator(), ConversionLikelihoodCalculator::calculateLikelihood(), tkDetUtil::calculatePhiWindow(), GsfElectronAlgo::ElectronData::checkCtfTrack(), TIBRing::checkPeriodicity(), NavVolume6Faces::computeBounds(), PixelBarrelLayer::computeCrossings(), TOBLayer::computeCrossings(), DTTime2DriftParametrization::computeDriftDistance_mean(), DTTime2DriftParametrization::computeDriftDistance_mode(), DDHCalEndcapAlgo::constructGeneralVolume(), DDHCalBarrelAlgo::constructGeneralVolume(), DDHCalEndcapAlgo::constructInsideModule(), DDHCalEndcapAlgo::constructInsideSector(), DDHCalBarrelAlgo::constructInsideSector(), Ring::containsDetId(), edm::FileLocator::convert(), HICTrajectoryCorrector::correct(), cms::HICFTSfromL1orL2::createFTSfromL1orL2(), RPCStripsRing::createRefConnections(), CylinderFromSectorMFGrid::CylinderFromSectorMFGrid(), PFClusterAlgo::dCrack(), PFEnergyCalibration::dCrackPhi(), PFResolutionMap::dCrackPhi(), stor::HLTInfo::declareStreamers(), IsolatedTracksCone::DeltaPhi(), IsolatedTracksNxN::DeltaPhi(), Decay3Body::doDecay(), FWFFMetadataManager::doUpdate(), reco::Conversion::dPhiTracksAtEcal(), reco::Conversion::dPhiTracksAtVtx(), DTTrigGeomUtils::DTTrigGeomUtils(), EgammaObjects::ecalEta(), EgammaSuperClusters::ecalEta(), ECALPositionCalculator::ecalEta(), ContainmentCorrectionAnalyzer::ecalEta(), edm::Schedule::endJob(), ConversionBarrelEstimator::estimate(), cms::HICSeedMeasurementEstimator::estimate(), ForwardMeasurementEstimator::estimate(), HICMeasurementEstimator::estimate(), ConversionForwardEstimator::estimate(), BarrelMeasurementEstimator::estimate(), DDHCalTBCableAlgo::execute(), RPCStripsRing::fillWithVirtualStrips(), MCParticlePairFilter::filter(), Thrust::finalAxis(), HICTrajectoryCorrector::findPhiInVertex(), HICMuonUpdator::findPhiInVertex(), cms::DiMuonSeedGeneratorHIC::forwardUpdateSeed(), cms::HICFTSfromL1orL2::FTSfromL1(), Gauss3DFunc(), GsfElectronCoreBaseProducer::getCtfTrackRef(), CastorSD::getEnergyDeposit(), ZdcSD::getEnergyDeposit(), TopologyWorker::getetaphi(), TwoBodyDecayLinearizationPointFinder::getLinearizationPoint(), EcalElectronicsMapping::GetListofFEDs(), pat::helper::ResolutionHelper::getResolTheta(), DDI::Ellipsoid::halfVol(), Thrust::initialAxis(), HDetIdAssociator::iPhi(), CaloCellId::isInCell(), ESListOfFEDSProducer::ListOfFEDS(), EcalListOfFEDSProducer::ListOfFEDS(), EcalRawToRecHitRoI::ListOfFEDS(), HLTAlCa::ListOfFEDS(), MagGeometry::MagGeometry(), MaterialBudgetCastorHistos::MaterialBudgetCastorHistos(), MaterialBudgetHcalHistos::MaterialBudgetHcalHistos(), stor::HLTInfo::mergeRegistry(), Utils::mpi_pi(), PFMETBenchmark::mpi_pi(), normalized_phi(), SimpleConeBounds::openingAngle(), CmsTrackerLevelBuilder::ExtractPhiModuleMirror::operator()(), CmsTrackerLevelBuilder::ExtractPhiModule::operator()(), CmsTrackerLevelBuilder::ExtractPhiGluedModuleMirror::operator()(), CmsTrackerLevelBuilder::ExtractPhiGluedModule::operator()(), CmsTrackerLevelBuilder::ExtractPhi::operator()(), CmsTrackerLevelBuilder::ExtractPhiMirror::operator()(), DDHCalEndcapAlgo::parameterLayer(), DDHCalEndcapAlgo::parameterLayer0(), RoadSearchCircleSeed::Phi0(), PhiBorderFinder::PhiBorderFinder(), TopologyWorker::planes_sphe(), TopologyWorker::planes_sphe_wei(), TopologyWorker::planes_thrust(), HFFibreFiducial::PMTNumber(), FWPathsPopup::postProcessEvent(), cms::AlCaDiJetsProducer::produce(), MuonSimHitProducer::produce(), HLTTauMCProducer::produce(), cms::FastMuPropagator::propagate(), stor::DQMEventStore< DQMEventMsg, EventRetriever< RegInfo, QueueCollectionPtr >, StateMachine >::purge(), SteppingHelixPropagator::refToDest(), SteppingHelixPropagator::refToMagVolume(), SteppingHelixPropagator::refToMatVolume(), gen::AMPTHadronizer::rotateEvtPlane(), gen::HijingHadronizer::rotateEvtPlane(), gen::HydjetHadronizer::rotateEvtPlane(), RoadSearchCloudMakerAlgorithm::run(), DQMImplNet< DQMNet::Object >::sendObjectListToPeer(), PFConversionAlgo::setCandidates(), Cone::side(), FWPSetTableManager::update(), FP420Test::update(), HICMuonUpdator::update(), BscTest::update(), HICMuonUpdator::updateBarrel(), HICMuonUpdator::updateEndcap(), FWPSetTableManager::updateFilter(), DDI::Cons::volume(), DDI::Ellipsoid::volume(), DDI::Tubs::volume(), DDI::Torus::volume(), and DDI::Polycone::volume().
std::vector<VertexType> Vertices |
Definition at line 57 of file Vx3DHLTAnalyzer.h.
Referenced by Vx3DHLTAnalyzer::analyze(), and Gauss3DFunc().
double VxErrCorr |
Definition at line 67 of file Vx3DHLTAnalyzer.h.
Referenced by Gauss3DFunc(), and Vx3DHLTAnalyzer::Vx3DHLTAnalyzer().
double xPos |
Definition at line 62 of file Vx3DHLTAnalyzer.h.
Referenced by DisplayManager::createGPart(), DisplayManager::createGTrack(), Gauss3DFunc(), GlobalTrackingRegionProducer::GlobalTrackingRegionProducer(), HITrackingRegionProducer::HITrackingRegionProducer(), PixelCPEGeneric::localPosition(), Vx3DHLTAnalyzer::MyFit(), and cond::PayLoadInspector< DataT >::plot().
double yPos |
Definition at line 62 of file Vx3DHLTAnalyzer.h.
Referenced by DisplayManager::createGPart(), DisplayManager::createGTrack(), Gauss3DFunc(), GlobalTrackingRegionProducer::GlobalTrackingRegionProducer(), HITrackingRegionProducer::HITrackingRegionProducer(), PixelCPEGeneric::localPosition(), Vx3DHLTAnalyzer::MyFit(), and cond::PayLoadInspector< DataT >::plot().
double zPos |
Definition at line 62 of file Vx3DHLTAnalyzer.h.
Referenced by MuRingForwardDoubleLayer::compatible(), ForwardDetLayer::compatible(), NavVolume6Faces::computeBounds(), TIDLayer::computeDisk(), ForwardDetLayer::computeSurface(), MuRingForwardDoubleLayer::computeSurface(), DTSegmentUpdator::fit(), Gauss3DFunc(), getFlagStream(), GlobalTrackingRegionProducer::GlobalTrackingRegionProducer(), HITrackingRegionProducer::HITrackingRegionProducer(), MuRingForwardLayer::MuRingForwardLayer(), Vx3DHLTAnalyzer::MyFit(), and DTCombinatorialPatternReco4D::reconstruct().