24 #include "FairRootManager.h" 
   25 #include "FairRunAna.h" 
   26 #include "FairRuntimeDb.h" 
   28 #include "FairRuntimeDb.h" 
   31 #include "TClonesArray.h" 
   37 #include "TMVA/Reader.h" 
   91 typedef std::map<int, PndSoftTriggerLine*>::iterator 
TrigIt;
 
   94 int fSTPidIndex[16] =       {-11, 11, -13, 13, 211, -211, 321, -321, 2212, -2212, 22, 111, 310, 221,   0,   0};
 
  108     "eslnpide"     , 
"eslnpidmu"    , 
"eslnpidpi"    , 
"eslnpidk"     , 
"eslnpidp"     , 
 
  109     "esfw1"        , 
"esfw2"        , 
"esfw3"        , 
"esfw4"        , 
"esfw5"        , 
 
  110     "esapl"        , 
"escir"        , 
"espla"        , 
"esnneut"      , 
"esnpart"      , 
 
  111     "esnchrg"      , 
"espmax"       , 
"espmaxl"      , 
"espmin"       , 
"espminl"      , 
 
  112     "esprapmax"    , 
"esptmax"      , 
"essumen"      , 
"essumenl"     , 
"essumetn"     , 
 
  113     "essumpc"      , 
"essumpc05"    , 
"essumpcl"     , 
"essumpt"      , 
"essumptc"     , 
 
  114     "esthr"        , 
"essph"        , 
"esptmin"      , 
"esncp10l"     , 
"esnne10l" 
  119 TString fSTVarSuff[] = {
"pt",
"tht",
"pcm",
"thtcm",
"pide",
"pidmu",
"pidpi",
"pidk",
"pidp", 
"pidmax",
"pocqa",
"pocdist",
"pocctau",
"oang",
"cdecang",
"decang",
"p" };
 
  120 int   fSTQuantCode[] = { 11,  12,   13,   14,      20,    21,     22,     23,    24,     25,     30,     31,       32,      40,     42,      41,      10 };
 
  135         FairTask(
"Panda Softtrigger Task"),
 
  136         fVerbose(0), fMode(mode), fEvtCount(0), fRunNum(runnum), fSigCount(0), fNsigTag(8.0), fNsigAux(3.0), fDstMDiffCut(10.),
 
  137         fTriggerFileName(trigfilename), fPhotosMax(0), fPhotosThresh(0.05), 
 
  138         fIniP4(0,0,0,0), fEcm(0.), fPbarMom(pmom),
 
  139         fQAPi0(false),fQAEta(false),fQAKs0(false),fQAEvent(false), fQAMc(false), fQAMctOnly(false),
 
  140         fGammaMinE(0.03), fPi0MinE(0.0), fEtaMinE(0.0), fTrackMinP(0.15), fIniPidCut(0.0),
 
  141         fPi0Sel(NULL), fEtaSel(NULL), fKs0Sel(NULL),
 
  142         fMomentumSel(NULL), fEnergySel(NULL),
 
  143         ntp(0), nks0(0), npi0(0), neta(0), nmc(0), 
 
  147         fPdg = TDatabasePDG::Instance();
 
  150         double ppwidth = 0.01;
 
  151         fPdg->AddParticle(
"pbarpSystem", 
"pbar p", 
fEcm, 
false, ppwidth,0,
"",88888);
 
  152         fPdg->AddParticle(
"pbarpSystem0",
"pbar p", 
fEcm, 
false, ppwidth,0,
"",88880);
 
  153         fPdg->AddParticle(
"pbarpSystem1",
"pbar p", 
fEcm, 
false, ppwidth,0,
"",88881);
 
  154         fPdg->AddParticle(
"pbarpSystem2",
"pbar p", 
fEcm, 
false, ppwidth,0,
"",88882);
 
  156         fPdg->AddParticle(
"pbarnSystem", 
"pbar n", 
fEcm, 
false, ppwidth,0,
"",88887);
 
  157         fPdg->AddParticle(
"pbardSystem", 
"pbar d", 
fEcm, 
false, ppwidth,0,
"",88889);
 
  159         double mp = 
fPdg->GetParticle(
"proton")->Mass(); 
 
  167         fAlgoElectron   = 
