本文整理汇总了C++中TVector2::Y方法的典型用法代码示例。如果您正苦于以下问题:C++ TVector2::Y方法的具体用法?C++ TVector2::Y怎么用?C++ TVector2::Y使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TVector2
的用法示例。
在下文中一共展示了TVector2::Y方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: testPadDimensions
void testPadDimensions(AliMq::Station12Type station, AliMp::PlaneType plane)
{
AliMpDataProcessor mp;
AliMpDataMap* dataMap = mp.CreateDataMap("data");
AliMpDataStreams dataStreams(dataMap);
AliMpSectorReader r(dataStreams, station, plane);
AliMpSector* sector = r.BuildSector();
AliMpSectorSegmentation segmentation(sector);
segmentation.PrintZones();
TVector2 previousDimensions;
for (Int_t i=1; i<segmentation.MaxPadIndexX()+1;i++)
for (Int_t j=1;j<segmentation.MaxPadIndexY()+1;++j) {
if ( segmentation.HasPadByIndices(i,j) ) {
// Check pad dimensions
AliMpPad pad = segmentation.PadByIndices(i,j);
TVector2 dimensions = segmentation.PadDimensions(segmentation.Zone(pad));
if ( dimensions.X() != previousDimensions.X() ||
dimensions.Y() != previousDimensions.Y() ) {
// Print dimensions
cout << "Pad: " << "(" << i << "," << j << ")";
cout << " dimensions: (" << dimensions.X() << ", " << dimensions.Y() << ")"
<< endl;
previousDimensions = dimensions;
}
}
}
}
示例2: Discretize
std::vector<unsigned int> HashTable::FindNN(TVector2 position) {
std::vector<unsigned int> results;
std::vector<unsigned int> cell;
TVector2 min = Discretize(position) - TVector2(_NG_H_,_NG_H_);
TVector2 max = Discretize(position) + TVector2(_NG_H_,_NG_H_);
for(TVector2 it(min); it.X() <= max.X() ; it.Set(it.X()+1,it.Y())) {
for(it.Set(it.X(),min.Y());it.Y() <= max.Y(); it.Set(it.X(),it.Y()+1)) {
cell.clear();
cell = hashTable[GetHash(it)];
results.insert(results.end(), cell.begin(), cell.end());
}
}
return results;
}
示例3: getCeF3Position
void getCeF3Position( std::vector<float> cef3, float& xPos, float& yPos ) {
xPos=0.;
yPos=0.;
float r02 = cef3[0]/cef3[2];
float r13 = cef3[1]/cef3[3];
TF1* f1_d02 = getCef3Function("diag02");
TF1* f1_d13 = getCef3Function("diag13");
float diag02 = f1_d02->GetX(r02, -50., 50.);
float diag13 = f1_d13->GetX(r13, -50., 50.);
TVector2 v( diag13, diag02 );
float pi = 3.14159;
float theta = pi/4.; // 45 degrees
TVector2 d = v.Rotate(+theta);
xPos = d.X();
yPos = d.Y();
//xPos = diag02;
//yPos = diag13;
delete f1_d02;
delete f1_d13;
}
示例4: X
matrixstack::Vector::Vector(const TVector2 &v): TVectorT<double>(2)
{
X() = v.X();
Y() = v.Y();
}
示例5: GetHash
unsigned int HashTable::GetHash(TVector2 position) {
unsigned long int x = (unsigned long int) position.X();
unsigned long int y = (unsigned long int) position.Y();
return ((x*_HT_P1_)^(y*_HT_P2_))%_HT_NH_;
}
示例6:
inline TVector3 Pi_versor_reco_from_2hits(double deltaz, TVector2 hit1, TVector2 hit2)
{
double px = (hit2.X() - hit1.X())/deltaz;
double py = (hit2.Y() - hit1.Y())/deltaz;
return TVector3(px, py, 1);
}
示例7:
HHKinFit2::HHFitObjectMET::HHFitObjectMET(TVector2 const& v,TVector2 const& vfit)
:HHFitObject(HHLorentzVector(v.X(),v.Y(),0,sqrt(v.X()*v.X()+v.Y()*v.Y()))){
this->setFit4Vector(HHLorentzVector(vfit.X(),vfit.Y(),0,sqrt(vfit.X()*vfit.X()+vfit.Y()*vfit.Y())));
}
示例8: main
int main( int argc, char* argv[] ) {
std::string runName = "precalib_BGO_pedestal_noSource";
if( argc>1 ) {
std::string runName_str(argv[1]);
runName = runName_str;
}
std::string tag = "V00";
if( argc>2 ) {
std::string tag_str(argv[2]);
tag = tag_str;
}
TString runName_tstr(runName);
bool isOnlyRunNumber = !(runName_tstr.BeginsWith("BTF_"));
TChain* tree = new TChain("recoTree");
if( isOnlyRunNumber ) {
std::cout << "-> We believe you are passing the program only the run number!" << std::endl;
std::cout << "-> So for instance you are passing '246' for run 'BTF_246_20140501-212512_beam'" << std::endl;
std::cout << "(if this is not the case this means TROUBLE)" << std::endl;
std::cout << "-> Will look for runs matching run number: " << runName << std::endl;
tree->Add(Form("analysisTrees_%s/Reco_BTF_%s_*beam.root/recoTree", tag.c_str(), runName.c_str()) );
if( tree->GetEntries()==0 ) {
std::cout << "WARNING! Didn't find any events matching run: " << runName << std::endl;
std::cout << "Exiting" << std::endl;
exit(1913);
}
} else {
std::string fileName = "analysisTrees_"+tag+"/Reco_" + runName + ".root";
TFile* file = TFile::Open(fileName.c_str());
if( file==0 ) {
std::cout << "ERROR! Din't find file " << fileName << std::endl;
std::cout << "Exiting." << std::endl;
exit(11);
}
tree = (TChain*)file->Get("recoTree");
}
UInt_t evtNumber;
tree->SetBranchAddress( "evtNumber", &evtNumber );
UInt_t adcData[40];
tree->SetBranchAddress( "adcData", adcData );
UInt_t adcBoard[40];
tree->SetBranchAddress( "adcBoard", adcBoard );
UInt_t adcChannel[40];
tree->SetBranchAddress( "adcChannel", adcChannel );
unsigned int runNumber;
int nHodoFibersX;
int nHodoFibersY;
int nHodoClustersX;
int nHodoClustersY;
float cef3_corr[CEF3_CHANNELS];
float bgo_corr[BGO_CHANNELS];
float scintFront;
float pos_hodoClustX[HODOX_CHANNELS];
float pos_hodoClustY[HODOY_CHANNELS];
int nFibres_hodoClustX[HODOX_CHANNELS];
int nFibres_hodoClustY[HODOY_CHANNELS];
float xBeam, yBeam;
bool isSingleEle_scintFront;
bool cef3_ok;
bool cef3_corr_ok;
bool bgo_ok;
bool bgo_corr_ok;
tree->SetBranchAddress( "runNumber", &runNumber );
tree->SetBranchAddress( "scintFront", &scintFront );
tree->SetBranchAddress( "cef3_corr", cef3_corr );
tree->SetBranchAddress( "bgo_corr", bgo_corr );
tree->SetBranchAddress( "nHodoFibersX", &nHodoFibersX );
tree->SetBranchAddress( "nHodoFibersY", &nHodoFibersY );
tree->SetBranchAddress( "nHodoClustersX", &nHodoClustersX );
tree->SetBranchAddress( "pos_hodoClustX", pos_hodoClustX );
tree->SetBranchAddress( "nFibres_hodoClustX", nFibres_hodoClustX );
tree->SetBranchAddress( "nHodoClustersY", &nHodoClustersY );
tree->SetBranchAddress( "pos_hodoClustY", pos_hodoClustY );
tree->SetBranchAddress( "nFibres_hodoClustY", nFibres_hodoClustY );
tree->SetBranchAddress( "scintFront", &scintFront );
tree->SetBranchAddress( "isSingleEle_scintFront", &isSingleEle_scintFront );
tree->SetBranchAddress( "xBeam", &xBeam );
tree->SetBranchAddress( "yBeam", &yBeam );
tree->SetBranchAddress( "cef3_ok", &cef3_ok );
tree->SetBranchAddress( "cef3_corr_ok", &cef3_corr_ok );
tree->SetBranchAddress( "bgo_ok", &bgo_ok );
tree->SetBranchAddress( "bgo_corr_ok", &bgo_corr_ok );
//.........这里部分代码省略.........