CMS 3D CMS Logo

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

#include <Vx3DHLTAnalyzer.h>

Inheritance diagram for Vx3DHLTAnalyzer:
DQMOneLumiEDAnalyzer<> DQMOneEDAnalyzer< edm::EndLuminosityBlockProducer, edm::one::WatchLuminosityBlocks, Args... > edm::one::EDProducer< edm::EndRunProducer, edm::one::WatchRuns, edm::Accumulator, Args... > edm::one::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 Vx3DHLTAnalyzer (const edm::ParameterSet &)
 
 ~Vx3DHLTAnalyzer () override
 
- Public Member Functions inherited from DQMOneLumiEDAnalyzer<>
void accumulate (edm::Event const &event, edm::EventSetup const &setup) override
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
 DQMOneLumiEDAnalyzer ()
 
void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) final
 
void endLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &setup) final
 
bool getCanSaveByLumi () override
 
- Public Member Functions inherited from DQMOneEDAnalyzer< edm::EndLuminosityBlockProducer, edm::one::WatchLuminosityBlocks, Args... >
void accumulate (edm::Event const &event, edm::EventSetup const &setup) override
 
void beginRun (edm::Run const &run, edm::EventSetup const &setup) final
 
 DQMOneEDAnalyzer ()
 
void endRun (edm::Run const &, edm::EventSetup const &) final
 
void endRunProduce (edm::Run &run, edm::EventSetup const &setup) final
 
- Public Member Functions inherited from edm::one::EDProducer< edm::EndRunProducer, edm::one::WatchRuns, edm::Accumulator, Args... >
 EDProducer ()=default
 
 EDProducer (const EDProducer &)=delete
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
const EDProduceroperator= (const EDProducer &)=delete
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsInputProcessBlocks () const final
 
bool wantsProcessBlocks () const final
 
- Public Member Functions inherited from edm::one::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDProducerBase () override
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
std::vector< edm::ProductResolverIndex > const & putTokenIndexToProductResolverIndex () const
 
std::vector< bool > const & recordProvenanceList () const
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
 
TypeLabelList const & typeLabelList () const
 used by the fwk to register the list of products of this module More...
 
 ~ProducerBase () noexcept(false) override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESProxyIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex > const & esGetTokenRecordIndicesVector (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::array< std::vector< ModuleDescription const *> *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, ProductRegistry const &preg, std::map< std::string, ModuleDescription const *> const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Protected Member Functions

double Gauss3DFunc (const double *par)
 
- Protected Member Functions inherited from DQMOneEDAnalyzer< edm::EndLuminosityBlockProducer, edm::one::WatchLuminosityBlocks, Args... >
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
virtual void dqmEndRun (edm::Run const &, edm::EventSetup const &)
 
- Protected Member Functions inherited from edm::ProducerBase
template<Transition Tr = Transition::Event>
auto produces (std::string instanceName) noexcept
 declare what type of product will make and with which optional label More...
 
template<Transition B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<BranchType B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<class ProductType >
BranchAliasSetterT< ProductType > produces ()
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces ()
 
template<class ProductType >
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces ()
 
template<Transition Tr = Transition::Event>
auto produces () noexcept
 
ProducesCollector producesCollector ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< Bconsumes (edm::InputTag tag) noexcept
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes ()
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag)
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
void resetItemsToGetFrom (BranchType iType)
 

Private Member Functions

void analyze (const edm::Event &iEvent, const edm::EventSetup &iSetup) override
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
void dqmBeginLuminosityBlock (const edm::LuminosityBlock &lumiBlock, const edm::EventSetup &iSetup) override
 
void dqmEndLuminosityBlock (const edm::LuminosityBlock &lumiBlock, const edm::EventSetup &iSetup) override
 
std::string formatTime (const time_t &t)
 
unsigned int HitCounter (const edm::Event &iEvent)
 
int MyFit (std::vector< double > *vals)
 
void printFitParams (const std::vector< double > &fitResults)
 
void reset (std::string ResetType)
 
void writeToFile (std::vector< double > *vals, edm::TimeValue_t BeginTimeOfFit, edm::TimeValue_t EndTimeOfFit, unsigned int BeginLumiOfFit, unsigned int EndLumiOfFit, int dataType)
 

Private Attributes

unsigned int beginLumiOfFit
 
edm::TimeValue_t beginTimeOfFit
 
bool considerVxCovariance
 
unsigned int counterVx
 
bool dataFromFit
 
bool debugMode
 
MonitorElementdxdzlumi
 
MonitorElementdydzlumi
 
unsigned int endLumiOfFit
 
edm::TimeValue_t endTimeOfFit
 
std::string fileName
 
MonitorElementfitResults
 
MonitorElementgoodVxCounter
 
MonitorElementhitCounter
 
bool internalDebug
 
unsigned int lastLumiOfFit
 
unsigned int lumiCounter
 
double maxLongLength
 
unsigned int maxLumiIntegration
 
double maxTransRadius
 
unsigned int minNentries
 
double minVxDoF
 
double minVxWgt
 
MonitorElementmXlumi
 
MonitorElementmYlumi
 
MonitorElementmZlumi
 
unsigned int nLumiFit
 
unsigned int nLumiXaxisRange
 
unsigned int nParams
 
unsigned int numberFits
 
unsigned int numberGoodFits
 
std::ofstream outputDebugFile
 
std::ofstream outputFile
 
double pi
 
edm::EDGetTokenT< SiPixelRecHitCollectionpixelHitCollection
 
MonitorElementreportSummary
 
MonitorElementreportSummaryMap
 
unsigned int runNumber
 
MonitorElementstatusCounter
 
MonitorElementsXlumi
 
MonitorElementsYlumi
 
MonitorElementsZlumi
 
unsigned int totalHits
 
edm::EDGetTokenT< reco::VertexCollectionvertexCollection
 
std::vector< VertexTypeVertices
 
MonitorElementVx_X
 
MonitorElementVx_X_Cum
 
MonitorElementVx_X_Fit
 
MonitorElementVx_XY
 
MonitorElementVx_XY_Cum
 
MonitorElementVx_Y
 
MonitorElementVx_Y_Cum
 
MonitorElementVx_Y_Fit
 
MonitorElementVx_Z
 
MonitorElementVx_Z_Cum
 
MonitorElementVx_Z_Fit
 
MonitorElementVx_ZX
 
MonitorElementVx_ZX_Cum
 
MonitorElementVx_ZY
 
MonitorElementVx_ZY_Cum
 
double VxErrCorr
 
double xPos
 
double xRange
 
double xStep
 
double yPos
 
double yRange
 
double yStep
 
double zPos
 
double zRange
 
double zStep
 

Additional Inherited Members

- Public Types inherited from DQMOneEDAnalyzer< edm::EndLuminosityBlockProducer, edm::one::WatchLuminosityBlocks, Args... >
typedef dqm::reco::DQMStore DQMStore
 
typedef dqm::reco::MonitorElement MonitorElement
 
- Public Types inherited from edm::one::EDProducerBase
typedef EDProducerBase ModuleType
 
- Public Types inherited from edm::ProducerBase
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex > >
 
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::one::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Attributes inherited from DQMOneLumiEDAnalyzer<>
edm::EDPutTokenT< DQMTokenlumiToken_
 
- Protected Attributes inherited from DQMOneEDAnalyzer< edm::EndLuminosityBlockProducer, edm::one::WatchLuminosityBlocks, Args... >
edm::EDPutTokenT< DQMTokenrunToken_
 

Detailed Description

Definition at line 42 of file Vx3DHLTAnalyzer.h.

Constructor & Destructor Documentation

◆ Vx3DHLTAnalyzer()

Vx3DHLTAnalyzer::Vx3DHLTAnalyzer ( const edm::ParameterSet iConfig)

Definition at line 24 of file Vx3DHLTAnalyzer.cc.

References beampixel_dqm_sourceclient-live_cfg::dataFromFit, beampixel_dqm_sourceclient-live_cfg::debugMode, MillePedeFileConverter_cfg::fileName, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), HLT_2022v12_cff::InputTag, beampixel_dqm_sourceclient-live_cfg::maxLumiIntegration, beampixel_dqm_sourceclient-live_cfg::minNentries, beampixel_dqm_sourceclient-live_cfg::minVxDoF, beampixel_dqm_sourceclient-live_cfg::minVxWgt, beampixel_dqm_sourceclient-live_cfg::nLumiFit, beampixel_dqm_sourceclient-live_cfg::nLumiXaxisRange, pi, beampixel_dqm_sourceclient-live_cfg::pixelHitCollection, spclusmultinvestigator_cfi::vertexCollection, beampixel_dqm_sourceclient-live_cfg::VxErrCorr, beampixel_dqm_sourceclient-live_cfg::xRange, beampixel_dqm_sourceclient-live_cfg::xStep, beampixel_dqm_sourceclient-live_cfg::yRange, beampixel_dqm_sourceclient-live_cfg::yStep, beampixel_dqm_sourceclient-live_cfg::zRange, and beampixel_dqm_sourceclient-live_cfg::zStep.