"PidAlgoEmcBayes;PidAlgoDrc;PidAlgoDisc;PidAlgoStt;PidAlgoMdtHardCuts";
 
  186                 cout <<
"Reading default trigger lines file "<<
fTriggerFileName.Data()<<endl;
 
  205         TString selectioncfg = 
TString(gSystem->Getenv(
"VMCWORKDIR"))+
"/softrig/selection_fsim_dec2014.cfg"; 
 
  228         TString selectioncfg = 
TString(gSystem->Getenv(
"VMCWORKDIR"))+
"/softrig/selection_full_jan2015.cfg"; 
 
  242         SetPidAlgoAll(
"PidAlgoEmcBayes;PidAlgoDrc;PidAlgoDisc;PidAlgoStt;PidAlgoMdtHardCuts;PidAlgoMvd");
 
  267         TDirectory *dir = gDirectory;
 
  316         if (
fApplyFullSelection && diff>1.0) cout <<
"[PndSoftTriggerTask::Init] **** WARNING: Energy of best matching selection differs "<<diff<<
" GeV from current energy!"<<endl;
 
  330                                 cout <<
"*** MODE: "<<it->first<<endl;
 
  343                 cout <<
"[PndSoftTriggerTask] **** Selection setup:"<<endl;
 
  344                 for (std::map<int,STCutSet>::iterator it=
fSTSelmap.begin(); it!=
fSTSelmap.end(); ++it)
 
  346                         std::cout << it->first << 
" => ";
 
  352                                 cout<<
"  TMVA cut:"<<cs.
tmvacut<<
"  vars:";
 
  365         double Pi0Mass = 
DbMass(
"pi0");
 
  366         double EtaMass = 
DbMass(
"eta");
 
  367         double Ks0Mass = 
DbMass(
"K_S0");
 
  414         if (mode<10) divi=100;
 
  415         else if (mode<100) divi=10;
 
  418                 if (it->first/divi == mode) it->second->SetWriteQA(qa);
 
  442         if (mode<10) divi=100;
 
  443         else if (mode<100) divi=10;
 
  446                 if (it->first/divi == mode) it->second->SetTagActive(tag);
 
  456                 it->second->SetTagActive(tag);
 
  473                 it->second->SetTagNSig(nsig);   
 
  500         if (pididx>=0 && pididx<5)
 
  502                         if (l[ii]->GetPidInfo(pididx)<
cut )
 
  517         if (pididx>=0 && pididx<5)
 
  519                         if (l[ii]->GetPidInfo(pididx)>=prob) ++mult;
 
  535                 cout <<
"[PndSoftTriggerTask] **** Unable to open trigger file "<<
fTriggerFileName.Data()<<endl;
 
  538         else cout <<
"[PndSoftTriggerTask] **** Reading trigger lines from "<<
fTriggerFileName.Data()<<endl;
 
  546                 file.getline(line,499);
 
  550                 if (sline.BeginsWith(
"#")||sline==
"") 
continue;  
 
  555                 if (N!=13)  {cout <<
"[PndSoftTriggerTask] **** Invalid trigger line: "<<sline.Data()<<endl; 
continue;}
 
  558                 int mode = toks[0].Atoi();
 
  561                 double mean=0, qamin = toks[5].Atof(), qamax = toks[6].Atof();
 
  567                         mean = toks[7].Atof();
 
  570                 if (toks[5].BeginsWith(
"-")) qamin = mean + toks[5].Atof(); 
 
  571                 if (toks[6].BeginsWith(
"+")) qamax = mean + toks[6].Atof();
 
  583         cout << 
"[PndSoftTriggerTask] **** Found "<<
fSTTriggers.size()<<
" trigger definitions: ";
 
  585                 cout << it->second->GetName()<<
" ";
 
  605                 cout <<
"[PndSoftTriggerTask] **** Unable to open selection file "<<
fCfgFileName.Data()<<endl;
 
  608         else cout <<
