CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes
PrimaryVertexValidation Class Reference

#include <Alignment/OfflineValidation/plugins/PrimaryVertexValidation.cc>

Inheritance diagram for PrimaryVertexValidation:
edm::EDAnalyzer edm::EDConsumerBase

Public Member Functions

 PrimaryVertexValidation (const edm::ParameterSet &)
 
 ~PrimaryVertexValidation ()
 
- Public Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Member Functions

virtual void analyze (const edm::Event &, const edm::EventSetup &)
 
double approximateTrackError (const GlobalPoint &refPoint, const GlobalPoint &dcaPosition, const GlobalVector &tangent, const AlgebraicMatrix33 &covMatrix)
 
virtual void beginJob ()
 
AlgebraicVector3 displacementFromTrack (const GlobalPoint &pv, const GlobalPoint &dcaPosition_, const GlobalVector &tangent_)
 
virtual void endJob ()
 
void FillTrendPlot (TH1F *trendPlot, TH1F *residualsPlot[100], const TString &fitPar_, const TString &var_)
 
std::pair< std::pair< Double_t,
Double_t >, std::pair
< Double_t, Double_t > > 
fitResiduals (TH1 *hist)
 
std::pair< Double_t, Double_t > getMAD (TH1F *histo)
 
std::pair< Double_t, Double_t > getMedian (TH1F *histo)
 
bool hasFirstLayerPixelHits (const reco::TransientTrack track)
 
bool isHit2D (const TrackingRecHit &hit) const
 
void SetVarToZero ()
 
double square (double x)
 

Private Attributes

TH1F * a_dxyBiasResidualsMap [nMaxBins_][nMaxBins_]
 
TH1F * a_dxyEtaBiasResiduals [nMaxBins_]
 
TH1F * a_dxyEtaMADBiasTrend
 
TH1F * a_dxyEtaMADTrend
 
TH1F * a_dxyEtaMeanBiasTrend
 
TH1F * a_dxyEtaMeanTrend
 
TH1F * a_dxyEtaMedianBiasTrend
 
TH1F * a_dxyEtaMedianTrend
 
TH1F * a_dxyEtaResiduals [nMaxBins_]
 
TH1F * a_dxyEtaWidthBiasTrend
 
TH1F * a_dxyEtaWidthTrend
 
TH2F * a_dxyMeanBiasMap
 
TH2F * a_dxyMeanMap
 
TH1F * a_dxyPhiBiasResiduals [nMaxBins_]
 
TH1F * a_dxyPhiMADBiasTrend
 
TH1F * a_dxyPhiMADTrend
 
TH1F * a_dxyPhiMeanBiasTrend
 
TH1F * a_dxyPhiMeanTrend
 
TH1F * a_dxyPhiMedianBiasTrend
 
TH1F * a_dxyPhiMedianTrend
 
TH1F * a_dxyPhiResiduals [nMaxBins_]
 
TH1F * a_dxyPhiWidthBiasTrend
 
TH1F * a_dxyPhiWidthTrend
 
TH1F * a_dxyResidualsMap [nMaxBins_][nMaxBins_]
 
TH2F * a_dxyWidthBiasMap
 
TH2F * a_dxyWidthMap
 
TH1F * a_dzBiasResidualsMap [nMaxBins_][nMaxBins_]
 
TH1F * a_dzEtaBiasResiduals [nMaxBins_]
 
TH1F * a_dzEtaMADBiasTrend
 
TH1F * a_dzEtaMADTrend
 
TH1F * a_dzEtaMeanBiasTrend
 
TH1F * a_dzEtaMeanTrend
 
TH1F * a_dzEtaMedianBiasTrend
 
TH1F * a_dzEtaMedianTrend
 
TH1F * a_dzEtaResiduals [nMaxBins_]
 
TH1F * a_dzEtaWidthBiasTrend
 
TH1F * a_dzEtaWidthTrend
 
TH2F * a_dzMeanBiasMap
 
TH2F * a_dzMeanMap
 
TH1F * a_dzPhiBiasResiduals [nMaxBins_]
 
TH1F * a_dzPhiMADBiasTrend
 
TH1F * a_dzPhiMADTrend
 
TH1F * a_dzPhiMeanBiasTrend
 
TH1F * a_dzPhiMeanTrend
 
TH1F * a_dzPhiMedianBiasTrend
 
TH1F * a_dzPhiMedianTrend
 
TH1F * a_dzPhiResiduals [nMaxBins_]
 
TH1F * a_dzPhiWidthBiasTrend
 
TH1F * a_dzPhiWidthTrend
 
TH1F * a_dzResidualsMap [nMaxBins_][nMaxBins_]
 
TH2F * a_dzWidthBiasMap
 
TH2F * a_dzWidthMap
 
bool askFirstLayerHit_
 
double Beamdxdz_
 
double Beamsigmaz_
 
double BeamWidthX_
 
double BeamWidthY_
 
double BSx0_
 
double BSy0_
 
double BSz0_
 
int charge_ [nMaxtracks_]
 
double chi2_ [nMaxtracks_]
 
double chi2ndof_ [nMaxtracks_]
 
float chi2normUnbiasedVertex_ [nMaxtracks_]
 
float chi2UnbiasedVertex_ [nMaxtracks_]
 
bool debug_
 
float DOFUnbiasedVertex_ [nMaxtracks_]
 
double dszFromMyVertex_ [nMaxtracks_]
 
double dxy_ [nMaxtracks_]
 
double dxyBs_ [nMaxtracks_]
 
double dxyErrorFromMyVertex_ [nMaxtracks_]
 
double dxyFromMyVertex_ [nMaxtracks_]
 
double dz_ [nMaxtracks_]
 
double dzBs_ [nMaxtracks_]
 
double dzErrorFromMyVertex_ [nMaxtracks_]
 
double dzFromMyVertex_ [nMaxtracks_]
 
double eta_ [nMaxtracks_]
 
double etaOfProbe_
 
float etapitch_
 
unsigned int EventNumber_
 
TH1F * h_fitVtxChi2_
 
TH1F * h_fitVtxChi2ndf_
 
TH1F * h_fitVtxChi2Prob_
 
TH1F * h_fitVtxNdof_
 
TH1F * h_fitVtxNtracks_
 
TH1F * h_probeCharge_
 
TH1F * h_probeChi2_
 
TH1F * h_probedxy_
 
TH1F * h_probedz_
 
TH1F * h_probeEta_
 
TH1F * h_probeHits1D_
 
TH1F * h_probeHits2D_
 
TH1F * h_probeHits_
 
TH1F * h_probeHitsInBPIX_
 
TH1F * h_probeHitsInFPIX_
 
TH1F * h_probeHitsInTEC_
 
TH1F * h_probeHitsInTIB_
 
TH1F * h_probeHitsInTID_
 
TH1F * h_probeHitsInTOB_
 
TH1F * h_probeNormChi2_
 
TH1F * h_probePhi_
 
TH1F * h_probePt_
 
TH1F * h_probeQoverP_
 
TH1F * h_recoVtxChi2ndf_
 
TH1F * h_recoVtxChi2Prob_
 
TH1F * h_recoVtxNtracks_
 
TH1F * h_recoVtxSumPt_
 
int hasRecVertex_ [nMaxtracks_]
 
double IPLsigFromMyVertex_ [nMaxtracks_]
 
double IPTsigFromMyVertex_ [nMaxtracks_]
 
int isGoodTrack_ [nMaxtracks_]
 
int isHighPurity_ [nMaxtracks_]
 
bool lightNtupleSwitch_
 
unsigned int LuminosityBlockNumber_
 
TH1F * n_dxyBiasResidualsMap [nMaxBins_][nMaxBins_]
 
TH1F * n_dxyEtaBiasResiduals [nMaxBins_]
 
TH1F * n_dxyEtaMADBiasTrend
 
TH1F * n_dxyEtaMADTrend
 
TH1F * n_dxyEtaMeanBiasTrend
 
TH1F * n_dxyEtaMeanTrend
 
TH1F * n_dxyEtaMedianBiasTrend
 
TH1F * n_dxyEtaMedianTrend
 
TH1F * n_dxyEtaResiduals [nMaxBins_]
 
TH1F * n_dxyEtaWidthBiasTrend
 
TH1F * n_dxyEtaWidthTrend
 
TH2F * n_dxyMeanBiasMap
 
TH2F * n_dxyMeanMap
 
TH1F * n_dxyPhiBiasResiduals [nMaxBins_]
 
TH1F * n_dxyPhiMADBiasTrend
 
TH1F * n_dxyPhiMADTrend
 
TH1F * n_dxyPhiMeanBiasTrend
 
TH1F * n_dxyPhiMeanTrend
 
TH1F * n_dxyPhiMedianBiasTrend
 
TH1F * n_dxyPhiMedianTrend
 
TH1F * n_dxyPhiResiduals [nMaxBins_]
 
TH1F * n_dxyPhiWidthBiasTrend
 
TH1F * n_dxyPhiWidthTrend
 
TH1F * n_dxyResidualsMap [nMaxBins_][nMaxBins_]
 
TH2F * n_dxyWidthBiasMap
 
TH2F * n_dxyWidthMap
 
TH1F * n_dzBiasResidualsMap [nMaxBins_][nMaxBins_]
 
TH1F * n_dzEtaBiasResiduals [nMaxBins_]
 
TH1F * n_dzEtaMADBiasTrend
 
TH1F * n_dzEtaMADTrend
 
TH1F * n_dzEtaMeanBiasTrend
 
TH1F * n_dzEtaMeanTrend
 
TH1F * n_dzEtaMedianBiasTrend
 
TH1F * n_dzEtaMedianTrend
 
TH1F * n_dzEtaResiduals [nMaxBins_]
 
TH1F * n_dzEtaWidthBiasTrend
 
TH1F * n_dzEtaWidthTrend
 
TH2F * n_dzMeanBiasMap
 
TH2F * n_dzMeanMap
 
TH1F * n_dzPhiBiasResiduals [nMaxBins_]
 
TH1F * n_dzPhiMADBiasTrend
 
TH1F * n_dzPhiMADTrend
 
TH1F * n_dzPhiMeanBiasTrend
 
TH1F * n_dzPhiMeanTrend
 
TH1F * n_dzPhiMedianBiasTrend
 
TH1F * n_dzPhiMedianTrend
 
TH1F * n_dzPhiResiduals [nMaxBins_]
 
TH1F * n_dzPhiWidthBiasTrend
 
TH1F * n_dzPhiWidthTrend
 
TH1F * n_dzResidualsMap [nMaxBins_][nMaxBins_]
 
TH2F * n_dzWidthBiasMap
 
TH2F * n_dzWidthMap
 
int nBins_
 
int nClus_
 
int Nevt_
 
int nhits1D_ [nMaxtracks_]
 
int nhits2D_ [nMaxtracks_]
 
int nhits_ [nMaxtracks_]
 
int nhitsBPIX_ [nMaxtracks_]
 
int nhitsFPIX_ [nMaxtracks_]
 
int nhitsTEC_ [nMaxtracks_]
 
int nhitsTIB_ [nMaxtracks_]
 
int nhitsTID_ [nMaxtracks_]
 
int nhitsTOB_ [nMaxtracks_]
 
int nOfflineVertices_
 
int nTracks_
 
int nTracksPerClus_
 
double p_ [nMaxtracks_]
 
double phi_ [nMaxtracks_]
 
float phipitch_
 
double pt_ [nMaxtracks_]
 
double ptOfProbe_
 
double qoverp_ [nMaxtracks_]
 
TTree * rootTree_
 
unsigned int RunNumber_
 
bool storeNtuple_
 
float sumOfWeightsUnbiasedVertex_ [nMaxtracks_]
 
edm::ParameterSet theConfig
 
double theta_ [nMaxtracks_]
 
TrackClusterizerInZtheTrackClusterizer_
 
TrackFilterForPVFindingBasetheTrackFilter_
 
edm::InputTag TrackCollectionTag_
 
int tracksUsedForVertexing_ [nMaxtracks_]
 
bool useTracksFromRecoVtx_
 
double xOfflineVertex_
 
double xPCA_ [nMaxtracks_]
 
double xUnbiasedVertex_ [nMaxtracks_]
 
double yOfflineVertex_
 
double yPCA_ [nMaxtracks_]
 
double yUnbiasedVertex_ [nMaxtracks_]
 
double zOfflineVertex_
 
double zPCA_ [nMaxtracks_]
 
double zUnbiasedVertex_ [nMaxtracks_]
 

Static Private Attributes

static const int cmToum = 10000
 
static const int nMaxBins_ = 100
 
static const int nMaxtracks_ = 1000
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
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 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)
 

Detailed Description

Description: Validate alignment constants using unbiased vertex residuals

Implementation: <Notes on="" implementation>="">

Definition at line 80 of file PrimaryVertexValidation.h.

Constructor & Destructor Documentation

PrimaryVertexValidation::PrimaryVertexValidation ( const edm::ParameterSet iConfig)
explicit

Definition at line 75 of file PrimaryVertexValidation.cc.

References etapitch_, edm::ParameterSet::getParameter(), nBins_, phipitch_, Pi, AlCaHLTBitMon_QueryRunRegistry::string, theTrackClusterizer_, and theTrackFilter_.

75  :
76  storeNtuple_(iConfig.getParameter<bool>("storeNtuple")),
77  lightNtupleSwitch_(iConfig.getParameter<bool>("isLightNtuple")),
78  useTracksFromRecoVtx_(iConfig.getParameter<bool>("useTracksFromRecoVtx")),
79  askFirstLayerHit_(iConfig.getParameter<bool>("askFirstLayerHit")),
80  ptOfProbe_(iConfig.getUntrackedParameter<double>("probePt",0.)),
81  etaOfProbe_(iConfig.getUntrackedParameter<double>("probeEta",2.4)),
82  nBins_(iConfig.getUntrackedParameter<int>("numberOfBins",24)),
83  debug_(iConfig.getParameter<bool>("Debug")),
84  TrackCollectionTag_(iConfig.getParameter<edm::InputTag>("TrackCollectionTag"))
85 {
86 
87  // now do what ever initialization is needed
88  // initialize phase space boundaries
89 
90  phipitch_ = (2*TMath::Pi())/nBins_;
91  etapitch_ = 5./nBins_;
92 
93  // old version
94  // theTrackClusterizer_ = new GapClusterizerInZ(iConfig.getParameter<edm::ParameterSet>("TkClusParameters").getParameter<edm::ParameterSet>("TkGapClusParameters"));
95 
96  // select and configure the track filter
97  theTrackFilter_= new TrackFilterForPVFinding(iConfig.getParameter<edm::ParameterSet>("TkFilterParameters") );
98  // select and configure the track clusterizer
99  std::string clusteringAlgorithm=iConfig.getParameter<edm::ParameterSet>("TkClusParameters").getParameter<std::string>("algorithm");
100  if (clusteringAlgorithm=="gap"){
101  theTrackClusterizer_ = new GapClusterizerInZ(iConfig.getParameter<edm::ParameterSet>("TkClusParameters").getParameter<edm::ParameterSet>("TkGapClusParameters"));
102  }else if(clusteringAlgorithm=="DA"){
103  theTrackClusterizer_ = new DAClusterizerInZ(iConfig.getParameter<edm::ParameterSet>("TkClusParameters").getParameter<edm::ParameterSet>("TkDAClusParameters"));
104  }else{
105  throw VertexException("PrimaryVertexProducerAlgorithm: unknown clustering algorithm: " + clusteringAlgorithm);
106  }
107 }
const double Pi
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
TrackFilterForPVFindingBase * theTrackFilter_
Common base class.
TrackClusterizerInZ * theTrackClusterizer_
PrimaryVertexValidation::~PrimaryVertexValidation ( )

Definition at line 110 of file PrimaryVertexValidation.cc.

111 {
112  // do anything here that needs to be done at desctruction time
113  // (e.g. close files, deallocate resources etc.)
114 }

Member Function Documentation

void PrimaryVertexValidation::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
privatevirtual

Implements edm::EDAnalyzer.

Definition at line 123 of file PrimaryVertexValidation.cc.

References a_dxyBiasResidualsMap, a_dxyEtaBiasResiduals, a_dxyEtaResiduals, a_dxyPhiBiasResiduals, a_dxyPhiResiduals, a_dxyResidualsMap, a_dzBiasResidualsMap, a_dzEtaBiasResiduals, a_dzEtaResiduals, a_dzPhiBiasResiduals, a_dzPhiResiduals, a_dzResidualsMap, askFirstLayerHit_, Beamdxdz_, Beamsigmaz_, SiPixelRawToDigiRegional_cfi::beamSpot, BeamWidthX_, BeamWidthY_, BSx0_, BSy0_, BSz0_, charge_, reco::Vertex::chi2(), chi2_, chi2ndof_, chi2normUnbiasedVertex_, chi2UnbiasedVertex_, TrackClusterizerInZ::clusterize(), cmToum, gather_cfg::cout, GlobalErrorBase< T, ErrorWeightType >::czz(), debug_, TransientVertex::degreesOfFreedom(), DOFUnbiasedVertex_, dszFromMyVertex_, dxy_, dxyBs_, dxyErrorFromMyVertex_, dxyFromMyVertex_, dz_, dzBs_, dzErrorFromMyVertex_, dzFromMyVertex_, eta_, etaOfProbe_, etapitch_, edm::EventID::event(), edm::Event::eventAuxiliary(), EventNumber_, edm::EventSetup::get(), edm::Event::getByLabel(), h_fitVtxChi2_, h_fitVtxChi2ndf_, h_fitVtxChi2Prob_, h_fitVtxNdof_, h_fitVtxNtracks_, h_probeCharge_, h_probeChi2_, h_probedxy_, h_probedz_, h_probeEta_, h_probeHits1D_, h_probeHits2D_, h_probeHits_, h_probeHitsInBPIX_, h_probeHitsInFPIX_, h_probeHitsInTEC_, h_probeHitsInTIB_, h_probeHitsInTID_, h_probeHitsInTOB_, h_probeNormChi2_, h_probePhi_, h_probePt_, h_probeQoverP_, h_recoVtxChi2ndf_, h_recoVtxChi2Prob_, h_recoVtxNtracks_, h_recoVtxSumPt_, hasFirstLayerPixelHits(), hasRecVertex_, TransientVertex::hasTrackWeight(), i, edm::EventAuxiliary::id(), IPLsigFromMyVertex_, IPTsigFromMyVertex_, isGoodTrack_, isHighPurity_, isHit2D(), reco::Vertex::isValid(), TransientVertex::isValid(), j, gen::k, kBPIX, kFPIX, LogTrace, edm::EventAuxiliary::luminosityBlock(), LuminosityBlockNumber_, n_dxyBiasResidualsMap, n_dxyEtaBiasResiduals, n_dxyEtaResiduals, n_dxyPhiBiasResiduals, n_dxyPhiResiduals, n_dxyResidualsMap, n_dzBiasResidualsMap, n_dzEtaBiasResiduals, n_dzEtaResiduals, n_dzPhiBiasResiduals, n_dzPhiResiduals, n_dzResidualsMap, nBins_, nClus_, reco::Vertex::ndof(), Nevt_, nhits1D_, nhits2D_, nhits_, nhitsBPIX_, nhitsFPIX_, nhitsTEC_, nhitsTIB_, nhitsTID_, nhitsTOB_, nMaxtracks_, nOfflineVertices_, TransientVertex::normalisedChiSquared(), reco::Vertex::normalizedChi2(), nTracks_, nTracksPerClus_, p_, phi_, phipitch_, Pi, point, reco::Vertex::position(), TransientVertex::position(), TransientVertex::positionError(), RecoTauCleanerPlugins::pt, pt_, ptOfProbe_, qoverp_, reco::TrackBase::qualityByName(), rootTree_, edm::EventAuxiliary::run(), RunNumber_, TrackFilterForPVFindingBase::select(), SetVarToZero(), IPTools::signedTransverseImpactParameter(), storeNtuple_, sumOfWeightsUnbiasedVertex_, StripSubdetector::TEC, theta_, theTrackClusterizer_, theTrackFilter_, StripSubdetector::TIB, StripSubdetector::TID, StripSubdetector::TOB, TransientVertex::totalChiSquared(), TrackCollectionTag_, reco::Vertex::tracks_begin(), reco::Vertex::tracks_end(), reco::Vertex::tracksSize(), tracksUsedForVertexing_, TransientVertex::trackWeight(), useTracksFromRecoVtx_, VertexFitter< N >::vertex(), cms::Exception::what(), PV3DBase< T, PVType, FrameType >::x(), xOfflineVertex_, xPCA_, xUnbiasedVertex_, PV3DBase< T, PVType, FrameType >::y(), yOfflineVertex_, yPCA_, yUnbiasedVertex_, PV3DBase< T, PVType, FrameType >::z(), zOfflineVertex_, zPCA_, and zUnbiasedVertex_.