24  {
25  debugMode = true;
26  nLumiFit = 2; // Number of integrated lumis to perform the fit
28  15; // If failing fits, this is the maximum number of integrated lumis after which a reset is issued
29  nLumiXaxisRange = 5000; // Correspond to about 32h of data taking: 32h * 60min * 60s / 23s per lumi-block = 5009
30  dataFromFit = true; // The Beam Spot data can be either taken from the histograms or from the fit results
31  minNentries = 20; // Minimum number of good vertices to perform the fit
32  xRange = 0.8; // [cm]
33  xStep = 0.001; // [cm]
34  yRange = 0.8; // [cm]
35  yStep = 0.001; // [cm]
36  zRange = 30.; // [cm]
37  zStep = 0.04; // [cm]
38  VxErrCorr = 1.3;
39  minVxDoF = 10.; // Good-vertex selection cut
40  // For vertex fitter without track-weight: d.o.f. = 2*NTracks - 3
41  // For vertex fitter with track-weight: d.o.f. = sum_NTracks(2*track_weight) - 3
42  minVxWgt = 0.5; // Good-vertex selection cut
43  fileName = "BeamPixelResults.txt";
44 
45  vertexCollection = consumes<VertexCollection>(
46  iConfig.getUntrackedParameter<InputTag>("vertexCollection", InputTag("pixelVertices")));
47  pixelHitCollection = consumes<SiPixelRecHitCollection>(
48  iConfig.getUntrackedParameter<InputTag>("pixelHitCollection", InputTag("siPixelRecHits")));
49 
50  debugMode = iConfig.getParameter<bool>("debugMode");
51  nLumiFit = iConfig.getParameter<unsigned int>("nLumiFit");
52  maxLumiIntegration = iConfig.getParameter<unsigned int>("maxLumiIntegration");
53  nLumiXaxisRange = iConfig.getParameter<unsigned int>("nLumiXaxisRange");
54  dataFromFit = iConfig.getParameter<bool>("dataFromFit");
55  minNentries = iConfig.getParameter<unsigned int>("minNentries");
56  xRange = iConfig.getParameter<double>("xRange");
57  xStep = iConfig.getParameter<double>("xStep");
58  yRange = iConfig.getParameter<double>("yRange");
59  yStep = iConfig.getParameter<double>("yStep");
60  zRange = iConfig.getParameter<double>("zRange");
61  zStep = iConfig.getParameter<double>("zStep");
62  VxErrCorr = iConfig.getParameter<double>("VxErrCorr");
63  minVxDoF = iConfig.getParameter<double>("minVxDoF");
64  minVxWgt = iConfig.getParameter<double>("minVxWgt");
65  fileName = iConfig.getParameter<string>("fileName");
66 
67  // ### Set internal variables ###
68  nParams = 9; // Number of free parameters in the fit
69  internalDebug = false;
70  considerVxCovariance = true; // Deconvolute vertex covariance matrix
71  pi = 3.141592653589793238;
72  // ##############################
73 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
unsigned int maxLumiIntegration
edm::EDGetTokenT< reco::VertexCollection > vertexCollection
unsigned int nLumiXaxisRange
unsigned int minNentries
edm::EDGetTokenT< SiPixelRecHitCollection > pixelHitCollection
unsigned int nParams
T getUntrackedParameter(std::string const &, T const &) const
std::string fileName
unsigned int nLumiFit

◆ ~Vx3DHLTAnalyzer()

Vx3DHLTAnalyzer::~Vx3DHLTAnalyzer ( )
override

Definition at line 75 of file Vx3DHLTAnalyzer.cc.

75 {}

Member Function Documentation

◆ analyze()

void Vx3DHLTAnalyzer::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprivatevirtual

Reimplemented from DQMOneEDAnalyzer< edm::EndLuminosityBlockProducer, edm::one::WatchLuminosityBlocks, Args... >.

Definition at line 77 of file Vx3DHLTAnalyzer.cc.

References VertexType::Covariance, beampixel_dqm_sourceclient-live_cfg::debugMode, DIM, MillePedeFileConverter_cfg::fileName, mps_fire::i, iEvent, edm::isNotFinite(), dqmiolumiharvest::j, beampixel_dqm_sourceclient-live_cfg::minVxDoF, beampixel_dqm_sourceclient-live_cfg::minVxWgt, MillePedeFileConverter_cfg::out, reset(), convertSQLiteXML::runNumber, createJobs::tmp, spclusmultinvestigator_cfi::vertexCollection, pfPileUpJME_cfi::Vertices, VertexType::x, VertexType::y, and VertexType::z.

77  {
78  Handle<VertexCollection> Vx3DCollection;
79  iEvent.getByToken(vertexCollection, Vx3DCollection);
80 
81  unsigned int i, j;
82  double det;
83  VertexType MyVertex;
84 
85  if (runNumber != iEvent.id().run()) {
86  reset("scratch");
87  runNumber = iEvent.id().run();
88 
89  if (debugMode == true) {
90  stringstream debugFile;
91  string tmp(fileName);
92 
93  if (outputDebugFile.is_open() == true)
94  outputDebugFile.close();
95  tmp.erase(strlen(fileName.c_str()) - 4, 4);
96  debugFile << tmp.c_str() << "_Run" << iEvent.id().run() << ".txt";
97  outputDebugFile.open(debugFile.str().c_str(), ios::out);
98  outputDebugFile.close();
99  outputDebugFile.open(debugFile.str().c_str(), ios::app);
100  }
101 
102  dqmBeginLuminosityBlock(iEvent.getLuminosityBlock(), iSetup);
103  } else if (beginTimeOfFit != 0) {
105 
106  if (internalDebug == true) {
107  edm::LogInfo("Vx3DHLTAnalyzer") << "\tI found " << totalHits << " pixel hits until now";
108  edm::LogInfo("Vx3DHLTAnalyzer") << "\tIn this event there are " << Vx3DCollection->size() << " vertex cadidates";
109  }
110 
111  for (vector<Vertex>::const_iterator it3DVx = Vx3DCollection->begin(); it3DVx != Vx3DCollection->end(); it3DVx++) {
112  if (internalDebug == true) {
113  edm::LogInfo("Vx3DHLTAnalyzer") << "\tVertex selections:";
114  edm::LogInfo("Vx3DHLTAnalyzer") << "\tEvent ID = " << iEvent.id();
115  edm::LogInfo("Vx3DHLTAnalyzer") << "\tVertex number = " << it3DVx - Vx3DCollection->begin();
116  edm::LogInfo("Vx3DHLTAnalyzer") << "\tisValid = " << it3DVx->isValid();
117  edm::LogInfo("Vx3DHLTAnalyzer") << "\tisFake = " << it3DVx->isFake();
118  edm::LogInfo("Vx3DHLTAnalyzer") << "\tnodof = " << it3DVx->ndof();
119  edm::LogInfo("Vx3DHLTAnalyzer") << "\ttracksSize = " << it3DVx->tracksSize();
120  }
121 
122  if ((it3DVx->isValid() == true) && (it3DVx->isFake() == false) && (it3DVx->ndof() >= minVxDoF) &&
123  (it3DVx->tracksSize() > 0) && ((it3DVx->ndof() + 3.) / ((double)it3DVx->tracksSize()) >= 2. * minVxWgt)) {
124  for (i = 0; i < DIM; i++) {
125  for (j = 0; j < DIM; j++) {
126  MyVertex.Covariance[i][j] = it3DVx->covariance(i, j);
127  if (isNotFinite(MyVertex.Covariance[i][j]) == true)
128  break;
129  }
130 
131  if (j != DIM)
132  break;
133  }
134 
135  if (i == DIM)
136  det = std::fabs(MyVertex.Covariance[0][0]) *
137  (std::fabs(MyVertex.Covariance[1][1]) * std::fabs(MyVertex.Covariance[2][2]) -
138  MyVertex.Covariance[1][2] * MyVertex.Covariance[1][2]) -
139  MyVertex.Covariance[0][1] * (MyVertex.Covariance[0][1] * std::fabs(MyVertex.Covariance[2][2]) -
140  MyVertex.Covariance[0][2] * MyVertex.Covariance[1][2]) +
141  MyVertex.Covariance[0][2] * (MyVertex.Covariance[0][1] * MyVertex.Covariance[1][2] -
142  MyVertex.Covariance[0][2] * std::fabs(MyVertex.Covariance[1][1]));
143 
144  if ((i == DIM) && (det > 0.)) {
145  if (internalDebug == true)
146  edm::LogInfo("Vx3DHLTAnalyzer") << "\tVertex accepted !";
147 
148  MyVertex.x = it3DVx->x();
149  MyVertex.y = it3DVx->y();
150  MyVertex.z = it3DVx->z();
151  Vertices.push_back(MyVertex);
152 
153  Vx_X->Fill(it3DVx->x());
154  Vx_Y->Fill(it3DVx->y());
155  Vx_Z->Fill(it3DVx->z());
156 
157  Vx_ZX->Fill(it3DVx->z(), it3DVx->x());
158  Vx_ZY->Fill(it3DVx->z(), it3DVx->y());
159  Vx_XY->Fill(it3DVx->x(), it3DVx->y());
160 
161  Vx_X_Cum->Fill(it3DVx->x());
162  Vx_Y_Cum->Fill(it3DVx->y());
163  Vx_Z_Cum->Fill(it3DVx->z());
164 
165  Vx_ZX_Cum->Fill(it3DVx->z(), it3DVx->x());
166  Vx_ZY_Cum->Fill(it3DVx->z(), it3DVx->y());
167  Vx_XY_Cum->Fill(it3DVx->x(), it3DVx->y());
168  } else if (internalDebug == true) {
169  edm::LogInfo("Vx3DHLTAnalyzer") << "\tVertex discarded !";
170 
171  for (i = 0; i < DIM; i++)
172  for (j = 0; j < DIM; j++)
173  edm::LogInfo("Vx3DHLTAnalyzer") << "(i,j) --> " << i << "," << j << " --> " << MyVertex.Covariance[i][j];
174  }
175  } else if (internalDebug == true)
176  edm::LogInfo("Vx3DHLTAnalyzer") << "\tVertex discarded !";
177  }
178  }
179 }
MonitorElement * Vx_ZX
unsigned int totalHits
MonitorElement * Vx_Y_Cum
edm::EDGetTokenT< reco::VertexCollection > vertexCollection
constexpr bool isNotFinite(T x)
Definition: isFinite.h:9
void dqmBeginLuminosityBlock(const edm::LuminosityBlock &lumiBlock, const edm::EventSetup &iSetup) override
#define DIM(a)
MonitorElement * Vx_X
edm::TimeValue_t beginTimeOfFit
unsigned int HitCounter(const edm::Event &iEvent)
MonitorElement * Vx_XY
void Fill(long long x)
double Covariance[3][3]
int iEvent
Definition: GenABIO.cc:224
MonitorElement * Vx_ZY
std::string fileName
MonitorElement * Vx_ZY_Cum
std::ofstream outputDebugFile
MonitorElement * Vx_ZX_Cum
MonitorElement * Vx_Z
void reset(std::string ResetType)
MonitorElement * Vx_X_Cum
std::vector< VertexType > Vertices
Log< level::Info, false > LogInfo
MonitorElement * Vx_XY_Cum
unsigned int runNumber
MonitorElement * Vx_Z_Cum
tmp
align.sh
Definition: createJobs.py:716
MonitorElement * Vx_Y

◆ bookHistograms()

void Vx3DHLTAnalyzer::bookHistograms ( DQMStore::IBooker ibooker,
edm::Run const &  iRun,
edm::EventSetup const &   
)
overrideprivatevirtual

Implements DQMOneEDAnalyzer< edm::EndLuminosityBlockProducer, edm::one::WatchLuminosityBlocks, Args... >.

Definition at line 1338 of file Vx3DHLTAnalyzer.cc.

References dqm::implementation::IBooker::book1D(), dqm::implementation::IBooker::book2D(), dqm::implementation::IBooker::bookFloat(), dqm::impl::MonitorElement::Fill(), dqm::legacy::MonitorElement::getTH1(), beampixel_dqm_sourceclient-live_cfg::nLumiXaxisRange, reset(), dqm::impl::MonitorElement::setAxisTitle(), dqm::implementation::NavigatorBase::setCurrentFolder(), beampixel_dqm_sourceclient-live_cfg::xRange, beampixel_dqm_sourceclient-live_cfg::xStep, beampixel_dqm_sourceclient-live_cfg::yRange, beampixel_dqm_sourceclient-live_cfg::yStep, beampixel_dqm_sourceclient-live_cfg::zRange, and beampixel_dqm_sourceclient-live_cfg::zStep.

1338  {
1339  ibooker.setCurrentFolder("BeamPixel");
1340 
1341  Vx_X = ibooker.book1D(
1342  "F - vertex x", "Primary Vertex X Distribution", int(rint(xRange / xStep)), -xRange / 2., xRange / 2.);
1343  Vx_Y = ibooker.book1D(
1344  "F - vertex y", "Primary Vertex Y Distribution", int(rint(yRange / yStep)), -yRange / 2., yRange / 2.);
1345  Vx_Z = ibooker.book1D(
1346  "F - vertex z", "Primary Vertex Z Distribution", int(rint(zRange / zStep)), -zRange / 2., zRange / 2.);
1347  Vx_X->setAxisTitle("Primary Vertices X [cm]", 1);
1348  Vx_X->setAxisTitle("Entries [#]", 2);
1349  Vx_Y->setAxisTitle("Primary Vertices Y [cm]", 1);
1350  Vx_Y->setAxisTitle("Entries [#]", 2);
1351  Vx_Z->setAxisTitle("Primary Vertices Z [cm]", 1);
1352  Vx_Z->setAxisTitle("Entries [#]", 2);
1353 
1354  Vx_X_Fit = ibooker.book1D("G - vertex x fit",
1355  "Primary Vertex X Distribution (For Fit)",
1356  int(rint(xRange / xStep)),
1357  -xRange / 2.,
1358  xRange / 2.);
1359  Vx_Y_Fit = ibooker.book1D("G - vertex y fit",
1360  "Primary Vertex Y Distribution (For Fit)",
1361  int(rint(yRange / yStep)),
1362  -yRange / 2.,
1363  yRange / 2.);
1364  Vx_Z_Fit = ibooker.book1D("G - vertex z fit",
1365  "Primary Vertex Z Distribution (For Fit)",
1366  int(rint(zRange / zStep)),
1367  -zRange / 2.,
1368  zRange / 2.);
1369  Vx_X_Fit->setAxisTitle("Primary Vertices X [cm]", 1);
1370  Vx_X_Fit->setAxisTitle("Entries [#]", 2);
1371  Vx_Y_Fit->setAxisTitle("Primary Vertices Y [cm]", 1);
1372  Vx_Y_Fit->setAxisTitle("Entries [#]", 2);
1373  Vx_Z_Fit->setAxisTitle("Primary Vertices Z [cm]", 1);
1374  Vx_Z_Fit->setAxisTitle("Entries [#]", 2);
1375 
1376  Vx_X_Cum = ibooker.book1D("I - vertex x cum",
1377  "Primary Vertex X Distribution (Cumulative)",
1378  int(rint(xRange / xStep)),
1379  -xRange / 2.,
1380  xRange / 2.);
1381  Vx_Y_Cum = ibooker.book1D("I - vertex y cum",
1382  "Primary Vertex Y Distribution (Cumulative)",
1383  int(rint(yRange / yStep)),
1384  -yRange / 2.,
1385  yRange / 2.);
1386  Vx_Z_Cum = ibooker.book1D("I - vertex z cum",
1387  "Primary Vertex Z Distribution (Cumulative)",
1388  int(rint(zRange / zStep)),
1389  -zRange / 2.,
1390  zRange / 2.);
1391  Vx_X_Cum->setAxisTitle("Primary Vertices X [cm]", 1);
1392  Vx_X_Cum->setAxisTitle("Entries [#]", 2);
1393  Vx_Y_Cum->setAxisTitle("Primary Vertices Y [cm]", 1);
1394  Vx_Y_Cum->setAxisTitle("Entries [#]", 2);
1395  Vx_Z_Cum->setAxisTitle("Primary Vertices Z [cm]", 1);
1396  Vx_Z_Cum->setAxisTitle("Entries [#]", 2);
1397 
1398  mXlumi = ibooker.book1D(
1399  "B - muX vs lumi", "#mu_{x} vs. Lumisection", nLumiXaxisRange, 0.5, ((double)nLumiXaxisRange) + 0.5);
1400  mYlumi = ibooker.book1D(
1401  "B - muY vs lumi", "#mu_{y} vs. Lumisection", nLumiXaxisRange, 0.5, ((double)nLumiXaxisRange) + 0.5);
1402  mZlumi = ibooker.book1D(
1403  "B - muZ vs lumi", "#mu_{z} vs. Lumisection", nLumiXaxisRange, 0.5, ((double)nLumiXaxisRange) + 0.5);
1404  mXlumi->setAxisTitle("Lumisection [#]", 1);
1405  mXlumi->setAxisTitle("#mu_{x} [cm]", 2);
1406  mXlumi->getTH1()->SetOption("E1");
1407  mYlumi->setAxisTitle("Lumisection [#]", 1);
1408  mYlumi->setAxisTitle("#mu_{y} [cm]", 2);
1409  mYlumi->getTH1()->SetOption("E1");
1410  mZlumi->setAxisTitle("Lumisection [#]", 1);
1411  mZlumi->setAxisTitle("#mu_{z} [cm]", 2);
1412  mZlumi->getTH1()->SetOption("E1");
1413 
1414  sXlumi = ibooker.book1D(
1415  "C - sigmaX vs lumi", "#sigma_{x} vs. Lumisection", nLumiXaxisRange, 0.5, ((double)nLumiXaxisRange) + 0.5);
1416  sYlumi = ibooker.book1D(
1417  "C - sigmaY vs lumi", "#sigma_{y} vs. Lumisection", nLumiXaxisRange, 0.5, ((double)nLumiXaxisRange) + 0.5);
1418  sZlumi = ibooker.book1D(
1419  "C - sigmaZ vs lumi", "#sigma_{z} vs. Lumisection", nLumiXaxisRange, 0.5, ((double)nLumiXaxisRange) + 0.5);
1420  sXlumi->setAxisTitle("Lumisection [#]", 1);
1421  sXlumi->setAxisTitle("#sigma_{x} [cm]", 2);
1422  sXlumi->getTH1()->SetOption("E1");
1423  sYlumi->setAxisTitle("Lumisection [#]", 1);
1424  sYlumi->setAxisTitle("#sigma_{y} [cm]", 2);
1425  sYlumi->getTH1()->SetOption("E1");
1426  sZlumi->setAxisTitle("Lumisection [#]", 1);
1427  sZlumi->setAxisTitle("#sigma_{z} [cm]", 2);
1428  sZlumi->getTH1()->SetOption("E1");
1429 
1430  dxdzlumi = ibooker.book1D(
1431  "D - dxdz vs lumi", "dX/dZ vs. Lumisection", nLumiXaxisRange, 0.5, ((double)nLumiXaxisRange) + 0.5);
1432  dydzlumi = ibooker.book1D(
1433  "D - dydz vs lumi", "dY/dZ vs. Lumisection", nLumiXaxisRange, 0.5, ((double)nLumiXaxisRange) + 0.5);
1434  dxdzlumi->setAxisTitle("Lumisection [#]", 1);
1435  dxdzlumi->setAxisTitle("dX/dZ [rad]", 2);
1436  dxdzlumi->getTH1()->SetOption("E1");
1437  dydzlumi->setAxisTitle("Lumisection [#]", 1);
1438  dydzlumi->setAxisTitle("dY/dZ [rad]", 2);
1439  dydzlumi->getTH1()->SetOption("E1");
1440 
1441  Vx_ZX = ibooker.book2D("E - vertex zx",
1442  "Primary Vertex ZX Distribution",
1443  int(rint(zRange / zStep)),
1444  -zRange / 2.,
1445  zRange / 2.,
1446  int(rint(xRange / xStep)),
1447  -xRange / 2.,
1448  xRange / 2.);
1449  Vx_ZY = ibooker.book2D("E - vertex zy",
1450  "Primary Vertex ZY Distribution",
1451  int(rint(zRange / zStep)),
1452  -zRange / 2.,
1453  zRange / 2.,
1454  int(rint(yRange / yStep)),
1455  -yRange / 2.,
1456  yRange / 2.);
1457  Vx_XY = ibooker.book2D("E - vertex xy",
1458  "Primary Vertex XY Distribution",
1459  int(rint(xRange / xStep)),
1460  -xRange / 2.,
1461  xRange / 2.,
1462  int(rint(yRange / yStep)),
1463  -yRange / 2.,
1464  yRange / 2.);
1465  Vx_ZX->setAxisTitle("Primary Vertices Z [cm]", 1);
1466  Vx_ZX->setAxisTitle("Primary Vertices X [cm]", 2);
1467  Vx_ZX->setAxisTitle("Entries [#]", 3);
1468  Vx_ZY->setAxisTitle("Primary Vertices Z [cm]", 1);
1469  Vx_ZY->setAxisTitle("Primary Vertices Y [cm]", 2);
1470  Vx_ZY->setAxisTitle("Entries [#]", 3);
1471  Vx_XY->setAxisTitle("Primary Vertices X [cm]", 1);
1472  Vx_XY->setAxisTitle("Primary Vertices Y [cm]", 2);
1473  Vx_XY->setAxisTitle("Entries [#]", 3);
1474 
1475  Vx_ZX_Cum = ibooker.book2D("H - vertex zx cum",
1476  "Primary Vertex ZX Distribution (Cumulative)",
1477  int(rint(zRange / zStep)),
1478  -zRange / 2.,
1479  zRange / 2.,
1480  int(rint(xRange / xStep)),
1481  -xRange / 2.,
1482  xRange / 2.);
1483  Vx_ZY_Cum = ibooker.book2D("H - vertex zy cum",
1484  "Primary Vertex ZY Distribution (Cumulative)",
1485  int(rint(zRange / zStep)),
1486  -zRange / 2.,
1487  zRange / 2.,
1488  int(rint(yRange / yStep)),
1489  -yRange / 2.,
1490  yRange / 2.);
1491  Vx_XY_Cum = ibooker.book2D("H - vertex xy cum",
1492  "Primary Vertex XY Distribution (Cumulative)",
1493  int(rint(xRange / xStep)),
1494  -xRange / 2.,
1495  xRange / 2.,
1496  int(rint(yRange / yStep)),
1497  -yRange / 2.,
1498  yRange / 2.);
1499  Vx_ZX_Cum->setAxisTitle("Primary Vertices Z [cm]", 1);
1500  Vx_ZX_Cum->setAxisTitle("Primary Vertices X [cm]", 2);
1501  Vx_ZX_Cum->setAxisTitle("Entries [#]", 3);
1502  Vx_ZY_Cum->setAxisTitle("Primary Vertices Z [cm]", 1);
1503  Vx_ZY_Cum->setAxisTitle("Primary Vertices Y [cm]", 2);
1504  Vx_ZY_Cum->setAxisTitle("Entries [#]", 3);
1505  Vx_XY_Cum->setAxisTitle("Primary Vertices X [cm]", 1);
1506  Vx_XY_Cum->setAxisTitle("Primary Vertices Y [cm]", 2);
1507  Vx_XY_Cum->setAxisTitle("Entries [#]", 3);
1508 
1509  hitCounter = ibooker.book1D(
1510  "J - pixelHits vs lumi", "# Pixel-Hits vs. Lumisection", nLumiXaxisRange, 0.5, ((double)nLumiXaxisRange) + 0.5);
1511  hitCounter->setAxisTitle("Lumisection [#]", 1);
1512  hitCounter->setAxisTitle("Pixel-Hits [#]", 2);
1513  hitCounter->getTH1()->SetOption("E1");
1514 
1515  goodVxCounter = ibooker.book1D("K - good vertices vs lumi",
1516  "# Good vertices vs. Lumisection",
1518  0.5,
1519  ((double)nLumiXaxisRange) + 0.5);
1520  goodVxCounter->setAxisTitle("Lumisection [#]", 1);
1521  goodVxCounter->setAxisTitle("Good vertices [#]", 2);
1522  goodVxCounter->getTH1()->SetOption("E1");
1523 
1524  statusCounter = ibooker.book1D(
1525  "L - status vs lumi", "App. Status vs. Lumisection", nLumiXaxisRange, 0.5, ((double)nLumiXaxisRange) + 0.5);
1526  statusCounter->setAxisTitle("Lumisection [#]", 1);
1527  statusCounter->getTH1()->SetOption("E1");
1528  statusCounter->getTH1()->GetYaxis()->Set(11, -5.5, 5.5);
1529  statusCounter->getTH1()->GetYaxis()->SetBinLabel(1, "Max Lumi.");
1530  statusCounter->getTH1()->GetYaxis()->SetBinLabel(2, "Neg. det.");
1531  statusCounter->getTH1()->GetYaxis()->SetBinLabel(3, "Infinite err.");
1532  statusCounter->getTH1()->GetYaxis()->SetBinLabel(4, "No vtx.");
1533  statusCounter->getTH1()->GetYaxis()->SetBinLabel(5, "Infinite EDM");
1534  statusCounter->getTH1()->GetYaxis()->SetBinLabel(6, "OK");
1535  statusCounter->getTH1()->GetYaxis()->SetBinLabel(7, "MINUIT stat.");
1536  statusCounter->getTH1()->GetYaxis()->SetBinLabel(8, "MINUIT stat.");
1537  statusCounter->getTH1()->GetYaxis()->SetBinLabel(9, "MINUIT stat.");
1538  statusCounter->getTH1()->GetYaxis()->SetBinLabel(10, "MINUIT stat.");
1539  statusCounter->getTH1()->GetYaxis()->SetBinLabel(11, "MINUIT stat.");
1540 
1541  fitResults = ibooker.book2D("A - fit results", "Results of Beam Spot Fit", 2, 0., 2., 9, 0., 9.);
1542  fitResults->setAxisTitle("Ongoing: bootstrapping", 1);
1543  fitResults->setBinLabel(9, "X[cm]", 2);
1544  fitResults->setBinLabel(8, "Y[cm]", 2);
1545  fitResults->setBinLabel(7, "Z[cm]", 2);
1546  fitResults->setBinLabel(6, "#sigma_{X}[cm]", 2);
1547  fitResults->setBinLabel(5, "#sigma_{Y}[cm]", 2);
1548  fitResults->setBinLabel(4, "#sigma_{Z}[cm]", 2);
1549  fitResults->setBinLabel(3, "#frac{dX}{dZ}[rad]", 2);
1550  fitResults->setBinLabel(2, "#frac{dY}{dZ}[rad]", 2);
1551  fitResults->setBinLabel(1, "Vtx[#]", 2);
1552  fitResults->setBinLabel(1, "Value", 1);
1553  fitResults->setBinLabel(2, "Error (stat)", 1);
1554  fitResults->getTH1()->SetOption("text");
1555 
1556  ibooker.setCurrentFolder("BeamPixel/EventInfo");
1557 
1558  reportSummary = ibooker.bookFloat("reportSummary");
1559  reportSummary->Fill(-1);
1560  reportSummaryMap = ibooker.book2D("reportSummaryMap", "Pixel-Vertices Beam Spot: % Good Fits", 1, 0., 1., 1, 0., 1.);
1561  reportSummaryMap->getTH1()->SetBinContent(1, 1, -1);
1562 
1563  ibooker.setCurrentFolder("BeamPixel/EventInfo/reportSummaryContents");
1564 
1565  // Convention for reportSummary and reportSummaryMap:
1566  // - -1% at the moment of creation of the histogram (i.e. white histogram)
1567  // - n% numberGoodFits / numberFits
1568 
1569  reset("scratch"); // Initialize histograms after creation
1570 }
MonitorElement * statusCounter
MonitorElement * dxdzlumi
MonitorElement * Vx_ZX
MonitorElement * bookFloat(TString const &name, FUNC onbooking=NOOP())
Definition: DQMStore.h:80
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
MonitorElement * Vx_Y_Cum
unsigned int nLumiXaxisRange
MonitorElement * Vx_X
MonitorElement * mYlumi
MonitorElement * sYlumi
MonitorElement * reportSummaryMap
MonitorElement * Vx_XY
MonitorElement * sZlumi
void Fill(long long x)
MonitorElement * fitResults
MonitorElement * Vx_ZY
MonitorElement * reportSummary
MonitorElement * Vx_ZY_Cum
MonitorElement * goodVxCounter
MonitorElement * dydzlumi
MonitorElement * Vx_ZX_Cum
MonitorElement * Vx_Z
MonitorElement * mXlumi
void reset(std::string ResetType)
virtual void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
MonitorElement * Vx_X_Cum
MonitorElement * mZlumi
MonitorElement * sXlumi
MonitorElement * Vx_Z_Fit
MonitorElement * Vx_XY_Cum
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
Definition: DQMStore.h:212
MonitorElement * Vx_X_Fit
MonitorElement * Vx_Z_Cum
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
MonitorElement * hitCounter
MonitorElement * Vx_Y_Fit
MonitorElement * Vx_Y
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)