"[PndSoftTriggerTask] **** Reading selection from "<<
fCfgFileName.Data()<<endl;
 
  619                 file.getline(line,1499);
 
  623                 sline.ReplaceAll(
"\t",
"");
 
  626                 if (sline.Contains(
"#")) sline = sline(0,sline.Index(
"#")-1);
 
  629                 sline = sline.Strip(TString::kBoth);
 
  631                 if (sline==
"") 
continue;
 
  638                 if (N1<2 || N1>3)  {cout <<
"invalid line: "<<sline.Data()<<endl; 
continue;}
 
  641                 int mcode = toks[0].Atoi();
 
  642                 int en    = mcode / 1000; 
 
  651                 for (
int i=0;
i<N2;++
i) 
 
  653                         cuts[
i].ReplaceAll(
" ",
"");
 
  654                         if (cuts[
i]==
"tag") cuts[
i]=
"tag>0";
 
  657                         if (cuts[
i].BeginsWith(
"abs"))
 
  659                                 int pos1 = cuts[
i].First(
'-'); 
 
  660                                 int pos2 = cuts[
i].Last(
')');  
 
  661                                 int pos3 = cuts[
i].Last(
'<');  
 
  664                                 double val = 
TString(cuts[
i](pos1+1,(pos2-pos1)-1)).Atof(); 
 
  665                                 double win = 
TString(cuts[
i](pos3+1,1000)).Atof();  
 
  666                                 cuts[
i]= TString::Format(
"%s>%f",name.Data(), val-win);      
 
  667                                 cuts[N2++] = TString::Format(
"%s<%f",name.Data(), val+win);   
 
  682                 for (
int i=0;
i<N2;++
i)
 
  685                         while (j<5 && op==-1) 
 
  687                                 if (cuts[
i].Contains(
fSTOps[j])) 
 
  706                                 cs.
cutval[
i] = toks2[1].Atof();
 
  713                                 cs.
cutval[
i] = toks2[1].Atof();
 
  718                                 cout <<
"[PndSoftTriggerTask] **** Unmapped cut variable: "<<toks2[0].Data()<<
". Skipping mode "<<mcode<<
"."<<endl;
 
  732                                 cout <<
"[PndSoftTriggerTask] **** Invalid TMVA configuration for mode "<<mcode<<
". Skipping."<<endl;
 
  739                                 TString wfile   = 
TString(getenv(
"VMCWORKDIR"))+
"/softrig/weights/"+toks2[0]+
".weights.xml";
 
  740                                 cs.
tmvameth = toks2[0](toks2[0].Length()-3,3); 
 
  743                                 cs.
tmvacut  = toks2[N3-1].Atof();
 
  749                                 cs.
tmvaread = 
new TMVA::Reader(
"Silent");
 
  751                                 for (
int i=1; 
i<N3-1; ++
i)
 
  757                                                 cout <<
"[PndSoftTriggerTask] **** Unmapped TMVA variable: "<<toks2[
i].Data()<<
". Skipping mode "<<mcode<<
"."<<endl;
 
  771                         cout <<
"mcode="<<mcode<<endl;
 
  773                         cout <<
"  Ncut="<<cts.
ncut<<
" (";
 
  774                         for (
int k=0;k<cts.
ncut;++k) cout <<cts.
varid[k]<<
" ";
 
  791         TObjArray *tok = s.Tokenize(delim);
 
  792         int N = tok->GetEntries();      
 
  793         for (
int i=0;
i<N;++
i) 
 
  796                         toks[
i] = ((TObjString*)tok->At(
i))->String();
 
  797                         toks[
i].ReplaceAll(
"\t",
"");
 
  798                         toks[
i] = toks[
i].Strip(TString::kBoth);
 
  808   FairRun* 
run = FairRun::Instance();
 
  809   if ( ! run ) Fatal(
"SetParContainers", 
"No analysis run");
 
  844         int tag_glob = 0, tag_glob_pre = 0, tag_pre = 0;
 
  855                         int ntag =  
TagMode( tl , tag_pre);
 
  857                         info->
SetNTag(it->first, ntag);                      
 
  859                         tag_glob_pre += tag_pre;
 
  863         Int_t tagged  = (tag_glob>0);
 
  864         Int_t taggedm = (tag_glob_pre>0);  
 
  892                 ntp->
Column(
"tagall",   (Int_t) tag_glob,               0);
 
  893                 ntp->