124 {
125 
126  using namespace std;
127  using namespace IPTools;
128 
129  Nevt_++;
130 
131  //=======================================================
132  // Initialize Root-tuple variables
133  //=======================================================
134 
135  SetVarToZero();
136 
137  //=======================================================
138  // Retrieve the Magnetic Field information
139  //=======================================================
140 
141  edm::ESHandle<MagneticField> theMGField;
142  iSetup.get<IdealMagneticFieldRecord>().get( theMGField );
143 
144  //=======================================================
145  // Retrieve the Tracking Geometry information
146  //=======================================================
147 
148  edm::ESHandle<GlobalTrackingGeometry> theTrackingGeometry;
149  iSetup.get<GlobalTrackingGeometryRecord>().get( theTrackingGeometry );
150 
151  //=======================================================
152  // Retrieve the Track information
153  //=======================================================
154 
155  edm::Handle<reco::TrackCollection> trackCollectionHandle;
156  iEvent.getByLabel(TrackCollectionTag_, trackCollectionHandle);
157 
158  //=======================================================
159  // Retrieve offline vartex information (only for reco)
160  //=======================================================
161 
163  try {
164  iEvent.getByLabel("offlinePrimaryVertices", vertices);
165  } catch (...) {
166  if(debug_)
167  cout << "No offlinePrimaryVertices found!" << endl;
168  }
169  if ( vertices.isValid() ) {
170  xOfflineVertex_ = (*vertices)[0].x();
171  yOfflineVertex_ = (*vertices)[0].y();
172  zOfflineVertex_ = (*vertices)[0].z();
173  }
174 
175  unsigned int vertexCollectionSize = vertices.product()->size();
176  int nvvertex = 0;
177 
178  for (unsigned int i=0; i<vertexCollectionSize; i++) {
179  const reco::Vertex& vertex = vertices->at(i);
180  if (vertex.isValid()) nvvertex++;
181  }
182 
183  nOfflineVertices_ = nvvertex;
184 
185 
186  if ( vertices->size() && useTracksFromRecoVtx_ ) {
187 
188  double sumpt = 0;
189  size_t ntracks = 0;
190  double chi2ndf = 0.;
191  double chi2prob = 0.;
192 
193  if (!vertices->at(0).isFake()) {
194 
195  reco::Vertex pv = vertices->at(0);
196 
197  ntracks = pv.tracksSize();
198  chi2ndf = pv.normalizedChi2();
199  chi2prob = TMath::Prob(pv.chi2(),(int)pv.ndof());
200 
201  h_recoVtxNtracks_->Fill(ntracks);
202  h_recoVtxChi2ndf_->Fill(chi2ndf);
203  h_recoVtxChi2Prob_->Fill(chi2prob);
204 
205  for (reco::Vertex::trackRef_iterator itrk = pv.tracks_begin();itrk != pv.tracks_end(); ++itrk) {
206  double pt = (**itrk).pt();
207  sumpt += pt*pt;
208 
209  const math::XYZPoint myVertex(pv.position().x(),pv.position().y(),pv.position().z());
210 
211  double dxyRes = (**itrk).dxy(myVertex);
212  double dzRes = (**itrk).dz(myVertex);
213 
214  double dxy_err = (**itrk).dxyError();
215  double dz_err = (**itrk).dzError();
216 
217  float_t trackphi = ((**itrk).phi())*(180/TMath::Pi());
218  float_t tracketa = (**itrk).eta();
219 
220  for(Int_t i=0; i<nBins_; i++){
221 
222  float phiF = (-TMath::Pi()+i*phipitch_)*(180/TMath::Pi());
223  float phiL = (-TMath::Pi()+(i+1)*phipitch_)*(180/TMath::Pi());
224 
225  float etaF=-2.5+i*etapitch_;
226  float etaL=-2.5+(i+1)*etapitch_;
227 
228  if(trackphi >= phiF && trackphi < phiL ){
229 
230  a_dxyPhiBiasResiduals[i]->Fill(dxyRes*cmToum);
231  a_dzPhiBiasResiduals[i]->Fill(dzRes*cmToum);
232  n_dxyPhiBiasResiduals[i]->Fill((dxyRes)/dxy_err);
233  n_dzPhiBiasResiduals[i]->Fill((dzRes)/dz_err);
234 
235  for(Int_t j=0; j<nBins_; j++){
236 
237  float etaJ=-2.5+j*etapitch_;
238  float etaK=-2.5+(j+1)*etapitch_;
239 
240  if(tracketa >= etaJ && tracketa < etaK ){
241 
242  a_dxyBiasResidualsMap[i][j]->Fill(dxyRes*cmToum);
243  a_dzBiasResidualsMap[i][j]->Fill(dzRes*cmToum);
244 
245  n_dxyBiasResidualsMap[i][j]->Fill((dxyRes)/dxy_err);
246  n_dzBiasResidualsMap[i][j]->Fill((dzRes)/dz_err);
247 
248  }
249  }
250  }
251 
252  if(tracketa >= etaF && tracketa < etaL ){
253  a_dxyEtaBiasResiduals[i]->Fill(dxyRes*cmToum);
254  a_dzEtaBiasResiduals[i]->Fill(dzRes*cmToum);
255  n_dxyEtaBiasResiduals[i]->Fill((dxyRes)/dxy_err);
256  n_dzEtaBiasResiduals[i]->Fill((dzRes)/dz_err);
257  }
258  }
259  }
260 
261  h_recoVtxSumPt_->Fill(sumpt);
262 
263  }
264  }
265 
266  //=======================================================
267  // Retrieve Beamspot information
268  //=======================================================
269 
271  edm::Handle<reco::BeamSpot> beamSpotHandle;
272  iEvent.getByLabel("offlineBeamSpot", beamSpotHandle);
273 
274  if ( beamSpotHandle.isValid() )
275  {
276  beamSpot = *beamSpotHandle;
277  BSx0_ = beamSpot.x0();
278  BSy0_ = beamSpot.y0();
279  BSz0_ = beamSpot.z0();
280  Beamsigmaz_ = beamSpot.sigmaZ();
281  Beamdxdz_ = beamSpot.dxdz();
282  BeamWidthX_ = beamSpot.BeamWidthX();
283  BeamWidthY_ = beamSpot.BeamWidthY();
284  } else
285  {
286  if(debug_)
287  cout << "No BeamSpot found!" << endl;
288  }
289 
290  if(debug_)
291  std::cout<<"Beamspot x:"<<BSx0_<<" y:"<<BSy0_<<" z:"<<BSz0_<<std::endl;
292 
293  //double sigmaz = beamSpot.sigmaZ();
294  //double dxdz = beamSpot.dxdz();
295  //double BeamWidth = beamSpot.BeamWidth();
296 
297  //=======================================================
298  // Starts here ananlysis
299  //=======================================================
300 
301  RunNumber_=iEvent.eventAuxiliary().run();
303  EventNumber_=iEvent.eventAuxiliary().id().event();
304 
305  if(debug_)
306  std::cout<<"PrimaryVertexValidation::analyze() looping over "<<trackCollectionHandle->size()<< "tracks." <<std::endl;
307 
308  //======================================================
309  // Interface RECO tracks to vertex reconstruction
310  //======================================================
311 
312  std::vector<reco::TransientTrack> t_tks;
313  unsigned int k = 0;
314  for(reco::TrackCollection::const_iterator track = trackCollectionHandle->begin(); track!= trackCollectionHandle->end(); ++track, ++k){
315 
316  reco::TrackRef trackref(trackCollectionHandle,k);
317  reco::TransientTrack theTTRef = reco::TransientTrack(trackref, &*theMGField, theTrackingGeometry );
318  t_tks.push_back(theTTRef);
319 
320  }
321 
322  if(debug_) {cout << "PrimaryVertexValidation"
323  << "Found: " << t_tks.size() << " reconstructed tracks" << "\n";
324  }
325 
326  //======================================================
327  // select the tracks
328  //======================================================
329 
330  std::vector<reco::TransientTrack> seltks = theTrackFilter_->select(t_tks);
331 
332  //======================================================
333  // clusterize tracks in Z
334  //======================================================
335 
336  vector< vector<reco::TransientTrack> > clusters = theTrackClusterizer_->clusterize(seltks);
337 
338  if (debug_){
339  cout << " clustering returned "<< clusters.size() << " clusters from " << t_tks.size() << " selected tracks" <<endl;
340  }
341 
342  nClus_=clusters.size();
343 
344  //======================================================
345  // Starts loop on clusters
346  //======================================================
347 
348  for (vector< vector<reco::TransientTrack> >::const_iterator iclus = clusters.begin(); iclus != clusters.end(); iclus++) {
349 
350  nTracksPerClus_=0;
351 
352  unsigned int i = 0;
353  for(vector<reco::TransientTrack>::const_iterator theTrack = iclus->begin(); theTrack!= iclus->end(); ++theTrack, ++i)
354  {
355  if ( nTracks_ >= nMaxtracks_ ) {
356  std::cout << " PrimaryVertexValidation::analyze() : Warning - Number of tracks: " << nTracks_ << " , greater than " << nMaxtracks_ << std::endl;
357  continue;
358  }
359 
360  pt_[nTracks_] = theTrack->track().pt();
361  p_[nTracks_] = theTrack->track().p();
362  nhits_[nTracks_] = theTrack->track().numberOfValidHits();
363  eta_[nTracks_] = theTrack->track().eta();
364  theta_[nTracks_] = theTrack->track().theta();
365  phi_[nTracks_] = theTrack->track().phi();
366  chi2_[nTracks_] = theTrack->track().chi2();
367  chi2ndof_[nTracks_] = theTrack->track().normalizedChi2();
368  charge_[nTracks_] = theTrack->track().charge();
369  qoverp_[nTracks_] = theTrack->track().qoverp();
370  dz_[nTracks_] = theTrack->track().dz();
371  dxy_[nTracks_] = theTrack->track().dxy();
372 
374  isHighPurity_[nTracks_] = theTrack->track().quality(_trackQuality);
375 
376  math::XYZPoint point(beamSpot.x0(),beamSpot.y0(), beamSpot.z0());
377  dxyBs_[nTracks_] = theTrack->track().dxy(point);
378  dzBs_[nTracks_] = theTrack->track().dz(point);
379 
380  xPCA_[nTracks_] = theTrack->track().vertex().x();
381  yPCA_[nTracks_] = theTrack->track().vertex().y();
382  zPCA_[nTracks_] = theTrack->track().vertex().z();
383 
384  //=======================================================
385  // Retrieve rechit information
386  //=======================================================
387 
388  int nRecHit1D =0;
389  int nRecHit2D =0;
390  int nhitinTIB =0;
391  int nhitinTOB =0;
392  int nhitinTID =0;
393  int nhitinTEC =0;
394  int nhitinBPIX=0;
395  int nhitinFPIX=0;
396 
397  for (trackingRecHit_iterator iHit = theTrack->recHitsBegin(); iHit != theTrack->recHitsEnd(); ++iHit) {
398  if((*iHit)->isValid()) {
399 
400  if (this->isHit2D(**iHit)) {++nRecHit2D;}
401  else {++nRecHit1D; }
402 
403  int type =(*iHit)->geographicalId().subdetId();
404 
405  if(type==int(StripSubdetector::TIB)){++nhitinTIB;}
406  if(type==int(StripSubdetector::TOB)){++nhitinTOB;}
407  if(type==int(StripSubdetector::TID)){++nhitinTID;}
408  if(type==int(StripSubdetector::TEC)){++nhitinTEC;}
409  if(type==int( kBPIX)){++nhitinBPIX;}
410  if(type==int( kFPIX)){++nhitinFPIX;}
411  }
412  }
413 
414  nhits1D_[nTracks_] = nRecHit1D;
415  nhits2D_[nTracks_] = nRecHit2D;
416  nhitsBPIX_[nTracks_] = nhitinBPIX;
417  nhitsFPIX_[nTracks_] = nhitinFPIX;
418  nhitsTIB_[nTracks_] = nhitinTIB;
419  nhitsTID_[nTracks_] = nhitinTID;
420  nhitsTOB_[nTracks_] = nhitinTOB;
421  nhitsTEC_[nTracks_] = nhitinTEC;
422 
423  //=======================================================
424  // Good tracks for vertexing selection
425  //=======================================================
426 
427  bool pass = true;
428  if(askFirstLayerHit_) pass = this->hasFirstLayerPixelHits((*theTrack));
429  if (pass){
431  }
432 
433  //=======================================================
434  // Fit unbiased vertex
435  //=======================================================
436 
437  vector<reco::TransientTrack> theFinalTracks;
438  theFinalTracks.clear();
439 
440  for(vector<reco::TransientTrack>::const_iterator tk = iclus->begin(); tk!= iclus->end(); ++tk){
441 
442  pass = this->hasFirstLayerPixelHits((*tk));
443  if (pass){
444  if( tk == theTrack ) continue;
445  else {
446  theFinalTracks.push_back((*tk));
447  }
448  }
449  }
450 
451  if(theFinalTracks.size() > 2){
452 
453  if(debug_)
454  std::cout <<"PrimaryVertexValidation::analyze() :Transient Track Collection size: "<<theFinalTracks.size()<<std::endl;
455 
456  try{
457 
459  TransientVertex theFittedVertex = fitter->vertex(theFinalTracks);
460 
461  if(theFittedVertex.isValid ()){
462 
463  if(theFittedVertex.hasTrackWeight()){
464  for(size_t rtracks= 0; rtracks < theFinalTracks.size(); rtracks++){
465  sumOfWeightsUnbiasedVertex_[nTracks_] += theFittedVertex.trackWeight(theFinalTracks[rtracks]);
466  }
467  }
468 
470 
471  const math::XYZPoint myVertex(theFittedVertex.position().x(),theFittedVertex.position().y(),theFittedVertex.position().z());
472  hasRecVertex_[nTracks_] = 1;
473  xUnbiasedVertex_[nTracks_] = theFittedVertex.position().x();
474  yUnbiasedVertex_[nTracks_] = theFittedVertex.position().y();
475  zUnbiasedVertex_[nTracks_] = theFittedVertex.position().z();
476 
478  chi2UnbiasedVertex_[nTracks_] = theFittedVertex.totalChiSquared();
479  DOFUnbiasedVertex_[nTracks_] = theFittedVertex.degreesOfFreedom();
480  tracksUsedForVertexing_[nTracks_] = theFinalTracks.size();
481 
482  h_fitVtxNtracks_->Fill(theFinalTracks.size());
483  h_fitVtxChi2_->Fill(theFittedVertex.totalChiSquared());
484  h_fitVtxNdof_->Fill(theFittedVertex.degreesOfFreedom());
485  h_fitVtxChi2ndf_->Fill(theFittedVertex.normalisedChiSquared());
486  h_fitVtxChi2Prob_->Fill(TMath::Prob(theFittedVertex.totalChiSquared(),(int)theFittedVertex.degreesOfFreedom()));
487 
488  dszFromMyVertex_[nTracks_] = theTrack->track().dsz(myVertex);
489  dxyFromMyVertex_[nTracks_] = theTrack->track().dxy(myVertex);
490  dzFromMyVertex_[nTracks_] = theTrack->track().dz(myVertex);
491 
492  double dz_err = hypot(theTrack->track().dzError(),theFittedVertex.positionError().czz());
493 
494  // PV2D
495 
496  // std::pair<bool,Measurement1D> ip2dpv = absoluteTransverseImpactParameter(*theTrack,theFittedVertex);
497  // double ip2d_corr = ip2dpv.second.value();
498  // double ip2d_err = ip2dpv.second.error();
499 
500  std::pair<bool,Measurement1D> s_ip2dpv =
501  signedTransverseImpactParameter(*theTrack,GlobalVector(theTrack->track().px(),
502  theTrack->track().py(),
503  theTrack->track().pz()),
504  theFittedVertex);
505 
506  // double s_ip2dpv_corr = s_ip2dpv.second.value();
507  double s_ip2dpv_err = s_ip2dpv.second.error();
508 
509  // PV3D
510 
511  // std::pair<bool,Measurement1D> ip3dpv = absoluteImpactParameter3D(*theTrack,theFittedVertex);
512  // double ip3d_corr = ip3dpv.second.value();
513  // double ip3d_err = ip3dpv.second.error();
514 
515  // std::pair<bool,Measurement1D> s_ip3dpv =
516  // signedImpactParameter3D(*theTrack,GlobalVector(theTrack->track().px(),
517  // theTrack->track().py(),
518  // theTrack->track().pz()),
519  // theFittedVertex);
520 
521  // double s_ip3dpv_corr = s_ip3dpv.second.value();
522  // double s_ip3dpv_err = s_ip3dpv.second.error();
523 
524  dxyErrorFromMyVertex_[nTracks_] = s_ip2dpv_err;
525  dzErrorFromMyVertex_[nTracks_] = dz_err;
526 
527  IPTsigFromMyVertex_[nTracks_] = (theTrack->track().dxy(myVertex))/s_ip2dpv_err;
528  IPLsigFromMyVertex_[nTracks_] = (theTrack->track().dz(myVertex))/dz_err;
529 
530  // fill directly the histograms of residuals
531 
532  float_t trackphi = (theTrack->track().phi())*(180/TMath::Pi());
533  float_t tracketa = theTrack->track().eta();
534  float_t trackpt = theTrack->track().pt();
535 
536  // checks on the probe track quality
537  if(trackpt >= ptOfProbe_ && fabs(tracketa)<= etaOfProbe_){
538 
539  h_probePt_->Fill(theTrack->track().pt());
540  h_probeEta_->Fill(theTrack->track().eta());
541  h_probePhi_->Fill(theTrack->track().phi());
542  h_probeChi2_->Fill(theTrack->track().chi2());
543  h_probeNormChi2_->Fill(theTrack->track().normalizedChi2());
544  h_probeCharge_->Fill(theTrack->track().charge());
545  h_probeQoverP_->Fill(theTrack->track().qoverp());
546  h_probedz_->Fill(theTrack->track().dz(theRecoVertex));
547  h_probedxy_->Fill((theTrack->track().dxy(theRecoVertex)));
548 
549  h_probeHits_->Fill(theTrack->track().numberOfValidHits());
550  h_probeHits1D_->Fill(nRecHit1D);
551  h_probeHits2D_->Fill(nRecHit2D);
552  h_probeHitsInTIB_->Fill(nhitinBPIX);
553  h_probeHitsInTOB_->Fill(nhitinFPIX);
554  h_probeHitsInTID_->Fill(nhitinTIB);
555  h_probeHitsInTEC_->Fill(nhitinTID);
556  h_probeHitsInBPIX_->Fill(nhitinTOB);
557  h_probeHitsInFPIX_->Fill(nhitinTEC);
558 
559  for(Int_t i=0; i<nBins_; i++){
560 
561  float phiF = (-TMath::Pi()+i*phipitch_)*(180/TMath::Pi());
562  float phiL = (-TMath::Pi()+(i+1)*phipitch_)*(180/TMath::Pi());
563 
564  float etaF=-2.5+i*etapitch_;
565  float etaL=-2.5+(i+1)*etapitch_;
566 
567  if(trackphi >= phiF && trackphi < phiL ){
568  a_dxyPhiResiduals[i]->Fill(theTrack->track().dxy(myVertex)*cmToum);
569  a_dzPhiResiduals[i]->Fill(theTrack->track().dz(myVertex)*cmToum);
570  n_dxyPhiResiduals[i]->Fill((theTrack->track().dxy(myVertex))/s_ip2dpv_err);
571  n_dzPhiResiduals[i]->Fill((theTrack->track().dz(myVertex))/dz_err);
572 
573  for(Int_t j=0; j<nBins_; j++){
574 
575  float etaJ=-2.5+j*etapitch_;
576  float etaK=-2.5+(j+1)*etapitch_;
577 
578  if(tracketa >= etaJ && tracketa < etaK ){
579 
580  a_dxyResidualsMap[i][j]->Fill(theTrack->track().dxy(myVertex)*cmToum);
581  a_dzResidualsMap[i][j]->Fill(theTrack->track().dz(myVertex)*cmToum);
582 
583  n_dxyResidualsMap[i][j]->Fill((theTrack->track().dxy(myVertex))/s_ip2dpv_err);
584  n_dzResidualsMap[i][j]->Fill((theTrack->track().dz(myVertex))/dz_err);
585 
586  }
587  }
588  }
589 
590  if(tracketa >= etaF && tracketa < etaL ){
591  a_dxyEtaResiduals[i]->Fill(theTrack->track().dxy(myVertex)*cmToum);
592  a_dzEtaResiduals[i]->Fill(theTrack->track().dz(myVertex)*cmToum);
593  n_dxyEtaResiduals[i]->Fill((theTrack->track().dxy(myVertex))/s_ip2dpv_err);
594  n_dzEtaResiduals[i]->Fill((theTrack->track().dz(myVertex))/dz_err);
595  }
596  }
597  }
598 
599  if(debug_){
600  std::cout<<"PrimaryVertexValidation::analyze() : myVertex.x()= "<<myVertex.x()<<" myVertex.y()= "<<myVertex.y()<<" theFittedVertex.z()= "<<myVertex.z()<<std::endl;
601  std::cout<<"PrimaryVertexValidation::analyze() : theTrack->track().dz(myVertex)= "<<theTrack->track().dz(myVertex)<<std::endl;
602  std::cout<<"PrimaryVertexValidation::analyze() : zPCA -myVertex.z() = "<<(theTrack->track().vertex().z() -myVertex.z() )<<std::endl;
603  }// ends if debug_
604  } // ends if the fitted vertex is Valid
605 
606  delete fitter;
607 
608  } catch ( cms::Exception& er ) {
609  LogTrace("PrimaryVertexValidation::analyze RECO")<<"caught std::exception "<<er.what()<<std::endl;
610  }
611 
612  } //ends if theFinalTracks.size() > 2
613 
614  else {
615  if(debug_)
616  std::cout << "PrimaryVertexValidation::analyze() :Not enough tracks to make a vertex. Returns no vertex info" << std::endl;
617  }
618 
619  ++nTracks_;
620  ++nTracksPerClus_;
621 
622  if(debug_)
623  cout<< "Track "<<i<<" : pT = "<<theTrack->track().pt()<<endl;
624 
625  }// for loop on tracks
626 
627  } // for loop on track clusters
628 
629 
630  // Fill the TTree if needed
631 
632  if(storeNtuple_){
633  rootTree_->Fill();
634  }
635 
636 
637 }
virtual char const * what() const
Definition: Exception.cc:141
GlobalError positionError() const
const double Pi
type
Definition: HCALResponse.h:21
EventNumber_t event() const
Definition: EventID.h:44
int i
Definition: DBlmapReader.cc:9
TH1F * n_dzResidualsMap[nMaxBins_][nMaxBins_]
trackRef_iterator tracks_end() const
last iterator over tracks
Definition: Vertex.cc:44
TrackFilterForPVFindingBase * theTrackFilter_
TH1F * a_dxyResidualsMap[nMaxBins_][nMaxBins_]
TrackQuality
track quality
Definition: TrackBase.h:93
TH1F * n_dxyEtaBiasResiduals[nMaxBins_]
bool isValid() const
Tells whether the vertex is valid.
Definition: Vertex.h:60
std::pair< bool, Measurement1D > signedTransverseImpactParameter(const reco::TransientTrack &track, const GlobalVector &direction, const reco::Vertex &vertex)
Definition: IPTools.cc:50
TH1F * n_dxyBiasResidualsMap[nMaxBins_][nMaxBins_]
float totalChiSquared() const
T y() const
Definition: PV3DBase.h:63
RunNumber_t run() const
float DOFUnbiasedVertex_[nMaxtracks_]
TH1F * a_dzPhiBiasResiduals[nMaxBins_]
TH1F * n_dzEtaBiasResiduals[nMaxBins_]
double dszFromMyVertex_[nMaxtracks_]
double dxyFromMyVertex_[nMaxtracks_]
const Point & position() const
position
Definition: Vertex.h:106
double dzErrorFromMyVertex_[nMaxtracks_]
LuminosityBlockNumber_t luminosityBlock() const
TH1F * a_dxyPhiBiasResiduals[nMaxBins_]
double IPTsigFromMyVertex_[nMaxtracks_]
virtual std::vector< std::vector< reco::TransientTrack > > clusterize(const std::vector< reco::TransientTrack > &tracks) const =0
const int kFPIX
float normalisedChiSquared() const
int tracksUsedForVertexing_[nMaxtracks_]
bool hasFirstLayerPixelHits(const reco::TransientTrack track)
virtual CachingVertex< N > vertex(const std::vector< reco::TransientTrack > &tracks) const =0
TH1F * n_dzPhiBiasResiduals[nMaxBins_]
float degreesOfFreedom() const
double yUnbiasedVertex_[nMaxtracks_]
GlobalPoint position() const
T z() const
Definition: PV3DBase.h:64
double chi2() const
chi-squares
Definition: Vertex.h:95
int j
Definition: DBlmapReader.cc:9
double zUnbiasedVertex_[nMaxtracks_]
float chi2normUnbiasedVertex_[nMaxtracks_]
virtual std::vector< reco::TransientTrack > select(const std::vector< reco::TransientTrack > &tracks) const =0
float trackWeight(const reco::TransientTrack &track) const
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:390
#define LogTrace(id)
double IPLsigFromMyVertex_[nMaxtracks_]
double ndof() const
Definition: Vertex.h:102
int k[5][pyjets_maxn]
EventAuxiliary const & eventAuxiliary() const
Definition: Event.h:72
static TrackQuality qualityByName(const std::string &name)
Definition: TrackBase.cc:46
bool hasTrackWeight() const
bool isHit2D(const TrackingRecHit &hit) const
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
const T & get() const
Definition: EventSetup.h:55
TH1F * n_dxyPhiBiasResiduals[nMaxBins_]
TrackClusterizerInZ * theTrackClusterizer_
double xUnbiasedVertex_[nMaxtracks_]
TH1F * a_dxyEtaBiasResiduals[nMaxBins_]
EventID const & id() const
double dzFromMyVertex_[nMaxtracks_]
std::vector< TrackBaseRef >::const_iterator trackRef_iterator
The iteratator for the vector&lt;TrackRef&gt;
Definition: Vertex.h:37
TH1F * a_dxyBiasResidualsMap[nMaxBins_][nMaxBins_]
tuple cout
Definition: gather_cfg.py:121
TH1F * n_dxyResidualsMap[nMaxBins_][nMaxBins_]
double normalizedChi2() const
chi-squared divided by n.d.o.f.
Definition: Vertex.h:104
double dxyErrorFromMyVertex_[nMaxtracks_]
trackRef_iterator tracks_begin() const
first iterator over tracks
Definition: Vertex.cc:39
float sumOfWeightsUnbiasedVertex_[nMaxtracks_]
TH1F * n_dzBiasResidualsMap[nMaxBins_][nMaxBins_]
TH1F * a_dzBiasResidualsMap[nMaxBins_][nMaxBins_]
T x() const
Definition: PV3DBase.h:62
TH1F * a_dzEtaBiasResiduals[nMaxBins_]
bool isValid() const
TH1F * a_dzResidualsMap[nMaxBins_][nMaxBins_]
float chi2UnbiasedVertex_[nMaxtracks_]
size_t tracksSize() const
number of tracks
Definition: Vertex.cc:34
*vegas h *****************************************************used in the default bin number in original ***version of VEGAS is ***a higher bin number might help to derive a more precise ***grade subtle point
Definition: invegas.h:5
Global3DVector GlobalVector
Definition: GlobalVector.h:10
const int kBPIX
double PrimaryVertexValidation::approximateTrackError ( const GlobalPoint refPoint,
const GlobalPoint dcaPosition,
const GlobalVector tangent,
const AlgebraicMatrix33 covMatrix 
)
private
void PrimaryVertexValidation::beginJob ( void  )
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 689 of file PrimaryVertexValidation.cc.