◆ dqmBeginLuminosityBlock()

void Vx3DHLTAnalyzer::dqmBeginLuminosityBlock ( const edm::LuminosityBlock lumiBlock,
const edm::EventSetup iSetup 
)
overrideprivatevirtual

Reimplemented from DQMOneLumiEDAnalyzer<>.

Definition at line 944 of file Vx3DHLTAnalyzer.cc.

References edm::LuminosityBlockBase::beginTime(), edm::LuminosityBlockBase::luminosityBlock(), reset(), and edm::Timestamp::value().

944  {
945  // @@@ If statement to avoid problems with non-sequential lumisections @@@
946  if ((lumiCounter == 0) && (lumiBlock.luminosityBlock() > lastLumiOfFit)) {
947  beginTimeOfFit = lumiBlock.beginTime().value();
948  beginLumiOfFit = lumiBlock.luminosityBlock();
949  lumiCounter++;
950  } else if ((lumiCounter != 0) && (lumiBlock.luminosityBlock() >= (beginLumiOfFit + lumiCounter)))
951  lumiCounter++;
952  else
953  reset("scratch");
954 }
unsigned int lumiCounter
unsigned int beginLumiOfFit
edm::TimeValue_t beginTimeOfFit
void reset(std::string ResetType)
unsigned int lastLumiOfFit
TimeValue_t value() const
Definition: Timestamp.h:45
Timestamp const & beginTime() const
LuminosityBlockNumber_t luminosityBlock() const

◆ dqmEndLuminosityBlock()

void Vx3DHLTAnalyzer::dqmEndLuminosityBlock ( const edm::LuminosityBlock lumiBlock,
const edm::EventSetup iSetup 
)
overrideprivatevirtual

Reimplemented from DQMOneLumiEDAnalyzer<>.

Definition at line 956 of file Vx3DHLTAnalyzer.cc.

References beampixel_dqm_sourceclient-live_cfg::dataFromFit, beampixel_dqm_sourceclient-live_cfg::debugMode, MillePedeFileConverter_cfg::e, edm::LuminosityBlockBase::endTime(), B2GTnPMonitor_cfi::histTitle, mps_fire::i, edm::LuminosityBlockBase::luminosityBlock(), beampixel_dqm_sourceclient-live_cfg::maxLumiIntegration, beampixel_dqm_sourceclient-live_cfg::minNentries, beampixel_dqm_sourceclient-live_cfg::nLumiFit, funct::pow(), reset(), convertSQLiteXML::runNumber, mathSSE::sqrt(), edm::Timestamp::value(), and l1tpf_impl::writeToFile().