Column(
"tagpre",   (Int_t) tag_glob_pre,   0);
 
  901                 ntp->
Column(
"eslnpidmu",(Int_t)  fPidMult_025[1],               0 );
 
  902                 ntp->
Column(
"eslnpidpi",(Int_t)  fPidMult_025[2],               0 );
 
  903                 ntp->
Column(
"eslnpidk", (Int_t)  fPidMult_025[3],               0 );
 
  904                 ntp->
Column(
"eslnpidp", (Int_t)  fPidMult_025[4],               0 );
 
  943                 int dpdg = abs(
fMcTruth[0]->Daughter(
i)->PdgCode());
 
  947                         case 22:  mode += 1;      
break;  
 
  948                         case 111: mode += 10;     
break;  
 
  949                         case 211: mode += 100;    
break;  
 
  950                         case 321: mode += 1000;   
break;  
 
  951                         case 130: mode += 10000;  
break;  
 
  952                         case 310: mode += 10000;  
break;  
 
  953                         case 221: mode += 100000; 
break;  
 
  959                 case       0 : code = 0;  
break;  
 
  960                 case       1 : code = 1;  
break;  
 
  961                 case      10 : code = 2;  
break;  
 
  962                 case  100000 : code = 3;  
break;  
 
  963                 case      20 : code = 4;  
break;  
 
  964                 case     200 : code = 5;  
break;  
 
  965                 case    2000 : code = 6;  
break;  
 
  966                 case   20000 : code = 7;  
break;  
 
  967                 case  200000 : code = 8;  
break;  
 
  968                 case     210 : code = 9;  
break;  
 
  969                 default      : code =-1;  
break;
 
  993                         n->
Column(
"tag",        (Int_t) tag,            0);
 
  994                         n->
Column(
"nsig",       (Float_t) nsig,         0.0
f);
 
  997                         n->
Column(
"num",        (Int_t) 
i,                      0);
 
 1185         TLorentzVector lcm = l;
 
 1186         lcm.Boost(-
fIniP4.BoostVector());
 
 1202         oang = d0->
P3().Angle(d1->
P3());
 
 1205         TLorentzVector d_cms = d0->
P4();
 
 1206         d_cms.Boost(-(c->
P4().BoostVector()));
 
 1207         decang  = d_cms.Vect().Angle(c->
P3());
 
 1216         TVector3 vtx, altvtx, primvtx;
 
 1232         if (altvtx.Mag()>0.) dist = (vtx-altvtx).Mag();
 
 1234         ctau = dist*c->
M()/c->
P();
 
 1257         int i=0, code=0, A=9, B=9, 
C=9, D=9, EF=0;
 
 1259         if (v==
"mmiss") 
return 80;
 
 1260         if (v==
"xmdif") 
return 82;
 
 1261         if (v==
"tag")   
return 99;
 
 1271         if (i<1000) {cout <<
"[PndSoftTriggerTask] ***** Unknown variable suffix in variable '"<<v<<
"'"<<endl; 
return -1;}
 
 1274         v.ReplaceAll(
"pi1",
"d0");
 
 1275         v.ReplaceAll(
"pi2",
"d1");
 
 1276         v.ReplaceAll(
"g1",
"d0");
 
 1277         v.ReplaceAll(
"g2",
"d1");
 
 1279         TRegexp 
r1(
"xd[0-4]$");
 
 1280         TRegexp 
r2(
"xd[0-4]d[0-4]$");
 
 1281         TRegexp r3(
"xd[0-4]d[0-4]d[0-4]$");
 
 1283         if (v!=
"x" && 
v(r1)==
"" && 
v(r2)==
"" && 
v(r3)==
"") {cout <<
"[PndSoftTriggerTask] ***** Unknown candidate prefix in variable '"<<v<<
"'"<<endl; 
return -1;}
 
 1287         if (l>1) B = 
TString(
v(2,1)).Atoi();
 
 1289         if (l>5) D = 
TString(
v(6,1)).Atoi();
 
 1291         code=EF+100*D+1000*
