210         int i=0,j=0, k=0, l=0;
 
  215         if (!(++
nevts%100)) cout << 
"evt "<<
nevts<<endl;
 
  222         RhoCandList p, pbar, 
piplus, 
piminus, lam0, lam0bar, truepiplus, truepiminus, truep, truepbar, lam0_tm, lam0bar_tm, ppbarsystem, 
mclist;
 
  224         Bool_t pfromlam, pbarfromlam, piplusfromlam, piminusfromlam;
 
  226         double m0_p  = 0.938272;
 
  228         pbarfromlam = kFALSE;
 
  229         piplusfromlam = kFALSE;
 
  230         piminusfromlam = kFALSE;
 
  232         TLorentzVector targ(0,0,0,m0_p);
 
  233         TLorentzVector beam(0,0,pbarmom,
sqrt(m0_p*m0_p + pbarmom*pbarmom));
 
  234         TLorentzVector 
init=targ+beam;
 
  235         TVector3 cmboost = -init.BoostVector();
 
  260         ppbarsystem.
Combine(lam0,lam0bar);
 
  262         RhoCandidate *mctrlam0, *mctrlam0bar, *mctrpiplus, *mctrpiminus, *mctrproton, *mctrantiproton;
 
  265         mctrlam0 = mclist[2];
 
  266         mctrlam0bar = mclist[1];
 
  267         mctrproton = mclist[2]->Daughter(0);
 
  268         mctrantiproton = mclist[1]->Daughter(0);
 
  269         mctrpiplus = mclist[1]->Daughter(1);
 
  270         mctrpiminus = mclist[2]->Daughter(1);
 
  273         TLorentzVector mctrlam04 = mctrlam0->
P4();
 
  274         TLorentzVector mctrlam0bar4 = mctrlam0bar->
P4();
 
  275         TLorentzVector mctrpiplus4 = mctrpiplus->
P4();
 
  276         TLorentzVector mctrpiminus4 = mctrpiminus->
P4();
 
  277         TLorentzVector mctrproton4 = mctrproton->
P4();
 
  278         TLorentzVector mctrantiproton4 = mctrantiproton->
P4();
 
  281         mctrlam04.Boost(cmboost);
 
  282         mctrlam0bar4.Boost(cmboost);
 
  314                 bool check = fitter.FitConserveMasses();        
 
  316                 double chi2_4c = fitter.GetChi2();      
 
  317                 double prob_4c = fitter.GetProb();      
 
  321                 RhoCandidate *lam04cfit = ppbarsystem[j]->Daughter(0)->GetFit();        
 
  322                 RhoCandidate *lam0bar4cfit = ppbarsystem[j]->Daughter(1)->GetFit();     
 
  324                 if (chi2_4c<20 && check)        
 
  333         lam0bar_tm.
Combine(pbar, piplus);
 
  342                 TLorentzVector lam04 = lam0_tm[j]->P4();
 
  343                 TLorentzVector lam04_cm = lam04;
 
  344                 lam04_cm.
Boost(cmboost);
 
  352                 double chi2_vtx = vtxfitter.GetChi2();  
 
  353                 double prob_vtx = vtxfitter.GetProb();  
 
  356                 TVector3 lam0_tm_XYZ = jfit->
Pos();
 
  358                 if ( prob_vtx > 0.01 )  
 
  369                 TLorentzVector lam0bar4 = lam0bar_tm[j]->P4();
 
  370                 TLorentzVector lam0bar4_cm = lam0bar4;
 
  371                 lam0bar4_cm.
Boost(cmboost);
 
  379                 double chi2_vtx = vtxfitter.GetChi2();  
 
  380                 double prob_vtx = vtxfitter.GetProb();  
 
  383                 TVector3 lam0bar_tm_XYZ = jfit->
Pos();
 
  385                 if ( prob_vtx > 0.01 )  
 
  396                 if((truepiplus[j]->GetMcTruth()->TheMother()->PdgCode())!=-3122) 
continue;      
 
  397                 piplusfromlam = kTRUE;
 
  400                 TLorentzVector piplus4=truepiplus[j]->P4();     
 
  401                 TLorentzVector mctruthpiplus4=truepiplus[j]->GetMcTruth()->P4();
 
  402                 TLorentzVector piplus4cm = piplus4;
 
  403                 piplus4cm.