956  {
957  stringstream histTitle;
958  double minXfit, maxXfit;
959  int goodData;
960 
961  if ((nLumiFit != 0) && (lumiCounter % nLumiFit == 0) && (beginTimeOfFit != 0) && (runNumber != 0)) {
962  endTimeOfFit = lumiBlock.endTime().value();
963  endLumiOfFit = lumiBlock.luminosityBlock();
965  vector<double> vals;
966 
967  hitCounter->getTH1()->SetBinContent(lastLumiOfFit, (double)totalHits);
968  hitCounter->getTH1()->SetBinError(
970  (totalHits != 0 ? 1.
971  : 0.)); // It's not sqrt(n) because we want to weight all entries in the same way for the fit
972 
973  if (dataFromFit == true) {
974  vector<double> fitResults;
975 
976  fitResults.push_back(Vx_X->getTH1()->GetRMS() * Vx_X->getTH1()->GetRMS());
977  fitResults.push_back(Vx_Y->getTH1()->GetRMS() * Vx_Y->getTH1()->GetRMS());
978  fitResults.push_back(Vx_Z->getTH1()->GetRMS() * Vx_Z->getTH1()->GetRMS());
979  fitResults.push_back(0.0);
980  fitResults.push_back(0.0);
981  fitResults.push_back(0.0);
982  fitResults.push_back(Vx_X->getTH1()->GetMean());
983  fitResults.push_back(Vx_Y->getTH1()->GetMean());
984  fitResults.push_back(Vx_Z->getTH1()->GetMean());
985  for (unsigned int i = 0; i < nParams; i++)
986  fitResults.push_back(0.0);
987 
988  if (internalDebug == true) {
989  edm::LogInfo("Vx3DHLTAnalyzer") << "\t@@@ Beam Spot parameters - prefit @@@";
990 
992 
993  edm::LogInfo("Vx3DHLTAnalyzer") << "Runnumber " << runNumber;
994  edm::LogInfo("Vx3DHLTAnalyzer") << "BeginTimeOfFit " << formatTime(beginTimeOfFit >> 32) << " "
995  << (beginTimeOfFit >> 32);
996  edm::LogInfo("Vx3DHLTAnalyzer") << "EndTimeOfFit " << formatTime(endTimeOfFit >> 32) << " "
997  << (endTimeOfFit >> 32);
998  edm::LogInfo("Vx3DHLTAnalyzer") << "LumiRange " << beginLumiOfFit << " - " << endLumiOfFit;
999  }
1000 
1001  goodData = MyFit(&fitResults);
1002 
1003  if (internalDebug == true) {
1004  edm::LogInfo("Vx3DHLTAnalyzer") << "\t@@@ Beam Spot parameters - postfit @@@";
1005 
1007 
1008  edm::LogInfo("Vx3DHLTAnalyzer") << "goodData --> " << goodData;
1009  edm::LogInfo("Vx3DHLTAnalyzer") << "Used vertices --> " << counterVx;
1010  }
1011 
1012  if (goodData == 0) {
1013  vals.push_back(fitResults[6]);
1014  vals.push_back(fitResults[7]);
1015  vals.push_back(fitResults[8]);
1016  vals.push_back(std::sqrt(std::fabs(fitResults[0])));
1017  vals.push_back(std::sqrt(std::fabs(fitResults[1])));
1018  vals.push_back(std::sqrt(std::fabs(fitResults[2])));
1019  vals.push_back(fitResults[5]);
1020  vals.push_back(fitResults[4]);
1021 
1022  vals.push_back(std::pow(fitResults[6 + nParams], 2.));
1023  vals.push_back(std::pow(fitResults[7 + nParams], 2.));
1024  vals.push_back(std::pow(fitResults[8 + nParams], 2.));
1025  vals.push_back(std::pow(std::fabs(fitResults[0 + nParams]) / (2. * std::sqrt(std::fabs(fitResults[0]))), 2.));
1026  vals.push_back(std::pow(std::fabs(fitResults[1 + nParams]) / (2. * std::sqrt(std::fabs(fitResults[1]))), 2.));
1027  vals.push_back(std::pow(std::fabs(fitResults[2 + nParams]) / (2. * std::sqrt(std::fabs(fitResults[2]))), 2.));
1028  vals.push_back(std::pow(fitResults[5 + nParams], 2.));
1029  vals.push_back(std::pow(fitResults[4 + nParams], 2.));
1030  } else
1031  for (unsigned int i = 0; i < (nParams - 1) * 2; i++)
1032  vals.push_back(0.0);
1033 
1034  fitResults.clear();
1035  } else {
1036  counterVx = Vx_X->getTH1F()->GetEntries();
1037 
1038  if (Vx_X->getTH1F()->GetEntries() >= minNentries) {
1039  goodData = 0;
1040 
1041  vals.push_back(Vx_X->getTH1F()->GetMean());
1042  vals.push_back(Vx_Y->getTH1F()->GetMean());
1043  vals.push_back(Vx_Z->getTH1F()->GetMean());
1044  vals.push_back(Vx_X->getTH1F()->GetRMS());
1045  vals.push_back(Vx_Y->getTH1F()->GetRMS());
1046  vals.push_back(Vx_Z->getTH1F()->GetRMS());
1047  vals.push_back(0.0);
1048  vals.push_back(0.0);
1049 
1050  vals.push_back(std::pow(Vx_X->getTH1F()->GetMeanError(), 2.));
1051  vals.push_back(std::pow(Vx_Y->getTH1F()->GetMeanError(), 2.));
1052  vals.push_back(std::pow(Vx_Z->getTH1F()->GetMeanError(), 2.));
1053  vals.push_back(std::pow(Vx_X->getTH1F()->GetRMSError(), 2.));
1054  vals.push_back(std::pow(Vx_Y->getTH1F()->GetRMSError(), 2.));
1055  vals.push_back(std::pow(Vx_Z->getTH1F()->GetRMSError(), 2.));
1056  vals.push_back(0.0);
1057  vals.push_back(0.0);
1058  } else {
1059  goodData = -2;
1060  for (unsigned int i = 0; i < (nParams - 1) * 2; i++)
1061  vals.push_back(0.0);
1062  }
1063  }
1064 
1065  // vals[0] = X0
1066  // vals[1] = Y0
1067  // vals[2] = Z0
1068  // vals[3] = sigmaX0
1069  // vals[4] = sigmaY0
1070  // vals[5] = sigmaZ0
1071  // vals[6] = dxdz
1072  // vals[7] = dydz
1073 
1074  // vals[8] = err^2 X0
1075  // vals[9] = err^2 Y0
1076  // vals[10] = err^2 Z0
1077  // vals[11] = err^2 sigmaX0
1078  // vals[12] = err^2 sigmaY0
1079  // vals[13] = err^2 sigmaZ0
1080  // vals[14] = err^2 dxdz
1081  // vals[15] = err^2 dydz
1082 
1083  numberFits++;
1085  if (internalDebug == true)
1086  edm::LogInfo("Vx3DHLTAnalyzer") << "\tUsed vertices: " << counterVx;
1087 
1088  statusCounter->getTH1()->SetBinContent(lastLumiOfFit, (double)goodData);
1089  statusCounter->getTH1()->SetBinError(lastLumiOfFit, 1e-3);
1090 
1091  // Copy vertex position histograms into to-fit histograms
1092  if (goodData == 0)
1093  reset("fit");
1094  else if (lumiCounter >= maxLumiIntegration) {
1095  reset("fit");
1096  reset("whole");
1097  }
1098 
1099  for (int i = 0; i < Vx_X_Fit->getTH1()->GetNbinsX(); i++) {
1100  Vx_X_Fit->getTH1()->SetBinContent(
1101  i + 1, Vx_X_Fit->getTH1()->GetBinContent(i + 1) + Vx_X->getTH1()->GetBinContent(i + 1));
1102  Vx_X_Fit->getTH1()->SetBinError(i + 1, sqrt(Vx_X_Fit->getTH1()->GetBinContent(i + 1)));
1103  }
1104 
1105  for (int i = 0; i < Vx_Y_Fit->getTH1()->GetNbinsX(); i++) {
1106  Vx_Y_Fit->getTH1()->SetBinContent(
1107  i + 1, Vx_Y_Fit->getTH1()->GetBinContent(i + 1) + Vx_Y->getTH1()->GetBinContent(i + 1));
1108  Vx_Y_Fit->getTH1()->SetBinError(i + 1, sqrt(Vx_Y_Fit->getTH1()->GetBinContent(i + 1)));
1109  }
1110 
1111  for (int i = 0; i < Vx_Z_Fit->getTH1()->GetNbinsX(); i++) {
1112  Vx_Z_Fit->getTH1()->SetBinContent(
1113  i + 1, Vx_Z_Fit->getTH1()->GetBinContent(i + 1) + Vx_Z->getTH1()->GetBinContent(i + 1));
1114  Vx_Z_Fit->getTH1()->SetBinError(i + 1, sqrt(Vx_Z_Fit->getTH1()->GetBinContent(i + 1)));
1115  }
1116 
1117  // Check data quality
1118  if (goodData == 0) {
1119  numberGoodFits++;
1120 
1121  histTitle << "Ongoing: fitted lumis " << beginLumiOfFit << " - " << endLumiOfFit;
1122  reset("whole");
1123  } else {
1124  if (goodData == -2)
1125  histTitle << "Ongoing: not enough evts (" << lumiCounter << " - " << maxLumiIntegration << " lumis)";
1126  else
1127  histTitle << "Ongoing: temporary problems (" << lumiCounter << " - " << maxLumiIntegration << " lumis)";
1128 
1130  statusCounter->getTH1()->SetBinContent(lastLumiOfFit, -5);
1131  statusCounter->getTH1()->SetBinError(lastLumiOfFit, 1e-3);
1132  } else
1133  reset("hitCounter");
1134  }
1135 
1136  reportSummary->Fill((numberFits != 0 ? ((double)numberGoodFits) / ((double)numberFits) : -1));
1137  reportSummaryMap->getTH1()->SetBinContent(
1138  1, 1, (numberFits != 0 ? ((double)numberGoodFits) / ((double)numberFits) : -1));
1139 
1140  fitResults->setAxisTitle(histTitle.str(), 1);
1141 
1142  fitResults->setBinContent(1, 9, vals[0]);
1143  fitResults->setBinContent(1, 8, vals[1]);
1144  fitResults->setBinContent(1, 7, vals[2]);
1145  fitResults->setBinContent(1, 6, vals[3]);
1146  fitResults->setBinContent(1, 5, vals[4]);
1147  fitResults->setBinContent(1, 4, vals[5]);
1148  fitResults->setBinContent(1, 3, vals[6]);
1149  fitResults->setBinContent(1, 2, vals[7]);
1151 
1152  fitResults->setBinContent(2, 9, std::sqrt(vals[8]));
1153  fitResults->setBinContent(2, 8, std::sqrt(vals[9]));
1154  fitResults->setBinContent(2, 7, std::sqrt(vals[10]));
1155  fitResults->setBinContent(2, 6, std::sqrt(vals[11]));
1156  fitResults->setBinContent(2, 5, std::sqrt(vals[12]));
1157  fitResults->setBinContent(2, 4, std::sqrt(vals[13]));
1158  fitResults->setBinContent(2, 3, std::sqrt(vals[14]));
1159  fitResults->setBinContent(2, 2, std::sqrt(vals[15]));
1161 
1162  // Linear fit to the historical plots
1163  TF1* myLinFit = new TF1(
1164  "myLinFit", "[0] + [1]*x", mXlumi->getTH1()->GetXaxis()->GetXmin(), mXlumi->getTH1()->GetXaxis()->GetXmax());
1165  myLinFit->SetLineColor(2);
1166  myLinFit->SetLineWidth(2);
1167  myLinFit->SetParName(0, "Inter.");
1168  myLinFit->SetParName(1, "Slope");
1169 
1170  mXlumi->getTH1()->SetBinContent(lastLumiOfFit, vals[0]);
1171  mXlumi->getTH1()->SetBinError(lastLumiOfFit, std::sqrt(vals[8]));
1172  myLinFit->SetParameter(0, mXlumi->getTH1()->GetMean(2));
1173  myLinFit->SetParameter(1, 0.0);
1174  mXlumi->getTH1()->Fit(myLinFit, "QR");
1175 
1176  mYlumi->getTH1()->SetBinContent(lastLumiOfFit, vals[1]);
1177  mYlumi->getTH1()->SetBinError(lastLumiOfFit, std::sqrt(vals[9]));
1178  myLinFit->SetParameter(0, mYlumi->getTH1()->GetMean(2));
1179  myLinFit->SetParameter(1, 0.0);
1180  mYlumi->getTH1()->Fit(myLinFit, "QR");
1181 
1182  mZlumi->getTH1()->SetBinContent(lastLumiOfFit, vals[2]);
1183  mZlumi->getTH1()->SetBinError(lastLumiOfFit, std::sqrt(vals[10]));
1184  myLinFit->SetParameter(0, mZlumi->getTH1()->GetMean(2));
1185  myLinFit->SetParameter(1, 0.0);
1186  mZlumi->getTH1()->Fit(myLinFit, "QR");
1187 
1188  sXlumi->getTH1()->SetBinContent(lastLumiOfFit, vals[3]);
1189  sXlumi->getTH1()->SetBinError(lastLumiOfFit, std::sqrt(vals[11]));
1190  myLinFit->SetParameter(0, sXlumi->getTH1()->GetMean(2));
1191  myLinFit->SetParameter(1, 0.0);
1192  sXlumi->getTH1()->Fit(myLinFit, "QR");
1193 
1194  sYlumi->getTH1()->SetBinContent(lastLumiOfFit, vals[4]);
1195  sYlumi->getTH1()->SetBinError(lastLumiOfFit, std::sqrt(vals[12]));
1196  myLinFit->SetParameter(0, sYlumi->getTH1()->GetMean(2));
1197  myLinFit->SetParameter(1, 0.0);
1198  sYlumi->getTH1()->Fit(myLinFit, "QR");
1199 
1200  sZlumi->getTH1()->SetBinContent(lastLumiOfFit, vals[5]);
1201  sZlumi->getTH1()->SetBinError(lastLumiOfFit, std::sqrt(vals[13]));
1202  myLinFit->SetParameter(0, sZlumi->getTH1()->GetMean(2));
1203  myLinFit->SetParameter(1, 0.0);
1204  sZlumi->getTH1()->Fit(myLinFit, "QR");
1205 
1206  dxdzlumi->getTH1()->SetBinContent(lastLumiOfFit, vals[6]);
1207  dxdzlumi->getTH1()->SetBinError(lastLumiOfFit, std::sqrt(vals[14]));
1208  myLinFit->SetParameter(0, dxdzlumi->getTH1()->GetMean(2));
1209  myLinFit->SetParameter(1, 0.0);
1210  dxdzlumi->getTH1()->Fit(myLinFit, "QR");
1211 
1212  dydzlumi->getTH1()->SetBinContent(lastLumiOfFit, vals[7]);
1213  dydzlumi->getTH1()->SetBinError(lastLumiOfFit, std::sqrt(vals[15]));
1214  myLinFit->SetParameter(0, dydzlumi->getTH1()->GetMean(2));
1215  myLinFit->SetParameter(1, 0.0);
1216  dydzlumi->getTH1()->Fit(myLinFit, "QR");
1217 
1218  myLinFit->SetParameter(0, hitCounter->getTH1()->GetMean(2));
1219  myLinFit->SetParameter(1, 0.0);
1220  hitCounter->getTH1()->Fit(myLinFit, "QR");
1221 
1222  goodVxCounter->getTH1()->SetBinContent(lastLumiOfFit, (double)counterVx);
1223  goodVxCounter->getTH1()->SetBinError(
1224  lastLumiOfFit,
1225  (counterVx != 0 ? 1.
1226  : 0.)); // It's not sqrt(n) because we want to weight all entries in the same way for the fit
1227  myLinFit->SetParameter(0, goodVxCounter->getTH1()->GetMean(2));
1228  myLinFit->SetParameter(1, 0.0);
1229  goodVxCounter->getTH1()->Fit(myLinFit, "QR");
1230 
1231  delete myLinFit;
1232  vals.clear();
1233 
1234  // Gaussian fit to 1D vertex coordinate distributions
1235  TF1* myGaussFit = new TF1("myGaussFit",
1236  "[0]*exp(-(x-[1])*(x-[1])/(2*[2]*[2]))",
1237  Vx_Z_Fit->getTH1()->GetXaxis()->GetXmin(),
1238  Vx_Z_Fit->getTH1()->GetXaxis()->GetXmax());
1239  myGaussFit->SetLineColor(2);
1240  myGaussFit->SetLineWidth(2);
1241  myGaussFit->SetParName(0, "Ampl.");
1242  myGaussFit->SetParName(1, "#mu");
1243  myGaussFit->SetParName(2, "#sigma");
1244 
1245  myGaussFit->SetParameter(0, Vx_X_Fit->getTH1()->GetMaximum());
1246  myGaussFit->SetParameter(1, Vx_X_Fit->getTH1()->GetMean());
1247  myGaussFit->SetParameter(2, Vx_X_Fit->getTH1()->GetRMS());
1248  minXfit = Vx_X_Fit->getTH1()->GetBinLowEdge(1);
1249  for (int i = 0; i < Vx_X_Fit->getTH1()->GetNbinsX(); i++) {
1250  if (Vx_X_Fit->getTH1()->GetBinContent(i + 1) > 0) {
1251  minXfit = Vx_X_Fit->getTH1()->GetBinLowEdge(i + 1);
1252  break;
1253  }
1254  }
1255  maxXfit = Vx_X_Fit->getTH1()->GetBinLowEdge(Vx_X_Fit->getTH1()->GetNbinsX());
1256  for (int i = Vx_X_Fit->getTH1()->GetNbinsX(); i > 0; i--) {
1257  if (Vx_X_Fit->getTH1()->GetBinContent(i) > 0) {
1258  maxXfit = Vx_X_Fit->getTH1()->GetBinLowEdge(i);
1259  break;
1260  }
1261  }
1262  myGaussFit->SetRange(minXfit - (maxXfit - minXfit) / 2., maxXfit + (maxXfit - minXfit) / 2.);
1263  if (Vx_X_Fit->getTH1()->GetEntries() > 0)
1264  Vx_X_Fit->getTH1()->Fit(myGaussFit, "QRL");
1265 
1266  myGaussFit->SetParameter(0, Vx_Y_Fit->getTH1()->GetMaximum());
1267  myGaussFit->SetParameter(1, Vx_Y_Fit->getTH1()->GetMean());
1268  myGaussFit->SetParameter(2, Vx_Y_Fit->getTH1()->GetRMS());
1269  minXfit = Vx_Y_Fit->getTH1()->GetBinLowEdge(1);
1270  for (int i = 0; i < Vx_Y_Fit->getTH1()->GetNbinsX(); i++) {
1271  if (Vx_Y_Fit->getTH1()->GetBinContent(i + 1) > 0) {
1272  minXfit = Vx_Y_Fit->getTH1()->GetBinLowEdge(i + 1);
1273  break;
1274  }
1275  }
1276  maxXfit = Vx_Y_Fit->getTH1()->GetBinLowEdge(Vx_Y_Fit->getTH1()->GetNbinsX());
1277  for (int i = Vx_Y_Fit->getTH1()->GetNbinsX(); i > 0; i--) {
1278  if (Vx_Y_Fit->getTH1()->GetBinContent(i) > 0) {
1279  maxXfit = Vx_Y_Fit->getTH1()->GetBinLowEdge(i);
1280  break;
1281  }
1282  }
1283  myGaussFit->SetRange(minXfit - (maxXfit - minXfit) / 2., maxXfit + (maxXfit - minXfit) / 2.);
1284  if (Vx_Y_Fit->getTH1()->GetEntries() > 0)
1285  Vx_Y_Fit->getTH1()->Fit(myGaussFit, "QRL");
1286 
1287  myGaussFit->SetParameter(0, Vx_Z_Fit->getTH1()->GetMaximum());
1288  myGaussFit->SetParameter(1, Vx_Z_Fit->getTH1()->GetMean());
1289  myGaussFit->SetParameter(2, Vx_Z_Fit->getTH1()->GetRMS());
1290  minXfit = Vx_Z_Fit->getTH1()->GetBinLowEdge(1);
1291  for (int i = 0; i < Vx_Z_Fit->getTH1()->GetNbinsX(); i++) {
1292  if (Vx_Z_Fit->getTH1()->GetBinContent(i + 1) > 0) {
1293  minXfit = Vx_Z_Fit->getTH1()->GetBinLowEdge(i + 1);
1294  break;
1295  }
1296  }
1297  maxXfit = Vx_Z_Fit->getTH1()->GetBinLowEdge(Vx_Z_Fit->getTH1()->GetNbinsX());
1298  for (int i = Vx_Z_Fit->getTH1()->GetNbinsX(); i > 0; i--) {
1299  if (Vx_Z_Fit->getTH1()->GetBinContent(i) > 0) {
1300  maxXfit = Vx_Z_Fit->getTH1()->GetBinLowEdge(i);
1301  break;
1302  }
1303  }
1304  myGaussFit->SetRange(minXfit - (maxXfit - minXfit) / 2., maxXfit + (maxXfit - minXfit) / 2.);
1305  if (Vx_Z_Fit->getTH1()->GetEntries() > 0)
1306  Vx_Z_Fit->getTH1()->Fit(myGaussFit, "QRL");
1307 
1308  delete myGaussFit;
1309  } else if ((nLumiFit != 0) && (lumiCounter % nLumiFit != 0) && (beginTimeOfFit != 0) && (runNumber != 0)) {
1310  histTitle << "Ongoing: accumulating evts (" << lumiCounter % nLumiFit << " - " << nLumiFit << " in " << lumiCounter
1311  << " - " << maxLumiIntegration << " lumis)";
1312  fitResults->setAxisTitle(histTitle.str(), 1);
1313  if ((debugMode == true) && (outputDebugFile.is_open() == true)) {
1314  outputDebugFile << "\n"
1315  << "Runnumber " << runNumber << endl;
1316  outputDebugFile << "BeginTimeOfFit " << formatTime(beginTimeOfFit >> 32) << " " << (beginTimeOfFit >> 32) << endl;
1317  outputDebugFile << "BeginLumiRange " << beginLumiOfFit << endl;
1318  outputDebugFile << histTitle.str().c_str() << "\n" << endl;
1319  }
1320  } else if ((nLumiFit == 0) || (beginTimeOfFit == 0) || (runNumber == 0)) {
1321  histTitle << "Ongoing: no ongoing fits";
1322  fitResults->setAxisTitle(histTitle.str(), 1);
1323  if ((debugMode == true) && (outputDebugFile.is_open() == true))
1324  outputDebugFile << histTitle.str().c_str() << "\n" << endl;
1325 
1326  endLumiOfFit = lumiBlock.luminosityBlock();
1327 
1328  hitCounter->getTH1()->SetBinContent(endLumiOfFit, (double)totalHits);
1329  hitCounter->getTH1()->SetBinError(endLumiOfFit, std::sqrt((double)totalHits));
1330 
1331  reset("whole");
1332  }
1333 
1334  if (internalDebug == true)
1335  edm::LogInfo("Vx3DHLTAnalyzer") << "::\tHistogram title: " << histTitle.str();
1336 }
unsigned int lumiCounter
MonitorElement * statusCounter
MonitorElement * dxdzlumi
unsigned int totalHits
unsigned int maxLumiIntegration
unsigned int numberFits
unsigned int beginLumiOfFit
int MyFit(std::vector< double > *vals)
unsigned int minNentries
MonitorElement * Vx_X
MonitorElement * mYlumi
edm::TimeValue_t beginTimeOfFit
edm::TimeValue_t endTimeOfFit
MonitorElement * sYlumi
MonitorElement * reportSummaryMap
void writeToFile(std::vector< double > *vals, edm::TimeValue_t BeginTimeOfFit, edm::TimeValue_t EndTimeOfFit, unsigned int BeginLumiOfFit, unsigned int EndLumiOfFit, int dataType)
unsigned int nParams
MonitorElement * sZlumi
void Fill(long long x)
MonitorElement * fitResults
unsigned int counterVx
std::string formatTime(const time_t &t)
unsigned int endLumiOfFit
unsigned int numberGoodFits
T sqrt(T t)
Definition: SSEVec.h:19
MonitorElement * reportSummary
MonitorElement * goodVxCounter
std::ofstream outputDebugFile
MonitorElement * dydzlumi
MonitorElement * Vx_Z
MonitorElement * mXlumi
void reset(std::string ResetType)
MonitorElement * mZlumi
MonitorElement * sXlumi
MonitorElement * Vx_Z_Fit
Log< level::Info, false > LogInfo
unsigned int lastLumiOfFit
virtual void setBinContent(int binx, double content)
set content of bin (1-D)
TimeValue_t value() const
Definition: Timestamp.h:45
Timestamp const & endTime() const
void printFitParams(const std::vector< double > &fitResults)
unsigned int runNumber
MonitorElement * Vx_X_Fit
unsigned int nLumiFit
LuminosityBlockNumber_t luminosityBlock() const
MonitorElement * hitCounter
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:29
MonitorElement * Vx_Y_Fit
MonitorElement * Vx_Y
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)