C+10000*B+100000*A;
 
 1312         if (
id==80) 
return (
fIniP4 - c->
P4()).M();         
 
 1313         if (
id==82) 
return (c->
M() - c->
Daughter(0)->
M()); 
 
 1314         if (
id==99) 
return 1.0;                            
 
 1319         int B = (
id/10000)%10, 
C = (
id/1000)%10, D = (
id/100)%10;
 
 1338         double pocdist, pocctau, oang, decang, cdecang, pidmax; 
 
 1355                         fSTVarCandArray[cand*100+14] = bl.Theta();
 
 1358                 case 20 : 
case 21 : 
case 22 : 
case 23 : 
case 24 :  
 
 1359                         fSTVarCandArray[id] = cnd->
GetPidInfo(quant%10);
 
 1365                         fSTVarCandArray[id] = pidmax;
 
 1368                 case 30 : 
case 31 : 
case 32 : 
 
 1369                         fSTVarCandArray[cand*100+30] = 
GetPocaVtx(cnd, pocdist, pocctau);
 
 1370                         fSTVarCandArray[cand*100+31] = pocdist; 
 
 1371                         fSTVarCandArray[cand*100+32] = pocctau; 
 
 1374                 case 40 : 
case 41 : 
case 42 : 
 
 1376                         cdecang = 
cos(decang);
 
 1377                         fSTVarCandArray[cand*100+40] = oang; 
 
 1378                         fSTVarCandArray[cand*100+41] = decang; 
 
 1379                         fSTVarCandArray[cand*100+42] = cdecang; 
 
 1382                         cout <<
"[PndSoftTriggerTask] ***** wrong variable code '"<<quant<<
"'"<<endl;
 
 1425         if (
fVerbose>1) cout <<
"AcceptCandidate : mode="<<mode<<
" mcode="<<mcode;
 
 1429         if (
fVerbose>1) cout <<
" found cut set";
 
 1432         if ( sel && !(sel->
Accept(c)) ) {
if (
fVerbose>1) cout <<endl;
return false;}
 
 1436         if (
fVerbose>1) cout <<
" accepted by precuts"<<endl;
 
 1481                 if (mvaout<cs.
tmvacut) acc=
false;
 
 1487                 if (acc) cout <<
" final accept"<<endl;
 
 1500         TParticlePDG *part = 
fPdg->GetParticle(pdg)->AntiParticle();
 
 1501         if (part) antipdg = part->PdgCode();
 
 1512         int nd = idx.size();
 
 1549         if (mothpdg<0) {cout << 
"[PndSoftTriggerTask] **** Invalid mother for combinatorics."<<endl; 
return 0;}
 
 1553         std::vector<int> 
idx, aidx, auxidx, auxaidx;
 
 1557         int amothpdg = 
AntiPdg(mothpdg);
 
 1560         bool cc = tl->
GetCC();
 
 1565                 if (cc) cout <<
" +cc";
 
 1573         int auxmothpdg, auxamothpdg; 
 
 1576         for (
int i=0; 
i<nd; ++
i)
 
 1581                 if (dpdg==-99) 
continue;
 
 1582                 if (dpdg==-98) {auxmode=
false; 
continue;} 
 
 1591                                 cout << 
"[PndSoftTriggerTask] **** Invalid daughter pdg code: "<<dpdg<<endl; 
 
 1600                                 if (auxamothpdg==auxmothpdg) aidx.push_back(14);
 
 1601                                 else aidx.push_back(15);
 
 1618         if (idx.size()>5)    {cout << 
"[PndSoftTriggerTask] **** Too many daughters ("<<idx.size()<<
") for combinatorics of target resonance."<<endl;
return 0;}
 
 1619         if (auxidx.size()>5) {cout << 
"[PndSoftTriggerTask] **** Too many daughters ("<<auxidx.size()<<
") for combinatorics of auxiliary resonance."<<endl;
return 0;}
 
 1623                 cout <<
"("<<mothpdg<<
"/"<<amothpdg<<
") : ";
 
 1624                 for (
size_t i=0; 
i<idx.size(); ++
i) cout <<
"("<<idx[
i]<<
"/"<<aidx[
i]<<
") "; 
 
 1626                 if (auxidx.size()>0)
 
 1628                         cout <<
