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


C++ TLorentzVector::RotateY方法代码示例

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


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

示例1: rotate

TLorentzVector rotate(TLorentzVector v, Float_t theta, Float_t phi){
    v.RotateX(theta);
    v.RotateY(phi);
    return v;

}
开发者ID:JeffersonLab,项目名称:LightIonEIC,代码行数:6,代码来源:lorentz_transform.cpp

示例2: sqrtBins


//.........这里部分代码省略.........
			bool triggerFired = false;
			bool fromKaon = false;
			bool passInitialCut_B = false;
			bool passInitialCut_Y = false;
			bool passDCAcut = false;

			StTriggerId trigId = pair1->triggerIds();
						
			//JP0,JP1,JP2,AJP
			if (trigId.isTrigger(370601) || trigId.isTrigger(370611) || trigId.isTrigger(370621) || trigId.isTrigger(370641))
			{
				triggerFired = true;
			}
			
			//BHT0VPD,BHT1VPD,BHT2BBC,BHT2
			if (trigId.isTrigger(370501) || trigId.isTrigger(370511) || trigId.isTrigger(370522) || trigId.isTrigger(370531))
			{
				triggerFired = true;
			}
			
			
			if (triggerFired)
			{
				
				blueFillNo   = pair1->runInfo().beamFillNumber(1); //1 = blue beam
				yellowFillNo = pair1->runInfo().beamFillNumber(0); //0 = yellow beam 

				sum = pair1->piPlusLV() + pair1->piMinusLV();
				sumB = sum; //blue beam.
				
				
				//yellow beam must rotate around y axis by pi so the eta cut can be the same for both beams. 				
				sumY = sum;
				sumY.RotateY(PI);

				//blue low limit eta is 0 yellow high limit eta is 0 this is a test
				if (sumB.Pt() >= lowLimitPt && sumB.Pt() <= hiLimitPt && sumB.M() >= lowLimitMass && sumB.M() <= hiLimitMass && sumB.Eta() >= lowLimitEta && sumB.Eta() <= hiLimitEta)
				{
					passInitialCut_B = true;
				}
				if (sumY.Pt() >= lowLimitPt && sumY.Pt() <= hiLimitPt && sumY.M() >= lowLimitMass && sumY.M() <= hiLimitMass && sumY.Eta() >= yellowLowLimitEta && sumY.Eta() <= hiLimitEta)
				{
					passInitialCut_Y = true;
				}
				
				if (passInitialCut_B && useBlueBeam)
				{
					//BLUE BEAM SPIN UP: spin bin 9 and 10
					if (pair1->spinBit() == 9 || pair1->spinBit() == 10)
					{						
						fillCorrectPtBin(hNumberUp_Pt, sumB, pair1->phiSR('b'), polOfBin_Pt, polarizationOfFill_B[blueFillNo],hPt);
						fillCorrectMassBin(hNumberUp_Mass, sumB, pair1->phiSR('b'), polOfBin_Mass, polarizationOfFill_B[blueFillNo],hMass);
						if(fullEta){fillCorrectEtaBin(hNumberUp_Eta, sumB, pair1->phiSR('b'), polOfBin_Eta, polarizationOfFill_B[blueFillNo],hEta);}
						
					}
					
					//BLUE BEAM SPIN DOWN: spin bin 5 and 6
					if (pair1->spinBit() == 5 || pair1->spinBit() == 6)
					{
						fillCorrectPtBin(hNumberDown_Pt, sumB, pair1->phiSR('b'), polOfBin_Pt, polarizationOfFill_B[blueFillNo],hPt);
						fillCorrectMassBin(hNumberDown_Mass, sumB, pair1->phiSR('b'), polOfBin_Mass, polarizationOfFill_B[blueFillNo],hMass);
						if(fullEta){fillCorrectEtaBin(hNumberDown_Eta, sumB, pair1->phiSR('b'), polOfBin_Eta, polarizationOfFill_B[blueFillNo],hEta);}
			
					}
				}//done with blue beam
				
开发者ID:keithdlandry,项目名称:2012IFF,代码行数:66,代码来源:copy_5_2_sqrtBins.C

示例3: sqrtByFill


//.........这里部分代码省略.........
			bool triggerFired = false;
			bool fromKaon = false;
			bool passInitialCut_B = false;
			bool passInitialCut_Y = false;
			bool passDCAcut = false;
			
			StTriggerId trigId = pair1->triggerIds();
			
			//JP0,JP1,JP2,AJP
			if (trigId.isTrigger(370601) || trigId.isTrigger(370611) || trigId.isTrigger(370621) || trigId.isTrigger(370641))
			{
				triggerFired = true;
			}
			
			//BHT0VPD,BHT1VPD,BHT2BBC,BHT2
			if (trigId.isTrigger(370501) || trigId.isTrigger(370511) || trigId.isTrigger(370522) || trigId.isTrigger(370531))
			{
				triggerFired = true;
			}
			
			
			if (triggerFired)
			{
				
				blueFillNo   = pair1->runInfo().beamFillNumber(1); //1 = blue beam
				yellowFillNo = pair1->runInfo().beamFillNumber(0); //0 = yellow beam 
				
				sum = pair1->piPlusLV() + pair1->piMinusLV();
				sumB = sum; //blue beam.
				
				
				//yellow beam must rotate around y axis by pi so the eta cut can be the same for both beams. 				
				sumY = sum;
				sumY.RotateY(PI);

				if (sumB.Pt() >= lowLimitPt && sumB.Pt() <= hiLimitPt && sumB.M() >= lowLimitMass && sumB.M() <= hiLimitMass && sumB.Eta() >= lowLimitEta && sumB.Eta() <= hiLimitEta)
				{
					passInitialCut_B = true;
				}
				if (sumY.Pt() >= lowLimitPt && sumY.Pt() <= hiLimitPt && sumY.M() >= lowLimitMass && sumY.M() <= hiLimitMass && sumY.Eta() >= lowLimitEta && sumY.Eta() <= hiLimitEta)
				{
					passInitialCut_Y = true;
				}
				
				if (passInitialCut_B && useBlueBeam)
				{
					//BLUE BEAM SPIN UP: spin bin 9 and 10
					if (pair1->spinBit() == 9 || pair1->spinBit() == 10)
					{						
						hNumberUp->Fill(pair1->phiSR('b'));
						phiSRbin = hNumberUp->FindBin(pair1->phiSR('b'));
						
						polOfBin[phiSRbin-1]->Fill(polarizationOfFill_B[blueFillNo]);
						/*if (iPair > 39000)
						{
							cout << "polarization = " << polarizationOfFill_B[blueFillNo] << "  " << blueFillNo << endl;
						}*/
						
						
					}
					
					//BLUE BEAM SPIN DOWN: spin bin 5 and 6
					if (pair1->spinBit() == 5 || pair1->spinBit() == 6)
					{
						hNumberDown->Fill(pair1->phiSR('b'));
						phiSRbin = hNumberDown->FindBin(pair1->phiSR('b'));
开发者ID:keithdlandry,项目名称:2012IFF,代码行数:67,代码来源:sqrtByFill.C

示例4: figureOutpiover2


//.........这里部分代码省略.........
            {
                fromKaon = true;
            }



            if (triggerFired)
            {


                blueFillNo   = pair1->runInfo().beamFillNumber(1); //1 = blue beam
                yellowFillNo = pair1->runInfo().beamFillNumber(0); //0 = yellow beam

                //cout << blueFillNo << "  " << yellowFillNo << endl;


                if (polarizationOfFill_B[blueFillNo] == 0 || polarizationOfFill_Y[yellowFillNo] == 0)
                {
                    continue;
                }


                hInvarM->Fill(pair1->invarientMass());

                TVector3 spinVec;


                sum = pair1->piPlusLV() + pair1->piMinusLV();
                sumB = sum; //blue beam.


                //yellow beam must rotate around y axis by pi so the eta cut can be the same for both beams.
                sumY = sum;
                sumY.RotateY(PI);


                double randomSpin = r.Uniform(0, 1);

                int randomSpinBit;

                if (randomSpin >=0 && randomSpin <0.25)  {
                    randomSpinBit = 5;
                }
                if (randomSpin >=0.25 && randomSpin <0.5) {
                    randomSpinBit = 6;
                }
                if (randomSpin >=0.5 && randomSpin <0.75) {
                    randomSpinBit = 9;
                }
                if (randomSpin >=0.75 && randomSpin <1.0) {
                    randomSpinBit = 10;
                }


                //CHECK CUTS
                if (sumB.Pt() > ptCutLo && sumB.Pt() < ptCutHi && sumB.M() > mCutLo && sumB.M() < mCutHi && sumB.Eta() > etaCutLo && sumB.Eta() < etaCutHi && useBlueBeam == true)
                {

                    //BLUE BEAM SPIN UP: spin bin 9 and 10
                    if (pair1->spinBit() == 9 || pair1->spinBit() == 10)
                    {
                        bin = hNumberUp->FindBin(pair1->phiSR('b'));
                        //hNumberUp->Fill(pair1->phiSR('b'));


开发者ID:keithdlandry,项目名称:2012IFF,代码行数:64,代码来源:figureOutpiover2.C

示例5: sqrtMethodSameSign


//.........这里部分代码省略.........
			
			if (pair1->invarientMass() > .4921 && pair1->invarientMass() < .4990)
			{
				fromKaon = true;
			}
			
			
			
			if (triggerFired)
			{
				
				
				blueFillNo   = pair1->runInfo().beamFillNumber(1); //1 = blue beam
				yellowFillNo = pair1->runInfo().beamFillNumber(0); //0 = yellow beam 
				
				//cout << blueFillNo << "  " << yellowFillNo << endl;
				
				
				if (polarizationOfFill_B[blueFillNo] == 0 || polarizationOfFill_Y[yellowFillNo] == 0) //0 is gap
				{
					continue;
				}
				
				
				hInvarM->Fill(pair1->invarientMass());
				
				
				sum = pair1->pion1LV() + pair1->pion2LV();
				sumB = sum; //blue beam.
				
				
				//yellow beam must rotate around y axis by pi so the eta cut can be the same for both beams. 				
				sumY = sum;
				sumY.RotateY(PI);
				
				//cout << pair1->phiS('y')-pair1->phiR('y') << "   " << pair1->phiSR('y') << endl;
				
				//option for randomizing spin
				if (randomizeSpin)
				{
					
					int origSpinBit = pair1->spinBit();
					
					double randomSpin = r.Uniform(0, 1);
					
					int randomSpinBit;
					
					if (randomSpin >=0 && randomSpin <0.25)  {randomSpinBit = 5; rand5++;}
					if (randomSpin >=0.25 && randomSpin <0.5){randomSpinBit = 6; rand6++;}
					if (randomSpin >=0.5 && randomSpin <0.75){randomSpinBit = 9; rand9++;}
					if (randomSpin >=0.75 && randomSpin <1.0){randomSpinBit = 10; rand10++;}
					
					
					
					pair1->setSpinBit(randomSpinBit);
					
					
					
				}
				
				
				//cout << pair1->sinPhiSR('b') << "   " << pair1->cosPhiSR('b') << "   " << pair1->phiSR('b') << endl;
				
				
				//MANUALLY ALTER ANGLES FOR TESTING-----
				/*
开发者ID:keithdlandry,项目名称:2012IFF,代码行数:67,代码来源:sqrtMethodSameSign.C


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