◆ formatTime()

string Vx3DHLTAnalyzer::formatTime ( const time_t &  t)
private

Definition at line 194 of file Vx3DHLTAnalyzer.cc.

References submitPVValidationJobs::t.

194  {
195  char ts[25];
196  strftime(ts, sizeof(ts), "%Y.%m.%d %H:%M:%S %Z", gmtime(&t));
197 
198  string ts_string(ts);
199 
200  return ts_string;
201 }

◆ Gauss3DFunc()

double Vx3DHLTAnalyzer::Gauss3DFunc ( const double *  par)
protected

Definition at line 203 of file Vx3DHLTAnalyzer.cc.

References DIM, mps_fire::i, dqm-mbProfile::log, pi, mathSSE::sqrt(), pfPileUpJME_cfi::Vertices, beampixel_dqm_sourceclient-live_cfg::VxErrCorr, and x.

Referenced by MyFit().

203  {
204  double K[DIM][DIM]; // Covariance Matrix
205  double M[DIM][DIM]; // K^-1
206  double det;
207  double sumlog = 0.;
208 
209  // par[0] = K(0,0) --> Var[X]
210  // par[1] = K(1,1) --> Var[Y]
211  // par[2] = K(2,2) --> Var[Z]
212  // par[3] = K(0,1) = K(1,0) --> Cov[X,Y]
213  // par[4] = K(1,2) = K(2,1) --> Cov[Y,Z] --> dy/dz
214  // par[5] = K(0,2) = K(2,0) --> Cov[X,Z] --> dx/dz
215  // par[6] = mean x
216  // par[7] = mean y
217  // par[8] = mean z
218 
219  counterVx = 0;
220  for (unsigned int i = 0; i < Vertices.size(); i++) {
221  if ((std::sqrt((Vertices[i].x - xPos) * (Vertices[i].x - xPos) + (Vertices[i].y - yPos) * (Vertices[i].y - yPos)) <=
222  maxTransRadius) &&
223  (std::fabs(Vertices[i].z - zPos) <= maxLongLength)) {
224  if (considerVxCovariance == true) {
225  K[0][0] = std::fabs(par[0]) + VxErrCorr * VxErrCorr * std::fabs(Vertices[i].Covariance[0][0]);
226  K[1][1] = std::fabs(par[1]) + VxErrCorr * VxErrCorr * std::fabs(Vertices[i].Covariance[1][1]);
227  K[2][2] = std::fabs(par[2]) + VxErrCorr * VxErrCorr * std::fabs(Vertices[i].Covariance[2][2]);
228  K[0][1] = K[1][0] = par[3] + VxErrCorr * VxErrCorr * Vertices[i].Covariance[0][1];
229  K[1][2] = K[2][1] = par[4] * (std::fabs(par[2]) - std::fabs(par[1])) - par[5] * par[3] +
231  K[0][2] = K[2][0] = par[5] * (std::fabs(par[2]) - std::fabs(par[0])) - par[4] * par[3] +
233  } else {
234  K[0][0] = std::fabs(par[0]);
235  K[1][1] = std::fabs(par[1]);
236  K[2][2] = std::fabs(par[2]);
237  K[0][1] = K[1][0] = par[3];
238  K[1][2] = K[2][1] = par[4] * (std::fabs(par[2]) - std::fabs(par[1])) - par[5] * par[3];
239  K[0][2] = K[2][0] = par[5] * (std::fabs(par[2]) - std::fabs(par[0])) - par[4] * par[3];
240  }
241 
242  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]) +
243  K[0][2] * (K[0][1] * K[1][2] - K[0][2] * K[1][1]);
244 
245  M[0][0] = (K[1][1] * K[2][2] - K[1][2] * K[1][2]) / det;
246  M[1][1] = (K[0][0] * K[2][2] - K[0][2] * K[0][2]) / det;
247  M[2][2] = (K[0][0] * K[1][1] - K[0][1] * K[0][1]) / det;
248  M[0][1] = M[1][0] = (K[0][2] * K[1][2] - K[0][1] * K[2][2]) / det;
249  M[1][2] = M[2][1] = (K[0][2] * K[0][1] - K[1][2] * K[0][0]) / det;
250  M[0][2] = M[2][0] = (K[0][1] * K[1][2] - K[0][2] * K[1][1]) / det;
251 
252  sumlog += double(DIM) * std::log(2. * pi) + std::log(std::fabs(det)) +
253  (M[0][0] * (Vertices[i].x - par[6]) * (Vertices[i].x - par[6]) +
254  M[1][1] * (Vertices[i].y - par[7]) * (Vertices[i].y - par[7]) +
255  M[2][2] * (Vertices[i].z - par[8]) * (Vertices[i].z - par[8]) +
256  2. * M[0][1] * (Vertices[i].x - par[6]) * (Vertices[i].y - par[7]) +
257  2. * M[1][2] * (Vertices[i].y - par[7]) * (Vertices[i].z - par[8]) +
258  2. * M[0][2] * (Vertices[i].x - par[6]) * (Vertices[i].z - par[8]));
259 
260  counterVx++;
261  }
262  }
263 
264  return sumlog;
265 }
#define DIM(a)
unsigned int counterVx
T sqrt(T t)
Definition: SSEVec.h:19
std::vector< VertexType > Vertices

◆ HitCounter()

unsigned int Vx3DHLTAnalyzer::HitCounter ( const edm::Event iEvent)
private

Definition at line 181 of file Vx3DHLTAnalyzer.cc.

References edmNew::DetSetVector< T >::begin(), counter, edmNew::DetSetVector< T >::end(), h, iEvent, dqmiolumiharvest::j, and beampixel_dqm_sourceclient-live_cfg::pixelHitCollection.

181  {
182  Handle<SiPixelRecHitCollection> rechitspixel;
183  iEvent.getByToken(pixelHitCollection, rechitspixel);
184 
185  unsigned int counter = 0;
186 
187  for (SiPixelRecHitCollection::const_iterator j = rechitspixel->begin(); j != rechitspixel->end(); j++)
188  for (edmNew::DetSet<SiPixelRecHit>::const_iterator h = j->begin(); h != j->end(); h++)
189  counter += h->cluster()->size();
190 
191  return counter;
192 }
edm::EDGetTokenT< SiPixelRecHitCollection > pixelHitCollection
data_type const * const_iterator
Definition: DetSetNew.h:31
const_iterator end(bool update=false) const
int iEvent
Definition: GenABIO.cc:224
boost::transform_iterator< IterHelp, const_IdIter > const_iterator
const_iterator begin(bool update=false) const
static std::atomic< unsigned int > counter
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4

◆ MyFit()

int Vx3DHLTAnalyzer::MyFit ( std::vector< double > *  vals)
private

Definition at line 267 of file Vx3DHLTAnalyzer.cc.

References MillePedeFileConverter_cfg::e, Gauss3DFunc(), mps_fire::i, edm::isNotFinite(), dqmiolumiharvest::j, beampixel_dqm_sourceclient-live_cfg::minNentries, HLT_2022v12_cff::nSigmaZ, mathSSE::sqrt(), and cms::Exception::what().