"("<<auxmothpdg<<
"/"<<auxamothpdg<<
") : ";
 
 1629                         for (
size_t i=0; 
i<auxidx.size(); ++
i) cout <<
"("<<auxidx[
i]<<
"/"<<auxaidx[
i]<<
") "; cout <<endl;
 
 1637                 if (auxmothpdg!=auxamothpdg)
 
 1650                         for (
size_t i=0;
i<auxidx.size();++
i) 
if (auxidx[
i]<10) pdgsum+=
fSTPidIndex[auxidx[
i]];
 
 1677         if ( fEcm < tl->GetThreshold() ) 
return 0;
 
 1719                         if (
fQAMctOnly && (l[i]->GetMcTruth())==0) 
continue;
 
 1726                         n->
Column(
"eslnpidmu",(Int_t)  fPidMult_025[1], 0);
 
 1727                         n->
Column(
"eslnpidpi",(Int_t)  fPidMult_025[2], 0);
 
 1728                         n->
Column(
"eslnpidk", (Int_t)  fPidMult_025[3], 0);
 
 1729                         n->
Column(
"eslnpidp", (Int_t)  fPidMult_025[4], 0);
 
 1737                         Float_t mmiss = (
fIniP4-(l[
i]->P4())).M();
 
 1741                         n->
Column(
"num",        (Int_t)   i,                    0);
 
 1746                         n->
Column(
"mmiss",      (Float_t) mmiss,                0.0
f);
 
 1747                         n->
Column(
"nsig",       (Float_t) nsig,                 0.0
f);
 
 1748                         n->
Column(prefix+
"mean",(Float_t) mean,         0.0
f);
 
 1749                         n->
Column(prefix+
"sig", (Float_t) sigma,        0.0
f);
 
 1750                         n->
Column(
"tag",        (Int_t)   tag,                  0);
 
 1751                         n->
Column(
"acc",    (Int_t) acc,            0);
 
