GSI Forum
GSI Helmholtzzentrum für Schwerionenforschung

Home » PANDA » PandaRoot » Analysis » [FIXED] Mc Truth Match
Re: Mc Truth Match [message #15290 is a reply to message #15285] Wed, 21 August 2013 13:16 Go to previous messageGo to previous message
MartinJGaluska is currently offline  MartinJGaluska
Messages: 203
Registered: March 2010
Location: Germany
first-grade participant
From: *physik.uni-giessen.de
I would like to add that I have just cross-checked the method

theAnalysis->FillList(piall,"PionAll");
pimatchplus.Cleanup();
pimatchminus.Cleanup();
	// for pimatch
		for ( int ii=0 ; ii<piall.GetLength() ; ++ii ){
			if ( theAnalysis->McTruthMatch(piall[ii]) ){
				if ( 0 < piall[ii]->PdgCode() ){
					pimatchplus.Add( piall[ii] );
				}
				if ( 0 > piall[ii]->PdgCode() ){
					pimatchminus.Add( piall[ii] );
				}

			}
		}


with the following method

SelectWithMcTruthPdgSimulateMcMatch(piall, pdgpiplus, 211);

int SelectWithMcTruthPdgSimulateMcMatch(RhoCandList &lOld, RhoCandList &lNew, Int_t SelectCandidatesWithPdgCode) {
	lNew.Cleanup();
	int notSelected = 0;
	for ( int ii=lOld.GetLength()-1; ii>=0; --ii ) {
		if ( ( lOld[ii]->GetMcTruth()->PdgCode() == SelectCandidatesWithPdgCode ) && ( lOld[ii]->PdgCode() == SelectCandidatesWithPdgCode ) ) {
			lNew.Add( lOld[ii] );
		} else {
			notSelected++;
		}
	}
	return notSelected;
}


for pions from 10k events simulated with the rho tutorial and 1k events of psi(4040) to D0 anti-D0 / D+ D- and all D decays allowed.

In other words, the McTruthMatch gives results consistent with checking the McTruth Pdg info directly (at least for charged particles, I have not checked resonances).
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: [FIXED] PndAnalysis::McTruthMatch always returns false, again ....
Next Topic: [FIXED] Bug in RhoCandList (?)
Goto Forum:
  


Current Time: Fri Nov 22 19:15:40 CET 2019

Total time taken to generate the page: 0.02800 seconds