References a_dxyBiasResidualsMap, a_dxyEtaBiasResiduals, a_dxyEtaMADBiasTrend, a_dxyEtaMADTrend, a_dxyEtaMeanBiasTrend, a_dxyEtaMeanTrend, a_dxyEtaMedianBiasTrend, a_dxyEtaMedianTrend, a_dxyEtaResiduals, a_dxyEtaWidthBiasTrend, a_dxyEtaWidthTrend, a_dxyMeanBiasMap, a_dxyMeanMap, a_dxyPhiBiasResiduals, a_dxyPhiMADBiasTrend, a_dxyPhiMADTrend, a_dxyPhiMeanBiasTrend, a_dxyPhiMeanTrend, a_dxyPhiMedianBiasTrend, a_dxyPhiMedianTrend, a_dxyPhiResiduals, a_dxyPhiWidthBiasTrend, a_dxyPhiWidthTrend, a_dxyResidualsMap, a_dxyWidthBiasMap, a_dxyWidthMap, a_dzBiasResidualsMap, a_dzEtaBiasResiduals, a_dzEtaMADBiasTrend, a_dzEtaMADTrend, a_dzEtaMeanBiasTrend, a_dzEtaMeanTrend, a_dzEtaMedianBiasTrend, a_dzEtaMedianTrend, a_dzEtaResiduals, a_dzEtaWidthBiasTrend, a_dzEtaWidthTrend, a_dzMeanBiasMap, a_dzMeanMap, a_dzPhiBiasResiduals, a_dzPhiMADBiasTrend, a_dzPhiMADTrend, a_dzPhiMeanBiasTrend, a_dzPhiMeanTrend, a_dzPhiMedianBiasTrend, a_dzPhiMedianTrend, a_dzPhiResiduals, a_dzPhiWidthBiasTrend, a_dzPhiWidthTrend, a_dzResidualsMap, a_dzWidthBiasMap, a_dzWidthMap, Beamdxdz_, Beamsigmaz_, BeamWidthX_, BeamWidthY_, BSx0_, BSy0_, BSz0_, charge_, chi2_, chi2ndof_, chi2normUnbiasedVertex_, chi2UnbiasedVertex_, DOFUnbiasedVertex_, dszFromMyVertex_, dxy_, dxyBs_, dxyErrorFromMyVertex_, dxyFromMyVertex_, dz_, dzBs_, dzErrorFromMyVertex_, dzFromMyVertex_, eta_, etapitch_, EventNumber_, h_fitVtxChi2_, h_fitVtxChi2ndf_, h_fitVtxChi2Prob_, h_fitVtxNdof_, h_fitVtxNtracks_, h_probeCharge_, h_probeChi2_, h_probedxy_, h_probedz_, h_probeEta_, h_probeHits1D_, h_probeHits2D_, h_probeHits_, h_probeHitsInBPIX_, h_probeHitsInFPIX_, h_probeHitsInTEC_, h_probeHitsInTIB_, h_probeHitsInTID_, h_probeHitsInTOB_, h_probeNormChi2_, h_probePhi_, h_probePt_, h_probeQoverP_, h_recoVtxChi2ndf_, h_recoVtxChi2Prob_, h_recoVtxNtracks_, h_recoVtxSumPt_, hasRecVertex_, i, IPLsigFromMyVertex_, IPTsigFromMyVertex_, isGoodTrack_, isHighPurity_, j, lightNtupleSwitch_, LuminosityBlockNumber_, TFileDirectory::make(), TFileService::make(), TFileService::mkdir(), n_dxyBiasResidualsMap, n_dxyEtaBiasResiduals, n_dxyEtaMADBiasTrend, n_dxyEtaMADTrend, n_dxyEtaMeanBiasTrend, n_dxyEtaMeanTrend, n_dxyEtaMedianBiasTrend, n_dxyEtaMedianTrend, n_dxyEtaResiduals, n_dxyEtaWidthBiasTrend, n_dxyEtaWidthTrend, n_dxyMeanBiasMap, n_dxyMeanMap, n_dxyPhiBiasResiduals, n_dxyPhiMADBiasTrend, n_dxyPhiMADTrend, n_dxyPhiMeanBiasTrend, n_dxyPhiMeanTrend, n_dxyPhiMedianBiasTrend, n_dxyPhiMedianTrend, n_dxyPhiResiduals, n_dxyPhiWidthBiasTrend, n_dxyPhiWidthTrend, n_dxyResidualsMap, n_dxyWidthBiasMap, n_dxyWidthMap, n_dzBiasResidualsMap, n_dzEtaBiasResiduals, n_dzEtaMADBiasTrend, n_dzEtaMADTrend, n_dzEtaMeanBiasTrend, n_dzEtaMeanTrend, n_dzEtaMedianBiasTrend, n_dzEtaMedianTrend, n_dzEtaResiduals, n_dzEtaWidthBiasTrend, n_dzEtaWidthTrend, n_dzMeanBiasMap, n_dzMeanMap, n_dzPhiBiasResiduals, n_dzPhiMADBiasTrend, n_dzPhiMADTrend, n_dzPhiMeanBiasTrend, n_dzPhiMeanTrend, n_dzPhiMedianBiasTrend, n_dzPhiMedianTrend, n_dzPhiResiduals, n_dzPhiWidthBiasTrend, n_dzPhiWidthTrend, n_dzResidualsMap, n_dzWidthBiasMap, n_dzWidthMap, nBins_, nClus_, Nevt_, nhits1D_, nhits2D_, nhits_, nhitsBPIX_, nhitsFPIX_, nhitsTEC_, nhitsTIB_, nhitsTID_, nhitsTOB_, nOfflineVertices_, nTracks_, nTracksPerClus_, p_, phi_, phipitch_, Pi, pt_, qoverp_, rootTree_, RunNumber_, sumOfWeightsUnbiasedVertex_, theta_, tracksUsedForVertexing_, useTracksFromRecoVtx_, xOfflineVertex_, xPCA_, xUnbiasedVertex_, yOfflineVertex_, yPCA_, yUnbiasedVertex_, zOfflineVertex_, zPCA_, and zUnbiasedVertex_.

