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


C++ HiForest::isSpike方法代码示例

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


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

示例1: forest2yskim_jetSkim_forestV3_noEleRejection


//.........这里部分代码省略.........
		if (colli ==kHIMC) {
			if ( evt.ptHat < 50  )       evt.ptHatWeight = 9008/16237. ;
			else if ( evt.ptHat < 80  )       evt.ptHatWeight = 3750/85438. ;
			else   evt.ptHatWeight =  1191/140432. ;
		}
        else if ( colli == kPPMC) { // pp has only 4 pthat samples
            if ( evt.ptHat > 30 && evt.ptHat < 50  )       evt.ptHatWeight = 156861/156861. ;
            else if ( evt.ptHat > 50 && evt.ptHat < 80  )       evt.ptHatWeight = 33610/193462. ;
            else if ( evt.ptHat > 80 && evt.ptHat < 120  )       evt.ptHatWeight = 5757/195174. ;
            else   evt.ptHatWeight = 1272/236703. ;
            //  if ( evt.ptHat < 50  )       evt.ptHatWeight = 9008/9008. ;
            //  else if ( evt.ptHat < 80  )       evt.ptHatWeight = 3750/40109. ;
            //  else   evt.ptHatWeight = 1191/66934. ;
    	}
		else if ( colli == kPAMC) { 
			if ( evt.ptHat > 30 && evt.ptHat < 50  )       evt.ptHatWeight = 62744/62744. ;
			else if ( evt.ptHat > 50 && evt.ptHat < 80  )       evt.ptHatWeight = 29499/107309. ;
			else if ( evt.ptHat > 80 && evt.ptHat < 120  )       evt.ptHatWeight = 7640/106817. ;
			else if ( evt.ptHat > 120 && evt.ptHat < 170  )       evt.ptHatWeight = 1868/104443. ;
			else   evt.ptHatWeight = 649/139647. ;
		}



		for (int j=0;j< c->photon.nPhotons;j++) {

			if (  ( c->photon.pt[j] > preCutPhotonEt ) && ( fabs( c->photon.eta[j] ) < cutphotonEta ) ) {
				newPt[j] = c->getCorrEt(j);
			}
			else
				newPt[j] = c->photon.pt[j] - 10000;

		//	if ( (c->isSpike(j)) || (c->photon.hadronicOverEm[j]>0.2) || (c->photon.isEle[j]))  // Electron Rejection should be default.
			if ( (c->isSpike(j)) || (c->photon.hadronicOverEm[j]>0.2) ) //||  (c->photon.isEle[j])  // This is for no Electron Rejection case.
				newPt[j] = newPt[j] - 20000;
			if (c->photon.seedTime[j] ==0 )   // clustering bug
				newPt[j] = newPt[j] - 30000;

			corrPt[j] = newPt[j];
		}

		TMath::Sort(c->photon.nPhotons, newPt, order);


		// Select the leading photon
		gj.clear();
		int leadingIndex=-1;
		for (int j=0;j<c->photon.nPhotons;j++) {
			if ( c->photon.pt[j]  < preCutPhotonEt ) continue;
			if ( fabs(c->photon.eta[j]) > cutphotonEta ) continue;
			if (c->isSpike(j)) continue;
			//   if (!(c->isLoosePhoton(j))) continue;
			if (c->photon.hadronicOverEm[j]>0.1) continue;
			if ((c->photon.rawEnergy[j]/c->photon.energy[j])<0.5) continue;



			// sort using corrected photon pt
			float theCorrPt= corrPt[j];
			if ( theCorrPt > gj.photonEt) {
				gj.photonEt = theCorrPt;
				leadingIndex = j;
			}
		}
		//    if ( (gj.photonEt < cutphotonPt) )    <== This cut ruins the ptHat weighting factor
		//  continue;
开发者ID:CmsHI,项目名称:gammaJetAnalysis,代码行数:67,代码来源:forest2yskim_jetSkim_forestV3_noEleRejection.C


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