本文整理汇总了C++中Track::Eta方法的典型用法代码示例。如果您正苦于以下问题:C++ Track::Eta方法的具体用法?C++ Track::Eta怎么用?C++ Track::Eta使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Track
的用法示例。
在下文中一共展示了Track::Eta方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: analyze
void analyze(){
int ifiles = 0;
bool MC = false;
bool correct = true;
double drMax = 0.2;
double ptMin = 0.3;
double ptMax = 15;
double jetPtMin = 7.;
double jetEtaMax = 2.;
double jetEMFMin = 0.01;
const int nEtBins = 8;
// === input ===
TChain* tree = new TChain("Events");
tree->Add("/d100/data/MinimumBias-ReReco/Jan29ReReco-v2/bambu/BSCNOBEAMHALO_000_*.root");
//tree->Add("/d100/data/MinimumBias-ReReco/Jan29ReReco-v2/bambu/BSCNOBEAMHALO_000_1.root");
// === ana config ===
double etBinsArray[nEtBins] = {0,5,10,15,20,30,70,120};
vector<double> etBins(etBinsArray,etBinsArray+nEtBins);
string JECLevels = "L2:L3";
//string JECTag = "900GeV_L2Relative_IC5Calo:900GeV_L3Absolute_IC5Calo";
string JECTag = "900GeV_L2Relative_AK5Calo:900GeV_L3Absolute_AK5Calo";
CombinedJetCorrector *JEC = new CombinedJetCorrector(JECLevels,JECTag);
// === setup output ===
char* outname = Form("hists.root",ifiles);
TFile* outf = new TFile(outname,"recreate");
TH1::SetDefaultSumw2();
TH1D* hptTr[nEtBins+1];
TH1D* hptGen[nEtBins+1];
TTree * tree_ = new TTree("dijetTree","dijet tree");
TreeDiJetEventData jd_;
jd_.SetTree(tree_);
jd_.SetBranches();
for(int ih = 0; ih < nEtBins+1; ++ih){
hptTr[ih] = new TH1D(Form("hptTr%d",ih),Form("Tracks in cone |#Delta R| < %f; p_{T}^{track}; N_{track}/N_{jet}",drMax),250,ptMin,ptMax);
hptGen[ih] = new TH1D(Form("hptGen%d",ih),Form("Charged Particles in cone |#Delta R| < %f; p_{T}^{chg}; N_{chg}/N_{jet}",drMax),250,ptMin,ptMax);
}
TH1D* hptJet = new TH1D("hptJet",";p_{T} [GeV];jets",100,0,20);
TH2D* hptCor = new TH2D("hptCor",";p_{T}^{raw} [GeV];p_{T}^{corrected} [GeV]",100,0,20,100,0,20);
TH1D* hDR = new TH1D("hDR",";#Delta R;tracks",100,0,3.2);
TH1D* hFFz = new TH1D("hFFz","",100,0,1.2);
TH1D* hXi = new TH1D("hXi","",100,-2,8);
TH1D* hFFzGen = new TH1D("hFFzGen","",100,0,1.2);
TH1D* hXiGen = new TH1D("hXiGen","",100,-2,8);
// === setup branches
mithep::Array<mithep::CaloJet> *jets;
mithep::Array<mithep::Track> *tracks;
mithep::Array<mithep::Vertex> *vertices;
mithep::L1TriggerMask *L1T;
mithep::L1TriggerMask *L1A;
mithep::Array<mithep::MCParticle> *genparticles;
mithep::Array<mithep::GenJet> *genjets;
mithep::EventHeader *evInfo;
//tree->SetBranchAddress("ItrCone5Jets",&jets);
tree->SetBranchAddress("AKt5Jets",&jets);
tree->SetBranchAddress("Tracks",&tracks);
tree->SetBranchAddress("PrimaryVertexes",&vertices);
tree->SetBranchAddress("L1TechBitsBeforeMask",&L1T);
tree->SetBranchAddress("L1AlgoBitsBeforeMask",&L1A);
tree->SetBranchAddress("EventHeader",&evInfo);
/*
if(MC){
tree->SetBranchAddress("MCParticles",&genparticles);
tree->SetBranchAddress("IC5GenJets",&genjets);
}
*/
int nevents = tree->GetEntries();
int nevtrig = 0;
double njet[nEtBins] = {0.,0.,0.,0.,0.,0.,0.,0.};
double ngenjet[nEtBins] = {0.,0.,0.,0.,0.,0.,0.,0.};
// nevents = 50;
for(int iev = 0; iev < nevents; ++iev){
tree->GetEntry(iev);
// clear jet data
jd_.ClearCounters();
// trigger info
bool A0 = L1A->Get().TestBit(0);
// run level
UInt_t runNum=evInfo->RunNum();
//.........这里部分代码省略.........