当前位置: 首页>>代码示例>>C++>>正文


C++ Track::D0Err方法代码示例

本文整理汇总了C++中Track::D0Err方法的典型用法代码示例。如果您正苦于以下问题:C++ Track::D0Err方法的具体用法?C++ Track::D0Err怎么用?C++ Track::D0Err使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Track的用法示例。


在下文中一共展示了Track::D0Err方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: analyze


//.........这里部分代码省略.........
    double ljdphi = TMath::Abs(reco::deltaPhi(phijet0,phijet1));
    cout << "   leading jets dphi: " << ljdphi << endl;
    // -- Fill jet info --
    // fill dijet info
    jd_.jdphi_	       = ljdphi;
    jd_.mass_	       = (jet0p4+jet1p4).M();

    // near/away info
    jd_.nljet_         = ptjet0;
    jd_.nljeta_	       = etajet0;
    jd_.nljphi_        = phijet0;
    jd_.nljemf_        = jet0->EnergyFractionEm();

    jd_.aljet_         = ptjet1;
    jd_.aljeta_	       = etajet1;
    jd_.aljphi_        = phijet1;
    jd_.aljemf_        = jet1->EnergyFractionEm();

    // === Track Level ===
    int ntracks = tracks->GetEntries();
    int nHP = 0;
    int selTrkCt = 0;
    for(int j = 0; j < ntracks; ++j){
      Track* track = (Track*)(tracks->At(j));

      double pttrack = track->Pt();
      double etatrack = track->Eta();
      double phitrack = track->Phi();


      mithep::TrackQuality& quality = track->Quality();

      if(0){
	double d0err = track->D0Err();
	double sigXY = sqrt(d0err*d0err + 0.04*0.04);
	double qope = track->QOverPErr();
	double lambdaerr = track->LambdaErr();
	double pz = track->Pz();
	int chg = track->Charge();
      }

      bool highPurity = quality.QualityMask().TestBit(2);
      //cout << "highPurity?: " << quality.QualityMask().TestBit(2) << endl;
      bool goodTrack = highPurity;
      if (highPurity) ++nHP;

      //if(!goodTrack) continue;
      //cout << "sel track: " << selTrkCt << " pt eta phi: " << pttrack << "|" << etatrack << "|" << phitrack << endl;

      // -- Fill Tracks --
      // fill frag candidates basic info
      jd_.trkNHits_[selTrkCt]      = track->NHits();
      jd_.trkHP_[selTrkCt]      = highPurity;
      jd_.ppt_[selTrkCt]      = pttrack;
      jd_.peta_[selTrkCt]     = etatrack;
      jd_.pphi_[selTrkCt]     = phitrack;

      // Relations to jet
      jd_.pndphi_[selTrkCt]   = TMath::Abs(reco::deltaPhi(phitrack,phijet0));
      jd_.pndeta_[selTrkCt]   = etatrack - etajet0;
      jd_.pndr_[selTrkCt]     = reco::deltaR(etatrack,phitrack,etajet0,phijet0);

      jd_.padphi_[selTrkCt]   = TMath::Abs(reco::deltaPhi(phitrack,phijet1));
      jd_.padeta_[selTrkCt]   = etatrack - etajet1;
      jd_.padr_[selTrkCt]     = reco::deltaR(etatrack,phitrack,etajet1,phijet1);
开发者ID:CmsHI,项目名称:CVS_SavedFMa,代码行数:66,代码来源:analyze.C


注:本文中的Track::D0Err方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。