690 {
691  edm::LogInfo("beginJob") << "Begin Job" << std::endl;
692  // Define TTree for output
693  Nevt_ = 0;
694 
695  // rootFile_ = new TFile(filename_.c_str(),"recreate");
697  rootTree_ = fs->make<TTree>("tree","PV Validation tree");
698 
699  // Track Paramters
700 
701  if(lightNtupleSwitch_){
702 
703  rootTree_->Branch("EventNumber",&EventNumber_,"EventNumber/i");
704  rootTree_->Branch("RunNumber",&RunNumber_,"RunNumber/i");
705  rootTree_->Branch("LuminosityBlockNumber",&LuminosityBlockNumber_,"LuminosityBlockNumber/i");
706  rootTree_->Branch("nOfflineVertices",&nOfflineVertices_,"nOfflineVertices/I");
707  rootTree_->Branch("nTracks",&nTracks_,"nTracks/I");
708  rootTree_->Branch("phi",&phi_,"phi[nTracks]/D");
709  rootTree_->Branch("eta",&eta_,"eta[nTracks]/D");
710  rootTree_->Branch("pt",&pt_,"pt[nTracks]/D");
711  rootTree_->Branch("dxyFromMyVertex",&dxyFromMyVertex_,"dxyFromMyVertex[nTracks]/D");
712  rootTree_->Branch("dzFromMyVertex",&dzFromMyVertex_,"dzFromMyVertex[nTracks]/D");
713  rootTree_->Branch("IPTsigFromMyVertex",&IPTsigFromMyVertex_,"IPTsigFromMyVertex_[nTracks]/D");
714  rootTree_->Branch("IPLsigFromMyVertex",&IPLsigFromMyVertex_,"IPLsigFromMyVertex_[nTracks]/D");
715  rootTree_->Branch("hasRecVertex",&hasRecVertex_,"hasRecVertex[nTracks]/I");
716  rootTree_->Branch("isGoodTrack",&isGoodTrack_,"isGoodTrack[nTracks]/I");
717  rootTree_->Branch("isHighPurity",&isHighPurity_,"isHighPurity_[nTracks]/I");
718 
719  } else {
720 
721  rootTree_->Branch("nTracks",&nTracks_,"nTracks/I");
722  rootTree_->Branch("nTracksPerClus",&nTracksPerClus_,"nTracksPerClus/I");
723  rootTree_->Branch("nClus",&nClus_,"nClus/I");
724  rootTree_->Branch("xOfflineVertex",&xOfflineVertex_,"xOfflineVertex/D");
725  rootTree_->Branch("yOfflineVertex",&yOfflineVertex_,"yOfflineVertex/D");
726  rootTree_->Branch("zOfflineVertex",&zOfflineVertex_,"zOfflineVertex/D");
727  rootTree_->Branch("BSx0",&BSx0_,"BSx0/D");
728  rootTree_->Branch("BSy0",&BSy0_,"BSy0/D");
729  rootTree_->Branch("BSz0",&BSz0_,"BSz0/D");
730  rootTree_->Branch("Beamsigmaz",&Beamsigmaz_,"Beamsigmaz/D");
731  rootTree_->Branch("Beamdxdz",&Beamdxdz_,"Beamdxdz/D");
732  rootTree_->Branch("BeamWidthX",&BeamWidthX_,"BeamWidthX/D");
733  rootTree_->Branch("BeamWidthY",&BeamWidthY_,"BeamWidthY/D");
734  rootTree_->Branch("pt",&pt_,"pt[nTracks]/D");
735  rootTree_->Branch("p",&p_,"p[nTracks]/D");
736  rootTree_->Branch("nhits",&nhits_,"nhits[nTracks]/I");
737  rootTree_->Branch("nhits1D",&nhits1D_,"nhits1D[nTracks]/I");
738  rootTree_->Branch("nhits2D",&nhits2D_,"nhits2D[nTracks]/I");
739  rootTree_->Branch("nhitsBPIX",&nhitsBPIX_,"nhitsBPIX[nTracks]/I");
740  rootTree_->Branch("nhitsFPIX",&nhitsFPIX_,"nhitsFPIX[nTracks]/I");
741  rootTree_->Branch("nhitsTIB",&nhitsTIB_,"nhitsTIB[nTracks]/I");
742  rootTree_->Branch("nhitsTID",&nhitsTID_,"nhitsTID[nTracks]/I");
743  rootTree_->Branch("nhitsTOB",&nhitsTOB_,"nhitsTOB[nTracks]/I");
744  rootTree_->Branch("nhitsTEC",&nhitsTEC_,"nhitsTEC[nTracks]/I");
745  rootTree_->Branch("eta",&eta_,"eta[nTracks]/D");
746  rootTree_->Branch("theta",&theta_,"theta[nTracks]/D");
747  rootTree_->Branch("phi",&phi_,"phi[nTracks]/D");
748  rootTree_->Branch("chi2",&chi2_,"chi2[nTracks]/D");
749  rootTree_->Branch("chi2ndof",&chi2ndof_,"chi2ndof[nTracks]/D");
750  rootTree_->Branch("charge",&charge_,"charge[nTracks]/I");
751  rootTree_->Branch("qoverp",&qoverp_,"qoverp[nTracks]/D");
752  rootTree_->Branch("dz",&dz_,"dz[nTracks]/D");
753  rootTree_->Branch("dxy",&dxy_,"dxy[nTracks]/D");
754  rootTree_->Branch("dzBs",&dzBs_,"dzBs[nTracks]/D");
755  rootTree_->Branch("dxyBs",&dxyBs_,"dxyBs[nTracks]/D");
756  rootTree_->Branch("xPCA",&xPCA_,"xPCA[nTracks]/D");
757  rootTree_->Branch("yPCA",&yPCA_,"yPCA[nTracks]/D");
758  rootTree_->Branch("zPCA",&zPCA_,"zPCA[nTracks]/D");
759  rootTree_->Branch("xUnbiasedVertex",&xUnbiasedVertex_,"xUnbiasedVertex[nTracks]/D");
760  rootTree_->Branch("yUnbiasedVertex",&yUnbiasedVertex_,"yUnbiasedVertex[nTracks]/D");
761  rootTree_->Branch("zUnbiasedVertex",&zUnbiasedVertex_,"zUnbiasedVertex[nTracks]/D");
762  rootTree_->Branch("chi2normUnbiasedVertex",&chi2normUnbiasedVertex_,"chi2normUnbiasedVertex[nTracks]/F");
763  rootTree_->Branch("chi2UnbiasedVertex",&chi2UnbiasedVertex_,"chi2UnbiasedVertex[nTracks]/F");
764  rootTree_->Branch("DOFUnbiasedVertex",&DOFUnbiasedVertex_," DOFUnbiasedVertex[nTracks]/F");
765  rootTree_->Branch("sumOfWeightsUnbiasedVertex",&sumOfWeightsUnbiasedVertex_,"sumOfWeightsUnbiasedVertex[nTracks]/F");
766  rootTree_->Branch("tracksUsedForVertexing",&tracksUsedForVertexing_,"tracksUsedForVertexing[nTracks]/I");
767  rootTree_->Branch("dxyFromMyVertex",&dxyFromMyVertex_,"dxyFromMyVertex[nTracks]/D");
768  rootTree_->Branch("dzFromMyVertex",&dzFromMyVertex_,"dzFromMyVertex[nTracks]/D");
769  rootTree_->Branch("dszFromMyVertex",&dszFromMyVertex_,"dszFromMyVertex[nTracks]/D");
770  rootTree_->Branch("dxyErrorFromMyVertex",&dxyErrorFromMyVertex_,"dxyErrorFromMyVertex_[nTracks]/D");
771  rootTree_->Branch("dzErrorFromMyVertex",&dzErrorFromMyVertex_,"dzErrorFromMyVertex_[nTracks]/D");
772  rootTree_->Branch("IPTsigFromMyVertex",&IPTsigFromMyVertex_,"IPTsigFromMyVertex_[nTracks]/D");
773  rootTree_->Branch("IPLsigFromMyVertex",&IPLsigFromMyVertex_,"IPLsigFromMyVertex_[nTracks]/D");
774  rootTree_->Branch("hasRecVertex",&hasRecVertex_,"hasRecVertex[nTracks]/I");
775  rootTree_->Branch("isGoodTrack",&isGoodTrack_,"isGoodTrack[nTracks]/I");
776  }
777 
778  // probe track histograms
779 
780  TFileDirectory ProbeFeatures = fs->mkdir("ProbeTrackFeatures");
781 
782  h_probePt_ = ProbeFeatures.make<TH1F>("h_probePt","p_{T} of probe track;track p_{T} (GeV); tracks",100,0.,50.);
783  h_probeEta_ = ProbeFeatures.make<TH1F>("h_probeEta","#eta of probe track;track #eta; tracks",54,-2.7,2.7);
784  h_probePhi_ = ProbeFeatures.make<TH1F>("h_probePhi","#phi of probe track;track #phi [rad]; tracks",100,-3.15,3.15);
785  h_probeChi2_ = ProbeFeatures.make<TH1F>("h_probeChi2","#chi^{2} of probe track;track #chi^{2}; tracks",100,0.,100.);
786  h_probeNormChi2_ = ProbeFeatures.make<TH1F>("h_probeNormChi2"," normalized #chi^{2} of probe track;track #chi^{2}/ndof; tracks",100,0.,10.);
787  h_probeCharge_ = ProbeFeatures.make<TH1F>("h_probeCharge","charge of profe track;track charge Q;tracks",3,-1.5,1.5);
788  h_probeQoverP_ = ProbeFeatures.make<TH1F>("h_probeQoverP","q/p of probe track; track Q/p (GeV^{-1})",200,-1.,1.);
789  h_probedz_ = ProbeFeatures.make<TH1F>("h_probedz","d_{z} of probe track;track d_{z} (cm);tracks",100,-5.,5.);
790  h_probedxy_ = ProbeFeatures.make<TH1F>("h_probedxy","d_{xy} of probe track;track d_{xy} (#mum);tracks",200,-1.,1.);
791 
792  h_probeHits_ = ProbeFeatures.make<TH1F>("h_probeNRechits" ,"N_{hits} ;N_{hits} ;tracks",40,-0.5,39.5);
793  h_probeHits1D_ = ProbeFeatures.make<TH1F>("h_probeNRechits1D" ,"N_{hits} 1D ;N_{hits} 1D ;tracks",40,-0.5,39.5);
794  h_probeHits2D_ = ProbeFeatures.make<TH1F>("h_probeNRechits2D" ,"N_{hits} 2D ;N_{hits} 2D ;tracks",40,-0.5,39.5);
795  h_probeHitsInTIB_ = ProbeFeatures.make<TH1F>("h_probeNRechitsTIB" ,"N_{hits} TIB ;N_{hits} TIB;tracks",40,-0.5,39.5);
796  h_probeHitsInTOB_ = ProbeFeatures.make<TH1F>("h_probeNRechitsTOB" ,"N_{hits} TOB ;N_{hits} TOB;tracks",40,-0.5,39.5);
797  h_probeHitsInTID_ = ProbeFeatures.make<TH1F>("h_probeNRechitsTID" ,"N_{hits} TID ;N_{hits} TID;tracks",40,-0.5,39.5);
798  h_probeHitsInTEC_ = ProbeFeatures.make<TH1F>("h_probeNRechitsTEC" ,"N_{hits} TEC ;N_{hits} TEC;tracks",40,-0.5,39.5);
799  h_probeHitsInBPIX_ = ProbeFeatures.make<TH1F>("h_probeNRechitsBPIX","N_{hits} BPIX;N_{hits} BPIX;tracks",40,-0.5,39.5);
800  h_probeHitsInFPIX_ = ProbeFeatures.make<TH1F>("h_probeNRechitsFPIX","N_{hits} FPIX;N_{hits} FPIX;tracks",40,-0.5,39.5);
801 
802  TFileDirectory RefitVertexFeatures = fs->mkdir("RefitVertexFeatures");
803  h_fitVtxNtracks_ = RefitVertexFeatures.make<TH1F>("h_fitVtxNtracks" ,"N^{vtx}_{trks};N^{vtx}_{trks};vertices" ,100,-0.5,99.5);
804  h_fitVtxNdof_ = RefitVertexFeatures.make<TH1F>("h_fitVtxNdof" ,"N^{vtx}_{DOF};N^{vtx}_{DOF};vertices" ,100,-0.5,99.5);
805  h_fitVtxChi2_ = RefitVertexFeatures.make<TH1F>("h_fitVtxChi2" ,"#chi^{2} vtx;#chi^{2} vtx;vertices" ,100,-0.5,99.5);
806  h_fitVtxChi2ndf_ = RefitVertexFeatures.make<TH1F>("h_fitVtxChi2ndf" ,"#chi^{2}/ndf vtx;#chi^{2}/ndf vtx;vertices" ,100,-0.5,9.5);
807  h_fitVtxChi2Prob_ = RefitVertexFeatures.make<TH1F>("h_fitVtxChi2Prob" ,"Prob(#chi^{2},ndf);Prob(#chi^{2},ndf);vertices",40,0.,1.);
808 
810 
811  TFileDirectory RecoVertexFeatures = fs->mkdir("RecoVertexFeatures");
812  h_recoVtxNtracks_ = RecoVertexFeatures.make<TH1F>("h_recoVtxNtracks" ,"N^{vtx}_{trks};N^{vtx}_{trks};vertices" ,100,-0.5,99.5);
813  h_recoVtxChi2ndf_ = RecoVertexFeatures.make<TH1F>("h_recoVtxChi2ndf" ,"#chi^{2}/ndf vtx;#chi^{2}/ndf vtx;vertices" ,10,-0.5,9.5);
814  h_recoVtxChi2Prob_ = RecoVertexFeatures.make<TH1F>("h_recoVtxChi2Prob" ,"Prob(#chi^{2},ndf);Prob(#chi^{2},ndf);vertices",40,0.,1.);
815  h_recoVtxSumPt_ = RecoVertexFeatures.make<TH1F>("h_recoVtxSumPt" ,"Sum(p^{trks}_{T});Sum(p^{trks}_{T});vertices" ,100,0.,200.);
816 
817  }
818 
819  // initialize the residuals histograms
820 
821  float dxymax_phi = 2000;
822  float dzmax_phi = 2000;
823  float dxymax_eta = 3000;
824  float dzmax_eta = 3000;
825 
826  const Int_t mybins_ = 500;
827 
829  //
830  // Usual plots from refitting the vertex
831  // The vertex is refit without the probe track
832  //
834 
835  TFileDirectory AbsTransPhiRes = fs->mkdir("Abs_Transv_Phi_Residuals");
836  TFileDirectory AbsTransEtaRes = fs->mkdir("Abs_Transv_Eta_Residuals");
837 
838  TFileDirectory AbsLongPhiRes = fs->mkdir("Abs_Long_Phi_Residuals");
839  TFileDirectory AbsLongEtaRes = fs->mkdir("Abs_Long_Eta_Residuals");
840 
841  TFileDirectory NormTransPhiRes = fs->mkdir("Norm_Transv_Phi_Residuals");
842  TFileDirectory NormTransEtaRes = fs->mkdir("Norm_Transv_Eta_Residuals");
843 
844  TFileDirectory NormLongPhiRes = fs->mkdir("Norm_Long_Phi_Residuals");
845  TFileDirectory NormLongEtaRes = fs->mkdir("Norm_Long_Eta_Residuals");
846 
847  TFileDirectory AbsDoubleDiffRes = fs->mkdir("Abs_DoubleDiffResiduals");
848  TFileDirectory NormDoubleDiffRes = fs->mkdir("Norm_DoubleDiffResiduals");
849 
850  for ( int i=0; i<nBins_; ++i ) {
851 
852  float phiF = (-TMath::Pi()+i*phipitch_)*(180/TMath::Pi());
853  float phiL = (-TMath::Pi()+(i+1)*phipitch_)*(180/TMath::Pi());
854 
855  float etaF=-2.5+i*etapitch_;
856  float etaL=-2.5+(i+1)*etapitch_;
857 
858  a_dxyPhiResiduals[i] = AbsTransPhiRes.make<TH1F>(Form("histo_dxy_phi_plot%i",i),Form("%.2f#circ<#varphi^{probe}_{tk}<%.2f#circ;d_{xy} [#mum];tracks",phiF,phiL),mybins_,-dxymax_phi,dxymax_phi);
859  a_dxyEtaResiduals[i] = AbsTransEtaRes.make<TH1F>(Form("histo_dxy_eta_plot%i",i),Form("%.2f<#eta^{probe}_{tk}<%.2f;d_{xy} [#mum];tracks",etaF,etaL),mybins_,-dxymax_eta,dxymax_eta);
860 
861  a_dzPhiResiduals[i] = AbsLongPhiRes.make<TH1F>(Form("histo_dz_phi_plot%i",i),Form("%.2f#circ<#varphi^{probe}_{tk}<%.2f #circ;d_{z} [#mum];tracks",phiF,phiL),mybins_,-dzmax_phi,dzmax_phi);
862  a_dzEtaResiduals[i] = AbsLongEtaRes.make<TH1F>(Form("histo_dz_eta_plot%i",i),Form("%.2f<#eta^{probe}_{tk}<%.2f;d_{z} [#mum];tracks",etaF,etaL),mybins_,-dzmax_eta,dzmax_eta);
863 
864  n_dxyPhiResiduals[i] = NormTransPhiRes.make<TH1F>(Form("histo_norm_dxy_phi_plot%i",i),Form("%.2f#circ<#varphi^{probe}_{tk}<%.2f#circ;d_{xy}/#sigma_{d_{xy}} [#mum];tracks",phiF,phiL),mybins_,-dxymax_phi/100.,dxymax_phi/100.);
865  n_dxyEtaResiduals[i] = NormTransEtaRes.make<TH1F>(Form("histo_norm_dxy_eta_plot%i",i),Form("%.2f<#eta^{probe}_{tk}<%.2f;d_{xy}/#sigma_{d_{xy}} [#mum];tracks",etaF,etaL),mybins_,-dxymax_eta/100.,dxymax_eta/100.);
866 
867  n_dzPhiResiduals[i] = NormLongPhiRes.make<TH1F>(Form("histo_norm_dz_phi_plot%i",i),Form("%.2f#circ<#varphi^{probe}_{tk}<%.2f#circ;d_{z}/#sigma_{d_{z}} [#mum];tracks",phiF,phiL),mybins_,-dzmax_phi/100.,dzmax_phi/100.);
868  n_dzEtaResiduals[i] = NormLongEtaRes.make<TH1F>(Form("histo_norm_dz_eta_plot%i",i),Form("%.2f<#eta^{probe}_{tk}<%.2f;d_{z}/#sigma_{d_{z}} [#mum];tracks",etaF,etaL),mybins_,-dzmax_eta/100.,dzmax_eta/100.);
869 
870  for ( int j=0; j<nBins_; ++j ) {
871 
872  a_dxyResidualsMap[i][j] = AbsDoubleDiffRes.make<TH1F>(Form("histo_dxy_eta_plot%i_phi_plot%i",i,j),Form("%.2f<#eta_{tk}<%.2f %.2f#circ<#varphi_{tk}<%.2f#circ;d_{xy} [#mum];tracks",etaF,etaL,phiF,phiL),mybins_,-dzmax_eta,dzmax_eta);
873  a_dzResidualsMap[i][j] = AbsDoubleDiffRes.make<TH1F>(Form("histo_dxy_eta_plot%i_phi_plot%i",i,j),Form("%.2f<#eta_{tk}<%.2f %.2f#circ<#varphi_{tk}<%.2f#circ;d_{z} [#mum];tracks",etaF,etaL,phiF,phiL),mybins_,-dzmax_eta,dzmax_eta);
874 
875  n_dxyResidualsMap[i][j] = NormDoubleDiffRes.make<TH1F>(Form("histo_norm_dxy_eta_plot%i_phi_plot%i",i,j),Form("%.2f<#eta_{tk}<%.2f %.2f#circ<#varphi_{tk}<%.2f#circ;d_{xy}/#sigma_{d_{xy}} [#mum];tracks",etaF,etaL,phiF,phiL),mybins_,-dzmax_eta/100,dzmax_eta/100);
876  n_dzResidualsMap[i][j] = NormDoubleDiffRes.make<TH1F>(Form("histo_norm_dxy_eta_plot%i_phi_plot%i",i,j),Form("%.2f<#eta_{tk}<%.2f %.2f#circ<#varphi_{tk}<%.2f#circ;d_{z}/#sigma_{d_{z}} [#mum];tracks",etaF,etaL,phiF,phiL),mybins_,-dzmax_eta/100,dzmax_eta/100);
877  }
878 
879  }
880 
881  // declaration of the directories
882 
883  TFileDirectory MeanTrendsDir = fs->mkdir("MeanTrends");
884  TFileDirectory WidthTrendsDir = fs->mkdir("WidthTrends");
885  TFileDirectory MedianTrendsDir = fs->mkdir("MedianTrends");
886  TFileDirectory MADTrendsDir = fs->mkdir("MADTrends");
887 
888  TFileDirectory Mean2DMapsDir = fs->mkdir("MeanMaps");
889  TFileDirectory Width2DMapsDir = fs->mkdir("WidthMaps");
890 
891  Double_t highedge=nBins_-0.5;
892  Double_t lowedge=-0.5;
893 
894  // means and widths from the fit
895 
896  a_dxyPhiMeanTrend = MeanTrendsDir.make<TH1F> ("means_dxy_phi","#LT d_{xy} #GT vs #phi sector;#varphi (sector) [degrees];#LT d_{xy} #GT [#mum]",nBins_,lowedge,highedge);
897  a_dxyPhiWidthTrend = WidthTrendsDir.make<TH1F>("widths_dxy_phi","#sigma_{d_{xy}} vs #phi sector;#varphi (sector) [degrees];#sigma_{d_{xy}} [#mum]",nBins_,lowedge,highedge);
898  a_dzPhiMeanTrend = MeanTrendsDir.make<TH1F> ("means_dz_phi","#LT d_{z} #GT vs #phi sector;#varphi (sector) [degrees];#LT d_{z} #GT [#mum]",nBins_,lowedge,highedge);
899  a_dzPhiWidthTrend = WidthTrendsDir.make<TH1F>("widths_dz_phi","#sigma_{d_{z}} vs #phi sector;#varphi (sector) [degrees];#sigma_{d_{z}} [#mum]",nBins_,lowedge,highedge);
900 
901  a_dxyEtaMeanTrend = MeanTrendsDir.make<TH1F> ("means_dxy_eta","#LT d_{xy} #GT vs #eta sector;#eta (sector);#LT d_{xy} #GT [#mum]",nBins_,lowedge,highedge);
902  a_dxyEtaWidthTrend = WidthTrendsDir.make<TH1F>("widths_dxy_eta","#sigma_{d_{xy}} vs #eta sector;#eta (sector);#sigma_{d_{xy}} [#mum]",nBins_,lowedge,highedge);
903  a_dzEtaMeanTrend = MeanTrendsDir.make<TH1F> ("means_dz_eta","#LT d_{z} #GT vs #eta sector;#eta (sector);#LT d_{z} #GT [#mum]",nBins_,lowedge,highedge);
904  a_dzEtaWidthTrend = WidthTrendsDir.make<TH1F>("widths_dz_eta","#sigma_{d_{xy}} vs #eta sector;#eta (sector);#sigma_{d_{z}} [#mum]",nBins_,lowedge,highedge);
905 
906  n_dxyPhiMeanTrend = MeanTrendsDir.make<TH1F> ("norm_means_dxy_phi","#LT d_{xy}/#sigma_{d_{xy}} #GT vs #phi sector;#varphi (sector) [degrees];#LT d_{xy}/#sigma_{d_{xy}} #GT",nBins_,lowedge,highedge);
907  n_dxyPhiWidthTrend = WidthTrendsDir.make<TH1F>("norm_widths_dxy_phi","width(d_{xy}/#sigma_{d_{xy}}) vs #phi sector;#varphi (sector) [degrees]; width(d_{xy}/#sigma_{d_{xy}})",nBins_,lowedge,highedge);
908  n_dzPhiMeanTrend = MeanTrendsDir.make<TH1F> ("norm_means_dz_phi","#LT d_{z}/#sigma_{d_{z}} #GT vs #phi sector;#varphi (sector) [degrees];#LT d_{z}/#sigma_{d_{z}} #GT",nBins_,lowedge,highedge);
909  n_dzPhiWidthTrend = WidthTrendsDir.make<TH1F>("norm_widths_dz_phi","width(d_{z}/#sigma_{d_{z}}) vs #phi sector;#varphi (sector) [degrees];width(d_{z}/#sigma_{d_{z}})",nBins_,lowedge,highedge);
910 
911  n_dxyEtaMeanTrend = MeanTrendsDir.make<TH1F> ("norm_means_dxy_eta","#LT d_{xy}/#sigma_{d_{xy}} #GT vs #eta sector;#eta (sector);#LT d_{xy}/#sigma_{d_{z}} #GT",nBins_,lowedge,highedge);
912  n_dxyEtaWidthTrend = WidthTrendsDir.make<TH1F>("norm_widths_dxy_eta","width(d_{xy}/#sigma_{d_{xy}}) vs #eta sector;#eta (sector);width(d_{xy}/#sigma_{d_{z}})",nBins_,lowedge,highedge);
913  n_dzEtaMeanTrend = MeanTrendsDir.make<TH1F> ("norm_means_dz_eta","#LT d_{z}/#sigma_{d_{z}} #GT vs #eta sector;#eta (sector);#LT d_{z}/#sigma_{d_{z}} #GT",nBins_,lowedge,highedge);
914  n_dzEtaWidthTrend = WidthTrendsDir.make<TH1F>("norm_widths_dz_eta","width(d_{z}/#sigma_{d_{z}}) vs #eta sector;#eta (sector);width(d_{z}/#sigma_{d_{z}})",nBins_,lowedge,highedge);
915 
916  // 2D maps
917 
918  a_dxyMeanMap = Mean2DMapsDir.make<TH2F> ("means_dxy_map","#LT d_{xy} #GT map;#eta (sector);#varphi (sector) [degrees]",nBins_,lowedge,highedge,nBins_,lowedge,highedge);
919  a_dzMeanMap = Mean2DMapsDir.make<TH2F> ("means_dz_map","#LT d_{z} #GT map;#eta (sector);#varphi (sector) [degrees]",nBins_,lowedge,highedge,nBins_,lowedge,highedge);
920 
921  n_dxyMeanMap = Mean2DMapsDir.make<TH2F> ("norm_means_dxy_map","#LT d_{xy}/#sigma_{d_{xy}} #GT map;#eta (sector);#varphi (sector) [degrees]",nBins_,lowedge,highedge,nBins_,lowedge,highedge);
922  n_dzMeanMap = Mean2DMapsDir.make<TH2F> ("norm_means_dz_map","#LT d_{z}/#sigma_{d_{z}} #GT map;#eta (sector);#varphi (sector) [degrees]",nBins_,lowedge,highedge,nBins_,lowedge,highedge);
923 
924  a_dxyWidthMap = Width2DMapsDir.make<TH2F> ("widths_dxy_map","#sigma_{d_{xy}} map;#eta (sector);#varphi (sector) [degrees]",nBins_,lowedge,highedge,nBins_,lowedge,highedge);
925  a_dzWidthMap = Width2DMapsDir.make<TH2F> ("widths_dz_map","#sigma_{d_{z}} map;#eta (sector);#varphi (sector) [degrees]",nBins_,lowedge,highedge,nBins_,lowedge,highedge);
926 
927  n_dxyWidthMap = Width2DMapsDir.make<TH2F> ("norm_widths_dxy_map","width(d_{xy}/#sigma_{d_{xy}}) map;#eta (sector);#varphi (sector) [degrees]",nBins_,lowedge,highedge,nBins_,lowedge,highedge);
928  n_dzWidthMap = Width2DMapsDir.make<TH2F> ("norm_widths_dz_map","width(d_{z}/#sigma_{d_{z}}) map;#eta (sector);#varphi (sector) [degrees]",nBins_,lowedge,highedge,nBins_,lowedge,highedge);
929 
930  // medians and MADs
931 
932  a_dxyPhiMedianTrend = MedianTrendsDir.make<TH1F>("medians_dxy_phi","Median of d_{xy} vs #phi sector;#varphi (sector) [degrees];#mu_{1/2}(d_{xy}) [#mum]",nBins_,lowedge,highedge);
933  a_dxyPhiMADTrend = MADTrendsDir.make<TH1F> ("MADs_dxy_phi","Median absolute deviation of d_{xy} vs #phi sector;#varphi (sector) [degrees];MAD(d_{xy}) [#mum]",nBins_,lowedge,highedge);
934  a_dzPhiMedianTrend = MedianTrendsDir.make<TH1F>("medians_dz_phi","Median of d_{z} vs #phi sector;#varphi (sector) [degrees];#mu_{1/2}(d_{z}) [#mum]",nBins_,lowedge,highedge);
935  a_dzPhiMADTrend = MADTrendsDir.make<TH1F> ("MADs_dz_phi","Median absolute deviation of d_{z} vs #phi sector;#varphi (sector) [degrees];MAD(d_{z}) [#mum]",nBins_,lowedge,highedge);
936 
937  a_dxyEtaMedianTrend = MedianTrendsDir.make<TH1F>("medians_dxy_eta","Median of d_{xy} vs #eta sector;#eta (sector);#mu_{1/2}(d_{xy}) [#mum]",nBins_,lowedge,highedge);
938  a_dxyEtaMADTrend = MADTrendsDir.make<TH1F> ("MADs_dxy_eta","Median absolute deviation of d_{xy} vs #eta sector;#eta (sector);MAD(d_{xy}) [#mum]",nBins_,lowedge,highedge);
939  a_dzEtaMedianTrend = MedianTrendsDir.make<TH1F>("medians_dz_eta","Median of d_{z} vs #eta sector;#eta (sector);#mu_{1/2}(d_{z}) [#mum]",nBins_,lowedge,highedge);
940  a_dzEtaMADTrend = MADTrendsDir.make<TH1F> ("MADs_dz_eta","Median absolute deviation of d_{z} vs #eta sector;#eta (sector);MAD(d_{z}) [#mum]",nBins_,lowedge,highedge);
941 
942  n_dxyPhiMedianTrend = MedianTrendsDir.make<TH1F>("norm_medians_dxy_phi","Median of d_{xy}/#sigma_{d_{xy}} vs #phi sector;#varphi (sector) [degrees];#mu_{1/2}(d_{xy}/#sigma_{d_{xy}})",nBins_,lowedge,highedge);
943  n_dxyPhiMADTrend = MADTrendsDir.make<TH1F> ("norm_MADs_dxy_phi","Median absolute deviation of d_{xy}/#sigma_{d_{xy}} vs #phi sector;#varphi (sector) [degrees]; MAD(d_{xy}/#sigma_{d_{xy}})",nBins_,lowedge,highedge);
944  n_dzPhiMedianTrend = MedianTrendsDir.make<TH1F>("norm_medians_dz_phi","Median of d_{z}/#sigma_{d_{z}} vs #phi sector;#varphi (sector) [degrees];#mu_{1/2}(d_{z}/#sigma_{d_{z}})",nBins_,lowedge,highedge);
945  n_dzPhiMADTrend = MADTrendsDir.make<TH1F> ("norm_MADs_dz_phi","Median absolute deviation of d_{z}/#sigma_{d_{z}} vs #phi sector;#varphi (sector) [degrees];MAD(d_{z}/#sigma_{d_{z}})",nBins_,lowedge,highedge);
946 
947  n_dxyEtaMedianTrend = MedianTrendsDir.make<TH1F>("norm_medians_dxy_eta","Median of d_{xy}/#sigma_{d_{xy}} vs #eta sector;#eta (sector);#mu_{1/2}(d_{xy}/#sigma_{d_{z}})",nBins_,lowedge,highedge);
948  n_dxyEtaMADTrend = MADTrendsDir.make<TH1F> ("norm_MADs_dxy_eta","Median absolute deviation of d_{xy}/#sigma_{d_{xy}} vs #eta sector;#eta (sector);MAD(d_{xy}/#sigma_{d_{z}})",nBins_,lowedge,highedge);
949  n_dzEtaMedianTrend = MedianTrendsDir.make<TH1F>("norm_medians_dz_eta","Median of d_{z}/#sigma_{d_{z}} vs #eta sector;#eta (sector);#mu_{1/2}(d_{z}/#sigma_{d_{z}})",nBins_,lowedge,highedge);
950  n_dzEtaMADTrend = MADTrendsDir.make<TH1F> ("norm_MADs_dz_eta","Median absolute deviation of d_{z}/#sigma_{d_{z}} vs #eta sector;#eta (sector);MAD(d_{z}/#sigma_{d_{z}})",nBins_,lowedge,highedge);
951 
952 
954  //
955  // plots of biased residuals
956  // The vertex is refit without the probe track
957  //
959 
961 
962  TFileDirectory AbsTransPhiBiasRes = fs->mkdir("Abs_Transv_Phi_BiasResiduals");
963  TFileDirectory AbsTransEtaBiasRes = fs->mkdir("Abs_Transv_Eta_BiasResiduals");
964 
965  TFileDirectory AbsLongPhiBiasRes = fs->mkdir("Abs_Long_Phi_BiasResiduals");
966  TFileDirectory AbsLongEtaBiasRes = fs->mkdir("Abs_Long_Eta_BiasResiduals");
967 
968  TFileDirectory NormTransPhiBiasRes = fs->mkdir("Norm_Transv_Phi_BiasResiduals");
969  TFileDirectory NormTransEtaBiasRes = fs->mkdir("Norm_Transv_Eta_BiasResiduals");
970 
971  TFileDirectory NormLongPhiBiasRes = fs->mkdir("Norm_Long_Phi_BiasResiduals");
972  TFileDirectory NormLongEtaBiasRes = fs->mkdir("Norm_Long_Eta_BiasResiduals");
973 
974  TFileDirectory AbsDoubleDiffBiasRes = fs->mkdir("Abs_DoubleDiffBiasResiduals");
975  TFileDirectory NormDoubleDiffBiasRes = fs->mkdir("Norm_DoubleDiffBiasResiduals");
976 
977  for ( int i=0; i<nBins_; ++i ) {
978 
979  float phiF = (-TMath::Pi()+i*phipitch_)*(180/TMath::Pi());
980  float phiL = (-TMath::Pi()+(i+1)*phipitch_)*(180/TMath::Pi());
981 
982  float etaF=-2.5+i*etapitch_;
983  float etaL=-2.5+(i+1)*etapitch_;
984 
985  a_dxyPhiBiasResiduals[i] = AbsTransPhiBiasRes.make<TH1F>(Form("histo_dxy_phi_plot%i",i),Form("%.2f#circ<#varphi^{probe}_{tk}<%.2f#circ;d_{xy} [#mum];tracks",phiF,phiL),mybins_,-dxymax_phi,dxymax_phi);
986  a_dxyEtaBiasResiduals[i] = AbsTransEtaBiasRes.make<TH1F>(Form("histo_dxy_eta_plot%i",i),Form("%.2f<#eta^{probe}_{tk}<%.2f;d_{xy} [#mum];tracks",etaF,etaL),mybins_,-dxymax_eta,dxymax_eta);
987 
988  a_dzPhiBiasResiduals[i] = AbsLongPhiBiasRes.make<TH1F>(Form("histo_dz_phi_plot%i",i),Form("%.2f#circ<#varphi^{probe}_{tk}<%.2f #circ;d_{z} [#mum];tracks",phiF,phiL),mybins_,-dzmax_phi,dzmax_phi);
989  a_dzEtaBiasResiduals[i] = AbsLongEtaBiasRes.make<TH1F>(Form("histo_dz_eta_plot%i",i),Form("%.2f<#eta^{probe}_{tk}<%.2f;d_{z} [#mum];tracks",etaF,etaL),mybins_,-dzmax_eta,dzmax_eta);
990 
991  n_dxyPhiBiasResiduals[i] = NormTransPhiBiasRes.make<TH1F>(Form("histo_norm_dxy_phi_plot%i",i),Form("%.2f#circ<#varphi^{probe}_{tk}<%.2f#circ;d_{xy}/#sigma_{d_{xy}} [#mum];tracks",phiF,phiL),mybins_,-dxymax_phi/100.,dxymax_phi/100.);
992  n_dxyEtaBiasResiduals[i] = NormTransEtaBiasRes.make<TH1F>(Form("histo_norm_dxy_eta_plot%i",i),Form("%.2f<#eta^{probe}_{tk}<%.2f;d_{xy}/#sigma_{d_{xy}} [#mum];tracks",etaF,etaL),mybins_,-dxymax_eta/100.,dxymax_eta/100.);
993 
994  n_dzPhiBiasResiduals[i] = NormLongPhiBiasRes.make<TH1F>(Form("histo_norm_dz_phi_plot%i",i),Form("%.2f#circ<#varphi^{probe}_{tk}<%.2f#circ;d_{z}/#sigma_{d_{z}} [#mum];tracks",phiF,phiL),mybins_,-dzmax_phi/100.,dzmax_phi/100.);
995  n_dzEtaBiasResiduals[i] = NormLongEtaBiasRes.make<TH1F>(Form("histo_norm_dz_eta_plot%i",i),Form("%.2f<#eta^{probe}_{tk}<%.2f;d_{z}/#sigma_{d_{z}} [#mum];tracks",etaF,etaL),mybins_,-dzmax_eta/100.,dzmax_eta/100.);
996 
997  for ( int j=0; j<nBins_; ++j ) {
998 
999  a_dxyBiasResidualsMap[i][j] = AbsDoubleDiffBiasRes.make<TH1F>(Form("histo_dxy_eta_plot%i_phi_plot%i",i,j),Form("%.2f<#eta_{tk}<%.2f %.2f#circ<#varphi_{tk}<%.2f#circ;d_{xy} [#mum];tracks",etaF,etaL,phiF,phiL),mybins_,-dzmax_eta,dzmax_eta);
1000  a_dzBiasResidualsMap[i][j] = AbsDoubleDiffBiasRes.make<TH1F>(Form("histo_dxy_eta_plot%i_phi_plot%i",i,j),Form("%.2f<#eta_{tk}<%.2f %.2f#circ<#varphi_{tk}<%.2f#circ;d_{z} [#mum];tracks",etaF,etaL,phiF,phiL),mybins_,-dzmax_eta,dzmax_eta);
1001 
1002  n_dxyBiasResidualsMap[i][j] = NormDoubleDiffBiasRes.make<TH1F>(Form("histo_norm_dxy_eta_plot%i_phi_plot%i",i,j),Form("%.2f<#eta_{tk}<%.2f %.2f#circ<#varphi_{tk}<%.2f#circ;d_{xy}/#sigma_{d_{xy}} [#mum];tracks",etaF,etaL,phiF,phiL),mybins_,-dzmax_eta/100,dzmax_eta/100);
1003  n_dzBiasResidualsMap[i][j] = NormDoubleDiffBiasRes.make<TH1F>(Form("histo_norm_dxy_eta_plot%i_phi_plot%i",i,j),Form("%.2f<#eta_{tk}<%.2f %.2f#circ<#varphi_{tk}<%.2f#circ;d_{z}/#sigma_{d_{z}} [#mum];tracks",etaF,etaL,phiF,phiL),mybins_,-dzmax_eta/100,dzmax_eta/100);
1004  }
1005 
1006  }
1007 
1008  // declaration of the directories
1009 
1010  TFileDirectory MeanBiasTrendsDir = fs->mkdir("MeanBiasTrends");
1011  TFileDirectory WidthBiasTrendsDir = fs->mkdir("WidthBiasTrends");
1012  TFileDirectory MedianBiasTrendsDir = fs->mkdir("MedianBiasTrends");
1013  TFileDirectory MADBiasTrendsDir = fs->mkdir("MADBiasTrends");
1014 
1015  TFileDirectory Mean2DBiasMapsDir = fs->mkdir("MeanBiasMaps");
1016  TFileDirectory Width2DBiasMapsDir = fs->mkdir("WidthBiasMaps");
1017 
1018  // means and widths from the fit
1019 
1020  a_dxyPhiMeanBiasTrend = MeanBiasTrendsDir.make<TH1F> ("means_dxy_phi","#LT d_{xy} #GT vs #phi sector;#varphi (sector) [degrees];#LT d_{xy} #GT [#mum]",nBins_,lowedge,highedge);
1021  a_dxyPhiWidthBiasTrend = WidthBiasTrendsDir.make<TH1F>("widths_dxy_phi","#sigma_{d_{xy}} vs #phi sector;#varphi (sector) [degrees];#sigma_{d_{xy}} [#mum]",nBins_,lowedge,highedge);
1022  a_dzPhiMeanBiasTrend = MeanBiasTrendsDir.make<TH1F> ("means_dz_phi","#LT d_{z} #GT vs #phi sector;#varphi (sector) [degrees];#LT d_{z} #GT [#mum]",nBins_,lowedge,highedge);
1023  a_dzPhiWidthBiasTrend = WidthBiasTrendsDir.make<TH1F>("widths_dz_phi","#sigma_{d_{z}} vs #phi sector;#varphi (sector) [degrees];#sigma_{d_{z}} [#mum]",nBins_,lowedge,highedge);
1024 
1025  a_dxyEtaMeanBiasTrend = MeanBiasTrendsDir.make<TH1F> ("means_dxy_eta","#LT d_{xy} #GT vs #eta sector;#eta (sector);#LT d_{xy} #GT [#mum]",nBins_,lowedge,highedge);
1026  a_dxyEtaWidthBiasTrend = WidthBiasTrendsDir.make<TH1F>("widths_dxy_eta","#sigma_{d_{xy}} vs #eta sector;#eta (sector);#sigma_{d_{xy}} [#mum]",nBins_,lowedge,highedge);
1027  a_dzEtaMeanBiasTrend = MeanBiasTrendsDir.make<TH1F> ("means_dz_eta","#LT d_{z} #GT vs #eta sector;#eta (sector);#LT d_{z} #GT [#mum]",nBins_,lowedge,highedge);
1028  a_dzEtaWidthBiasTrend = WidthBiasTrendsDir.make<TH1F>("widths_dz_eta","#sigma_{d_{xy}} vs #eta sector;#eta (sector);#sigma_{d_{z}} [#mum]",nBins_,lowedge,highedge);
1029 
1030  n_dxyPhiMeanBiasTrend = MeanBiasTrendsDir.make<TH1F> ("norm_means_dxy_phi","#LT d_{xy}/#sigma_{d_{xy}} #GT vs #phi sector;#varphi (sector) [degrees];#LT d_{xy}/#sigma_{d_{xy}} #GT",nBins_,lowedge,highedge);
1031  n_dxyPhiWidthBiasTrend = WidthBiasTrendsDir.make<TH1F>("norm_widths_dxy_phi","width(d_{xy}/#sigma_{d_{xy}}) vs #phi sector;#varphi (sector) [degrees]; width(d_{xy}/#sigma_{d_{xy}})",nBins_,lowedge,highedge);
1032  n_dzPhiMeanBiasTrend = MeanBiasTrendsDir.make<TH1F> ("norm_means_dz_phi","#LT d_{z}/#sigma_{d_{z}} #GT vs #phi sector;#varphi (sector) [degrees];#LT d_{z}/#sigma_{d_{z}} #GT",nBins_,lowedge,highedge);
1033  n_dzPhiWidthBiasTrend = WidthBiasTrendsDir.make<TH1F>("norm_widths_dz_phi","width(d_{z}/#sigma_{d_{z}}) vs #phi sector;#varphi (sector) [degrees];width(d_{z}/#sigma_{d_{z}})",nBins_,lowedge,highedge);
1034 
1035  n_dxyEtaMeanBiasTrend = MeanBiasTrendsDir.make<TH1F> ("norm_means_dxy_eta","#LT d_{xy}/#sigma_{d_{xy}} #GT vs #eta sector;#eta (sector);#LT d_{xy}/#sigma_{d_{z}} #GT",nBins_,lowedge,highedge);
1036  n_dxyEtaWidthBiasTrend = WidthBiasTrendsDir.make<TH1F>("norm_widths_dxy_eta","width(d_{xy}/#sigma_{d_{xy}}) vs #eta sector;#eta (sector);width(d_{xy}/#sigma_{d_{z}})",nBins_,lowedge,highedge);
1037  n_dzEtaMeanBiasTrend = MeanBiasTrendsDir.make<TH1F> ("norm_means_dz_eta","#LT d_{z}/#sigma_{d_{z}} #GT vs #eta sector;#eta (sector);#LT d_{z}/#sigma_{d_{z}} #GT",nBins_,lowedge,highedge);
1038  n_dzEtaWidthBiasTrend = WidthBiasTrendsDir.make<TH1F>("norm_widths_dz_eta","width(d_{z}/#sigma_{d_{z}}) vs #eta sector;#eta (sector);width(d_{z}/#sigma_{d_{z}})",nBins_,lowedge,highedge);
1039 
1040  // 2D maps
1041 
1042  a_dxyMeanBiasMap = Mean2DBiasMapsDir.make<TH2F> ("means_dxy_map","#LT d_{xy} #GT map;#eta (sector);#varphi (sector) [degrees]",nBins_,lowedge,highedge,nBins_,lowedge,highedge);
1043  a_dzMeanBiasMap = Mean2DBiasMapsDir.make<TH2F> ("means_dz_map","#LT d_{z} #GT map;#eta (sector);#varphi (sector) [degrees]",nBins_,lowedge,highedge,nBins_,lowedge,highedge);
1044 
1045  n_dxyMeanBiasMap = Mean2DBiasMapsDir.make<TH2F> ("norm_means_dxy_map","#LT d_{xy}/#sigma_{d_{xy}} #GT map;#eta (sector);#varphi (sector) [degrees]",nBins_,lowedge,highedge,nBins_,lowedge,highedge);
1046  n_dzMeanBiasMap = Mean2DBiasMapsDir.make<TH2F> ("norm_means_dz_map","#LT d_{z}/#sigma_{d_{z}} #GT map;#eta (sector);#varphi (sector) [degrees]",nBins_,lowedge,highedge,nBins_,lowedge,highedge);
1047 
1048  a_dxyWidthBiasMap = Width2DBiasMapsDir.make<TH2F> ("widths_dxy_map","#sigma_{d_{xy}} map;#eta (sector);#varphi (sector) [degrees]",nBins_,lowedge,highedge,nBins_,lowedge,highedge);
1049  a_dzWidthBiasMap = Width2DBiasMapsDir.make<TH2F> ("widths_dz_map","#sigma_{d_{z}} map;#eta (sector);#varphi (sector) [degrees]",nBins_,lowedge,highedge,nBins_,lowedge,highedge);
1050 
1051  n_dxyWidthBiasMap = Width2DBiasMapsDir.make<TH2F> ("norm_widths_dxy_map","width(d_{xy}/#sigma_{d_{xy}}) map;#eta (sector);#varphi (sector) [degrees]",nBins_,lowedge,highedge,nBins_,lowedge,highedge);
1052  n_dzWidthBiasMap = Width2DBiasMapsDir.make<TH2F> ("norm_widths_dz_map","width(d_{z}/#sigma_{d_{z}}) map;#eta (sector);#varphi (sector) [degrees]",nBins_,lowedge,highedge,nBins_,lowedge,highedge);
1053 
1054  // medians and MADs
1055 
1056  a_dxyPhiMedianBiasTrend = MedianBiasTrendsDir.make<TH1F>("medians_dxy_phi","Median of d_{xy} vs #phi sector;#varphi (sector) [degrees];#mu_{1/2}(d_{xy}) [#mum]",nBins_,lowedge,highedge);
1057  a_dxyPhiMADBiasTrend = MADBiasTrendsDir.make<TH1F> ("MADs_dxy_phi","Median absolute deviation of d_{xy} vs #phi sector;#varphi (sector) [degrees];MAD(d_{xy}) [#mum]",nBins_,lowedge,highedge);
1058  a_dzPhiMedianBiasTrend = MedianBiasTrendsDir.make<TH1F>("medians_dz_phi","Median of d_{z} vs #phi sector;#varphi (sector) [degrees];#mu_{1/2}(d_{z}) [#mum]",nBins_,lowedge,highedge);
1059  a_dzPhiMADBiasTrend = MADBiasTrendsDir.make<TH1F> ("MADs_dz_phi","Median absolute deviation of d_{z} vs #phi sector;#varphi (sector) [degrees];MAD(d_{z}) [#mum]",nBins_,lowedge,highedge);
1060 
1061  a_dxyEtaMedianBiasTrend = MedianBiasTrendsDir.make<TH1F>("medians_dxy_eta","Median of d_{xy} vs #eta sector;#eta (sector);#mu_{1/2}(d_{xy}) [#mum]",nBins_,lowedge,highedge);
1062  a_dxyEtaMADBiasTrend = MADBiasTrendsDir.make<TH1F> ("MADs_dxy_eta","Median absolute deviation of d_{xy} vs #eta sector;#eta (sector);MAD(d_{xy}) [#mum]",nBins_,lowedge,highedge);
1063  a_dzEtaMedianBiasTrend = MedianBiasTrendsDir.make<TH1F>("medians_dz_eta","Median of d_{z} vs #eta sector;#eta (sector);#mu_{1/2}(d_{z}) [#mum]",nBins_,lowedge,highedge);
1064  a_dzEtaMADBiasTrend = MADBiasTrendsDir.make<TH1F> ("MADs_dz_eta","Median absolute deviation of d_{z} vs #eta sector;#eta (sector);MAD(d_{z}) [#mum]",nBins_,lowedge,highedge);
1065 
1066  n_dxyPhiMedianBiasTrend = MedianBiasTrendsDir.make<TH1F>("norm_medians_dxy_phi","Median of d_{xy}/#sigma_{d_{xy}} vs #phi sector;#varphi (sector) [degrees];#mu_{1/2}(d_{xy}/#sigma_{d_{xy}})",nBins_,lowedge,highedge);
1067  n_dxyPhiMADBiasTrend = MADBiasTrendsDir.make<TH1F> ("norm_MADs_dxy_phi","Median absolute deviation of d_{xy}/#sigma_{d_{xy}} vs #phi sector;#varphi (sector) [degrees]; MAD(d_{xy}/#sigma_{d_{xy}})",nBins_,lowedge,highedge);
1068  n_dzPhiMedianBiasTrend = MedianBiasTrendsDir.make<TH1F>("norm_medians_dz_phi","Median of d_{z}/#sigma_{d_{z}} vs #phi sector;#varphi (sector) [degrees];#mu_{1/2}(d_{z}/#sigma_{d_{z}})",nBins_,lowedge,highedge);
1069  n_dzPhiMADBiasTrend = MADBiasTrendsDir.make<TH1F> ("norm_MADs_dz_phi","Median absolute deviation of d_{z}/#sigma_{d_{z}} vs #phi sector;#varphi (sector) [degrees];MAD(d_{z}/#sigma_{d_{z}})",nBins_,lowedge,highedge);
1070 
1071  n_dxyEtaMedianBiasTrend = MedianBiasTrendsDir.make<TH1F>("norm_medians_dxy_eta","Median of d_{xy}/#sigma_{d_{xy}} vs #eta sector;#eta (sector);#mu_{1/2}(d_{xy}/#sigma_{d_{z}})",nBins_,lowedge,highedge);
1072  n_dxyEtaMADBiasTrend = MADBiasTrendsDir.make<TH1F> ("norm_MADs_dxy_eta","Median absolute deviation of d_{xy}/#sigma_{d_{xy}} vs #eta sector;#eta (sector);MAD(d_{xy}/#sigma_{d_{z}})",nBins_,lowedge,highedge);
1073  n_dzEtaMedianBiasTrend = MedianBiasTrendsDir.make<TH1F>("norm_medians_dz_eta","Median of d_{z}/#sigma_{d_{z}} vs #eta sector;#eta (sector);#mu_{1/2}(d_{z}/#sigma_{d_{z}})",nBins_,lowedge,highedge);
1074  n_dzEtaMADBiasTrend = MADBiasTrendsDir.make<TH1F> ("norm_MADs_dz_eta","Median absolute deviation of d_{z}/#sigma_{d_{z}} vs #eta sector;#eta (sector);MAD(d_{z}/#sigma_{d_{z}})",nBins_,lowedge,highedge);
1075 
1076  }
1077 }
const double Pi
int i
Definition: DBlmapReader.cc:9
TH1F * n_dzResidualsMap[nMaxBins_][nMaxBins_]
TH1F * a_dxyResidualsMap[nMaxBins_][nMaxBins_]
TH1F * n_dxyEtaBiasResiduals[nMaxBins_]
TH1F * n_dxyBiasResidualsMap[nMaxBins_][nMaxBins_]
float DOFUnbiasedVertex_[nMaxtracks_]
TH1F * a_dzPhiBiasResiduals[nMaxBins_]
T * make(const Args &...args) const
make new ROOT object
Definition: TFileService.h:64
TH1F * n_dzEtaBiasResiduals[nMaxBins_]
double dszFromMyVertex_[nMaxtracks_]
double dxyFromMyVertex_[nMaxtracks_]
double dzErrorFromMyVertex_[nMaxtracks_]
TH1F * a_dxyPhiBiasResiduals[nMaxBins_]
double IPTsigFromMyVertex_[nMaxtracks_]
int tracksUsedForVertexing_[nMaxtracks_]
TH1F * n_dzPhiBiasResiduals[nMaxBins_]
double yUnbiasedVertex_[nMaxtracks_]
int j
Definition: DBlmapReader.cc:9
double zUnbiasedVertex_[nMaxtracks_]
float chi2normUnbiasedVertex_[nMaxtracks_]
T * make(const Args &...args) const
make new ROOT object
double IPLsigFromMyVertex_[nMaxtracks_]
TFileDirectory mkdir(const std::string &dir, const std::string &descr="")
create a new subdirectory
Definition: TFileService.h:69
TH1F * n_dxyPhiBiasResiduals[nMaxBins_]
double xUnbiasedVertex_[nMaxtracks_]
TH1F * a_dxyEtaBiasResiduals[nMaxBins_]
double dzFromMyVertex_[nMaxtracks_]
TH1F * a_dxyBiasResidualsMap[nMaxBins_][nMaxBins_]
TH1F * n_dxyResidualsMap[nMaxBins_][nMaxBins_]
double dxyErrorFromMyVertex_[nMaxtracks_]
float sumOfWeightsUnbiasedVertex_[nMaxtracks_]
TH1F * n_dzBiasResidualsMap[nMaxBins_][nMaxBins_]
TH1F * a_dzBiasResidualsMap[nMaxBins_][nMaxBins_]
TH1F * a_dzEtaBiasResiduals[nMaxBins_]
TH1F * a_dzResidualsMap[nMaxBins_][nMaxBins_]
float chi2UnbiasedVertex_[nMaxtracks_]
AlgebraicVector3 PrimaryVertexValidation::displacementFromTrack ( const GlobalPoint pv,
const GlobalPoint dcaPosition_,
const GlobalVector tangent_ 
)
private
void PrimaryVertexValidation::endJob ( void  )
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 1079 of file PrimaryVertexValidation.cc.

