22 if (Fname==
"" || Mom==0)
25 cout <<
"quickana.C( <input>, <mom>, <decay>, [nevt], [parms], [fastsim], [runST], [runnum], [mode] )\n\n";
26 cout <<
" <input> : input file name with PndPidCandidates\n";
27 cout <<
" <mom> : pbar momentum; negative values are interpreted as -E_cm\n";
28 cout <<
" <decay> : the decay pattern to be reconstructed, e.g. 'phi -> K+ K-; D_s+ -> phi pi-'\n";
29 cout <<
" [nevt] : number of events; default: 0 = all\n";
30 cout <<
" [parms] : parameters for the analysis, e.g. 'mwin=0.4:mwin(phi)=0.1:emin=0.1:pmin=0.1:qamc'; 'qapart' runs particle QA task\n";
31 cout <<
" [fastsim] : set true, if running fast sim (sets the PID algos properly); default: false'\n";
32 cout <<
" [runST] : if 'true' runs Software Trigger (default: false)\n";
33 cout <<
" [runnum] : integer run number (default: 0)\n";
34 cout <<
" [mode] : arbitrary mode number (default: 0)\n\n";
39 bool doreco = (anadecay !=
"" || anaparms.Contains(
"nevt"));
42 bool partQA = (anaparms.Contains(
"qapart"));
43 bool mc = !(anaparms.Contains(
"!mc")) && !(anaparms.Contains(
"qamc"));
44 bool neut = !(anaparms.Contains(
"!neut"));
45 bool chrg = !(anaparms.Contains(
"!chrg"));
53 double X = (Mom*Mom-2*mp*
mp)/(2*mp);
54 Mom =
sqrt(X*X-mp*mp);
58 TString pidalgo =
"PidAlgoEmcBayes;PidAlgoDrc;PidAlgoDisc;PidAlgoStt;PidAlgoMdtHardCuts;PidAlgoRich;PidAlgoSciT";
59 if (fastsim) pidalgo =
"PidChargedProbability";
62 anadecay.ReplaceAll(
"pbp",
"pbarpSystem");
63 anadecay.ReplaceAll(
"pbp0",
"pbarpSystem0");
67 TDatabasePDG::Instance()->AddParticle(
"pbarpSystem",
"pbarpSystem",3,kFALSE,0.1,0,
"",88888);
68 TDatabasePDG::Instance()->AddParticle(
"pbarpSystem0",
"pbarpSystem0",3,kFALSE,0.1,0,
"",88880);
72 OutFile.ReplaceAll(
".root",
"_ana.root");
76 if (!InFile.EndsWith(
".root")) InFile+=
"_fast.root";
79 FairLogger::GetLogger()->SetLogToFile(kFALSE);
81 FairRunAna*
fRun =
new FairRunAna();
82 fRun->SetGenerateRunInfo(kFALSE);
83 fRun->SetSource(
new FairFileSource(InFile));
84 fRun->SetOutputFile(OutFile);
96 TString triggercfg =
TString(gSystem->Getenv(
"VMCWORKDIR"))+
"/softrig/triggerlines.cfg";
97 if (fastsim) triggercfg =
TString(gSystem->Getenv(
"VMCWORKDIR"))+
"/softrig/triggerlines_fsim.cfg";
101 if (fastsim) stTask->SetFastSimDefaults();
102 else stTask->SetFullSimDefaults();
104 fRun->AddTask(stTask);
117 if (fastsim) anaparms+=
":algo="+pidalgo;
120 fRun->AddTask(scTask);
130 fRun->AddTask(partQaTask);
friend F32vec4 sqrt(const F32vec4 &a)
void SetPidAlgo(TString algo)
void quickana(TString Fname="", double Mom=0, TString anadecay="", int nevts=0, TString anaparms="", bool fastsim=false, bool runST=false, int run=0, int runmode=0)