267  {
268  // ############################################
269  // # RETURN CODE: #
270  // # >0 == NO OK - fit status (MINUIT manual) #
271  // # 0 == OK #
272  // # -1 == NO OK - not finite edm #
273  // # -2 == NO OK - not enough "minNentries" #
274  // # -3 == NO OK - not finite errors #
275  // # -4 == NO OK - negative determinant #
276  // # -5 == NO OK - maxLumiIntegration reached #
277  // ############################################
278 
279  if ((vals != nullptr) && (vals->size() == nParams * 2)) {
280  double nSigmaXY = 10.;
281  double nSigmaZ = 10.;
282  double parDistanceXY = 1e-3; // Unit: [cm]
283  double parDistanceZ = 1e-2; // Unit: [cm]
284  double parDistanceddZ = 1e-3; // Unit: [rad]
285  double parDistanceCxy = 1e-5; // Unit: [cm^2]
286  double bestEdm;
287 
288  const unsigned int trials = 4;
289  double largerDist[trials] = {0.1, 5., 10., 100.};
290 
291  double covxz, covyz, det;
292  double deltaMean;
293  int bestMovementX = 1;
294  int bestMovementY = 1;
295  int bestMovementZ = 1;
296  int goodData;
297 
298  double edm;
299 
300  vector<double>::const_iterator it = vals->begin();
301 
302  ROOT::Math::Minimizer* Gauss3D = ROOT::Math::Factory::CreateMinimizer("Minuit2", "Migrad");
303  Gauss3D->SetErrorDef(1.0);
304  if (internalDebug == true)
305  Gauss3D->SetPrintLevel(3);
306  else
307  Gauss3D->SetPrintLevel(0);
308 
309  ROOT::Math::Functor _Gauss3DFunc(this, &Vx3DHLTAnalyzer::Gauss3DFunc, nParams);
310  Gauss3D->SetFunction(_Gauss3DFunc);
311 
312  if (internalDebug == true)
313  edm::LogInfo("Vx3DHLTAnalyzer") << "\t@@@ START FITTING @@@";
314 
315  // @@@ Fit at X-deltaMean | X | X+deltaMean @@@
316  bestEdm = 1.;
317  for (int i = 0; i < 3; i++) {
318  deltaMean = (double(i) - 1.) * std::sqrt(*(it + 0));
319  if (internalDebug == true)
320  edm::LogInfo("Vx3DHLTAnalyzer") << "\tdeltaMean --> " << deltaMean;
321 
322  Gauss3D->Clear();
323 
324  Gauss3D->SetVariable(0, "var x ", *(it + 0), parDistanceXY * parDistanceXY);
325  Gauss3D->SetVariable(1, "var y ", *(it + 1), parDistanceXY * parDistanceXY);
326  Gauss3D->SetVariable(2, "var z ", *(it + 2), parDistanceZ * parDistanceZ);
327  Gauss3D->SetVariable(3, "cov xy", *(it + 3), parDistanceCxy);
328  Gauss3D->SetVariable(4, "dydz ", *(it + 4), parDistanceddZ);
329  Gauss3D->SetVariable(5, "dxdz ", *(it + 5), parDistanceddZ);
330  Gauss3D->SetVariable(6, "mean x", *(it + 6) + deltaMean, parDistanceXY);
331  Gauss3D->SetVariable(7, "mean y", *(it + 7), parDistanceXY);
332  Gauss3D->SetVariable(8, "mean z", *(it + 8), parDistanceZ);
333 
334  // Set the central positions of the centroid for vertex rejection
335  xPos = (*vals)[6];
336  yPos = (*vals)[7];
337  zPos = (*vals)[8];
338 
339  // Set dimensions of the centroid for vertex rejection
340  maxTransRadius = nSigmaXY * std::sqrt(std::fabs((*vals)[0]) + std::fabs((*vals)[1])) / 2.;
341  maxLongLength = nSigmaZ * std::sqrt(std::fabs((*vals)[2]));
342 
343  try {
344  Gauss3D->Minimize();
345  } catch (cms::Exception& er) {
346  edm::LogError("Vx3DHLTAnalyzer") << "\tCaught Minuit2 exception: " << er.what();
347  }
348  goodData = Gauss3D->Status();
349  edm = Gauss3D->Edm();
350 
351  if (counterVx < minNentries)
352  goodData = -2;
353  else if (isNotFinite(edm) == true) {
354  goodData = -1;
355  if (internalDebug == true)
356  edm::LogInfo("Vx3DHLTAnalyzer") << "\tNot finite edm !";
357  } else
358  for (unsigned int j = 0; j < nParams; j++)
359  if (isNotFinite(Gauss3D->Errors()[j]) == true) {
360  goodData = -3;
361  if (internalDebug == true)
362  edm::LogInfo("Vx3DHLTAnalyzer") << "\tNot finite errors !";
363  break;
364  }
365  if (goodData == 0) {
366  covyz = Gauss3D->X()[4] * (std::fabs(Gauss3D->X()[2]) - std::fabs(Gauss3D->X()[1])) -
367  Gauss3D->X()[5] * Gauss3D->X()[3];
368  covxz = Gauss3D->X()[5] * (std::fabs(Gauss3D->X()[2]) - std::fabs(Gauss3D->X()[0])) -
369  Gauss3D->X()[4] * Gauss3D->X()[3];
370 
371  det = std::fabs(Gauss3D->X()[0]) * (std::fabs(Gauss3D->X()[1]) * std::fabs(Gauss3D->X()[2]) - covyz * covyz) -
372  Gauss3D->X()[3] * (Gauss3D->X()[3] * std::fabs(Gauss3D->X()[2]) - covxz * covyz) +
373  covxz * (Gauss3D->X()[3] * covyz - covxz * std::fabs(Gauss3D->X()[1]));
374  if (det < 0.) {
375  goodData = -4;
376  if (internalDebug == true)
377  edm::LogInfo("Vx3DHLTAnalyzer") << "\tNegative determinant !";
378  }
379  }
380 
381  if ((goodData == 0) && (std::fabs(edm) < bestEdm)) {
382  bestEdm = edm;
383  bestMovementX = i;
384  }
385  }
386  if (internalDebug == true)
387  edm::LogInfo("Vx3DHLTAnalyzer") << "\tFound bestMovementX --> " << bestMovementX;
388 
389  // @@@ Fit at Y-deltaMean | Y | Y+deltaMean @@@
390  bestEdm = 1.;
391  for (int i = 0; i < 3; i++) {
392  deltaMean = (double(i) - 1.) * std::sqrt(*(it + 1));
393  if (internalDebug == true) {
394  edm::LogInfo("Vx3DHLTAnalyzer") << "\tdeltaMean --> " << deltaMean;
395  edm::LogInfo("Vx3DHLTAnalyzer") << "\tdeltaMean X --> " << (double(bestMovementX) - 1.) * std::sqrt(*(it + 0));
396  }
397 
398  Gauss3D->Clear();
399 
400  Gauss3D->SetVariable(0, "var x ", *(it + 0), parDistanceXY * parDistanceXY);
401  Gauss3D->SetVariable(1, "var y ", *(it + 1), parDistanceXY * parDistanceXY);
402  Gauss3D->SetVariable(2, "var z ", *(it + 2), parDistanceZ * parDistanceZ);
403  Gauss3D->SetVariable(3, "cov xy", *(it + 3), parDistanceCxy);
404  Gauss3D->SetVariable(4, "dydz ", *(it + 4), parDistanceddZ);
405  Gauss3D->SetVariable(5, "dxdz ", *(it + 5), parDistanceddZ);
406  Gauss3D->SetVariable(6, "mean x", *(it + 6) + (double(bestMovementX) - 1.) * std::sqrt(*(it + 0)), parDistanceXY);
407  Gauss3D->SetVariable(7, "mean y", *(it + 7) + deltaMean, parDistanceXY);
408  Gauss3D->SetVariable(8, "mean z", *(it + 8), parDistanceZ);
409 
410  // Set the central positions of the centroid for vertex rejection
411  xPos = Gauss3D->X()[6];
412  yPos = Gauss3D->X()[7];
413  zPos = Gauss3D->X()[8];
414 
415  // Set dimensions of the centroid for vertex rejection
416  maxTransRadius = nSigmaXY * std::sqrt(std::fabs(Gauss3D->X()[0]) + std::fabs(Gauss3D->X()[1])) / 2.;
417  maxLongLength = nSigmaZ * std::sqrt(std::fabs(Gauss3D->X()[2]));
418 
419  try {
420  Gauss3D->Minimize();
421  } catch (cms::Exception& er) {
422  edm::LogError("Vx3DHLTAnalyzer") << "\tCaught Minuit2 exception: " << er.what();
423  }
424  goodData = Gauss3D->Status();
425  edm = Gauss3D->Edm();
426 
427  if (counterVx < minNentries)
428  goodData = -2;
429  else if (isNotFinite(edm) == true) {
430  goodData = -1;
431  if (internalDebug == true)
432  edm::LogInfo("Vx3DHLTAnalyzer") << "\tNot finite edm !";
433  } else
434  for (unsigned int j = 0; j < nParams; j++)
435  if (isNotFinite(Gauss3D->Errors()[j]) == true) {
436  goodData = -3;
437  if (internalDebug == true)
438  edm::LogInfo("Vx3DHLTAnalyzer") << "\tNot finite errors !";
439  break;
440  }
441  if (goodData == 0) {
442  covyz = Gauss3D->X()[4] * (std::fabs(Gauss3D->X()[2]) - std::fabs(Gauss3D->X()[1])) -
443  Gauss3D->X()[5] * Gauss3D->X()[3];
444  covxz = Gauss3D->X()[5] * (std::fabs(Gauss3D->X()[2]) - std::fabs(Gauss3D->X()[0])) -
445  Gauss3D->X()[4] * Gauss3D->X()[3];
446 
447  det = std::fabs(Gauss3D->X()[0]) * (std::fabs(Gauss3D->X()[1]) * std::fabs(Gauss3D->X()[2]) - covyz * covyz) -
448  Gauss3D->X()[3] * (Gauss3D->X()[3] * std::fabs(Gauss3D->X()[2]) - covxz * covyz) +
449  covxz * (Gauss3D->X()[3] * covyz - covxz * std::fabs(Gauss3D->X()[1]));
450  if (det < 0.) {
451  goodData = -4;
452  if (internalDebug == true)
453  edm::LogInfo("Vx3DHLTAnalyzer") << "\tNegative determinant !";
454  }
455  }
456 
457  if ((goodData == 0) && (std::fabs(edm) < bestEdm)) {
458  bestEdm = edm;
459  bestMovementY = i;
460  }
461  }
462  if (internalDebug == true)
463  edm::LogInfo("Vx3DHLTAnalyzer") << "\tFound bestMovementY --> " << bestMovementY;
464 
465  // @@@ Fit at Z-deltaMean | Z | Z+deltaMean @@@
466  bestEdm = 1.;
467  for (int i = 0; i < 3; i++) {
468  deltaMean = (double(i) - 1.) * std::sqrt(*(it + 2));
469  if (internalDebug == true) {
470  edm::LogInfo("Vx3DHLTAnalyzer") << "\tdeltaMean --> " << deltaMean;
471  edm::LogInfo("Vx3DHLTAnalyzer") << "\tdeltaMean X --> " << (double(bestMovementX) - 1.) * std::sqrt(*(it + 0));
472  edm::LogInfo("Vx3DHLTAnalyzer") << "\tdeltaMean Y --> " << (double(bestMovementY) - 1.) * std::sqrt(*(it + 1));
473  }
474 
475  Gauss3D->Clear();
476 
477  Gauss3D->SetVariable(0, "var x ", *(it + 0), parDistanceXY * parDistanceXY);
478  Gauss3D->SetVariable(1, "var y ", *(it + 1), parDistanceXY * parDistanceXY);
479  Gauss3D->SetVariable(2, "var z ", *(it + 2), parDistanceZ * parDistanceZ);
480  Gauss3D->SetVariable(3, "cov xy", *(it + 3), parDistanceCxy);
481  Gauss3D->SetVariable(4, "dydz ", *(it + 4), parDistanceddZ);
482  Gauss3D->SetVariable(5, "dxdz ", *(it + 5), parDistanceddZ);
483  Gauss3D->SetVariable(6, "mean x", *(it + 6) + (double(bestMovementX) - 1.) * std::sqrt(*(it + 0)), parDistanceXY);
484  Gauss3D->SetVariable(7, "mean y", *(it + 7) + (double(bestMovementY) - 1.) * std::sqrt(*(it + 1)), parDistanceXY);
485  Gauss3D->SetVariable(8, "mean z", *(it + 8) + deltaMean, parDistanceZ);
486 
487  // Set the central positions of the centroid for vertex rejection
488  xPos = Gauss3D->X()[6];
489  yPos = Gauss3D->X()[7];
490  zPos = Gauss3D->X()[8];
491 
492  // Set dimensions of the centroid for vertex rejection
493  maxTransRadius = nSigmaXY * std::sqrt(std::fabs(Gauss3D->X()[0]) + std::fabs(Gauss3D->X()[1])) / 2.;
494  maxLongLength = nSigmaZ * std::sqrt(std::fabs(Gauss3D->X()[2]));
495 
496  try {
497  Gauss3D->Minimize();
498  } catch (cms::Exception& er) {
499  edm::LogError("Vx3DHLTAnalyzer") << "\tCaught Minuit2 exception: " << er.what();
500  }
501  goodData = Gauss3D->Status();
502  edm = Gauss3D->Edm();
503 
504  if (counterVx < minNentries)
505  goodData = -2;
506  else if (isNotFinite(edm) == true) {
507  goodData = -1;
508  if (internalDebug == true)
509  edm::LogInfo("Vx3DHLTAnalyzer") << "\tNot finite edm !";
510  } else
511  for (unsigned int j = 0; j < nParams; j++)
512  if (isNotFinite(Gauss3D->Errors()[j]) == true) {
513  goodData = -3;
514  if (internalDebug == true)
515  edm::LogInfo("Vx3DHLTAnalyzer") << "\tNot finite errors !";
516  break;
517  }
518  if (goodData == 0) {
519  covyz = Gauss3D->X()[4] * (std::fabs(Gauss3D->X()[2]) - std::fabs(Gauss3D->X()[1])) -
520  Gauss3D->X()[5] * Gauss3D->X()[3];
521  covxz = Gauss3D->X()[5] * (std::fabs(Gauss3D->X()[2]) - std::fabs(Gauss3D->X()[0])) -
522  Gauss3D->X()[4] * Gauss3D->X()[3];
523 
524  det = std::fabs(Gauss3D->X()[0]) * (std::fabs(Gauss3D->X()[1]) * std::fabs(Gauss3D->X()[2]) - covyz * covyz) -
525  Gauss3D->X()[3] * (Gauss3D->X()[3] * std::fabs(Gauss3D->X()[2]) - covxz * covyz) +
526  covxz * (Gauss3D->X()[3] * covyz - covxz * std::fabs(Gauss3D->X()[1]));
527  if (det < 0.) {
528  goodData = -4;
529  if (internalDebug == true)
530  edm::LogInfo("Vx3DHLTAnalyzer") << "\tNegative determinant !";
531  }
532  }
533 
534  if ((goodData == 0) && (std::fabs(edm) < bestEdm)) {
535  bestEdm = edm;
536  bestMovementZ = i;
537  }
538  }
539  if (internalDebug == true)
540  edm::LogInfo("Vx3DHLTAnalyzer") << "\tFound bestMovementZ --> " << bestMovementZ;
541 
542  Gauss3D->Clear();
543 
544  // @@@ FINAL FIT @@@
545  Gauss3D->SetVariable(0, "var x ", *(it + 0), parDistanceXY * parDistanceXY);
546  Gauss3D->SetVariable(1, "var y ", *(it + 1), parDistanceXY * parDistanceXY);
547  Gauss3D->SetVariable(2, "var z ", *(it + 2), parDistanceZ * parDistanceZ);
548  Gauss3D->SetVariable(3, "cov xy", *(it + 3), parDistanceCxy);
549  Gauss3D->SetVariable(4, "dydz ", *(it + 4), parDistanceddZ);
550  Gauss3D->SetVariable(5, "dxdz ", *(it + 5), parDistanceddZ);
551  Gauss3D->SetVariable(6, "mean x", *(it + 6) + (double(bestMovementX) - 1.) * std::sqrt(*(it + 0)), parDistanceXY);
552  Gauss3D->SetVariable(7, "mean y", *(it + 7) + (double(bestMovementY) - 1.) * std::sqrt(*(it + 1)), parDistanceXY);
553  Gauss3D->SetVariable(8, "mean z", *(it + 8) + (double(bestMovementZ) - 1.) * std::sqrt(*(it + 2)), parDistanceZ);
554 
555  // Set the central positions of the centroid for vertex rejection
556  xPos = (*vals)[6];
557  yPos = (*vals)[7];
558  zPos = (*vals)[8];
559 
560  // Set dimensions of the centroid for vertex rejection
561  maxTransRadius = nSigmaXY * std::sqrt(std::fabs((*vals)[0]) + std::fabs((*vals)[1])) / 2.;
562  maxLongLength = nSigmaZ * std::sqrt(std::fabs((*vals)[2]));
563 
564  try {
565  Gauss3D->Minimize();
566  } catch (cms::Exception& er) {
567  edm::LogError("Vx3DHLTAnalyzer") << "\tCaught Minuit2 exception: " << er.what();
568  }
569  goodData = Gauss3D->Status();
570  edm = Gauss3D->Edm();
571 
572  if (counterVx < minNentries)
573  goodData = -2;
574  else if (isNotFinite(edm) == true) {
575  goodData = -1;
576  if (internalDebug == true)
577  edm::LogInfo("Vx3DHLTAnalyzer") << "\tNot finite edm !";
578  } else
579  for (unsigned int j = 0; j < nParams; j++)
580  if (isNotFinite(Gauss3D->Errors()[j]) == true) {
581  goodData = -3;
582  if (internalDebug == true)
583  edm::LogInfo("Vx3DHLTAnalyzer") << "\tNot finite errors !";
584  break;
585  }
586  if (goodData == 0) {
587  covyz = Gauss3D->X()[4] * (std::fabs(Gauss3D->X()[2]) - std::fabs(Gauss3D->X()[1])) -
588  Gauss3D->X()[5] * Gauss3D->X()[3];
589  covxz = Gauss3D->X()[5] * (std::fabs(Gauss3D->X()[2]) - std::fabs(Gauss3D->X()[0])) -
590  Gauss3D->X()[4] * Gauss3D->X()[3];
591 
592  det = std::fabs(Gauss3D->X()[0]) * (std::fabs(Gauss3D->X()[1]) * std::fabs(Gauss3D->X()[2]) - covyz * covyz) -
593  Gauss3D->X()[3] * (Gauss3D->X()[3] * std::fabs(Gauss3D->X()[2]) - covxz * covyz) +
594  covxz * (Gauss3D->X()[3] * covyz - covxz * std::fabs(Gauss3D->X()[1]));
595  if (det < 0.) {
596  goodData = -4;
597  if (internalDebug == true)
598  edm::LogInfo("Vx3DHLTAnalyzer") << "\tNegative determinant !";
599  }
600  }
601 
602  // @@@ FIT WITH DIFFERENT PARAMETER DISTANCES @@@
603  for (unsigned int i = 0; i < trials; i++) {
604  if ((goodData != 0) && (goodData != -2)) {
605  Gauss3D->Clear();
606 
607  if (internalDebug == true)
608  edm::LogInfo("Vx3DHLTAnalyzer") << "\tFIT WITH DIFFERENT PARAMETER DISTANCES - STEP " << i + 1;
609 
610  Gauss3D->SetVariable(0, "var x ", *(it + 0), parDistanceXY * parDistanceXY * largerDist[i]);
611  Gauss3D->SetVariable(1, "var y ", *(it + 1), parDistanceXY * parDistanceXY * largerDist[i]);
612  Gauss3D->SetVariable(2, "var z ", *(it + 2), parDistanceZ * parDistanceZ * largerDist[i]);
613  Gauss3D->SetVariable(3, "cov xy", *(it + 3), parDistanceCxy * largerDist[i]);
614  Gauss3D->SetVariable(4, "dydz ", *(it + 4), parDistanceddZ * largerDist[i]);
615  Gauss3D->SetVariable(5, "dxdz ", *(it + 5), parDistanceddZ * largerDist[i]);
616  Gauss3D->SetVariable(6,
617  "mean x",
618  *(it + 6) + (double(bestMovementX) - 1.) * std::sqrt(*(it + 0)),
619  parDistanceXY * largerDist[i]);
620  Gauss3D->SetVariable(7,
621  "mean y",
622  *(it + 7) + (double(bestMovementY) - 1.) * std::sqrt(*(it + 1)),
623  parDistanceXY * largerDist[i]);
624  Gauss3D->SetVariable(
625  8, "mean z", *(it + 8) + (double(bestMovementZ) - 1.) * std::sqrt(*(it + 2)), parDistanceZ * largerDist[i]);
626 
627  // Set the central positions of the centroid for vertex rejection
628  xPos = Gauss3D->X()[6];
629  yPos = Gauss3D->X()[7];
630  zPos = Gauss3D->X()[8];
631 
632  // Set dimensions of the centroid for vertex rejection
633  maxTransRadius = nSigmaXY * std::sqrt(std::fabs(Gauss3D->X()[0]) + std::fabs(Gauss3D->X()[1])) / 2.;
634  maxLongLength = nSigmaZ * std::sqrt(std::fabs(Gauss3D->X()[2]));
635 
636  try {
637  Gauss3D->Minimize();
638  } catch (cms::Exception& er) {
639  edm::LogError("Vx3DHLTAnalyzer") << "\tCaught Minuit2 exception: " << er.what();
640  }
641  goodData = Gauss3D->Status();
642  edm = Gauss3D->Edm();
643 
644  if (counterVx < minNentries)
645  goodData = -2;
646  else if (isNotFinite(edm) == true) {
647  goodData = -1;
648  if (internalDebug == true)
649  edm::LogInfo("Vx3DHLTAnalyzer") << "\tNot finite edm !";
650  } else
651  for (unsigned int j = 0; j < nParams; j++)
652  if (isNotFinite(Gauss3D->Errors()[j]) == true) {
653  goodData = -3;
654  if (internalDebug == true)
655  edm::LogInfo("Vx3DHLTAnalyzer") << "\tNot finite errors !";
656  break;
657  }
658  if (goodData == 0) {
659  covyz = Gauss3D->X()[4] * (std::fabs(Gauss3D->X()[2]) - std::fabs(Gauss3D->X()[1])) -
660  Gauss3D->X()[5] * Gauss3D->X()[3];
661  covxz = Gauss3D->X()[5] * (std::fabs(Gauss3D->X()[2]) - std::fabs(Gauss3D->X()[0])) -
662  Gauss3D->X()[4] * Gauss3D->X()[3];
663 
664  det = std::fabs(Gauss3D->X()[0]) * (std::fabs(Gauss3D->X()[1]) * std::fabs(Gauss3D->X()[2]) - covyz * covyz) -
665  Gauss3D->X()[3] * (Gauss3D->X()[3] * std::fabs(Gauss3D->X()[2]) - covxz * covyz) +
666  covxz * (Gauss3D->X()[3] * covyz - covxz * std::fabs(Gauss3D->X()[1]));
667  if (det < 0.) {
668  goodData = -4;
669  if (internalDebug == true)
670  edm::LogInfo("Vx3DHLTAnalyzer") << "\tNegative determinant !";
671  }
672  }
673  } else
674  break;
675  }
676 
677  if (goodData == 0)
678  for (unsigned int i = 0; i < nParams; i++) {
679  vals->operator[](i) = Gauss3D->X()[i];
680  vals->operator[](i + nParams) = Gauss3D->Errors()[i];
681  }
682 
683  delete Gauss3D;
684  return goodData;
685  }
686 
687  return -1;
688 }
constexpr bool isNotFinite(T x)
Definition: isFinite.h:9
unsigned int minNentries
Log< level::Error, false > LogError
double Gauss3DFunc(const double *par)
unsigned int nParams
unsigned int counterVx
T sqrt(T t)
Definition: SSEVec.h:19
Log< level::Info, false > LogInfo
HLT enums.
char const * what() const noexcept override
Definition: Exception.cc:103