References a_dxyEtaBiasResiduals, a_dxyEtaMADBiasTrend, a_dxyEtaMADTrend, a_dxyEtaMeanBiasTrend, a_dxyEtaMeanTrend, a_dxyEtaMedianBiasTrend, a_dxyEtaMedianTrend, a_dxyEtaResiduals, a_dxyEtaWidthBiasTrend, a_dxyEtaWidthTrend, a_dxyPhiBiasResiduals, a_dxyPhiMADBiasTrend, a_dxyPhiMADTrend, a_dxyPhiMeanBiasTrend, a_dxyPhiMeanTrend, a_dxyPhiMedianBiasTrend, a_dxyPhiMedianTrend, a_dxyPhiResiduals, a_dxyPhiWidthBiasTrend, a_dxyPhiWidthTrend, a_dzEtaBiasResiduals, a_dzEtaMADBiasTrend, a_dzEtaMADTrend, a_dzEtaMeanBiasTrend, a_dzEtaMeanTrend, a_dzEtaMedianBiasTrend, a_dzEtaMedianTrend, a_dzEtaResiduals, a_dzEtaWidthBiasTrend, a_dzEtaWidthTrend, a_dzPhiBiasResiduals, a_dzPhiMADBiasTrend, a_dzPhiMADTrend, a_dzPhiMeanBiasTrend, a_dzPhiMeanTrend, a_dzPhiMedianBiasTrend, a_dzPhiMedianTrend, a_dzPhiResiduals, a_dzPhiWidthBiasTrend, a_dzPhiWidthTrend, gather_cfg::cout, FillTrendPlot(), n_dxyEtaBiasResiduals, n_dxyEtaMADBiasTrend, n_dxyEtaMADTrend, n_dxyEtaMeanBiasTrend, n_dxyEtaMeanTrend, n_dxyEtaMedianBiasTrend, n_dxyEtaMedianTrend, n_dxyEtaResiduals, n_dxyEtaWidthBiasTrend, n_dxyEtaWidthTrend, n_dxyPhiBiasResiduals, n_dxyPhiMADBiasTrend, n_dxyPhiMADTrend, n_dxyPhiMeanBiasTrend, n_dxyPhiMeanTrend, n_dxyPhiMedianBiasTrend, n_dxyPhiMedianTrend, n_dxyPhiResiduals, n_dxyPhiWidthBiasTrend, n_dxyPhiWidthTrend, n_dzEtaBiasResiduals, n_dzEtaMADBiasTrend, n_dzEtaMADTrend, n_dzEtaMeanBiasTrend, n_dzEtaMeanTrend, n_dzEtaMedianBiasTrend, n_dzEtaMedianTrend, n_dzEtaResiduals, n_dzEtaWidthBiasTrend, n_dzEtaWidthTrend, n_dzPhiBiasResiduals, n_dzPhiMADBiasTrend, n_dzPhiMADTrend, n_dzPhiMeanBiasTrend, n_dzPhiMeanTrend, n_dzPhiMedianBiasTrend, n_dzPhiMedianTrend, n_dzPhiResiduals, n_dzPhiWidthBiasTrend, n_dzPhiWidthTrend, Nevt_, and useTracksFromRecoVtx_.

