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"))
100 if (clusteringAlgorithm==
"gap"){
102 }
else if(clusteringAlgorithm==
"DA"){
105 throw VertexException(
"PrimaryVertexProducerAlgorithm: unknown clustering algorithm: " + clusteringAlgorithm);
127 using namespace IPTools;
164 iEvent.
getByLabel(
"offlinePrimaryVertices", vertices);
167 cout <<
"No offlinePrimaryVertices found!" << endl;
169 if ( vertices.isValid() ) {
175 unsigned int vertexCollectionSize = vertices.product()->size();
178 for (
unsigned int i=0;
i<vertexCollectionSize;
i++) {
180 if (vertex.
isValid()) nvvertex++;
191 double chi2prob = 0.;
193 if (!vertices->at(0).isFake()) {
199 chi2prob = TMath::Prob(pv.
chi2(),(int)pv.
ndof());
206 double pt = (**itrk).pt();
211 double dxyRes = (**itrk).dxy(myVertex);
212 double dzRes = (**itrk).dz(myVertex);
214 double dxy_err = (**itrk).dxyError();
215 double dz_err = (**itrk).dzError();
217 float_t trackphi = ((**itrk).phi())*(180/
TMath::Pi());
218 float_t tracketa = (**itrk).eta();
226 float etaL=-2.5+(
i+1)*etapitch_;
228 if(trackphi >= phiF && trackphi < phiL ){
238 float etaK=-2.5+(
j+1)*etapitch_;
240 if(tracketa >= etaJ && tracketa < etaK ){
252 if(tracketa >= etaF && tracketa < etaL ){
272 iEvent.
getByLabel(
"offlineBeamSpot", beamSpotHandle);
274 if ( beamSpotHandle.isValid() )
287 cout <<
"No BeamSpot found!" << endl;
306 std::cout<<
"PrimaryVertexValidation::analyze() looping over "<<trackCollectionHandle->size()<<
"tracks." <<std::endl;
312 std::vector<reco::TransientTrack> t_tks;
314 for(reco::TrackCollection::const_iterator track = trackCollectionHandle->begin(); track!= trackCollectionHandle->end(); ++track, ++
k){
318 t_tks.push_back(theTTRef);
323 <<
"Found: " << t_tks.size() <<
" reconstructed tracks" <<
"\n";
339 cout <<
" clustering returned "<< clusters.size() <<
" clusters from " << t_tks.size() <<
" selected tracks" <<endl;
348 for (vector< vector<reco::TransientTrack> >::const_iterator iclus = clusters.begin(); iclus != clusters.end(); iclus++) {
353 for(vector<reco::TransientTrack>::const_iterator theTrack = iclus->begin(); theTrack!= iclus->end(); ++theTrack, ++
i)
356 std::cout <<
" PrimaryVertexValidation::analyze() : Warning - Number of tracks: " <<
nTracks_ <<
" , greater than " <<
nMaxtracks_ << std::endl;
398 if((*iHit)->isValid()) {
400 if (this->
isHit2D(**iHit)) {++nRecHit2D;}
403 int type =(*iHit)->geographicalId().subdetId();
409 if(type==
int(
kBPIX)){++nhitinBPIX;}
410 if(type==
int(
kFPIX)){++nhitinFPIX;}
437 vector<reco::TransientTrack> theFinalTracks;
438 theFinalTracks.clear();
440 for(vector<reco::TransientTrack>::const_iterator tk = iclus->begin(); tk!= iclus->end(); ++tk){
444 if( tk == theTrack )
continue;
446 theFinalTracks.push_back((*tk));
451 if(theFinalTracks.size() > 2){
454 std::cout <<
"PrimaryVertexValidation::analyze() :Transient Track Collection size: "<<theFinalTracks.size()<<std::endl;
461 if(theFittedVertex.
isValid ()){
464 for(
size_t rtracks= 0; rtracks < theFinalTracks.size(); rtracks++){
492 double dz_err = hypot(theTrack->track().dzError(),theFittedVertex.
positionError().
czz());
500 std::pair<bool,Measurement1D> s_ip2dpv =
502 theTrack->track().py(),
503 theTrack->track().pz()),
507 double s_ip2dpv_err = s_ip2dpv.second.error();
532 float_t trackphi = (theTrack->track().phi())*(180/
TMath::Pi());
533 float_t tracketa = theTrack->track().eta();
534 float_t trackpt = theTrack->track().pt();
546 h_probedz_->Fill(theTrack->track().dz(theRecoVertex));
547 h_probedxy_->Fill((theTrack->track().dxy(theRecoVertex)));
549 h_probeHits_->Fill(theTrack->track().numberOfValidHits());
559 for(Int_t i=0; i<
nBins_; i++){
565 float etaL=-2.5+(i+1)*etapitch_;
567 if(trackphi >= phiF && trackphi < phiL ){
576 float etaK=-2.5+(
j+1)*etapitch_;
578 if(tracketa >= etaJ && tracketa < etaK ){
590 if(tracketa >= etaF && tracketa < etaL ){
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;
609 LogTrace(
"PrimaryVertexValidation::analyze RECO")<<
"caught std::exception "<<er.
what()<<std::endl;
616 std::cout <<
"PrimaryVertexValidation::analyze() :Not enough tracks to make a vertex. Returns no vertex info" << std::endl;
623 cout<<
"Track "<<i<<
" : pT = "<<theTrack->track().pt()<<endl;
647 if (detId.subdetId() ==
kBPIX || detId.subdetId() ==
kFPIX) {
650 if (dynamic_cast<const SiStripRecHit2D*>(&hit))
return false;
651 else if (dynamic_cast<const SiStripMatchedRecHit2D*>(&hit))
return true;
652 else if (dynamic_cast<const ProjectedSiStripRecHit2D*>(&hit))
return false;
654 edm::LogError(
"UnkownType") <<
"@SUB=AlignmentTrackSelector::isHit2D"
655 <<
"Tracker hit not in pixel and neither SiStripRecHit2D nor "
656 <<
"SiStripMatchedRecHit2D nor ProjectedSiStripRecHit2D.";
661 edm::LogWarning(
"DetectorMismatch") <<
"@SUB=AlignmentTrackSelector::isHit2D"
662 <<
"Hit not in tracker with 'official' dimension >=2.";
672 bool accepted =
false;
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.);
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);
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.);
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.);
821 float dxymax_phi = 2000;
822 float dzmax_phi = 2000;
823 float dxymax_eta = 3000;
824 float dzmax_eta = 3000;
826 const Int_t mybins_ = 500;
856 float etaL=-2.5+(
i+1)*etapitch_;
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);
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);
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.);
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.);
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);
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);
891 Double_t highedge=nBins_-0.5;
892 Double_t lowedge=-0.5;
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
983 float etaL=-2.5+(
i+1)*etapitch_;
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);
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);
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.);
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.);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
1082 std::cout<<
"######################################"<<std::endl;
1084 std::cout<<
"######################################"<<std::endl;
1248 Double_t median = 999;
1249 int nbins = histo->GetNbinsX();
1252 double *
x =
new double[
nbins];
1253 double *
y =
new double[
nbins];
1255 x[
j] = histo->GetBinCenter(
j+1);
1256 y[
j] = histo->GetBinContent(
j+1);
1258 median = TMath::Median(nbins, x, y);
1263 std::pair<Double_t,Double_t>
result;
1264 result = std::make_pair(median,median/TMath::Sqrt(histo->GetEntries()));
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];
1285 residuals[
j] =
TMath::Abs(median - histo->GetBinCenter(
j+1));
1286 weights[
j]=histo->GetBinContent(
j+1);
1287 newHisto->Fill(residuals[
j],weights[j]);
1290 Double_t theMAD = (
getMedian(newHisto).first)*1.4826;
1291 newHisto->Delete(
"");
1293 std::pair<Double_t,Double_t>
result;
1294 result = std::make_pair(theMAD,theMAD/histo->GetEntries());
1307 float mean = hist->GetMean();
1308 float sigma = hist->GetRMS();
1310 TF1 func(
"tmp",
"gaus", mean - 1.5*sigma, mean + 1.5*sigma);
1311 if (0 == hist->Fit(&func,
"QNR")) {
1312 mean = func.GetParameter(1);
1313 sigma = func.GetParameter(2);
1315 func.SetRange(mean - 2*sigma, mean + 2*sigma);
1318 if (0 == hist->Fit(&func,
"Q0LR")) {
1319 if (hist->GetFunction(func.GetName())) {
1320 hist->GetFunction(func.GetName())->ResetBit(TF1::kNotDraw);
1325 float res_mean = func.GetParameter(1);
1326 float res_width = func.GetParameter(2);
1328 float res_mean_err = func.GetParError(1);
1329 float res_width_err = func.GetParError(2);
1331 std::pair<Double_t,Double_t> resultM;
1332 std::pair<Double_t,Double_t> resultW;
1334 resultM = std::make_pair(res_mean,res_mean_err);
1335 resultW = std::make_pair(res_width,res_width_err);
1337 std::pair<std::pair<Double_t,Double_t>, std::pair<Double_t,Double_t> >
result;
1339 result = std::make_pair(resultM,resultW);
1348 float phiInterval = (360.)/
nBins_;
1349 float etaInterval = 5./
nBins_;
1353 char phipositionString[129];
1354 float phiposition = (-180+
i*phiInterval)+(phiInterval/2);
1355 sprintf(phipositionString,
"%.f",phiposition);
1357 char etapositionString[129];
1358 float etaposition = (-2.5+
i*etaInterval)+(etaInterval/2);
1359 sprintf(etapositionString,
"%.1f",etaposition);
1361 if(fitPar_==
"mean"){
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"){
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_);
1382 std::cout<<
"PrimaryVertexValidation::FillTrendPlot() "<<fitPar_<<
" unknown estimator!"<<std::endl;
1386 trendPlot->GetXaxis()->SetBinLabel(
i+1,phipositionString);
1387 }
else if(var_==
"phi"){
1388 trendPlot->GetXaxis()->SetBinLabel(
i+1,etapositionString);
1390 std::cout<<
"PrimaryVertexValidation::FillTrendPlot() "<<var_<<
" unknown track parameter!"<<std::endl;
TH1F * n_dxyPhiMedianTrend
TH1F * n_dzPhiResiduals[nMaxBins_]
virtual char const * what() const
GlobalError positionError() const
TH1F * n_dzEtaMedianTrend
T getParameter(std::string const &) const
EventNumber_t event() const
TH1F * n_dxyEtaMADBiasTrend
TH1F * a_dxyPhiMedianBiasTrend
TH1F * n_dxyPhiMADBiasTrend
virtual int dimension() const =0
TH1F * n_dzResidualsMap[nMaxBins_][nMaxBins_]
TH1F * a_dzPhiMedianBiasTrend
TH1F * a_dxyEtaWidthBiasTrend
TH1F * n_dxyEtaMedianTrend
TH1F * n_dxyEtaMeanBiasTrend
TH1F * a_dzEtaWidthBiasTrend
TH1F * a_dzPhiMADBiasTrend
static const int nMaxtracks_
static uint32_t getLayer(uint32_t pattern)
TH1F * n_dxyEtaMedianBiasTrend
TH1F * a_dxyEtaMADBiasTrend
trackRef_iterator tracks_end() const
last iterator over tracks
int nhits1D_[nMaxtracks_]
TrackFilterForPVFindingBase * theTrackFilter_
TH1F * a_dxyResidualsMap[nMaxBins_][nMaxBins_]
TrackQuality
track quality
TH1F * n_dxyEtaBiasResiduals[nMaxBins_]
#define DEFINE_FWK_MODULE(type)
bool isValid() const
Tells whether the vertex is valid.
PrimaryVertexValidation(const edm::ParameterSet &)
std::pair< Double_t, Double_t > getMAD(TH1F *histo)
TH1F * a_dzEtaMADBiasTrend
TH1F * n_dxyBiasResidualsMap[nMaxBins_][nMaxBins_]
float totalChiSquared() const
const HitPattern & hitPattern() const
edm::InputTag TrackCollectionTag_
float DOFUnbiasedVertex_[nMaxtracks_]
TH1F * a_dzPhiBiasResiduals[nMaxBins_]
TH1F * n_dzPhiWidthBiasTrend
T * make(const Args &...args) const
make new ROOT object
TH1F * n_dzEtaBiasResiduals[nMaxBins_]
virtual void analyze(const edm::Event &, const edm::EventSetup &)
double dxyBs_[nMaxtracks_]
double zPCA_[nMaxtracks_]
TH1F * a_dxyPhiWidthBiasTrend
double dszFromMyVertex_[nMaxtracks_]
double dxyFromMyVertex_[nMaxtracks_]
TH1F * a_dzPhiWidthBiasTrend
const Point & position() const
position
double dzErrorFromMyVertex_[nMaxtracks_]
LuminosityBlockNumber_t luminosityBlock() const
int isHighPurity_[nMaxtracks_]
int nhitsTIB_[nMaxtracks_]
TH1F * a_dxyPhiBiasResiduals[nMaxBins_]
double qoverp_[nMaxtracks_]
double IPTsigFromMyVertex_[nMaxtracks_]
virtual std::vector< std::vector< reco::TransientTrack > > clusterize(const std::vector< reco::TransientTrack > &tracks) const =0
std::pair< Double_t, Double_t > getMedian(TH1F *histo)
TH1F * a_dzEtaMedianTrend
double theta_[nMaxtracks_]
TH1F * a_dxyPhiMedianTrend
TH1F * a_dzPhiMeanBiasTrend
float normalisedChiSquared() const
int tracksUsedForVertexing_[nMaxtracks_]
int isGoodTrack_[nMaxtracks_]
TH1F * a_dxyPhiMADBiasTrend
unsigned int LuminosityBlockNumber_
TH1F * a_dxyPhiWidthTrend
int nhitsFPIX_[nMaxtracks_]
bool useTracksFromRecoVtx_
~PrimaryVertexValidation()
bool hasFirstLayerPixelHits(const reco::TransientTrack track)
virtual CachingVertex< N > vertex(const std::vector< reco::TransientTrack > &tracks) const =0
TH1F * n_dzPhiMADBiasTrend
TH1F * n_dzPhiBiasResiduals[nMaxBins_]
float degreesOfFreedom() const
double yUnbiasedVertex_[nMaxtracks_]
std::pair< std::pair< Double_t, Double_t >, std::pair< Double_t, Double_t > > fitResiduals(TH1 *hist)
GlobalPoint position() const
TH1F * n_dxyEtaResiduals[nMaxBins_]
TH1F * n_dxyPhiResiduals[nMaxBins_]
unsigned int EventNumber_
int nhitsTID_[nMaxtracks_]
double chi2() const
chi-squares
double zUnbiasedVertex_[nMaxtracks_]
TH1F * a_dzPhiMedianTrend
static bool validHitFilter(uint32_t pattern)
float chi2normUnbiasedVertex_[nMaxtracks_]
T * make(const Args &...args) const
make new ROOT object
virtual std::vector< reco::TransientTrack > select(const std::vector< reco::TransientTrack > &tracks) const =0
TH1F * n_dzEtaWidthBiasTrend
TH1F * n_dzEtaMADBiasTrend
float trackWeight(const reco::TransientTrack &track) const
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
double IPLsigFromMyVertex_[nMaxtracks_]
double dzBs_[nMaxtracks_]
double yPCA_[nMaxtracks_]
TH1F * a_dxyEtaWidthTrend
TH1F * n_dzPhiMeanBiasTrend
int nhits2D_[nMaxtracks_]
TH1F * a_dxyEtaMedianBiasTrend
EventAuxiliary const & eventAuxiliary() const
TH1F * n_dzPhiMedianBiasTrend
TH1F * a_dzPhiResiduals[nMaxBins_]
static TrackQuality qualityByName(const std::string &name)
TFileDirectory mkdir(const std::string &dir, const std::string &descr="")
create a new subdirectory
TH1F * n_dzEtaMeanBiasTrend
bool hasTrackWeight() const
bool isHit2D(const TrackingRecHit &hit) const
int nhitsTOB_[nMaxtracks_]
double chi2ndof_[nMaxtracks_]
XYZPointD XYZPoint
point in space with cartesian internal representation
void FillTrendPlot(TH1F *trendPlot, TH1F *residualsPlot[100], const TString &fitPar_, const TString &var_)
TH1F * n_dxyPhiBiasResiduals[nMaxBins_]
int nhitsTEC_[nMaxtracks_]
TrackClusterizerInZ * theTrackClusterizer_
double xPCA_[nMaxtracks_]
double xUnbiasedVertex_[nMaxtracks_]
TH1F * a_dxyPhiResiduals[nMaxBins_]
TH1F * n_dxyPhiWidthTrend
TH1F * a_dxyEtaMeanBiasTrend
TH1F * a_dxyEtaBiasResiduals[nMaxBins_]
EventID const & id() const
TH1F * a_dzEtaMedianBiasTrend
double dzFromMyVertex_[nMaxtracks_]
TH1F * n_dxyEtaWidthTrend
TH1F * a_dxyPhiMeanBiasTrend
TH1F * a_dzEtaResiduals[nMaxBins_]
TH1F * h_probeHitsInBPIX_
TH1F * h_recoVtxChi2Prob_
TH1F * h_probeHitsInFPIX_
TH1F * n_dxyEtaWidthBiasTrend
TH1F * a_dxyEtaResiduals[nMaxBins_]
std::vector< TrackBaseRef >::const_iterator trackRef_iterator
The iteratator for the vector<TrackRef>
TH1F * a_dxyBiasResidualsMap[nMaxBins_][nMaxBins_]
static bool pixelEndcapHitFilter(uint32_t pattern)
TH1F * n_dxyResidualsMap[nMaxBins_][nMaxBins_]
TH1F * n_dzPhiMedianTrend
double normalizedChi2() const
chi-squared divided by n.d.o.f.
double dxyErrorFromMyVertex_[nMaxtracks_]
DetId geographicalId() const
TH1F * n_dxyPhiWidthBiasTrend
trackRef_iterator tracks_begin() const
first iterator over tracks
float sumOfWeightsUnbiasedVertex_[nMaxtracks_]
TH1F * n_dzBiasResidualsMap[nMaxBins_][nMaxBins_]
uint32_t getHitPattern(int position) const
TH1F * n_dzEtaMedianBiasTrend
TH1F * a_dzBiasResidualsMap[nMaxBins_][nMaxBins_]
TH1F * a_dzEtaBiasResiduals[nMaxBins_]
TH1F * a_dxyEtaMedianTrend
int hasRecVertex_[nMaxtracks_]
TH1F * a_dzResidualsMap[nMaxBins_][nMaxBins_]
TH1F * n_dzEtaResiduals[nMaxBins_]
TH1F * a_dzEtaMeanBiasTrend
static bool pixelBarrelHitFilter(uint32_t pattern)
float chi2UnbiasedVertex_[nMaxtracks_]
size_t tracksSize() const
number of tracks
*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
TH1F * n_dxyPhiMedianBiasTrend
TH1F * n_dxyPhiMeanBiasTrend
Global3DVector GlobalVector
double chi2_[nMaxtracks_]
int nhitsBPIX_[nMaxtracks_]