◆ printFitParams()

void Vx3DHLTAnalyzer::printFitParams ( const std::vector< double > &  fitResults)
private

Definition at line 932 of file Vx3DHLTAnalyzer.cc.

932  {
933  edm::LogInfo("Vx3DHLTAnalyzer") << "var x --> " << fitResults[0] << " +/- " << fitResults[0 + nParams];
934  edm::LogInfo("Vx3DHLTAnalyzer") << "var y --> " << fitResults[1] << " +/- " << fitResults[1 + nParams];
935  edm::LogInfo("Vx3DHLTAnalyzer") << "var z --> " << fitResults[2] << " +/- " << fitResults[2 + nParams];
936  edm::LogInfo("Vx3DHLTAnalyzer") << "cov xy --> " << fitResults[3] << " +/- " << fitResults[3 + nParams];
937  edm::LogInfo("Vx3DHLTAnalyzer") << "dydz --> " << fitResults[4] << " +/- " << fitResults[4 + nParams];
938  edm::LogInfo("Vx3DHLTAnalyzer") << "dxdz --> " << fitResults[5] << " +/- " << fitResults[5 + nParams];
939  edm::LogInfo("Vx3DHLTAnalyzer") << "mean x --> " << fitResults[6] << " +/- " << fitResults[6 + nParams];
940  edm::LogInfo("Vx3DHLTAnalyzer") << "mean y --> " << fitResults[7] << " +/- " << fitResults[7 + nParams];
941  edm::LogInfo("Vx3DHLTAnalyzer") << "mean z --> " << fitResults[8] << " +/- " << fitResults[8 + nParams];
942 }
unsigned int nParams
MonitorElement * fitResults
Log< level::Info, false > LogInfo

◆ reset()

void Vx3DHLTAnalyzer::reset ( std::string  ResetType)
private

Definition at line 690 of file Vx3DHLTAnalyzer.cc.

References beampixel_dqm_sourceclient-live_cfg::debugMode, convertSQLiteXML::runNumber, and pfPileUpJME_cfi::Vertices.

690  {
691  if ((debugMode == true) && (outputDebugFile.is_open() == true)) {
692  outputDebugFile << "Runnumber " << runNumber << endl;
693  outputDebugFile << "BeginTimeOfFit " << formatTime(beginTimeOfFit >> 32) << " " << (beginTimeOfFit >> 32) << endl;
694  outputDebugFile << "BeginLumiRange " << beginLumiOfFit << endl;
695  outputDebugFile << "EndTimeOfFit " << formatTime(endTimeOfFit >> 32) << " " << (endTimeOfFit >> 32) << endl;
696  outputDebugFile << "EndLumiRange " << endLumiOfFit << endl;
697  outputDebugFile << "LumiCounter " << lumiCounter << endl;
698  outputDebugFile << "LastLumiOfFit " << lastLumiOfFit << endl;
699  }
700 
701  if (ResetType == "scratch") {
702  runNumber = 0;
703  numberGoodFits = 0;
704  numberFits = 0;
705  lastLumiOfFit = 0;
706 
707  Vx_X->Reset();
708  Vx_Y->Reset();
709  Vx_Z->Reset();
710 
711  Vx_X_Fit->Reset();
712  Vx_Y_Fit->Reset();
713  Vx_Z_Fit->Reset();
714 
715  Vx_ZX->Reset();
716  Vx_ZY->Reset();
717  Vx_XY->Reset();
718 
719  Vx_X_Cum->Reset();
720  Vx_Y_Cum->Reset();
721  Vx_Z_Cum->Reset();
722 
723  Vx_ZX_Cum->Reset();
724  Vx_ZY_Cum->Reset();
725  Vx_XY_Cum->Reset();
726 
727  mXlumi->Reset();
728  mYlumi->Reset();
729  mZlumi->Reset();
730 
731  sXlumi->Reset();
732  sYlumi->Reset();
733  sZlumi->Reset();
734 
735  dxdzlumi->Reset();
736  dydzlumi->Reset();
737 
738  hitCounter->Reset();
739  goodVxCounter->Reset();
740  statusCounter->Reset();
741  fitResults->Reset();
742 
743  reportSummary->Fill(-1);
744  reportSummaryMap->getTH1()->SetBinContent(1, 1, -1);
745 
746  Vertices.clear();
747 
748  lumiCounter = 0;
749  totalHits = 0;
750  beginTimeOfFit = 0;
751  endTimeOfFit = 0;
752  beginLumiOfFit = 0;
753  endLumiOfFit = 0;
754 
755  if (internalDebug == true)
756  edm::LogInfo("Vx3DHLTAnalyzer") << "\tReset issued: scratch";
757  if ((debugMode == true) && (outputDebugFile.is_open() == true))
758  outputDebugFile << "Reset -scratch- issued\n" << endl;
759  } else if (ResetType == "whole") {
760  Vx_X->Reset();
761  Vx_Y->Reset();
762  Vx_Z->Reset();
763 
764  Vx_ZX->Reset();
765  Vx_ZY->Reset();
766  Vx_XY->Reset();
767 
768  Vertices.clear();
769 
770  lumiCounter = 0;
771  totalHits = 0;
772  beginTimeOfFit = 0;
773  endTimeOfFit = 0;
774  beginLumiOfFit = 0;
775  endLumiOfFit = 0;
776 
777  if (internalDebug == true)
778  edm::LogInfo("Vx3DHLTAnalyzer") << "\tReset issued: whole";
779  if ((debugMode == true) && (outputDebugFile.is_open() == true))
780  outputDebugFile << "Reset -whole- issued\n" << endl;
781  } else if (ResetType == "fit") {
782  Vx_X_Fit->Reset();
783  Vx_Y_Fit->Reset();
784  Vx_Z_Fit->Reset();
785 
786  if (internalDebug == true)
787  edm::LogInfo("Vx3DHLTAnalyzer") << "\tReset issued: fit";
788  if ((debugMode == true) && (outputDebugFile.is_open() == true))
789  outputDebugFile << "Reset -fit- issued\n" << endl;
790  } else if (ResetType == "hitCounter") {
791  totalHits = 0;
792 
793  if (internalDebug == true)
794  edm::LogInfo("Vx3DHLTAnalyzer") << "\tReset issued: hitCounter";
795  if ((debugMode == true) && (outputDebugFile.is_open() == true))
796  outputDebugFile << "Reset -hitCounter- issued\n" << endl;
797  }
798 }
unsigned int lumiCounter
MonitorElement * statusCounter
MonitorElement * dxdzlumi
MonitorElement * Vx_ZX
unsigned int totalHits
unsigned int numberFits
MonitorElement * Vx_Y_Cum
unsigned int beginLumiOfFit
MonitorElement * Vx_X
MonitorElement * mYlumi
edm::TimeValue_t beginTimeOfFit
edm::TimeValue_t endTimeOfFit
MonitorElement * sYlumi
MonitorElement * reportSummaryMap
MonitorElement * Vx_XY
MonitorElement * sZlumi
void Fill(long long x)
virtual void Reset()
Remove all data from the ME, keept the empty histogram with all its settings.
MonitorElement * fitResults
MonitorElement * Vx_ZY
std::string formatTime(const time_t &t)
unsigned int endLumiOfFit
unsigned int numberGoodFits
MonitorElement * reportSummary
MonitorElement * Vx_ZY_Cum
MonitorElement * goodVxCounter
std::ofstream outputDebugFile
MonitorElement * dydzlumi
MonitorElement * Vx_ZX_Cum
MonitorElement * Vx_Z
MonitorElement * mXlumi
MonitorElement * Vx_X_Cum
std::vector< VertexType > Vertices
MonitorElement * mZlumi
MonitorElement * sXlumi
MonitorElement * Vx_Z_Fit
Log< level::Info, false > LogInfo
unsigned int lastLumiOfFit
MonitorElement * Vx_XY_Cum
unsigned int runNumber
MonitorElement * Vx_X_Fit
MonitorElement * Vx_Z_Cum
MonitorElement * hitCounter
MonitorElement * Vx_Y_Fit
MonitorElement * Vx_Y

◆ writeToFile()

void Vx3DHLTAnalyzer::writeToFile ( std::vector< double > *  vals,
edm::TimeValue_t  BeginTimeOfFit,
edm::TimeValue_t  EndTimeOfFit,
unsigned int  BeginLumiOfFit,
unsigned int  EndLumiOfFit,
int  dataType 
)
private

Definition at line 800 of file Vx3DHLTAnalyzer.cc.

References DTskim_cfg::dataType, beampixel_dqm_sourceclient-live_cfg::debugMode, MillePedeFileConverter_cfg::fileName, MillePedeFileConverter_cfg::out, download_sqlite_cfg::outputFile, convertSQLiteXML::runNumber, and mathSSE::sqrt().