1080 {
1081 
1082  std::cout<<"######################################"<<std::endl;
1083  std::cout<<"Number of analyzed events: "<<Nevt_<<std::endl;
1084  std::cout<<"######################################"<<std::endl;
1085 
1087 
1092 
1097 
1102 
1107 
1108  // medians and MADs
1109 
1114 
1119 
1124 
1129 
1130  }
1131 
1136 
1141 
1146 
1151 
1152  // medians and MADs
1153 
1158 
1163 
1168 
1173 
1174 }
TH1F * n_dxyEtaBiasResiduals[nMaxBins_]
TH1F * a_dzPhiBiasResiduals[nMaxBins_]
TH1F * n_dzEtaBiasResiduals[nMaxBins_]
TH1F * a_dxyPhiBiasResiduals[nMaxBins_]
TH1F * n_dzPhiBiasResiduals[nMaxBins_]
void FillTrendPlot(TH1F *trendPlot, TH1F *residualsPlot[100], const TString &fitPar_, const TString &var_)
TH1F * n_dxyPhiBiasResiduals[nMaxBins_]
TH1F * a_dxyEtaBiasResiduals[nMaxBins_]
tuple cout
Definition: gather_cfg.py:121
TH1F * a_dzEtaBiasResiduals[nMaxBins_]
void PrimaryVertexValidation::FillTrendPlot ( TH1F *  trendPlot,
TH1F *  residualsPlot[100],
const TString &  fitPar_,
const TString &  var_ 
)
private

Definition at line 1344 of file PrimaryVertexValidation.cc.

References gather_cfg::cout, fitResiduals(), getMAD(), getMedian(), i, and nBins_.

Referenced by endJob().

1346 {
1347 
1348  float phiInterval = (360.)/nBins_;
1349  float etaInterval = 5./nBins_;
1350 
1351  for ( int i=0; i<nBins_; ++i ) {
1352 
1353  char phipositionString[129];
1354  float phiposition = (-180+i*phiInterval)+(phiInterval/2);
1355  sprintf(phipositionString,"%.f",phiposition);
1356 
1357  char etapositionString[129];
1358  float etaposition = (-2.5+i*etaInterval)+(etaInterval/2);
1359  sprintf(etapositionString,"%.1f",etaposition);
1360 
1361  if(fitPar_=="mean"){
1362  float mean_ = fitResiduals(residualsPlot[i]).first.first;
1363  float meanErr_ = fitResiduals(residualsPlot[i]).first.second;
1364  trendPlot->SetBinContent(i+1,mean_);
1365  trendPlot->SetBinError(i+1,meanErr_);
1366  } else if (fitPar_=="width"){
1367  float width_ = fitResiduals(residualsPlot[i]).second.first;
1368  float widthErr_ = fitResiduals(residualsPlot[i]).second.second;
1369  trendPlot->SetBinContent(i+1,width_);
1370  trendPlot->SetBinError(i+1,widthErr_);
1371  } else if (fitPar_=="median"){
1372  float median_ = getMedian(residualsPlot[i]).first;
1373  float medianErr_ = getMedian(residualsPlot[i]).second;
1374  trendPlot->SetBinContent(i+1,median_);
1375  trendPlot->SetBinError(i+1,medianErr_);
1376  } else if (fitPar_=="mad"){
1377  float mad_ = getMAD(residualsPlot[i]).first;
1378  float madErr_ = getMAD(residualsPlot[i]).second;
1379  trendPlot->SetBinContent(i+1,mad_);
1380  trendPlot->SetBinError(i+1,madErr_);
1381  } else {
1382  std::cout<<"PrimaryVertexValidation::FillTrendPlot() "<<fitPar_<<" unknown estimator!"<<std::endl;
1383  }
1384 
1385  if(var_=="eta"){
1386  trendPlot->GetXaxis()->SetBinLabel(i+1,phipositionString);
1387  } else if(var_=="phi"){
1388  trendPlot->GetXaxis()->SetBinLabel(i+1,etapositionString);
1389  } else {
1390  std::cout<<"PrimaryVertexValidation::FillTrendPlot() "<<var_<<" unknown track parameter!"<<std::endl;
1391  }
1392  }
1393 }
int i
Definition: DBlmapReader.cc:9
std::pair< Double_t, Double_t > getMAD(TH1F *histo)
std::pair< Double_t, Double_t > getMedian(TH1F *histo)
std::pair< std::pair< Double_t, Double_t >, std::pair< Double_t, Double_t > > fitResiduals(TH1 *hist)
tuple cout
Definition: gather_cfg.py:121
std::pair< std::pair< Double_t, Double_t >, std::pair< Double_t, Double_t > > PrimaryVertexValidation::fitResiduals ( TH1 *  hist)
private

Definition at line 1301 of file PrimaryVertexValidation.cc.

References timingPdfMaker::mean, and query::result.

Referenced by FillTrendPlot().

1303 {
1304  //float fitResult(9999);
1305  //if (hist->GetEntries() < 20) return ;
1306 
1307  float mean = hist->GetMean();
1308  float sigma = hist->GetRMS();
1309 
1310  TF1 func("tmp", "gaus", mean - 1.5*sigma, mean + 1.5*sigma);
1311  if (0 == hist->Fit(&func,"QNR")) { // N: do not blow up file by storing fit!
1312  mean = func.GetParameter(1);
1313  sigma = func.GetParameter(2);
1314  // second fit: three sigma of first fit around mean of first fit
1315  func.SetRange(mean - 2*sigma, mean + 2*sigma);
1316  // I: integral gives more correct results if binning is too wide
1317  // L: Likelihood can treat empty bins correctly (if hist not weighted...)
1318  if (0 == hist->Fit(&func, "Q0LR")) {
1319  if (hist->GetFunction(func.GetName())) { // Take care that it is later on drawn:
1320  hist->GetFunction(func.GetName())->ResetBit(TF1::kNotDraw);
1321  }
1322  }
1323  }
1324 
1325  float res_mean = func.GetParameter(1);
1326  float res_width = func.GetParameter(2);
1327 
1328  float res_mean_err = func.GetParError(1);
1329  float res_width_err = func.GetParError(2);
1330 
1331  std::pair<Double_t,Double_t> resultM;
1332  std::pair<Double_t,Double_t> resultW;
1333 
1334  resultM = std::make_pair(res_mean,res_mean_err);
1335  resultW = std::make_pair(res_width,res_width_err);
1336 
1337  std::pair<std::pair<Double_t,Double_t>, std::pair<Double_t,Double_t> > result;
1338 
1339  result = std::make_pair(resultM,resultW);
1340  return result;
1341 }
tuple result
Definition: query.py:137
std::pair< Double_t, Double_t > PrimaryVertexValidation::getMAD ( TH1F *  histo)
private

Definition at line 1271 of file PrimaryVertexValidation.cc.

References getMedian(), j, pileupCalc::nbins, query::result, and create_public_pileup_plots::weights.

Referenced by FillTrendPlot().

1273 {
1274 
1275  int nbins = histo->GetNbinsX();
1276  Double_t median = getMedian(histo).first;
1277  Double_t x_lastBin = histo->GetBinLowEdge(nbins+1);
1278  const char *HistoName =histo->GetName();
1279  TString Finalname = Form("resMed%s",HistoName);
1280  TH1F *newHisto = new TH1F(Finalname,Finalname,nbins,0.,x_lastBin);
1281  Double_t *residuals = new Double_t[nbins];
1282  Double_t *weights = new Double_t[nbins];
1283 
1284  for (int j = 0; j < nbins; j++) {
1285  residuals[j] = TMath::Abs(median - histo->GetBinCenter(j+1));
1286  weights[j]=histo->GetBinContent(j+1);
1287  newHisto->Fill(residuals[j],weights[j]);
1288  }
1289 
1290  Double_t theMAD = (getMedian(newHisto).first)*1.4826;
1291  newHisto->Delete("");
1292 
1293  std::pair<Double_t,Double_t> result;
1294  result = std::make_pair(theMAD,theMAD/histo->GetEntries());
1295 
1296  return result;
1297 
1298 }
std::pair< Double_t, Double_t > getMedian(TH1F *histo)
tuple result
Definition: query.py:137
int j
Definition: DBlmapReader.cc:9
std::string HistoName
std::pair< Double_t, Double_t > PrimaryVertexValidation::getMedian ( TH1F *  histo)
private

Definition at line 1245 of file PrimaryVertexValidation.cc.

References j, pileupCalc::nbins, query::result, x, and detailsBasic3DVector::y.

Referenced by FillTrendPlot(), and getMAD().

1247 {
1248  Double_t median = 999;
1249  int nbins = histo->GetNbinsX();
1250 
1251  //extract median from histogram
1252  double *x = new double[nbins];
1253  double *y = new double[nbins];
1254  for (int j = 0; j < nbins; j++) {
1255  x[j] = histo->GetBinCenter(j+1);
1256  y[j] = histo->GetBinContent(j+1);
1257  }
1258  median = TMath::Median(nbins, x, y);
1259 
1260  delete[] x; x = 0;
1261  delete [] y; y = 0;
1262 
1263  std::pair<Double_t,Double_t> result;
1264  result = std::make_pair(median,median/TMath::Sqrt(histo->GetEntries()));
1265 
1266  return result;
1267 
1268 }
tuple result
Definition: query.py:137
int j
Definition: DBlmapReader.cc:9
Definition: DDAxes.h:10
bool PrimaryVertexValidation::hasFirstLayerPixelHits ( const reco::TransientTrack  track)
private

Definition at line 670 of file PrimaryVertexValidation.cc.

References reco::HitPattern::getHitPattern(), reco::HitPattern::getLayer(), reco::TransientTrack::hitPattern(), i, reco::HitPattern::numberOfHits(), AlCaHLTBitMon_ParallelJobs::p, listBenchmarks::pattern, reco::HitPattern::pixelBarrelHitFilter(), reco::HitPattern::pixelEndcapHitFilter(), and reco::HitPattern::validHitFilter().

Referenced by analyze().

671 {
672  bool accepted = false;
673  // hit pattern of the track
674  const reco::HitPattern& p = track.hitPattern();
675  for (int i=0; i<p.numberOfHits(); i++) {
676  uint32_t pattern = p.getHitPattern(i);
677  if (p.pixelBarrelHitFilter(pattern) || p.pixelEndcapHitFilter(pattern) ) {
678  if (p.getLayer(pattern) == 1) {
679  if (p.validHitFilter(pattern)) {
680  accepted = true;
681  }
682  }
683  }
684  }
685  return accepted;
686 }
int i
Definition: DBlmapReader.cc:9
static uint32_t getLayer(uint32_t pattern)
Definition: HitPattern.h:520
const HitPattern & hitPattern() const
int numberOfHits() const
Definition: HitPattern.cc:211
static bool validHitFilter(uint32_t pattern)
Definition: HitPattern.h:564
static bool pixelEndcapHitFilter(uint32_t pattern)
Definition: HitPattern.h:434
uint32_t getHitPattern(int position) const
Definition: HitPattern.cc:142
static bool pixelBarrelHitFilter(uint32_t pattern)
Definition: HitPattern.h:427
bool PrimaryVertexValidation::isHit2D ( const TrackingRecHit hit) const
private

Definition at line 640 of file PrimaryVertexValidation.cc.

References TrackingRecHit::dimension(), TrackingRecHit::geographicalId(), kBPIX, kFPIX, and DetId::Tracker.

Referenced by analyze().

641 {
642  if (hit.dimension() < 2) {
643  return false; // some (muon...) stuff really has RecHit1D
644  } else {
645  const DetId detId(hit.geographicalId());
646  if (detId.det() == DetId::Tracker) {
647  if (detId.subdetId() == kBPIX || detId.subdetId() == kFPIX) {
648  return true; // pixel is always 2D
649  } else { // should be SiStrip now
650  if (dynamic_cast<const SiStripRecHit2D*>(&hit)) return false; // normal hit
651  else if (dynamic_cast<const SiStripMatchedRecHit2D*>(&hit)) return true; // matched is 2D
652  else if (dynamic_cast<const ProjectedSiStripRecHit2D*>(&hit)) return false; // crazy hit...
653  else {
654  edm::LogError("UnkownType") << "@SUB=AlignmentTrackSelector::isHit2D"
655  << "Tracker hit not in pixel and neither SiStripRecHit2D nor "
656  << "SiStripMatchedRecHit2D nor ProjectedSiStripRecHit2D.";
657  return false;
658  }
659  }
660  } else { // not tracker??
661  edm::LogWarning("DetectorMismatch") << "@SUB=AlignmentTrackSelector::isHit2D"
662  << "Hit not in tracker with 'official' dimension >=2.";
663  return true; // dimension() >= 2 so accept that...
664  }
665  }
666  // never reached...
667 }
virtual int dimension() const =0
const int kFPIX
Definition: DetId.h:18
DetId geographicalId() const
const int kBPIX
void PrimaryVertexValidation::SetVarToZero ( )
private

Definition at line 1177 of file PrimaryVertexValidation.cc.

References Beamdxdz_, Beamsigmaz_, BeamWidthX_, BeamWidthY_, BSx0_, BSy0_, BSz0_, charge_, chi2_, chi2ndof_, chi2normUnbiasedVertex_, chi2UnbiasedVertex_, DOFUnbiasedVertex_, dszFromMyVertex_, dxy_, dxyBs_, dxyErrorFromMyVertex_, dxyFromMyVertex_, dz_, dzBs_, dzErrorFromMyVertex_, dzFromMyVertex_, eta_, hasRecVertex_, i, IPLsigFromMyVertex_, IPTsigFromMyVertex_, isGoodTrack_, isHighPurity_, LuminosityBlockNumber_, nClus_, nhits1D_, nhits2D_, nhits_, nhitsBPIX_, nhitsFPIX_, nhitsTEC_, nhitsTIB_, nhitsTID_, nhitsTOB_, nMaxtracks_, nOfflineVertices_, nTracks_, p_, phi_, pt_, qoverp_, RunNumber_, sumOfWeightsUnbiasedVertex_, theta_, tracksUsedForVertexing_, xOfflineVertex_, xPCA_, xUnbiasedVertex_, yOfflineVertex_, yPCA_, yUnbiasedVertex_, zOfflineVertex_, zPCA_, and zUnbiasedVertex_.

Referenced by analyze().