void SetQAMassWindow(double min, double max)
RhoMassParticleSelector * fEtaSel
int GetDaughterPdg(int idx)
RhoMassParticleSelector * fKs0Sel
double DbMass(TString name)
float fSTInputValues[STMAXCUT]
void qaPi0(TString pre, RhoCandidate *c, RhoTuple *n)
std::map< int, PndSoftTriggerLine * > fSTTriggers
double ChrgPtSumCms() const 
RhoMassParticleSelector * GetQASelector()
double ChrgPSumCms() const 
friend F32vec4 cos(const F32vec4 &a)
RhoEnergyParticleSelector * fEnergySel
void SetPidAlgoPion(TString algo)
RhoVtxPoca * fPocaVertexer
std::map< int, PndSoftTriggerLine * >::iterator TrigIt
void SetQAEvent(bool qa=true)
void SetQAKs0(bool qa=true)
void FillEventShapeVarArray()
friend F32vec4 sqrt(const F32vec4 &a)
double ChrgPSumLab() const 
Double_t val[nBoxes][nFEBox]
int CreateKs0Cands(RhoTuple *n)
void SetDstMDiffCut(double cut)
void SetQAMc(bool qa=true)
void SetFastSimDefaults()
void SetPidAlgoMuon(TString algo)
double NeutEtSumCms() const 
std::map< int, double > fSTVarCandArray
int SelectTruePid(RhoCandList &l)
void SetQAPi0(bool qa=true)
Bool_t FillList(RhoCandList &l, TString listkey="All", TString pidTcaNames="", int trackHypothesis=-1)
void SetTagAll(bool tag=true)
virtual Bool_t Accept(RhoCandidate *)=0
void SetConfigurationFile(TString fname)
double SumChrgPminCms(double pmin)
void SetPidAlgoElectron(TString algo)
void SetKs0SignalParams(double mean, double sigma)
RhoCandidate * Daughter(Int_t n)
RhoMassParticleSelector * fPi0PreSel
void SetPidAlgoKaon(TString algo)
std::map< int, int > fSTMapListIndex
void SetThreshold(double thr)
RhoCandList fNeutralCands
void qaP4(TString pre, TLorentzVector c, RhoTuple *n, bool skip=false)
void qaKs0(TString pre, RhoCandidate *c, RhoTuple *n)
void SetPi0SignalParams(double mean, double sigma)
int SelectPidProb(RhoCandList &l, int pididx, double cut)
void SetFullSimDefaults()
virtual void Exec(Option_t *opt)
void SetTagNSigAll(double nsig)
void SetQAEta(bool qa=true)
void qaMcList(TString pre, RhoCandList &l, RhoTuple *n, int max=10000)
int DoCombinatorics(RhoCandList &l, PndSoftTriggerLine *tl)
void SetNTag(int mode, const int tag)
virtual void SetParContainers()
void CombineAndAppend(RhoCandList &l1, RhoCandList &l2)
int DetermineRecoilMode(int &mode)
void SetTagNSig(double nsig)
void Combine(RhoCandList &l1, RhoCandList &l2)
std::map< int, STCutSet > fSTSelmap
void FillVarArray(RhoCandidate *c, int id, Bool_t tmva=false)
Double_t GetPocaVtx(TVector3 &vertex, RhoCandidate *composite)
RhoMassParticleSelector * fKs0PreSel
void SetEtaSignalParams(double mean, double sigma)
void SetSignalParamsDefaults()
bool AcceptCandidate(int mode, RhoCandidate *c, RhoParticleSelectorBase *sel=0)
double GetPocaVtx(RhoCandidate *c, double &dist, double &ctau)
void qaComp(TString pre, RhoCandidate *c, RhoTuple *n, bool covs=false, bool pulls=false)
void SetTrackMinP(double min)
virtual InitStatus Init()
std::map< TString, int > fSTVarmap
PndEventShape * fEventShape
TLorentzVector BoostCms(TLorentzVector in)
void Select(RhoParticleSelectorBase *pidmgr)
double NeutESumLab() const 
void qaEventShape(TString pre, PndEventShape *evsh, RhoTuple *n)
TLorentzVector P4() const 
void Column(const char *label, Bool_t value, Bool_t defval=0, const char *block=0)
void SetType(const TParticlePDG *pdt, int start=0)
friend F32vec4 fabs(const F32vec4 &a)
RhoCandList fChargedCands
void SetGammaMinE(double min)
Int_t Remove(RhoCandidate *)
void SetTagMode(int mode, bool tag=true)
double fSTVarEvArray[STMAXEVVARS]
void SetQAMode(int mode, bool qa=true)
void qaEventShapeShort(TString pre, PndEventShape *evsh, RhoTuple *n)
int CodeVariable(TString v)
Int_t RemoveFamily(RhoCandidate *)
void SetPidAlgoAll(TString algo)
void SetQAAll(bool qa=true)
void McMatchAllowPhotos(int maxn=1, double thresh=0.05)
double Thrust(int Nmax=4)
int TagMode(PndSoftTriggerLine *tl, int &npre)
void SetQASelectionDefaults()
RhoMassParticleSelector * fEtaPreSel
void SetTagNSigMode(int mode, double nsig)
TClonesArray * fTcaOnlineFilterInfo
int MultNeutEminLab(double emin)
int MultChrgPminLab(double pmin)
double FoxWolfMomR(int order)
RhoMassParticleSelector * fPi0Sel
RhoMomentumParticleSelector * fMomentumSel
TTree * GetInternalTree()
int MultPidProb(RhoCandList &l, int pididx, double prob)
Bool_t McTruthMatch(RhoCandidate *cand, Int_t level=2, bool verbose=false)
double NeutESumCms() const 
RhoMassParticleSelector * GetSelector()
void SetInitialPidCut(double cut)
void SetPidAlgoProton(TString algo)
bool AcceptDstCut(RhoCandidate *c)
FairRootManager * fRootManager
std::vector< int > fSTencode
void SetTagActive(bool ac=true)
void SetWriteQA(bool qa=true)
void SetMeanSigma(double mean, double sig)
void CombineList(RhoCandList &l, int mothpdg, int amothpdg, std::vector< int > &idx, std::vector< int > &aidx, bool cc=false)
double GetVarValue(RhoCandidate *c, int id)
double GetPidInfo(int hypo)
void ApplyFullSelection(int selmode=1)
virtual Bool_t Accept(RhoCandidate *b)
int SplitString(TString s, TString delim, TString *toks, int maxtoks)
void GetAngles(RhoCandidate *c, double &oang, double &decang)