805  {
806  stringstream BufferString;
807  BufferString.precision(5);
808 
809  outputFile.open(fileName.c_str(), ios::out);
810 
811  if ((outputFile.is_open() == true) && (vals != nullptr) && (vals->size() == (nParams - 1) * 2)) {
812  vector<double>::const_iterator it = vals->begin();
813 
814  outputFile << "Runnumber " << runNumber << endl;
815  outputFile << "BeginTimeOfFit " << formatTime(beginTimeOfFit >> 32) << " " << (beginTimeOfFit >> 32) << endl;
816  outputFile << "EndTimeOfFit " << formatTime(endTimeOfFit >> 32) << " " << (endTimeOfFit >> 32) << endl;
817  outputFile << "LumiRange " << beginLumiOfFit << " - " << endLumiOfFit << endl;
818  outputFile << "Type " << dataType << endl;
819  // 3D Vertexing with Pixel Tracks:
820  // Good data = Type 3
821  // Bad data = Type -1
822 
823  BufferString << *(it + 0);
824  outputFile << "X0 " << BufferString.str().c_str() << endl;
825  BufferString.str("");
826 
827  BufferString << *(it + 1);
828  outputFile << "Y0 " << BufferString.str().c_str() << endl;
829  BufferString.str("");
830 
831  BufferString << *(it + 2);
832  outputFile << "Z0 " << BufferString.str().c_str() << endl;
833  BufferString.str("");
834 
835  BufferString << *(it + 5);
836  outputFile << "sigmaZ0 " << BufferString.str().c_str() << endl;
837  BufferString.str("");
838 
839  BufferString << *(it + 6);
840  outputFile << "dxdz " << BufferString.str().c_str() << endl;
841  BufferString.str("");
842 
843  BufferString << *(it + 7);
844  outputFile << "dydz " << BufferString.str().c_str() << endl;
845  BufferString.str("");
846 
847  BufferString << *(it + 3);
848  outputFile << "BeamWidthX " << BufferString.str().c_str() << endl;
849  BufferString.str("");
850 
851  BufferString << *(it + 4);
852  outputFile << "BeamWidthY " << BufferString.str().c_str() << endl;
853  BufferString.str("");
854 
855  outputFile << "Cov(0,j) " << *(it + 8) << " 0 0 0 0 0 0" << endl;
856  outputFile << "Cov(1,j) 0 " << *(it + 9) << " 0 0 0 0 0" << endl;
857  outputFile << "Cov(2,j) 0 0 " << *(it + 10) << " 0 0 0 0" << endl;
858  outputFile << "Cov(3,j) 0 0 0 " << *(it + 13) << " 0 0 0" << endl;
859  outputFile << "Cov(4,j) 0 0 0 0 " << *(it + 14) << " 0 0" << endl;
860  outputFile << "Cov(5,j) 0 0 0 0 0 " << *(it + 15) << " 0" << endl;
861  outputFile << "Cov(6,j) 0 0 0 0 0 0 "
862  << ((*(it + 11)) + (*(it + 12)) + 2. * std::sqrt((*(it + 11)) * (*(it + 12)))) / 4. << endl;
863 
864  outputFile << "EmittanceX 0" << endl;
865  outputFile << "EmittanceY 0" << endl;
866  outputFile << "BetaStar 0" << endl;
867  }
868  outputFile.close();
869 
870  if ((debugMode == true) && (outputDebugFile.is_open() == true) && (vals != nullptr) &&
871  (vals->size() == (nParams - 1) * 2)) {
872  vector<double>::const_iterator it = vals->begin();
873 
874  outputDebugFile << "Runnumber " << runNumber << endl;
875  outputDebugFile << "BeginTimeOfFit " << formatTime(beginTimeOfFit >> 32) << " " << (beginTimeOfFit >> 32) << endl;
876  outputDebugFile << "EndTimeOfFit " << formatTime(endTimeOfFit >> 32) << " " << (endTimeOfFit >> 32) << endl;
877  outputDebugFile << "LumiRange " << beginLumiOfFit << " - " << endLumiOfFit << endl;
878  outputDebugFile << "Type " << dataType << endl;
879  // 3D Vertexing with Pixel Tracks:
880  // Good data = Type 3
881  // Bad data = Type -1
882 
883  BufferString << *(it + 0);
884  outputDebugFile << "X0 " << BufferString.str().c_str() << endl;
885  BufferString.str("");
886 
887  BufferString << *(it + 1);
888  outputDebugFile << "Y0 " << BufferString.str().c_str() << endl;
889  BufferString.str("");
890 
891  BufferString << *(it + 2);
892  outputDebugFile << "Z0 " << BufferString.str().c_str() << endl;
893  BufferString.str("");
894 
895  BufferString << *(it + 5);
896  outputDebugFile << "sigmaZ0 " << BufferString.str().c_str() << endl;
897  BufferString.str("");
898 
899  BufferString << *(it + 6);
900  outputDebugFile << "dxdz " << BufferString.str().c_str() << endl;
901  BufferString.str("");
902 
903  BufferString << *(it + 7);
904  outputDebugFile << "dydz " << BufferString.str().c_str() << endl;
905  BufferString.str("");
906 
907  BufferString << *(it + 3);
908  outputDebugFile << "BeamWidthX " << BufferString.str().c_str() << endl;
909  BufferString.str("");
910 
911  BufferString << *(it + 4);
912  outputDebugFile << "BeamWidthY " << BufferString.str().c_str() << endl;
913  BufferString.str("");
914 
915  outputDebugFile << "Cov(0,j) " << *(it + 8) << " 0 0 0 0 0 0" << endl;
916  outputDebugFile << "Cov(1,j) 0 " << *(it + 9) << " 0 0 0 0 0" << endl;
917  outputDebugFile << "Cov(2,j) 0 0 " << *(it + 10) << " 0 0 0 0" << endl;
918  outputDebugFile << "Cov(3,j) 0 0 0 " << *(it + 13) << " 0 0 0" << endl;
919  outputDebugFile << "Cov(4,j) 0 0 0 0 " << *(it + 14) << " 0 0" << endl;
920  outputDebugFile << "Cov(5,j) 0 0 0 0 0 " << *(it + 15) << " 0" << endl;
921  outputDebugFile << "Cov(6,j) 0 0 0 0 0 0 "
922  << ((*(it + 11)) + (*(it + 12)) + 2. * std::sqrt((*(it + 11)) * (*(it + 12)))) / 4. << endl;
923 
924  outputDebugFile << "EmittanceX 0" << endl;
925  outputDebugFile << "EmittanceY 0" << endl;
926  outputDebugFile << "BetaStar 0" << endl;
927 
928  outputDebugFile << "\nUsed vertices: " << counterVx << "\n" << endl;
929  }
930 }
unsigned int beginLumiOfFit
edm::TimeValue_t beginTimeOfFit
edm::TimeValue_t endTimeOfFit
unsigned int nParams
unsigned int counterVx
std::string fileName
std::string formatTime(const time_t &t)
unsigned int endLumiOfFit
T sqrt(T t)
Definition: SSEVec.h:19
std::ofstream outputDebugFile
std::ofstream outputFile
unsigned int runNumber

Member Data Documentation

◆ beginLumiOfFit

unsigned int Vx3DHLTAnalyzer::beginLumiOfFit
private

Definition at line 145 of file Vx3DHLTAnalyzer.h.

◆ beginTimeOfFit

edm::TimeValue_t Vx3DHLTAnalyzer::beginTimeOfFit
private

Definition at line 138 of file Vx3DHLTAnalyzer.h.

◆ considerVxCovariance

bool Vx3DHLTAnalyzer::considerVxCovariance
private

Definition at line 152 of file Vx3DHLTAnalyzer.h.

◆ counterVx

unsigned int Vx3DHLTAnalyzer::counterVx
private

Definition at line 153 of file Vx3DHLTAnalyzer.h.

◆ dataFromFit

bool Vx3DHLTAnalyzer::dataFromFit
private

Definition at line 74 of file Vx3DHLTAnalyzer.h.

◆ debugMode

bool Vx3DHLTAnalyzer::debugMode
private

Definition at line 73 of file Vx3DHLTAnalyzer.h.

◆ dxdzlumi

MonitorElement* Vx3DHLTAnalyzer::dxdzlumi
private

Definition at line 101 of file Vx3DHLTAnalyzer.h.

◆ dydzlumi

MonitorElement* Vx3DHLTAnalyzer::dydzlumi
private

Definition at line 102 of file Vx3DHLTAnalyzer.h.

◆ endLumiOfFit

unsigned int Vx3DHLTAnalyzer::endLumiOfFit
private

Definition at line 146 of file Vx3DHLTAnalyzer.h.

◆ endTimeOfFit

edm::TimeValue_t Vx3DHLTAnalyzer::endTimeOfFit
private

Definition at line 139 of file Vx3DHLTAnalyzer.h.

◆ fileName

std::string Vx3DHLTAnalyzer::fileName
private

Definition at line 88 of file Vx3DHLTAnalyzer.h.

Referenced by readConfig.fileINI::read().

◆ fitResults

MonitorElement* Vx3DHLTAnalyzer::fitResults
private

Definition at line 131 of file Vx3DHLTAnalyzer.h.

◆ goodVxCounter

MonitorElement* Vx3DHLTAnalyzer::goodVxCounter
private

Definition at line 124 of file Vx3DHLTAnalyzer.h.

◆ hitCounter

MonitorElement* Vx3DHLTAnalyzer::hitCounter
private

Definition at line 125 of file Vx3DHLTAnalyzer.h.

◆ internalDebug

bool Vx3DHLTAnalyzer::internalDebug
private

Definition at line 149 of file Vx3DHLTAnalyzer.h.

◆ lastLumiOfFit

unsigned int Vx3DHLTAnalyzer::lastLumiOfFit
private

Definition at line 147 of file Vx3DHLTAnalyzer.h.

◆ lumiCounter

unsigned int Vx3DHLTAnalyzer::lumiCounter
private

Definition at line 141 of file Vx3DHLTAnalyzer.h.

◆ maxLongLength

double Vx3DHLTAnalyzer::maxLongLength
private

Definition at line 155 of file Vx3DHLTAnalyzer.h.

◆ maxLumiIntegration

unsigned int Vx3DHLTAnalyzer::maxLumiIntegration
private

Definition at line 76 of file Vx3DHLTAnalyzer.h.

◆ maxTransRadius

double Vx3DHLTAnalyzer::maxTransRadius
private

Definition at line 154 of file Vx3DHLTAnalyzer.h.

◆ minNentries

unsigned int Vx3DHLTAnalyzer::minNentries
private

Definition at line 78 of file Vx3DHLTAnalyzer.h.

◆ minVxDoF

double Vx3DHLTAnalyzer::minVxDoF
private

Definition at line 86 of file Vx3DHLTAnalyzer.h.

◆ minVxWgt

double Vx3DHLTAnalyzer::minVxWgt
private

Definition at line 87 of file Vx3DHLTAnalyzer.h.

◆ mXlumi

MonitorElement* Vx3DHLTAnalyzer::mXlumi
private

Definition at line 93 of file Vx3DHLTAnalyzer.h.

◆ mYlumi

MonitorElement* Vx3DHLTAnalyzer::mYlumi
private

Definition at line 94 of file Vx3DHLTAnalyzer.h.

◆ mZlumi

MonitorElement* Vx3DHLTAnalyzer::mZlumi
private

Definition at line 95 of file Vx3DHLTAnalyzer.h.

◆ nLumiFit

unsigned int Vx3DHLTAnalyzer::nLumiFit
private

Definition at line 75 of file Vx3DHLTAnalyzer.h.

◆ nLumiXaxisRange

unsigned int Vx3DHLTAnalyzer::nLumiXaxisRange
private

Definition at line 77 of file Vx3DHLTAnalyzer.h.

◆ nParams

unsigned int Vx3DHLTAnalyzer::nParams
private

Definition at line 148 of file Vx3DHLTAnalyzer.h.

◆ numberFits

unsigned int Vx3DHLTAnalyzer::numberFits
private

Definition at line 144 of file Vx3DHLTAnalyzer.h.

◆ numberGoodFits

unsigned int Vx3DHLTAnalyzer::numberGoodFits
private

Definition at line 143 of file Vx3DHLTAnalyzer.h.

◆ outputDebugFile

std::ofstream Vx3DHLTAnalyzer::outputDebugFile
private

Definition at line 137 of file Vx3DHLTAnalyzer.h.

◆ outputFile

std::ofstream Vx3DHLTAnalyzer::outputFile
private

◆ pi

double Vx3DHLTAnalyzer::pi
private

Definition at line 157 of file Vx3DHLTAnalyzer.h.

◆ pixelHitCollection

edm::EDGetTokenT<SiPixelRecHitCollection> Vx3DHLTAnalyzer::pixelHitCollection
private

Definition at line 72 of file Vx3DHLTAnalyzer.h.

◆ reportSummary

MonitorElement* Vx3DHLTAnalyzer::reportSummary
private

Definition at line 128 of file Vx3DHLTAnalyzer.h.

◆ reportSummaryMap

MonitorElement* Vx3DHLTAnalyzer::reportSummaryMap
private

Definition at line 129 of file Vx3DHLTAnalyzer.h.

◆ runNumber

unsigned int Vx3DHLTAnalyzer::runNumber
private

◆ statusCounter

MonitorElement* Vx3DHLTAnalyzer::statusCounter
private

Definition at line 126 of file Vx3DHLTAnalyzer.h.

◆ sXlumi

MonitorElement* Vx3DHLTAnalyzer::sXlumi
private

Definition at line 97 of file Vx3DHLTAnalyzer.h.

◆ sYlumi

MonitorElement* Vx3DHLTAnalyzer::sYlumi
private

Definition at line 98 of file Vx3DHLTAnalyzer.h.

◆ sZlumi

MonitorElement* Vx3DHLTAnalyzer::sZlumi
private

Definition at line 99 of file Vx3DHLTAnalyzer.h.

◆ totalHits

unsigned int Vx3DHLTAnalyzer::totalHits
private

Definition at line 142 of file Vx3DHLTAnalyzer.h.

◆ vertexCollection

edm::EDGetTokenT<reco::VertexCollection> Vx3DHLTAnalyzer::vertexCollection
private

Definition at line 71 of file Vx3DHLTAnalyzer.h.

◆ Vertices

std::vector<VertexType> Vx3DHLTAnalyzer::Vertices
private

Definition at line 151 of file Vx3DHLTAnalyzer.h.

◆ Vx_X

MonitorElement* Vx3DHLTAnalyzer::Vx_X
private

Definition at line 104 of file Vx3DHLTAnalyzer.h.

◆ Vx_X_Cum

MonitorElement* Vx3DHLTAnalyzer::Vx_X_Cum
private

Definition at line 116 of file Vx3DHLTAnalyzer.h.

◆ Vx_X_Fit

MonitorElement* Vx3DHLTAnalyzer::Vx_X_Fit
private

Definition at line 112 of file Vx3DHLTAnalyzer.h.

◆ Vx_XY

MonitorElement* Vx3DHLTAnalyzer::Vx_XY
private

Definition at line 110 of file Vx3DHLTAnalyzer.h.

◆ Vx_XY_Cum

MonitorElement* Vx3DHLTAnalyzer::Vx_XY_Cum
private

Definition at line 122 of file Vx3DHLTAnalyzer.h.

◆ Vx_Y

MonitorElement* Vx3DHLTAnalyzer::Vx_Y
private

Definition at line 105 of file Vx3DHLTAnalyzer.h.

◆ Vx_Y_Cum

MonitorElement* Vx3DHLTAnalyzer::Vx_Y_Cum
private

Definition at line 117 of file Vx3DHLTAnalyzer.h.

◆ Vx_Y_Fit

MonitorElement* Vx3DHLTAnalyzer::Vx_Y_Fit
private

Definition at line 113 of file Vx3DHLTAnalyzer.h.

◆ Vx_Z

MonitorElement* Vx3DHLTAnalyzer::Vx_Z
private

Definition at line 106 of file Vx3DHLTAnalyzer.h.

◆ Vx_Z_Cum

MonitorElement* Vx3DHLTAnalyzer::Vx_Z_Cum
private

Definition at line 118 of file Vx3DHLTAnalyzer.h.

◆ Vx_Z_Fit

MonitorElement* Vx3DHLTAnalyzer::Vx_Z_Fit
private

Definition at line 114 of file Vx3DHLTAnalyzer.h.

◆ Vx_ZX

MonitorElement* Vx3DHLTAnalyzer::Vx_ZX
private

Definition at line 108 of file Vx3DHLTAnalyzer.h.

◆ Vx_ZX_Cum

MonitorElement* Vx3DHLTAnalyzer::Vx_ZX_Cum
private

Definition at line 120 of file Vx3DHLTAnalyzer.h.

◆ Vx_ZY

MonitorElement* Vx3DHLTAnalyzer::Vx_ZY
private

Definition at line 109 of file Vx3DHLTAnalyzer.h.

◆ Vx_ZY_Cum

MonitorElement* Vx3DHLTAnalyzer::Vx_ZY_Cum
private

Definition at line 121 of file Vx3DHLTAnalyzer.h.

◆ VxErrCorr

double Vx3DHLTAnalyzer::VxErrCorr
private

Definition at line 85 of file Vx3DHLTAnalyzer.h.

◆ xPos

double Vx3DHLTAnalyzer::xPos
private

Definition at line 156 of file Vx3DHLTAnalyzer.h.

◆ xRange

double Vx3DHLTAnalyzer::xRange
private

Definition at line 79 of file Vx3DHLTAnalyzer.h.

◆ xStep

double Vx3DHLTAnalyzer::xStep
private

Definition at line 80 of file Vx3DHLTAnalyzer.h.

◆ yPos

double Vx3DHLTAnalyzer::yPos
private

Definition at line 156 of file Vx3DHLTAnalyzer.h.

◆ yRange

double Vx3DHLTAnalyzer::yRange
private

Definition at line 81 of file Vx3DHLTAnalyzer.h.

◆ yStep

double Vx3DHLTAnalyzer::yStep
private

Definition at line 82 of file Vx3DHLTAnalyzer.h.

◆ zPos

double Vx3DHLTAnalyzer::zPos
private

Definition at line 156 of file Vx3DHLTAnalyzer.h.

◆ zRange

double Vx3DHLTAnalyzer::zRange
private

Definition at line 83 of file Vx3DHLTAnalyzer.h.

◆ zStep

double Vx3DHLTAnalyzer::zStep
private

Definition at line 84 of file Vx3DHLTAnalyzer.h.