1179 {
1180  nTracks_ = 0;
1181  nClus_ = 0;
1183  RunNumber_ =0;
1185  xOfflineVertex_ =-999.;
1186  yOfflineVertex_ =-999.;
1187  zOfflineVertex_ =-999.;
1188  BSx0_ = -999.;
1189  BSy0_ = -999.;
1190  BSz0_ = -999.;
1191  Beamsigmaz_=-999.;
1192  Beamdxdz_=-999.;
1193  BeamWidthX_=-999.;
1194  BeamWidthY_=-999.;
1195 
1196  for ( int i=0; i<nMaxtracks_; ++i ) {
1197 
1198  pt_[i] = 0;
1199  p_[i] = 0;
1200  nhits_[i] = 0;
1201  nhits1D_[i] = 0;
1202  nhits2D_[i] = 0;
1203  nhitsBPIX_[i] = 0;
1204  nhitsFPIX_[i] = 0;
1205  nhitsTIB_[i] = 0;
1206  nhitsTID_[i] = 0;
1207  nhitsTOB_[i] = 0;
1208  nhitsTEC_[i] = 0;
1209  isHighPurity_[i] = 0;
1210  eta_[i] = 0;
1211  theta_[i] = 0;
1212  phi_[i] = 0;
1213  chi2_[i] = 0;
1214  chi2ndof_[i] = 0;
1215  charge_[i] = 0;
1216  qoverp_[i] = 0;
1217  dz_[i] = 0;
1218  dxy_[i] = 0;
1219  dzBs_[i] = 0;
1220  dxyBs_[i] = 0;
1221  xPCA_[i] = 0;
1222  yPCA_[i] = 0;
1223  zPCA_[i] = 0;
1224  xUnbiasedVertex_[i] =0;
1225  yUnbiasedVertex_[i] =0;
1226  zUnbiasedVertex_[i] =0;
1229  DOFUnbiasedVertex_[i]=0;
1232  dxyFromMyVertex_[i]=0;
1233  dzFromMyVertex_[i]=0;
1234  dszFromMyVertex_[i]=0;
1236  dzErrorFromMyVertex_[i]=0;
1237  IPTsigFromMyVertex_[i]=0;
1238  IPLsigFromMyVertex_[i]=0;
1239  hasRecVertex_[i] = 0;
1240  isGoodTrack_[i] = 0;
1241  }
1242 }
int i
Definition: DBlmapReader.cc:9
float DOFUnbiasedVertex_[nMaxtracks_]
double dszFromMyVertex_[nMaxtracks_]
double dxyFromMyVertex_[nMaxtracks_]
double dzErrorFromMyVertex_[nMaxtracks_]
double IPTsigFromMyVertex_[nMaxtracks_]
int tracksUsedForVertexing_[nMaxtracks_]
double yUnbiasedVertex_[nMaxtracks_]
double zUnbiasedVertex_[nMaxtracks_]
float chi2normUnbiasedVertex_[nMaxtracks_]
double IPLsigFromMyVertex_[nMaxtracks_]
double xUnbiasedVertex_[nMaxtracks_]
double dzFromMyVertex_[nMaxtracks_]
double dxyErrorFromMyVertex_[nMaxtracks_]
float sumOfWeightsUnbiasedVertex_[nMaxtracks_]
float chi2UnbiasedVertex_[nMaxtracks_]
double PrimaryVertexValidation::square ( double  x)
inlineprivate

Definition at line 99 of file PrimaryVertexValidation.h.

References x.

99  {
100  return x*x;
101  }
Definition: DDAxes.h:10

Member Data Documentation

TH1F* PrimaryVertexValidation::a_dxyBiasResidualsMap[nMaxBins_][nMaxBins_]
private

Definition at line 312 of file PrimaryVertexValidation.h.

Referenced by analyze(), and beginJob().

TH1F* PrimaryVertexValidation::a_dxyEtaBiasResiduals[nMaxBins_]
private

Definition at line 297 of file PrimaryVertexValidation.h.

Referenced by analyze(), beginJob(), and endJob().

TH1F* PrimaryVertexValidation::a_dxyEtaMADBiasTrend
private

Definition at line 348 of file PrimaryVertexValidation.h.

Referenced by beginJob(), and endJob().

TH1F* PrimaryVertexValidation::a_dxyEtaMADTrend
private

Definition at line 264 of file PrimaryVertexValidation.h.

Referenced by beginJob(), and endJob().

TH1F* PrimaryVertexValidation::a_dxyEtaMeanBiasTrend
private

Definition at line 325 of file PrimaryVertexValidation.h.

Referenced by beginJob(), and endJob().

TH1F* PrimaryVertexValidation::a_dxyEtaMeanTrend
private

Definition at line 241 of file PrimaryVertexValidation.h.

Referenced by beginJob(), and endJob().

TH1F* PrimaryVertexValidation::a_dxyEtaMedianBiasTrend
private

Definition at line 347 of file PrimaryVertexValidation.h.

Referenced by beginJob(), and endJob().

TH1F* PrimaryVertexValidation::a_dxyEtaMedianTrend
private

Definition at line 263 of file PrimaryVertexValidation.h.

Referenced by beginJob(), and endJob().

TH1F* PrimaryVertexValidation::a_dxyEtaResiduals[nMaxBins_]
private

Definition at line 213 of file PrimaryVertexValidation.h.

Referenced by analyze(), beginJob(), and endJob().

TH1F* PrimaryVertexValidation::a_dxyEtaWidthBiasTrend
private

Definition at line 326 of file PrimaryVertexValidation.h.

Referenced by beginJob(), and endJob().

TH1F* PrimaryVertexValidation::a_dxyEtaWidthTrend
private

Definition at line 242 of file PrimaryVertexValidation.h.

Referenced by beginJob(), and endJob().

TH2F* PrimaryVertexValidation::a_dxyMeanBiasMap
private

Definition at line 364 of file PrimaryVertexValidation.h.

Referenced by beginJob().

TH2F* PrimaryVertexValidation::a_dxyMeanMap
private

Definition at line 280 of file PrimaryVertexValidation.h.

Referenced by beginJob().

TH1F* PrimaryVertexValidation::a_dxyPhiBiasResiduals[nMaxBins_]
private

Definition at line 296 of file PrimaryVertexValidation.h.

Referenced by analyze(), beginJob(), and endJob().

TH1F* PrimaryVertexValidation::a_dxyPhiMADBiasTrend
private

Definition at line 343 of file PrimaryVertexValidation.h.

Referenced by beginJob(), and endJob().

TH1F* PrimaryVertexValidation::a_dxyPhiMADTrend
private

Definition at line 259 of file PrimaryVertexValidation.h.

Referenced by beginJob(), and endJob().

TH1F* PrimaryVertexValidation::a_dxyPhiMeanBiasTrend
private

Definition at line 320 of file PrimaryVertexValidation.h.

Referenced by beginJob(), and endJob().

TH1F* PrimaryVertexValidation::a_dxyPhiMeanTrend
private

Definition at line 236 of file PrimaryVertexValidation.h.

Referenced by beginJob(), and endJob().

TH1F* PrimaryVertexValidation::a_dxyPhiMedianBiasTrend
private

Definition at line 342 of file PrimaryVertexValidation.h.

Referenced by beginJob(), and endJob().

TH1F* PrimaryVertexValidation::a_dxyPhiMedianTrend
private

Definition at line 258 of file PrimaryVertexValidation.h.

Referenced by beginJob(), and endJob().

TH1F* PrimaryVertexValidation::a_dxyPhiResiduals[nMaxBins_]
private

Definition at line 212 of file PrimaryVertexValidation.h.

Referenced by analyze(), beginJob(), and endJob().

TH1F* PrimaryVertexValidation::a_dxyPhiWidthBiasTrend
private

Definition at line 321 of file PrimaryVertexValidation.h.

Referenced by beginJob(), and endJob().

TH1F* PrimaryVertexValidation::a_dxyPhiWidthTrend
private

Definition at line 237 of file PrimaryVertexValidation.h.

Referenced by beginJob(), and endJob().

TH1F* PrimaryVertexValidation::a_dxyResidualsMap[nMaxBins_][nMaxBins_]
private

Definition at line 228 of file PrimaryVertexValidation.h.

Referenced by analyze(), and beginJob().

TH2F* PrimaryVertexValidation::a_dxyWidthBiasMap
private

Definition at line 370 of file PrimaryVertexValidation.h.

Referenced by beginJob().

TH2F* PrimaryVertexValidation::a_dxyWidthMap
private

Definition at line 286 of file PrimaryVertexValidation.h.

Referenced by beginJob().

TH1F* PrimaryVertexValidation::a_dzBiasResidualsMap[nMaxBins_][nMaxBins_]
private

Definition at line 313 of file PrimaryVertexValidation.h.

Referenced by analyze(), and beginJob().

TH1F* PrimaryVertexValidation::a_dzEtaBiasResiduals[nMaxBins_]
private

Definition at line 300 of file PrimaryVertexValidation.h.

Referenced by analyze(), beginJob(), and endJob().

TH1F* PrimaryVertexValidation::a_dzEtaMADBiasTrend
private

Definition at line 350 of file PrimaryVertexValidation.h.

Referenced by beginJob(), and endJob().

TH1F* PrimaryVertexValidation::a_dzEtaMADTrend
private

Definition at line 266 of file PrimaryVertexValidation.h.

Referenced by beginJob(), and endJob().

TH1F* PrimaryVertexValidation::a_dzEtaMeanBiasTrend
private

Definition at line 327 of file PrimaryVertexValidation.h.

Referenced by beginJob(), and endJob().

TH1F* PrimaryVertexValidation::a_dzEtaMeanTrend
private

Definition at line 243 of file PrimaryVertexValidation.h.

Referenced by beginJob(), and endJob().

TH1F* PrimaryVertexValidation::a_dzEtaMedianBiasTrend
private

Definition at line 349 of file PrimaryVertexValidation.h.

Referenced by beginJob(), and endJob().

TH1F* PrimaryVertexValidation::a_dzEtaMedianTrend
private

Definition at line 265 of file PrimaryVertexValidation.h.

Referenced by beginJob(), and endJob().

TH1F* PrimaryVertexValidation::a_dzEtaResiduals[nMaxBins_]
private

Definition at line 216 of file PrimaryVertexValidation.h.

Referenced by analyze(), beginJob(), and endJob().

TH1F* PrimaryVertexValidation::a_dzEtaWidthBiasTrend
private

Definition at line 328 of file PrimaryVertexValidation.h.

Referenced by beginJob(), and endJob().

TH1F* PrimaryVertexValidation::a_dzEtaWidthTrend
private

Definition at line 244 of file PrimaryVertexValidation.h.

Referenced by beginJob(), and endJob().

TH2F* PrimaryVertexValidation::a_dzMeanBiasMap
private

Definition at line 365 of file PrimaryVertexValidation.h.

Referenced by beginJob().

TH2F* PrimaryVertexValidation::a_dzMeanMap
private

Definition at line 281 of file PrimaryVertexValidation.h.

Referenced by beginJob().

TH1F* PrimaryVertexValidation::a_dzPhiBiasResiduals[nMaxBins_]
private

Definition at line 299 of file PrimaryVertexValidation.h.

Referenced by analyze(), beginJob(), and endJob().

TH1F* PrimaryVertexValidation::a_dzPhiMADBiasTrend
private

Definition at line 345 of file PrimaryVertexValidation.h.

Referenced by beginJob(), and endJob().

TH1F* PrimaryVertexValidation::a_dzPhiMADTrend
private

Definition at line 261 of file PrimaryVertexValidation.h.

Referenced by beginJob(), and endJob().

TH1F* PrimaryVertexValidation::a_dzPhiMeanBiasTrend
private

Definition at line 322 of file PrimaryVertexValidation.h.

Referenced by beginJob(), and endJob().

TH1F* PrimaryVertexValidation::a_dzPhiMeanTrend
private

Definition at line 238 of file PrimaryVertexValidation.h.

Referenced by beginJob(), and endJob().

TH1F* PrimaryVertexValidation::a_dzPhiMedianBiasTrend
private

Definition at line 344 of file PrimaryVertexValidation.h.

Referenced by beginJob(), and endJob().

TH1F* PrimaryVertexValidation::a_dzPhiMedianTrend
private

Definition at line 260 of file PrimaryVertexValidation.h.

Referenced by beginJob(), and endJob().

TH1F* PrimaryVertexValidation::a_dzPhiResiduals[nMaxBins_]
private

Definition at line 215 of file PrimaryVertexValidation.h.

Referenced by analyze(), beginJob(), and endJob().

TH1F* PrimaryVertexValidation::a_dzPhiWidthBiasTrend
private

Definition at line 323 of file PrimaryVertexValidation.h.

Referenced by beginJob(), and endJob().

TH1F* PrimaryVertexValidation::a_dzPhiWidthTrend
private

Definition at line 239 of file PrimaryVertexValidation.h.

Referenced by beginJob(), and endJob().

TH1F* PrimaryVertexValidation::a_dzResidualsMap[nMaxBins_][nMaxBins_]
private

Definition at line 229 of file PrimaryVertexValidation.h.

Referenced by analyze(), and beginJob().

TH2F* PrimaryVertexValidation::a_dzWidthBiasMap
private

Definition at line 371 of file PrimaryVertexValidation.h.

Referenced by beginJob().

TH2F* PrimaryVertexValidation::a_dzWidthMap
private

Definition at line 287 of file PrimaryVertexValidation.h.

Referenced by beginJob().

bool PrimaryVertexValidation::askFirstLayerHit_
private

Definition at line 120 of file PrimaryVertexValidation.h.

Referenced by analyze().

double PrimaryVertexValidation::Beamdxdz_
private

Definition at line 155 of file PrimaryVertexValidation.h.

Referenced by analyze(), beginJob(), and SetVarToZero().

double PrimaryVertexValidation::Beamsigmaz_
private

Definition at line 154 of file PrimaryVertexValidation.h.

Referenced by analyze(), beginJob(), and SetVarToZero().

double PrimaryVertexValidation::BeamWidthX_
private

Definition at line 156 of file PrimaryVertexValidation.h.

Referenced by analyze(), beginJob(), and SetVarToZero().

double PrimaryVertexValidation::BeamWidthY_
private

Definition at line 157 of file PrimaryVertexValidation.h.

Referenced by analyze(), beginJob(), and SetVarToZero().

double PrimaryVertexValidation::BSx0_
private

Definition at line 151 of file PrimaryVertexValidation.h.

Referenced by analyze(), beginJob(), and SetVarToZero().

double PrimaryVertexValidation::BSy0_
private

Definition at line 152 of file PrimaryVertexValidation.h.

Referenced by analyze(), beginJob(), and SetVarToZero().

double PrimaryVertexValidation::BSz0_
private

Definition at line 153 of file PrimaryVertexValidation.h.

Referenced by analyze(), beginJob(), and SetVarToZero().

int PrimaryVertexValidation::charge_[nMaxtracks_]
private

Definition at line 177 of file PrimaryVertexValidation.h.

Referenced by analyze(), beginJob(), and SetVarToZero().

double PrimaryVertexValidation::chi2_[nMaxtracks_]
private

Definition at line 175 of file PrimaryVertexValidation.h.

Referenced by analyze(), beginJob(), and SetVarToZero().

double PrimaryVertexValidation::chi2ndof_[nMaxtracks_]
private

Definition at line 176 of file PrimaryVertexValidation.h.

Referenced by analyze(), beginJob(), and SetVarToZero().

float PrimaryVertexValidation::chi2normUnbiasedVertex_[nMaxtracks_]
private

Definition at line 189 of file PrimaryVertexValidation.h.

Referenced by analyze(), beginJob(), and SetVarToZero().

float PrimaryVertexValidation::chi2UnbiasedVertex_[nMaxtracks_]
private

Definition at line 190 of file PrimaryVertexValidation.h.

Referenced by analyze(), beginJob(), and SetVarToZero().

const int PrimaryVertexValidation::cmToum = 10000
staticprivate

Definition at line 135 of file PrimaryVertexValidation.h.

Referenced by analyze().

bool PrimaryVertexValidation::debug_
private

Definition at line 125 of file PrimaryVertexValidation.h.

Referenced by analyze().

float PrimaryVertexValidation::DOFUnbiasedVertex_[nMaxtracks_]
private

Definition at line 191 of file PrimaryVertexValidation.h.

Referenced by analyze(), beginJob(), and SetVarToZero().

double PrimaryVertexValidation::dszFromMyVertex_[nMaxtracks_]
private

Definition at line 204 of file PrimaryVertexValidation.h.

Referenced by analyze(), beginJob(), and SetVarToZero().

double PrimaryVertexValidation::dxy_[nMaxtracks_]
private

Definition at line 180 of file PrimaryVertexValidation.h.

Referenced by analyze(), beginJob(), and SetVarToZero().

double PrimaryVertexValidation::dxyBs_[nMaxtracks_]
private

Definition at line 181 of file PrimaryVertexValidation.h.

Referenced by analyze(), beginJob(), and SetVarToZero().

double PrimaryVertexValidation::dxyErrorFromMyVertex_[nMaxtracks_]
private

Definition at line 198 of file PrimaryVertexValidation.h.

Referenced by analyze(), beginJob(), and SetVarToZero().

double PrimaryVertexValidation::dxyFromMyVertex_[nMaxtracks_]
private

Definition at line 195 of file PrimaryVertexValidation.h.

Referenced by analyze(), beginJob(), and SetVarToZero().

double PrimaryVertexValidation::dz_[nMaxtracks_]
private

Definition at line 179 of file PrimaryVertexValidation.h.

Referenced by analyze(), beginJob(), and SetVarToZero().

double PrimaryVertexValidation::dzBs_[nMaxtracks_]
private

Definition at line 182 of file PrimaryVertexValidation.h.

Referenced by analyze(), beginJob(), and SetVarToZero().

double PrimaryVertexValidation::dzErrorFromMyVertex_[nMaxtracks_]
private

Definition at line 199 of file PrimaryVertexValidation.h.

Referenced by analyze(), beginJob(), and SetVarToZero().

double PrimaryVertexValidation::dzFromMyVertex_[nMaxtracks_]
private

Definition at line 196 of file PrimaryVertexValidation.h.

Referenced by analyze(), beginJob(), and SetVarToZero().

double PrimaryVertexValidation::eta_[nMaxtracks_]
private

Definition at line 172 of file PrimaryVertexValidation.h.

Referenced by analyze(), beginJob(), and SetVarToZero().

double PrimaryVertexValidation::etaOfProbe_
private

Definition at line 122 of file PrimaryVertexValidation.h.

Referenced by analyze().

float PrimaryVertexValidation::etapitch_
private

Definition at line 138 of file PrimaryVertexValidation.h.

Referenced by analyze(), beginJob(), and PrimaryVertexValidation().

unsigned int PrimaryVertexValidation::EventNumber_
private

Definition at line 146 of file PrimaryVertexValidation.h.

Referenced by analyze(), and beginJob().

TH1F* PrimaryVertexValidation::h_fitVtxChi2_
private

Definition at line 401 of file PrimaryVertexValidation.h.

Referenced by analyze(), and beginJob().

TH1F* PrimaryVertexValidation::h_fitVtxChi2ndf_
private

Definition at line 403 of file PrimaryVertexValidation.h.

Referenced by analyze(), and beginJob().

TH1F* PrimaryVertexValidation::h_fitVtxChi2Prob_
private

Definition at line 404 of file PrimaryVertexValidation.h.

Referenced by analyze(), and beginJob().

TH1F* PrimaryVertexValidation::h_fitVtxNdof_
private

Definition at line 400 of file PrimaryVertexValidation.h.

Referenced by analyze(), and beginJob().

TH1F* PrimaryVertexValidation::h_fitVtxNtracks_
private

Definition at line 402 of file PrimaryVertexValidation.h.

Referenced by analyze(), and beginJob().

TH1F* PrimaryVertexValidation::h_probeCharge_
private

Definition at line 383 of file PrimaryVertexValidation.h.

Referenced by analyze(), and beginJob().

TH1F* PrimaryVertexValidation::h_probeChi2_
private

Definition at line 381 of file PrimaryVertexValidation.h.

Referenced by analyze(), and beginJob().

TH1F* PrimaryVertexValidation::h_probedxy_
private

Definition at line 386 of file PrimaryVertexValidation.h.

Referenced by analyze(), and beginJob().

TH1F* PrimaryVertexValidation::h_probedz_
private

Definition at line 385 of file PrimaryVertexValidation.h.

Referenced by analyze(), and beginJob().

TH1F* PrimaryVertexValidation::h_probeEta_
private

Definition at line 379 of file PrimaryVertexValidation.h.

Referenced by analyze(), and beginJob().

TH1F* PrimaryVertexValidation::h_probeHits1D_
private

Definition at line 389 of file PrimaryVertexValidation.h.

Referenced by analyze(), and beginJob().

TH1F* PrimaryVertexValidation::h_probeHits2D_
private

Definition at line 390 of file PrimaryVertexValidation.h.

Referenced by analyze(), and beginJob().

TH1F* PrimaryVertexValidation::h_probeHits_
private

Definition at line 388 of file PrimaryVertexValidation.h.

Referenced by analyze(), and beginJob().

TH1F* PrimaryVertexValidation::h_probeHitsInBPIX_
private

Definition at line 395 of file PrimaryVertexValidation.h.

Referenced by analyze(), and beginJob().

TH1F* PrimaryVertexValidation::h_probeHitsInFPIX_
private

Definition at line 396 of file PrimaryVertexValidation.h.

Referenced by analyze(), and beginJob().

TH1F* PrimaryVertexValidation::h_probeHitsInTEC_
private

Definition at line 394 of file PrimaryVertexValidation.h.

Referenced by analyze(), and beginJob().

