本文整理汇总了C++中TString::IsDigit方法的典型用法代码示例。如果您正苦于以下问题:C++ TString::IsDigit方法的具体用法?C++ TString::IsDigit怎么用?C++ TString::IsDigit使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TString
的用法示例。
在下文中一共展示了TString::IsDigit方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Begin
//_____________________________________________________________________________
void ProofSimple::Begin(TTree * /*tree*/)
{
// The Begin() function is called at the start of the query.
// When running with PROOF Begin() is only called on the client.
// The tree argument is deprecated (on PROOF 0 is passed).
TString option = GetOption();
Ssiz_t iopt = kNPOS;
// Histos array
if (fInput->FindObject("ProofSimple_NHist")) {
TParameter<Long_t> *p =
dynamic_cast<TParameter<Long_t>*>(fInput->FindObject("ProofSimple_NHist"));
fNhist = (p) ? (Int_t) p->GetVal() : fNhist;
} else if ((iopt = option.Index("nhist=")) != kNPOS) {
TString s;
Ssiz_t from = iopt + strlen("nhist=");
if (option.Tokenize(s, from, ";") && s.IsDigit()) fNhist = s.Atoi();
}
if (fNhist < 1) {
Abort("fNhist must be > 0! Hint: proof->SetParameter(\"ProofSimple_NHist\","
" (Long_t) <nhist>)", kAbortProcess);
return;
}
if (fInput->FindObject("ProofSimple_NHist3")) {
TParameter<Long_t> *p =
dynamic_cast<TParameter<Long_t>*>(fInput->FindObject("ProofSimple_NHist3"));
fNhist3 = (p) ? (Int_t) p->GetVal() : fNhist3;
} else if ((iopt = option.Index("nhist3=")) != kNPOS) {
TString s;
Ssiz_t from = iopt + strlen("nhist3=");
if (option.Tokenize(s, from, ";") && s.IsDigit()) fNhist3 = s.Atoi();
}
// Ntuple
TNamed *nm = dynamic_cast<TNamed *>(fInput->FindObject("ProofSimple_Ntuple"));
if (nm) {
// Title is in the form
// merge merge via file
// |<fout> location of the output file if merge
// |retrieve retrieve to client machine
// dataset create a dataset
// |<dsname> dataset name (default: dataset_ntuple)
// |plot for a final plot
// <empty> or other keep in memory
fHasNtuple = 1;
TString ontp(nm->GetTitle());
if (ontp.Contains("|plot") || ontp == "plot") {
fPlotNtuple = kTRUE;
ontp.ReplaceAll("|plot", "");
if (ontp == "plot") ontp = "";
}
if (ontp.BeginsWith("dataset")) fHasNtuple = 2;
}
}
示例2: Print
void GausBF::Print(Option_t *option) const
{
TString sopt = option; sopt.ToLower();
if (sopt == "dump") {
for (Int_t i = 0; i < Ns1*Ns9*Np; i++) {
cout << Form(" %10.3e,", _par[i]);
if (i%6 == 5) cout << endl;
}
cout << endl;
}
if (sopt.BeginsWith("p")) {
TString ss = sopt(1, 2);
if (ss.IsDigit()) {
Int_t ip = ss.Atoi();
if (0 <= ip && ip < Np)
for (Int_t i = 0; i < Ns1; i++) {
for (Int_t j = 0; j < Ns9; j++) {
AMSPoint p1 = GetP1(i);
AMSPoint p9 = GetP9(j);
cout << Form("%3d %3d %6.2f %6.2f %7.2f %7.2f %10.3e",
i, j, p1.x(), p1.y(),
p9.x(), p9.y(), _par[(i*Ns9+j)*Np+ip]) << endl;
}
}
}
}
}
示例3: Begin
//_____________________________________________________________________________
void ProofSimpleFile::Begin(TTree * /*tree*/)
{
// The Begin() function is called at the start of the query.
// When running with PROOF Begin() is only called on the client.
// The tree argument is deprecated (on PROOF 0 is passed).
TString option = GetOption();
// Number of histograms (needed in terminate)
if (fInput->FindObject("ProofSimpleFile_NHist")) {
TParameter<Long_t> *p =
dynamic_cast<TParameter<Long_t>*>(fInput->FindObject("ProofSimpleFile_NHist"));
fNhist = (p) ? (Int_t) p->GetVal() : fNhist;
} else if ((iopt = option.Index("nhist=")) != kNPOS) {
TString s;
Ssiz_t from = iopt + strlen("nhist=");
if (option.Tokenize(s, from, ";") && s.IsDigit()) fNhist = s.Atoi();
}
}
示例4: Configure
// ======= FIXME: Hall A lib ================================================
//_____________________________________________________________________________
Int_t TrigBitLoc::Configure( const TObjArray* params, Int_t start )
{
// Initialize CrateLoc from given parmeters
// Load name, crate, slot, channel
Int_t ret = CrateLocMulti::Configure( params, start );
if( ret )
return ret;
// Additional parameters: lower and upper TDC cuts
cutlo = GetString( params, start+4 ).Atoi();
cuthi = GetString( params, start+5 ).Atoi();
// The bit number is determined from any trailing digits of the name,
// which must be in the range 0-31
assert( fName.Length() > 0 ); // else bug in base class Configure()
Int_t pos = fName.Length()-1, end = pos;
TString e;
do {
e = fName(pos);
} while( e.IsDigit() && pos-- > 0 );
if( pos == end ) { // No digits at the end of the name
Error( "TrigBitLoc", "Name of trigger bit variable %s must end with bit "
"number (0-31). Example: \"bit12\". Fix database.", GetName() );
return 50;
}
e = fName(pos+1,end-pos);
Int_t val = e.Atoi();
if( val < 0 || val > 31 ) {
Error( "TrigBitLoc", "Illegal bit number %d in trigger bit name %s. "
"Must be 0-31. Fix database.", val, GetName() );
return 50;
}
bitnum = val;
return 0;
}
示例5: SlaveBegin
//_____________________________________________________________________________
void ProofSimpleFile::SlaveBegin(TTree * /*tree*/)
{
// The SlaveBegin() function is called after the Begin() function.
// When running with PROOF SlaveBegin() is called on each slave server.
// The tree argument is deprecated (on PROOF 0 is passed).
TString option = GetOption();
// Number of histograms (needed in terminate)
Ssiz_t iopt = kNPOS;
if (fInput->FindObject("ProofSimpleFile_NHist")) {
TParameter<Long_t> *p =
dynamic_cast<TParameter<Long_t>*>(fInput->FindObject("ProofSimpleFile_NHist"));
fNhist = (p) ? (Int_t) p->GetVal() : fNhist;
} else if ((iopt = option.Index("nhist=")) != kNPOS) {
TString s;
Ssiz_t from = iopt + strlen("nhist=");
if (option.Tokenize(s, from, ";") && s.IsDigit()) fNhist = s.Atoi();
}
// The file for merging
fProofFile = new TProofOutputFile("SimpleFile.root", "M");
TNamed *out = (TNamed *) fInput->FindObject("PROOF_OUTPUTFILE");
if (out) fProofFile->SetOutputFileName(out->GetTitle());
TDirectory *savedir = gDirectory;
fFile = fProofFile->OpenFile("RECREATE");
if (fFile && fFile->IsZombie()) SafeDelete(fFile);
savedir->cd();
// Cannot continue
if (!fFile) {
TString amsg = TString::Format("ProofSimpleFile::SlaveBegin: could not create '%s':"
" instance is invalid!", fProofFile->GetName());
Abort(amsg, kAbortProcess);
return;
}
// Histos arrays
if (CreateHistoArrays() != 0) {
Abort("ProofSimpleFile::SlaveBegin: could not create histograms", kAbortProcess);
return;
}
// Create directory
if (!(fFileDir = fFile->mkdir("blue"))) {
Abort("ProofSimpleFile::SlaveBegin: could not create directory 'blue' in file!",
kAbortProcess);
return;
}
// Create the histograms
for (Int_t i=0; i < fNhist; i++) {
fHistTop[i] = new TH1F(Form("ht%d",i), Form("ht%d",i), 100, -3., 3.);
fHistTop[i]->SetFillColor(kRed);
fHistTop[i]->SetDirectory(fFile);
fHistDir[i] = new TH1F(Form("hd%d",i), Form("hd%d",i), 100, -3., 3.);
fHistDir[i]->SetFillColor(kBlue);
fHistDir[i]->SetDirectory(fFileDir);
}
// Set random seed
fRandom = new TRandom3(0);
}
示例6: main
int main(int argc,char *argv[])
{
string usage = "\nCNVnator ";
#ifdef CNVNATOR_VERSION
usage += CNVNATOR_VERSION;
#else
usage += "v???";
#endif
usage += "\n\nUsage:\n";
usage += argv[0];
usage += " -root out.root [-genome name] [-chrom 1 2 ...] -tree file1.bam ...\n";
usage += argv[0];
usage += " -root out.root [-genome name] [-chrom 1 2 ...] -merge file1.root ...\n";
usage += argv[0];
usage += " -root file.root [-genome name] [-chrom 1 2 ...] [-d dir] -his bin_size\n";
usage += argv[0];
usage += " -root file.root [-chrom 1 2 ...] -stat bin_size\n";
usage += argv[0];
usage += " -root file.root -eval bin_size\n";
usage += argv[0];
usage += " -root file.root [-chrom 1 2 ...] -partition bin_size [-ngc]\n";
// usage += argv[0];
//usage += " -root file.root [-chrom 1 2 ...] -spartition bin_size [-gc]\n";
usage += argv[0];
usage += " -root file.root [-chrom 1 2 ...] -call bin_size [-ngc]\n";
usage += argv[0];
usage += " -root file.root -genotype bin_size [-ngc]\n";
usage += argv[0];
usage += " -root file.root -view bin_size [-ngc]\n";
usage += argv[0];
usage += " -pe file1.bam ... -qual val(20) -over val(0.8) [-f file]\n";
usage += "\n";
usage += "Valid genomes (-genome option) are: NCBI36, hg18, GRCh37, hg19\n";
if (argc < 2) {
cerr<<"Not enough parameters."<<endl;
cerr<<usage<<endl;
return 0;
}
#ifdef USE_YEPPP
YepStatus yepStatus = yepLibrary_Init();
if (yepStatus != YepStatusOk) {
cerr<<"Yeppp library initialization failed with status "<<yepStatus<<"."<<endl;
return 1;
}
#endif
static const int OPT_TREE = 0x00001;
static const int OPT_MERGE = 0x00002;
static const int OPT_HIS = 0x00004;
static const int OPT_HISMERGE = 0x00008;
static const int OPT_STAT = 0x00010;
static const int OPT_PARTITION = 0x00020;
static const int OPT_EPARTITION = 0x00040;
static const int OPT_CALL = 0x00080;
static const int OPT_VIEW = 0x00100;
static const int OPT_GENOTYPE = 0x00200;
static const int OPT_EVAL = 0x00400;
static const int OPT_PE = 0x00800;
static const int OPT_PANEL = 0x01000;
static const int OPT_FIT = 0x02000;
static const int OPT_SPARTITION = 0x04000;
static const int OPT_HIS_NEW = 0x08000;
static const int OPT_AGGREGATE = 0x10000;
// tree, merge, his, stat, partition, spartition, call, view, genotype
int max_opts = 10000, n_opts = 0, opts[max_opts], bins[max_opts], gbin = 0;
for (int i = 0;i < n_opts;i++) bins[i] = 0;
bool useGCcorr = true,useATcorr = false;
bool forUnique = false,relaxCalling = false;
string out_root_file(""),call_file(""),group_name("");
string chroms[1000],data_files[100000],root_files[100000] = {""},dir = ".";
int n_chroms = 0,n_files = 0,n_root_files = 0,range = 128, qual = 20;
double over = 0.8;
Genome *genome = NULL;
int index = 1;
while (index < argc) {
string option = argv[index++];
if (option == "-tree" || option == "-merge" || option == "-pe") {
if (option == "-tree") opts[n_opts++] = OPT_TREE;
if (option == "-merge") opts[n_opts++] = OPT_MERGE;
if (option == "-pe") opts[n_opts++] = OPT_PE;
while (index < argc && argv[index][0] != '-')
if (strlen(argv[index++]) > 0) data_files[n_files++] = argv[index - 1];
} else if (option == "-his" || option == "-his_new" ||
option == "-hismerge" ||
option == "-stat" || option == "-eval" ||
option == "-partition" || option == "-spartition" ||
option == "-epartition" ||
option == "-call" || option == "-view" ||
option == "-genotype" || option == "-aggregate") {
int bs = 0;
if (index < argc && argv[index][0] != '-') {
TString tmp = argv[index++];
if (!tmp.IsDigit()) {
cerr<<"Bin size must be integer for option '"<<option<<"'."<<endl;
cerr<<usage<<endl;
//.........这里部分代码省略.........
示例7: SlaveBegin
//_____________________________________________________________________________
void ProofSimple::SlaveBegin(TTree * /*tree*/)
{
// The SlaveBegin() function is called after the Begin() function.
// When running with PROOF SlaveBegin() is called on each slave server.
// The tree argument is deprecated (on PROOF 0 is passed).
TString option = GetOption();
Ssiz_t iopt = kNPOS;
// Histos array
if (fInput->FindObject("ProofSimple_NHist")) {
TParameter<Long_t> *p =
dynamic_cast<TParameter<Long_t>*>(fInput->FindObject("ProofSimple_NHist"));
fNhist = (p) ? (Int_t) p->GetVal() : fNhist;
} else if ((iopt = option.Index("nhist=")) != kNPOS) {
TString s;
Ssiz_t from = iopt + strlen("nhist=");
if (option.Tokenize(s, from, ";") && s.IsDigit()) fNhist = s.Atoi();
}
if (fNhist < 1) {
Abort("fNhist must be > 0! Hint: proof->SetParameter(\"ProofSimple_NHist\","
" (Long_t) <nhist>)", kAbortProcess);
return;
}
fHist = new TH1F*[fNhist];
TString hn;
// Create the histogram
for (Int_t i=0; i < fNhist; i++) {
hn.Form("h%d",i);
fHist[i] = new TH1F(hn.Data(), hn.Data(), 100, -3., 3.);
fHist[i]->SetFillColor(kRed);
fOutput->Add(fHist[i]);
}
// 3D Histos array
if (fInput->FindObject("ProofSimple_NHist3")) {
TParameter<Long_t> *p =
dynamic_cast<TParameter<Long_t>*>(fInput->FindObject("ProofSimple_NHist3"));
fNhist3 = (p) ? (Int_t) p->GetVal() : fNhist3;
} else if ((iopt = option.Index("nhist3=")) != kNPOS) {
TString s;
Ssiz_t from = iopt + strlen("nhist3=");
if (option.Tokenize(s, from, ";") && s.IsDigit()) fNhist3 = s.Atoi();
}
if (fNhist3 > 0) {
fHist3 = new TH3F*[fNhist3];
Info("Begin", "%d 3D histograms requested", fNhist3);
// Create the 3D histogram
for (Int_t i=0; i < fNhist3; i++) {
hn.Form("h%d_3d",i);
fHist3[i] = new TH3F(hn.Data(), hn.Data(),
100, -3., 3., 100, -3., 3., 100, -3., 3.);
fOutput->Add(fHist3[i]);
}
}
// Histo with labels
if (fInput->FindObject("ProofSimple_TestLabelMerging")) {
fHLab = new TH1F("hlab", "Test merging of histograms with automatic labels", 10, 0., 10.);
fOutput->Add(fHLab);
}
// Ntuple
TNamed *nm = dynamic_cast<TNamed *>(fInput->FindObject("ProofSimple_Ntuple"));
if (nm) {
// Title is in the form
// merge merge via file
// |<fout> location of the output file if merge
// |retrieve retrieve to client machine
// dataset create a dataset
// |<dsname> dataset name (default: dataset_ntuple)
// |plot for a final plot
// <empty> or other keep in memory
fHasNtuple = 1;
TString ontp(nm->GetTitle());
if (ontp.Contains("|plot") || ontp == "plot") {
fPlotNtuple = kTRUE;
ontp.ReplaceAll("|plot", "");
if (ontp == "plot") ontp = "";
}
TString locfn("SimpleNtuple.root");
if (ontp.BeginsWith("merge")) {
ontp.Replace(0,5,"");
fProofFile = new TProofOutputFile(locfn, "M");
TString fn;
Ssiz_t iret = ontp.Index("|retrieve");
if (iret != kNPOS) {
fProofFile->SetRetrieve(kTRUE);
TString rettag("|retrieve");
if ((iret = ontp.Index("|retrieve=")) != kNPOS) {
rettag += "=";
fn = ontp(iret + rettag.Length(), ontp.Length() - iret - rettag.Length());
if ((iret = fn.Index('|')) != kNPOS) fn.Remove(iret);
rettag += fn;
}
//.........这里部分代码省略.........
示例8: TriggerInputsForMuonEventCuts
void TriggerInputsForMuonEventCuts ( TString runListFilename, TString selectedInputs="", TString defaultStorage = "raw://" )
{
AliCDBManager::Instance()->SetDefaultStorage(defaultStorage.Data());
TObjArray inputsList;
inputsList.SetOwner();
TObjArray* selectedInputsList = selectedInputs.Tokenize(",");
// Read input run list
ifstream inFile(runListFilename.Data());
TString srun = "";
if ( inFile.is_open() ) {
while ( ! inFile.eof() ) {
srun.ReadLine(inFile,kFALSE);
if ( ! srun.IsDigit() ) continue;
// For each run, read trigger inputs from OCDB
Int_t runNumber = srun.Atoi();
AliCDBManager::Instance()->SetRun(runNumber);
// Get trigger class configuration
AliCDBEntry* entry = AliCDBManager::Instance()->Get("GRP/CTP/Config");
if ( ! entry ) continue;
THashList* runInputs = new THashList();
runInputs->SetOwner();
runInputs->SetUniqueID((UInt_t)runNumber);
AliTriggerConfiguration* trigConf = (AliTriggerConfiguration*)entry->GetObject();
const TObjArray& trigInputsArray = trigConf->GetInputs();
AliTriggerInput* trigInput = 0x0;
TIter next(&trigInputsArray);
while ( ( trigInput = static_cast<AliTriggerInput*>(next()) ) ) {
if ( selectedInputsList->GetEntriesFast() > 0 && ! selectedInputsList->FindObject(trigInput->GetName()) ) continue;
Int_t inputId = (Int_t)TMath::Log2(trigInput->GetMask());
TObjString* currInput = new TObjString(trigInput->GetName());
currInput->SetUniqueID(inputId);
runInputs->Add(currInput);
}
inputsList.Add(runInputs);
}
inFile.close();
}
delete selectedInputsList;
// Loop on the trigger inputs
// and group runs with an equal list of inputs
Int_t nentries = inputsList.GetEntries();
TArrayI checkMask(nentries);
checkMask.Reset(1);
for ( Int_t irun=0; irun<nentries; irun++ ) {
if ( checkMask[irun] == 0 ) continue;
THashList* currList = static_cast<THashList*>(inputsList.At(irun));
TString runRange = Form("Run range: %u", currList->GetUniqueID());
for ( Int_t jrun=irun+1; jrun<nentries; jrun++ ) {
if ( checkMask[jrun] == 0 ) continue;
THashList* checkList = static_cast<THashList*>(inputsList.At(jrun));
Bool_t isDifferent = kFALSE;
for ( Int_t itrig=0; itrig<currList->GetEntries(); itrig++ ) {
TObjString* currInput = static_cast<TObjString*>(currList->At(itrig));
TObject* checkInput = checkList->FindObject(currInput->GetName());
if ( ! checkInput || checkInput->GetUniqueID() != currInput->GetUniqueID() ) {
isDifferent = kTRUE;
break;
}
} // loop on trigger inputs
if ( isDifferent ) continue;
checkMask[jrun] = 0;
runRange += Form(",%u", checkList->GetUniqueID());
} // loop on runs
TString outString = "\nSetTrigInputsMap(\"";
for ( Int_t itrig=0; itrig<currList->GetEntries(); itrig++ ) {
TObjString* currInput = static_cast<TObjString*>(currList->At(itrig));
outString += Form("%s:%u,",currInput->GetString().Data(), currInput->GetUniqueID());
}
outString.Append("\");\n");
outString.ReplaceAll(",\"","\"");
outString += runRange;
printf("%s\n", outString.Data());
} // loop on runs
}
示例9: plotFF
void plotFF(char * infname1 = "/net/pstore01/d00/scratch/frankma/hiroot/pythia100_5k_dijet_000777.root",
char * infname2 = "/net/pstore01/d00/scratch/frankma/hiroot/pyquen100_5k_dijet_000777.root",
// -pythia-
TString PythiaAnaNJetEtMin = "90",
TString PythiaAnaNJetEtMax = "",
TString PythiaAnaAJetEtMin = "50",
// -pyquen-
TString PyquenAnaNJetEtMin = "90",
TString PyquenAnaNJetEtMax = "",
TString PyquenAnaAJetEtMin = "50",
TString JDPhiMin = "3.0",
char * plotdir = "plots",
const Int_t NXIBIN = 10,
const Double_t XIMAX = 9.,
const Double_t XIYMAX = 10,
Bool_t check = kFALSE
)
{
cout << PythiaAnaNJetEtMin << " " << PythiaAnaNJetEtMax << " " << PythiaAnaAJetEtMin << " "
<< PyquenAnaNJetEtMin << " " << PyquenAnaNJetEtMax << " " << PyquenAnaAJetEtMin
<< endl;
//=== Setup ana cuts ===
// --Et--
TString PythiaAnaJetCut;
if (!PythiaAnaNJetEtMin.IsDigit())
terminate(Form("PythiaAnaNJetEtMin: %s is not a digit",PythiaAnaNJetEtMin.Data()));
PythiaAnaJetCut = "npet>"+PythiaAnaNJetEtMin;
if (!PythiaAnaNJetEtMax.IsNull()) {
if (!PythiaAnaNJetEtMax.IsDigit())
terminate(Form("PythiaAnaNJetEtMax: %s is not a digit",PythiaAnaNJetEtMax.Data()));
PythiaAnaJetCut += (" && npet<"+PythiaAnaNJetEtMax);
}
if (!PythiaAnaAJetEtMin.IsNull()) {
if (!PythiaAnaAJetEtMin.IsDigit())
terminate(Form("PythiaAnaAJetEtMin: %s is not a digit",PythiaAnaAJetEtMin.Data()));
PythiaAnaJetCut += (" && apet>"+PythiaAnaAJetEtMin);
}
//--
TString PyquenAnaJetCut;
if (!PyquenAnaNJetEtMin.IsDigit())
terminate(Form("PyquenAnaNJetEtMin: %s is not a digit",PyquenAnaNJetEtMin.Data()));
PyquenAnaJetCut = "npet>"+PyquenAnaNJetEtMin;
if (!PyquenAnaNJetEtMax.IsNull()) {
if (!PyquenAnaNJetEtMax.IsDigit())
terminate(Form("PyquenAnaNJetEtMax: %s is not a digit",PyquenAnaNJetEtMax.Data()));
PyquenAnaJetCut += (" && npet<"+PyquenAnaNJetEtMax);
}
if (!PyquenAnaAJetEtMin.IsNull()) {
if (!PyquenAnaAJetEtMin.IsDigit())
terminate(Form("PyquenAnaAJetEtMin: %s is not a digit",PyquenAnaAJetEtMin.Data()));
PyquenAnaJetCut += (" && apet>"+PyquenAnaAJetEtMin);
}
// --Opening angle--
TString JDPhiCut = ("apdphi>" + JDPhiMin);
PythiaAnaJetCut += (" && " + JDPhiCut);
PyquenAnaJetCut += (" && " + JDPhiCut);
// --Jet constituent--
TString AnaNPConeCut = "abs(pndphi)<0.5";
TString AnaAPConeCut = "abs(padphi)<0.5";
// --Particle pt--
TString ParticlePtCut = "ppt>0.5";
TString PythiaNearFFCut = PythiaAnaJetCut + " && " + AnaNPConeCut + " && " + ParticlePtCut;
TString PythiaAwayFFCut = PythiaAnaJetCut + " && " + AnaAPConeCut + " && " + ParticlePtCut;
TString PyquenNearFFCut = PyquenAnaJetCut + " && " + AnaNPConeCut + " && " + ParticlePtCut;
TString PyquenAwayFFCut = PyquenAnaJetCut + " && " + AnaAPConeCut + " && " + ParticlePtCut;
printf("\n=========================Cuts setup======================\n");
printf("Near Pythia FF cut: %s\n",PythiaNearFFCut.Data());
printf("Away Pythia FF cut: %s\n",PythiaAwayFFCut.Data());
printf("Near Pyquen FF cut: %s\n",PyquenNearFFCut.Data());
printf("Away Pyquen FF cut: %s\n",PyquenAwayFFCut.Data());
bool NoNorm = false;
//=== Get input files ===
//---pythia---
TFile * infile = findFile(infname1);
TNtuple * ntPythia = dynamic_cast<TNtuple*>(infile->Get("NTTruePFF"));
TNtuple * ntJetPythia = dynamic_cast<TNtuple*>(infile->Get("NTJetFF"));
TNtuple * ntJetLeadingPythia = dynamic_cast<TNtuple*>(infile->Get("NTJetLeading"));
//---pyquen---
TFile * infile2 = findFile(infname2);
TNtuple * ntPyquen = dynamic_cast<TNtuple*>(infile2->Get("NTTruePFF"));
TNtuple * ntJetPyquen = dynamic_cast<TNtuple*>(infile2->Get("NTJetFF"));
TNtuple * ntJetLeadingPyquen = dynamic_cast<TNtuple*>(infile2->Get("NTJetLeading"));
//---output---
TFile * outfile = new TFile(Form("%s/FFHistos.root",plotdir),"RECREATE");
if (check) {
printf("\n============================Do Checks======================\n");
printf("%s\n",infname1);
printf("%s\n",infname2);
//---- Check dijet properties ----
//--- inv mass ---
drawTree(ntJetPythia, "mass>>hMassPPythia","",drsgFF,"hMassPPythia","Pythia: inv mass of dijet",100,0,1800,true,kRed,1,3);
drawTree(ntJetPyquen, "mass>>hMassPPyquen","",drdbFF,"hMassPPyquen","draw Pyquen: inv mass of dijet",100,0,1800,true,kBlue,1,3);
//--- Et ---
//.........这里部分代码省略.........