Boost(cmboost);       
 
  404                 recopiplus=truepiplus[j]->GetRecoCandidate();
 
  415                 hpiplus_tm_PvsDP->Fill(piplus4.P(),(piplus4.P()-mctruthpiplus4.P())/mctruthpiplus4.P());
 
  422                 if((truepiminus[j]->GetMcTruth()->TheMother()->PdgCode())!=3122) 
continue;      
 
  423                 piminusfromlam = kTRUE;
 
  426                 TLorentzVector piminus4=truepiminus[j]->P4();
 
  427                 TLorentzVector mctruthpiminus4=truepiminus[j]->GetMcTruth()->P4();
 
  428                 TLorentzVector piminus4cm = piminus4;
 
  429                 piminus4cm.
Boost(cmboost);
 
  430                 recopiminus=truepiminus[j]->GetRecoCandidate();
 
  442                 hpiminus_tm_PvsDP->Fill(piminus4.P(),(piminus4.P()-mctruthpiminus4.P())/mctruthpiminus4.P());
 
  449                 if((truep[j]->GetMcTruth()->TheMother()->PdgCode())!=3122) 
continue;    
 
  453                 TLorentzVector p4=truep[j]->P4();
 
  454                 TLorentzVector mctruthp4=truep[j]->GetMcTruth()->P4();
 
  455                 TLorentzVector p4cm = p4;
 
  457                 recop=truep[j]->GetRecoCandidate();
 
  476                 if((truepbar[j]->GetMcTruth()->TheMother()->PdgCode())!=-3122) 
continue;        
 
  480                 TLorentzVector pbar4=truepbar[j]->P4();
 
  481                 TLorentzVector mctruthpbar4=truepbar[j]->GetMcTruth()->P4();
 
  482                 TLorentzVector pbar4cm = pbar4;
 
  483                 pbar4cm.
Boost(cmboost);
 
  484                 recopbar=truepbar[j]->GetRecoCandidate();
 
TH2F * hantiproton_tm_PvsDP
TH1F * hpiplus_tm_cosTheta
int SelectTruePid(PndAnalysis *ana, RhoCandList &l)
TH1F * htrueantiproton_cosTheta
friend F32vec4 sqrt(const F32vec4 &a)
TH1F * htruelam0_cm_cosTheta
TH1F * hlam0_tm_cosTheta_all
void Boost(const TVector3 &)
Bool_t FillList(RhoCandList &l, TString listkey="All", TString pidTcaNames="", int trackHypothesis=-1)
TH2F * hpiminus_tm_ThetavsDTheta
TH1F * hlam0bar_tm_cosTheta_all
TH1F * htruelam0bar_cm_cosTheta
TH2F * hpiminus_tm_PvsTheta
TH1F * hlam0_tm_cm_cosTheta_all
TH2F * hantiproton_tm_PvsTheta
TH1F * hproton_tm_cosTheta
void Combine(RhoCandList &l1, RhoCandList &l2)
TH1F * hantiproton_tm_cosTheta
TH1F * hlam0bar_tm_chi2_vtx
TH1F * hantiproton_tm_Theta
TH1F * htruepiplus_cosTheta
TH2F * hantiproton_tm_ThetavsDTheta
TLorentzVector P4() const 
TH1F * hlam0bar_tm_prob_vtx
void SetType(const TParticlePDG *pdt, int start=0)
TH2F * hpiplus_tm_PvsTheta
PndAnalysis * theAnalysis
TH1F * hantiproton_tm_cm_cosTheta
TH1F * hproton_tm_cm_cosTheta
TH2F * hproton_tm_PvsTheta
Int_t GetEvent(Int_t n=-1)
TH1F * htruepiminus_cosTheta
TH1F * hpiplus_tm_cm_cosTheta
TH1F * hpiminus_tm_cosTheta
TH1F * htrueproton_cosTheta
TH2F * hpiplus_tm_ThetavsDTheta
TH1F * hlam0bar_tm_cm_cosTheta_all
TH1F * hpiminus_tm_cm_cosTheta
TH2F * hproton_tm_ThetavsDTheta