TH1F* PrimaryVertexValidation::h_probeHitsInTIB_
private

Definition at line 391 of file PrimaryVertexValidation.h.

Referenced by analyze(), and beginJob().

TH1F* PrimaryVertexValidation::h_probeHitsInTID_
private

Definition at line 393 of file PrimaryVertexValidation.h.

Referenced by analyze(), and beginJob().

TH1F* PrimaryVertexValidation::h_probeHitsInTOB_
private

Definition at line 392 of file PrimaryVertexValidation.h.

Referenced by analyze(), and beginJob().

TH1F* PrimaryVertexValidation::h_probeNormChi2_
private

Definition at line 382 of file PrimaryVertexValidation.h.

Referenced by analyze(), and beginJob().

TH1F* PrimaryVertexValidation::h_probePhi_
private

Definition at line 380 of file PrimaryVertexValidation.h.

Referenced by analyze(), and beginJob().

TH1F* PrimaryVertexValidation::h_probePt_
private

Definition at line 378 of file PrimaryVertexValidation.h.

Referenced by analyze(), and beginJob().

TH1F* PrimaryVertexValidation::h_probeQoverP_
private

Definition at line 384 of file PrimaryVertexValidation.h.

Referenced by analyze(), and beginJob().

TH1F* PrimaryVertexValidation::h_recoVtxChi2ndf_
private

Definition at line 407 of file PrimaryVertexValidation.h.

Referenced by analyze(), and beginJob().

TH1F* PrimaryVertexValidation::h_recoVtxChi2Prob_
private

Definition at line 408 of file PrimaryVertexValidation.h.

Referenced by analyze(), and beginJob().

TH1F* PrimaryVertexValidation::h_recoVtxNtracks_
private

Definition at line 406 of file PrimaryVertexValidation.h.

Referenced by analyze(), and beginJob().

TH1F* PrimaryVertexValidation::h_recoVtxSumPt_
private

Definition at line 409 of file PrimaryVertexValidation.h.

Referenced by analyze(), and beginJob().

int PrimaryVertexValidation::hasRecVertex_[nMaxtracks_]
private

Definition at line 205 of file PrimaryVertexValidation.h.

Referenced by analyze(), beginJob(), and SetVarToZero().

double PrimaryVertexValidation::IPLsigFromMyVertex_[nMaxtracks_]
private

Definition at line 202 of file PrimaryVertexValidation.h.

Referenced by analyze(), beginJob(), and SetVarToZero().

double PrimaryVertexValidation::IPTsigFromMyVertex_[nMaxtracks_]
private

Definition at line 201 of file PrimaryVertexValidation.h.

Referenced by analyze(), beginJob(), and SetVarToZero().

int PrimaryVertexValidation::isGoodTrack_[nMaxtracks_]
private

Definition at line 206 of file PrimaryVertexValidation.h.

Referenced by analyze(), beginJob(), and SetVarToZero().

int PrimaryVertexValidation::isHighPurity_[nMaxtracks_]
private

Definition at line 171 of file PrimaryVertexValidation.h.

Referenced by analyze(), beginJob(), and SetVarToZero().

bool PrimaryVertexValidation::lightNtupleSwitch_
private

Definition at line 116 of file PrimaryVertexValidation.h.

Referenced by beginJob().

unsigned int PrimaryVertexValidation::LuminosityBlockNumber_
private

Definition at line 147 of file PrimaryVertexValidation.h.

Referenced by analyze(), beginJob(), and SetVarToZero().

TH1F* PrimaryVertexValidation::n_dxyBiasResidualsMap[nMaxBins_][nMaxBins_]
private

Definition at line 315 of file PrimaryVertexValidation.h.

Referenced by analyze(), and beginJob().

TH1F* PrimaryVertexValidation::n_dxyEtaBiasResiduals[nMaxBins_]
private

Definition at line 305 of file PrimaryVertexValidation.h.

Referenced by analyze(), beginJob(), and endJob().

TH1F* PrimaryVertexValidation::n_dxyEtaMADBiasTrend
private

Definition at line 358 of file PrimaryVertexValidation.h.

Referenced by beginJob(), and endJob().

TH1F* PrimaryVertexValidation::n_dxyEtaMADTrend
private

Definition at line 274 of file PrimaryVertexValidation.h.

Referenced by beginJob(), and endJob().

TH1F* PrimaryVertexValidation::n_dxyEtaMeanBiasTrend
private

Definition at line 335 of file PrimaryVertexValidation.h.

Referenced by beginJob(), and endJob().

TH1F* PrimaryVertexValidation::n_dxyEtaMeanTrend
private

Definition at line 251 of file PrimaryVertexValidation.h.

Referenced by beginJob(), and endJob().

TH1F* PrimaryVertexValidation::n_dxyEtaMedianBiasTrend
private

Definition at line 357 of file PrimaryVertexValidation.h.

Referenced by beginJob(), and endJob().

TH1F* PrimaryVertexValidation::n_dxyEtaMedianTrend
private

Definition at line 273 of file PrimaryVertexValidation.h.

Referenced by beginJob(), and endJob().

TH1F* PrimaryVertexValidation::n_dxyEtaResiduals[nMaxBins_]
private

Definition at line 221 of file PrimaryVertexValidation.h.

Referenced by analyze(), beginJob(), and endJob().

TH1F* PrimaryVertexValidation::n_dxyEtaWidthBiasTrend
private

Definition at line 336 of file PrimaryVertexValidation.h.

Referenced by beginJob(), and endJob().

TH1F* PrimaryVertexValidation::n_dxyEtaWidthTrend
private

Definition at line 252 of file PrimaryVertexValidation.h.

Referenced by beginJob(), and endJob().

TH2F* PrimaryVertexValidation::n_dxyMeanBiasMap
private

Definition at line 367 of file PrimaryVertexValidation.h.

Referenced by beginJob().

TH2F* PrimaryVertexValidation::n_dxyMeanMap
private

Definition at line 283 of file PrimaryVertexValidation.h.

Referenced by beginJob().

TH1F* PrimaryVertexValidation::n_dxyPhiBiasResiduals[nMaxBins_]
private

Definition at line 304 of file PrimaryVertexValidation.h.

Referenced by analyze(), beginJob(), and endJob().

TH1F* PrimaryVertexValidation::n_dxyPhiMADBiasTrend
private

Definition at line 353 of file PrimaryVertexValidation.h.

Referenced by beginJob(), and endJob().

TH1F* PrimaryVertexValidation::n_dxyPhiMADTrend
private

Definition at line 269 of file PrimaryVertexValidation.h.

Referenced by beginJob(), and endJob().

TH1F* PrimaryVertexValidation::n_dxyPhiMeanBiasTrend
private

Definition at line 330 of file PrimaryVertexValidation.h.

Referenced by beginJob(), and endJob().

TH1F* PrimaryVertexValidation::n_dxyPhiMeanTrend
private

Definition at line 246 of file PrimaryVertexValidation.h.

Referenced by beginJob(), and endJob().

TH1F* PrimaryVertexValidation::n_dxyPhiMedianBiasTrend
private

Definition at line 352 of file PrimaryVertexValidation.h.

Referenced by beginJob(), and endJob().

TH1F* PrimaryVertexValidation::n_dxyPhiMedianTrend
private

Definition at line 268 of file PrimaryVertexValidation.h.

Referenced by beginJob(), and endJob().

TH1F* PrimaryVertexValidation::n_dxyPhiResiduals[nMaxBins_]
private

Definition at line 220 of file PrimaryVertexValidation.h.

Referenced by analyze(), beginJob(), and endJob().

TH1F* PrimaryVertexValidation::n_dxyPhiWidthBiasTrend
private

Definition at line 331 of file PrimaryVertexValidation.h.

Referenced by beginJob(), and endJob().

TH1F* PrimaryVertexValidation::n_dxyPhiWidthTrend
private

Definition at line 247 of file PrimaryVertexValidation.h.

Referenced by beginJob(), and endJob().

TH1F* PrimaryVertexValidation::n_dxyResidualsMap[nMaxBins_][nMaxBins_]
private

Definition at line 231 of file PrimaryVertexValidation.h.

Referenced by analyze(), and beginJob().

TH2F* PrimaryVertexValidation::n_dxyWidthBiasMap
private

Definition at line 373 of file PrimaryVertexValidation.h.

Referenced by beginJob().

TH2F* PrimaryVertexValidation::n_dxyWidthMap
private

Definition at line 289 of file PrimaryVertexValidation.h.

Referenced by beginJob().

TH1F* PrimaryVertexValidation::n_dzBiasResidualsMap[nMaxBins_][nMaxBins_]
private

Definition at line 316 of file PrimaryVertexValidation.h.

Referenced by analyze(), and beginJob().

TH1F* PrimaryVertexValidation::n_dzEtaBiasResiduals[nMaxBins_]
private

Definition at line 308 of file PrimaryVertexValidation.h.

Referenced by analyze(), beginJob(), and endJob().

TH1F* PrimaryVertexValidation::n_dzEtaMADBiasTrend
private

Definition at line 360 of file PrimaryVertexValidation.h.

Referenced by beginJob(), and endJob().

TH1F* PrimaryVertexValidation::n_dzEtaMADTrend
private

Definition at line 276 of file PrimaryVertexValidation.h.

Referenced by beginJob(), and endJob().

TH1F* PrimaryVertexValidation::n_dzEtaMeanBiasTrend
private

Definition at line 337 of file PrimaryVertexValidation.h.

Referenced by beginJob(), and endJob().

TH1F* PrimaryVertexValidation::n_dzEtaMeanTrend
private

Definition at line 253 of file PrimaryVertexValidation.h.

Referenced by beginJob(), and endJob().

TH1F* PrimaryVertexValidation::n_dzEtaMedianBiasTrend
private

Definition at line 359 of file PrimaryVertexValidation.h.

Referenced by beginJob(), and endJob().

TH1F* PrimaryVertexValidation::n_dzEtaMedianTrend
private

Definition at line 275 of file PrimaryVertexValidation.h.

Referenced by beginJob(), and endJob().

TH1F* PrimaryVertexValidation::n_dzEtaResiduals[nMaxBins_]
private

Definition at line 224 of file PrimaryVertexValidation.h.

Referenced by analyze(), beginJob(), and endJob().

TH1F* PrimaryVertexValidation::n_dzEtaWidthBiasTrend
private

Definition at line 338 of file PrimaryVertexValidation.h.

Referenced by beginJob(), and endJob().

TH1F* PrimaryVertexValidation::n_dzEtaWidthTrend
private

Definition at line 254 of file PrimaryVertexValidation.h.

Referenced by beginJob(), and endJob().

TH2F* PrimaryVertexValidation::n_dzMeanBiasMap
private

Definition at line 368 of file PrimaryVertexValidation.h.

Referenced by beginJob().

TH2F* PrimaryVertexValidation::n_dzMeanMap
private

Definition at line 284 of file PrimaryVertexValidation.h.

Referenced by beginJob().

TH1F* PrimaryVertexValidation::n_dzPhiBiasResiduals[nMaxBins_]
private

Definition at line 307 of file PrimaryVertexValidation.h.

Referenced by analyze(), beginJob(), and endJob().

TH1F* PrimaryVertexValidation::n_dzPhiMADBiasTrend
private

Definition at line 355 of file PrimaryVertexValidation.h.

Referenced by beginJob(), and endJob().

TH1F* PrimaryVertexValidation::n_dzPhiMADTrend
private

Definition at line 271 of file PrimaryVertexValidation.h.

Referenced by beginJob(), and endJob().

TH1F* PrimaryVertexValidation::n_dzPhiMeanBiasTrend
private

Definition at line 332 of file PrimaryVertexValidation.h.

Referenced by beginJob(), and endJob().

TH1F* PrimaryVertexValidation::n_dzPhiMeanTrend
private

Definition at line 248 of file PrimaryVertexValidation.h.

Referenced by beginJob(), and endJob().

TH1F* PrimaryVertexValidation::n_dzPhiMedianBiasTrend
private

Definition at line 354 of file PrimaryVertexValidation.h.

Referenced by beginJob(), and endJob().

TH1F* PrimaryVertexValidation::n_dzPhiMedianTrend
private

Definition at line 270 of file PrimaryVertexValidation.h.

Referenced by beginJob(), and endJob().

TH1F* PrimaryVertexValidation::n_dzPhiResiduals[nMaxBins_]
private

Definition at line 223 of file PrimaryVertexValidation.h.

Referenced by analyze(), beginJob(), and endJob().

TH1F* PrimaryVertexValidation::n_dzPhiWidthBiasTrend
private

Definition at line 333 of file PrimaryVertexValidation.h.

Referenced by beginJob(), and endJob().

TH1F* PrimaryVertexValidation::n_dzPhiWidthTrend
private

Definition at line 249 of file PrimaryVertexValidation.h.

Referenced by beginJob(), and endJob().

TH1F* PrimaryVertexValidation::n_dzResidualsMap[nMaxBins_][nMaxBins_]
private

Definition at line 232 of file PrimaryVertexValidation.h.

Referenced by analyze(), and beginJob().

TH2F* PrimaryVertexValidation::n_dzWidthBiasMap
private

Definition at line 374 of file PrimaryVertexValidation.h.

Referenced by beginJob().

TH2F* PrimaryVertexValidation::n_dzWidthMap
private

Definition at line 290 of file PrimaryVertexValidation.h.

Referenced by beginJob().

int PrimaryVertexValidation::nBins_
private
int PrimaryVertexValidation::nClus_
private

Definition at line 143 of file PrimaryVertexValidation.h.

Referenced by analyze(), beginJob(), and SetVarToZero().

int PrimaryVertexValidation::Nevt_
private

Definition at line 105 of file PrimaryVertexValidation.h.

Referenced by analyze(), beginJob(), and endJob().

int PrimaryVertexValidation::nhits1D_[nMaxtracks_]
private

Definition at line 163 of file PrimaryVertexValidation.h.

Referenced by analyze(), beginJob(), and SetVarToZero().

int PrimaryVertexValidation::nhits2D_[nMaxtracks_]
private

Definition at line 164 of file PrimaryVertexValidation.h.

Referenced by analyze(), beginJob(), and SetVarToZero().

int PrimaryVertexValidation::nhits_[nMaxtracks_]
private

Definition at line 162 of file PrimaryVertexValidation.h.

Referenced by analyze(), beginJob(), and SetVarToZero().

int PrimaryVertexValidation::nhitsBPIX_[nMaxtracks_]
private

Definition at line 165 of file PrimaryVertexValidation.h.

Referenced by analyze(), beginJob(), and SetVarToZero().

int PrimaryVertexValidation::nhitsFPIX_[nMaxtracks_]
private

Definition at line 166 of file PrimaryVertexValidation.h.

Referenced by analyze(), beginJob(), and SetVarToZero().

int PrimaryVertexValidation::nhitsTEC_[nMaxtracks_]
private

Definition at line 170 of file PrimaryVertexValidation.h.

Referenced by analyze(), beginJob(), and SetVarToZero().

int PrimaryVertexValidation::nhitsTIB_[nMaxtracks_]
private

Definition at line 167 of file PrimaryVertexValidation.h.

Referenced by analyze(), beginJob(), and SetVarToZero().

int PrimaryVertexValidation::nhitsTID_[nMaxtracks_]
private

Definition at line 168 of file PrimaryVertexValidation.h.

Referenced by analyze(), beginJob(), and SetVarToZero().

int PrimaryVertexValidation::nhitsTOB_[nMaxtracks_]
private

Definition at line 169 of file PrimaryVertexValidation.h.

Referenced by analyze(), beginJob(), and SetVarToZero().

const int PrimaryVertexValidation::nMaxBins_ = 100
staticprivate

Definition at line 111 of file PrimaryVertexValidation.h.

const int PrimaryVertexValidation::nMaxtracks_ = 1000
staticprivate

Definition at line 134 of file PrimaryVertexValidation.h.

Referenced by analyze(), and SetVarToZero().

int PrimaryVertexValidation::nOfflineVertices_
private

Definition at line 144 of file PrimaryVertexValidation.h.

Referenced by analyze(), beginJob(), and SetVarToZero().

int PrimaryVertexValidation::nTracks_
private

Definition at line 141 of file PrimaryVertexValidation.h.

Referenced by analyze(), beginJob(), and SetVarToZero().

int PrimaryVertexValidation::nTracksPerClus_
private

Definition at line 142 of file PrimaryVertexValidation.h.

Referenced by analyze(), and beginJob().

double PrimaryVertexValidation::p_[nMaxtracks_]
private

Definition at line 161 of file PrimaryVertexValidation.h.

Referenced by analyze(), beginJob(), and SetVarToZero().

double PrimaryVertexValidation::phi_[nMaxtracks_]
private

Definition at line 174 of file PrimaryVertexValidation.h.

Referenced by analyze(), beginJob(), and SetVarToZero().

float PrimaryVertexValidation::phipitch_
private

Definition at line 137 of file PrimaryVertexValidation.h.

Referenced by analyze(), beginJob(), and PrimaryVertexValidation().

double PrimaryVertexValidation::pt_[nMaxtracks_]
private

Definition at line 160 of file PrimaryVertexValidation.h.

Referenced by analyze(), beginJob(), and SetVarToZero().

double PrimaryVertexValidation::ptOfProbe_
private

Definition at line 121 of file PrimaryVertexValidation.h.

Referenced by analyze().

double PrimaryVertexValidation::qoverp_[nMaxtracks_]
private

Definition at line 178 of file PrimaryVertexValidation.h.

Referenced by analyze(), beginJob(), and SetVarToZero().

TTree* PrimaryVertexValidation::rootTree_
private

Definition at line 128 of file PrimaryVertexValidation.h.

Referenced by analyze(), and beginJob().

unsigned int PrimaryVertexValidation::RunNumber_
private

Definition at line 145 of file PrimaryVertexValidation.h.

Referenced by analyze(), beginJob(), and SetVarToZero().

bool PrimaryVertexValidation::storeNtuple_
private

Definition at line 115 of file PrimaryVertexValidation.h.

Referenced by analyze().

float PrimaryVertexValidation::sumOfWeightsUnbiasedVertex_[nMaxtracks_]
private

Definition at line 192 of file PrimaryVertexValidation.h.

Referenced by analyze(), beginJob(), and SetVarToZero().

edm::ParameterSet PrimaryVertexValidation::theConfig
private

Definition at line 104 of file PrimaryVertexValidation.h.

double PrimaryVertexValidation::theta_[nMaxtracks_]
private

Definition at line 173 of file PrimaryVertexValidation.h.

Referenced by analyze(), beginJob(), and SetVarToZero().

TrackClusterizerInZ* PrimaryVertexValidation::theTrackClusterizer_
private

Definition at line 108 of file PrimaryVertexValidation.h.

Referenced by analyze(), and PrimaryVertexValidation().

TrackFilterForPVFindingBase* PrimaryVertexValidation::theTrackFilter_
private

Definition at line 107 of file PrimaryVertexValidation.h.

Referenced by analyze(), and PrimaryVertexValidation().

edm::InputTag PrimaryVertexValidation::TrackCollectionTag_
private

Definition at line 126 of file PrimaryVertexValidation.h.

Referenced by analyze().

int PrimaryVertexValidation::tracksUsedForVertexing_[nMaxtracks_]
private

Definition at line 193 of file PrimaryVertexValidation.h.

Referenced by analyze(), beginJob(), and SetVarToZero().

bool PrimaryVertexValidation::useTracksFromRecoVtx_
private

Definition at line 117 of file PrimaryVertexValidation.h.

Referenced by analyze(), beginJob(), and endJob().

double PrimaryVertexValidation::xOfflineVertex_
private

Definition at line 148 of file PrimaryVertexValidation.h.

Referenced by analyze(), beginJob(), and SetVarToZero().

double PrimaryVertexValidation::xPCA_[nMaxtracks_]
private

Definition at line 183 of file PrimaryVertexValidation.h.

Referenced by analyze(), beginJob(), and SetVarToZero().

double PrimaryVertexValidation::xUnbiasedVertex_[nMaxtracks_]
private

Definition at line 186 of file PrimaryVertexValidation.h.

Referenced by analyze(), beginJob(), and SetVarToZero().

double PrimaryVertexValidation::yOfflineVertex_
private

Definition at line 149 of file PrimaryVertexValidation.h.

Referenced by analyze(), beginJob(), and SetVarToZero().

double PrimaryVertexValidation::yPCA_[nMaxtracks_]
private

Definition at line 184 of file PrimaryVertexValidation.h.

Referenced by analyze(), beginJob(), and SetVarToZero().

double PrimaryVertexValidation::yUnbiasedVertex_[nMaxtracks_]
private

Definition at line 187 of file PrimaryVertexValidation.h.

Referenced by analyze(), beginJob(), and SetVarToZero().

double PrimaryVertexValidation::zOfflineVertex_
private

Definition at line 150 of file PrimaryVertexValidation.h.

Referenced by analyze(), beginJob(), and SetVarToZero().

double PrimaryVertexValidation::zPCA_[nMaxtracks_]
private

Definition at line 185 of file PrimaryVertexValidation.h.

Referenced by analyze(), beginJob(), and SetVarToZero().

double PrimaryVertexValidation::zUnbiasedVertex_[nMaxtracks_]
private

Definition at line 188 of file PrimaryVertexValidation.h.

Referenced by analyze(), beginJob(), and SetVarToZero().