FairRoot/PandaRoot
Functions
ana_multi.C File Reference
#include "../auxi.C"

Go to the source code of this file.

Functions

int SelectTruePid (PndAnalysis *ana, RhoCandList &l)
 
void printCand (RhoCandidate *c)
 
void countDoubles (RhoCandList &l, int &n1, int &n2, int &n3)
 
int ana_multi (int nevts=100)
 

Function Documentation

int ana_multi ( int  nevts = 100)

Definition at line 57 of file ana_multi.C.

References RhoKinFitter::Add4MomConstraint(), RhoKinFitter::AddMassConstraint(), CloseGeoManager(), RhoCandList::Combine(), countDoubles(), ctime, Double_t, PndAnalysis::FillList(), RhoKinFitter::Fit(), RhoFitterBase::Fit(), fRun, RhoFitterBase::GetChi2(), PndAnalysis::GetEntries(), PndAnalysis::GetEvent(), RhoCandList::GetLength(), RhoFitterBase::GetProb(), hvpos, i, RhoCandidate::M(), PndAnalysis::McTruthMatch(), muminus, muplus, out, P, piminus, piplus, PndAnalysis::PndAnalysis(), RhoCandidate::Pos(), rtdb, rtime, RhoCandList::Select(), SelectTruePid(), RhoCandList::SetType(), and TString.

58 {
59  TDatabasePDG::Instance()->AddParticle("pbarpSystem","pbarpSystem",1.9,kFALSE,0.1,0,"",88888);
60  TStopwatch fTimer;
61  // *** some variables
62  int i=0,j=0, k=0, l=0;
63  gStyle->SetOptFit(1011);
64 
65  // *** the output file for FairRunAna
66  TString OutFile="outputmult.root";
67 
68  // *** the files coming from the simulation
69  TString inPidFile = "psi2s_jpsi2pi_jpsi_mumu_pidmult.root"; // this file contains the PndPidCandidates and McTruth
70  //TString inRecFile = "psi2s_jpsi2pi_jpsi_mumu_recomult.root"; // this file contains the PndTracks and McTruth
71  //TString inSimFile = "psi2s_jpsi2pi_jpsi_mumu_sim.root"; // this file contains the PndTracks and McTruth
72  //TString inDigiFile = "psi2s_jpsi2pi_jpsi_mumu_digi.root"; // this file contains the PndTracks and McTruth
73  TString inParFile = "psi2s_jpsi2pi_jpsi_mumu_par.root";
74 
75  // *** PID table with selection thresholds; can be modified by the user
76  TString pidParFile = TString(gSystem->Getenv("VMCWORKDIR"))+"/macro/params/all.par";
77 
78  // *** initialization
79  FairLogger::GetLogger()->SetLogToFile(kFALSE);
80  FairRunAna* fRun = new FairRunAna();
81  FairRuntimeDb* rtdb = fRun->GetRuntimeDb();
82  fRun->SetInputFile(inPidFile);
83  //fRun->AddFriend(inRecFile);
84  //fRun->AddFriend(inDigiFile);
85  //fRun->AddFriend(inSimFile);
86 
87  // *** setup parameter database
88  FairParRootFileIo* parIO = new FairParRootFileIo();
89  parIO->open(inParFile);
90  FairParAsciiFileIo* parIOPid = new FairParAsciiFileIo();
91  parIOPid->open(pidParFile.Data(),"in");
92 
93  rtdb->setFirstInput(parIO);
94  rtdb->setSecondInput(parIOPid);
95  rtdb->setOutput(parIO);
96 
97  fRun->SetOutputFile(OutFile);
98  fRun->Init();
99 
100  // *** create an output file for all histograms
101  TFile *out = TFile::Open("output_anamulti.root","RECREATE");
102 
103  // *** create some histograms
104  TH1F *hmomtrk = new TH1F("hmomtrk","track momentum (all)",200,0,5);
105  TH1F *hthttrk = new TH1F("hthttrk","track theta (all)",200,0,3.1415);
106 
107  TH1F *hjpsim_all = new TH1F("hjpsim_all","J/#psi mass (all)",200,0,4.5);
108  TH1F *hpsim_all = new TH1F("hpsim_all","#psi(2S) mass (all)",200,0,5);
109 
110  TH1F *hjpsim_lpid = new TH1F("hjpsim_lpid","J/#psi mass (loose pid)",200,0,4.5);
111  TH1F *hpsim_lpid = new TH1F("hpsim_lpid","#psi(2S) mass (loose pid)",200,0,5);
112 
113  TH1F *hjpsim_tpid = new TH1F("hjpsim_tpid","J/#psi mass (tight pid)",200,0,4.5);
114  TH1F *hpsim_tpid = new TH1F("hpsim_tpid","#psi(2S) mass (tight pid)",200,0,5);
115 
116  TH1F *hjpsim_trpid = new TH1F("hjpsim_trpid","J/#psi mass (true pid)",200,0,4.5);
117  TH1F *hpsim_trpid = new TH1F("hpsim_trpid","#psi(2S) mass (true pid)",200,0,5);
118 
119  TH1F *hjpsim_ftm = new TH1F("hjpsim_ftm","J/#psi mass (full truth match)",200,0,4.5);
120  TH1F *hpsim_ftm = new TH1F("hpsim_ftm","#psi(2S) mass (full truth match)",200,0,5);
121 
122  TH1F *hjpsim_nm = new TH1F("hjpsim_nm","J/#psi mass (no truth match)",200,0,4.5);
123  TH1F *hpsim_nm = new TH1F("hpsim_nm","#psi(2S) mass (no truth match)",200,0,5);
124 
125  TH1F *hjpsim_diff = new TH1F("hjpsim_diff","J/#psi mass diff to truth",100,-2,2);
126  TH1F *hpsim_diff = new TH1F("hpsim_diff","#psi(2S) mass diff to truth",100,-2,2);
127 
128  TH1F *hjpsim_vf = new TH1F("hjpsim_vf","J/#psi mass (vertex fit)",200,0,4.5);
129  TH1F *hjpsim_4cf = new TH1F("hjpsim_4cf","J/#psi mass (4C fit)",200,0,4.5);
130  TH1F *hjpsim_mcf = new TH1F("hjpsim_mcf","J/#psi mass (mass constraint fit)",200,0,4.5);
131 
132  TH1F *hjpsi_chi2_vf = new TH1F("hjpsi_chi2_vf", "J/#psi: #chi^{2} vertex fit",100,0,10);
133  TH1F *hpsi_chi2_4c = new TH1F("hpsi_chi2_4c", "#psi(2S): #chi^{2} 4C fit",100,0,250);
134  TH1F *hjpsi_chi2_mf = new TH1F("hjpsi_chi2_mf", "J/#psi: #chi^{2} mass fit",100,0,10);
135 
136  TH1F *hjpsi_prob_vf = new TH1F("hjpsi_prob_vf", "J/#psi: Prob vertex fit",100,0,1);
137  TH1F *hpsi_prob_4c = new TH1F("hpsi_prob_4c", "#psi(2S): Prob 4C fit",100,0,1);
138  TH1F *hjpsi_prob_mf = new TH1F("hjpsi_prob_mf", "J/#psi: Prob mass fit",100,0,1);
139 
140  TH2F *hvpos = new TH2F("hvpos","(x,y) projection of fitted decay vertex",100,-2,2,100,-2,2);
141 
142  //
143  // Now the analysis stuff comes...
144  //
145 
146  // *** the data reader object
147  PndAnalysis* theAnalysis = new PndAnalysis();
148  //theAnalysis->SetVerbose(5);
149  if (nevts==0) nevts= theAnalysis->GetEntries();
150 
151  // *** RhoCandLists for the analysis
152  RhoCandList chrg, muplus, muminus, piplus, piminus, jpsi, psi2s;
153  RhoCandList muplusloose, muminusloose, piplusloose, piminusloose, jpsiloose, psi2sloose;
154  RhoCandList muplustight, muminustight, piplustight, piminustight, jpsitight, psi2stight;
155 
156  // *** Mass selector for the jpsi cands
157  double m0_jpsi = TDatabasePDG::Instance()->GetParticle("J/psi")->Mass(); // Get nominal PDG mass of the J/psi
158  RhoMassParticleSelector *jpsiMassSel=new RhoMassParticleSelector("jpsi",m0_jpsi,1.0);
159 
160  // *** the lorentz vector of the initial psi(2S)
161  TLorentzVector ini(0, 0, 6.231552, 7.240065);
162 
163  // ***
164  // the event loop
165  // ***
166 
167  int cntdbltrk=0, cntdblmc=0, cntdblboth=0, cnttrk=0, cnt_dbl_jpsi=0, cnt_dbl_psip=0;
168 
169  while (theAnalysis->GetEvent() && i++<nevts)
170  {
171  if ((i%100)==0) cout<<"evt " << i << endl;
172 
173  // *** Select with no PID info ('All'); type and mass are set
174  theAnalysis->FillList(chrg, "Charged");
175  theAnalysis->FillList(muplus, "MuonAllPlus");
176  theAnalysis->FillList(muminus, "MuonAllMinus");
177  theAnalysis->FillList(piplus, "PionAllPlus");
178  theAnalysis->FillList(piminus, "PionAllMinus");
179 
180  // *** momentum and theta histograms
181  for (j=0;j<muplus.GetLength();++j)
182  {
183  hmomtrk->Fill(muplus[j]->P());
184  hthttrk->Fill(muplus[j]->P4().Theta());
185  }
186  for (j=0;j<muminus.GetLength();++j)
187  {
188  hmomtrk->Fill(muminus[j]->P());
189  hthttrk->Fill(muminus[j]->P4().Theta());
190  }
191 
192  cnttrk += chrg.GetLength();
193 
194  int n1, n2, n3;
195 
196  countDoubles(chrg,n1,n2,n3);
197  cntdbltrk += n1;
198  cntdblmc += n2;
199  cntdblboth += n3;
200 
201  // *** combinatorics for J/psi -> mu+ mu-
202  jpsi.Combine(muplus, muminus);
203 
204  //cout << jpsi.GetLength() << " jpsis "
205  //<< chrg.GetLength() << " chrg "
206  //<< muplus.GetLength() << " muplus "
207  //<< muminus.GetLength() << " muminus "
208  //<< piplus.GetLength() << " piplus "
209  //<< piminus.GetLength() << " piminus "
210  //<< endl;
211 
212  // ***
213  // *** do the TRUTH MATCH for jpsi
214  // ***
215  jpsi.SetType(443);
216 
217  int nm = 0;
218  for (j=0;j<jpsi.GetLength();++j)
219  {
220  hjpsim_all->Fill( jpsi[j]->M() );
221 
222  if (theAnalysis->McTruthMatch(jpsi[j]))
223  {
224  nm++;
225  hjpsim_ftm->Fill( jpsi[j]->M() );
226  hjpsim_diff->Fill( jpsi[j]->GetMcTruth()->M() - jpsi[j]->M() );
227  }
228  else
229  hjpsim_nm->Fill( jpsi[j]->M() );
230  }
231 
232  if (nm>1) cnt_dbl_jpsi++;
233  // ***
234  // *** do VERTEX FIT (J/psi)
235  // ***
236  for (j=0;j<jpsi.GetLength();++j)
237  {
238  RhoKinVtxFitter vtxfitter(jpsi[j]); // instantiate a vertex fitter
239  vtxfitter.Fit();
240 
241  double chi2_vtx = vtxfitter.GetChi2(); // access chi2 of fit
242  double prob_vtx = vtxfitter.GetProb(); // access probability of fit
243  hjpsi_chi2_vf->Fill(chi2_vtx);
244  hjpsi_prob_vf->Fill(prob_vtx);
245 
246  if ( prob_vtx > 0.01 ) // when good enough, fill some histos
247  {
248  RhoCandidate *jfit = jpsi[j]->GetFit(); // access the fitted cand
249  TVector3 jVtx=jfit->Pos(); // and the decay vertex position
250 
251  hjpsim_vf->Fill(jfit->M());
252  hvpos->Fill(jVtx.X(),jVtx.Y());
253  }
254  }
255 
256  // *** some rough mass selection
257  jpsi.Select(jpsiMassSel);
258 
259  // *** combinatorics for psi(2S) -> J/psi pi+ pi-
260  psi2s.Combine(jpsi, piplus, piminus);
261 
262  // ***
263  // *** do the TRUTH MATCH for psi(2S)
264  // ***
265  psi2s.SetType(88888);
266 
267  nm = 0;
268  for (j=0;j<psi2s.GetLength();++j)
269  {
270  hpsim_all->Fill( psi2s[j]->M() );
271  if (theAnalysis->McTruthMatch(psi2s[j]))
272  {
273  nm++;
274  hpsim_ftm->Fill( psi2s[j]->M() );
275  hpsim_diff->Fill( psi2s[j]->GetMcTruth()->M() - psi2s[j]->M() );
276  }
277  else
278  hpsim_nm->Fill( psi2s[j]->M() );
279  }
280  if (nm>1) cnt_dbl_psip++;
281 
282 
283  // ***
284  // *** do 4C FIT (initial psi(2S) system)
285  // ***
286  for (j=0;j<psi2s.GetLength();++j)
287  {
288  RhoKinFitter fitter(psi2s[j]); // instantiate the kin fitter in psi(2S)
289  fitter.Add4MomConstraint(ini); // set 4 constraint
290  fitter.Fit(); // do fit
291 
292  double chi2_4c = fitter.GetChi2(); // get chi2 of fit
293  double prob_4c = fitter.GetProb(); // access probability of fit
294  hpsi_chi2_4c->Fill(chi2_4c);
295  hpsi_prob_4c->Fill(prob_4c);
296 
297  if ( prob_4c > 0.01 ) // when good enough, fill some histo
298  {
299  RhoCandidate *jfit = psi2s[j]->Daughter(0)->GetFit(); // get fitted J/psi
300 
301  hjpsim_4cf->Fill(jfit->M());
302  }
303  }
304 
305 
306  // ***
307  // *** do MASS CONSTRAINT FIT (J/psi)
308  // ***
309  for (j=0;j<jpsi.GetLength();++j)
310  {
311  RhoKinFitter mfitter(jpsi[j]); // instantiate the RhoKinFitter in psi(2S)
312  mfitter.AddMassConstraint(m0_jpsi); // add the mass constraint
313  mfitter.Fit(); // do fit
314 
315  double chi2_m = mfitter.GetChi2(); // get chi2 of fit
316  double prob_m = mfitter.GetProb(); // access probability of fit
317  hjpsi_chi2_mf->Fill(chi2_m);
318  hjpsi_prob_mf->Fill(prob_m);
319 
320  if ( prob_m > 0.01 ) // when good enough, fill some histo
321  {
322  RhoCandidate *jfit = jpsi[j]->GetFit(); // access the fitted cand
323  hjpsim_mcf->Fill(jfit->M());
324  }
325  }
326 
327 
328  // ***
329  // *** TRUE PID combinatorics
330  // ***
331 
332  // *** do MC truth match for PID type
333  SelectTruePid(theAnalysis, muplus);
334  SelectTruePid(theAnalysis, muminus);
335  SelectTruePid(theAnalysis, piplus);
336  SelectTruePid(theAnalysis, piminus);
337 
338  // *** all combinatorics again with true PID
339  jpsi.Combine(muplus, muminus);
340  for (j=0;j<jpsi.GetLength();++j) hjpsim_trpid->Fill( jpsi[j]->M() );
341  jpsi.Select(jpsiMassSel);
342 
343  psi2s.Combine(jpsi, piplus, piminus);
344  for (j=0;j<psi2s.GetLength();++j) hpsim_trpid->Fill( psi2s[j]->M() );
345 
346 
347  // ***
348  // *** LOOSE PID combinatorics
349  // ***
350  // *** and again with PidAlgoMvd;PidAlgoStt;PidAlgoDrc and loose selection
351  theAnalysis->FillList(muplusloose, "MuonLoosePlus", "PidAlgoMvd;PidAlgoStt;PidAlgoDrc;PidAlgoDisc;PidAlgoMdtHardCuts");
352  theAnalysis->FillList(muminusloose, "MuonLooseMinus", "PidAlgoMvd;PidAlgoStt;PidAlgoDrc;PidAlgoDisc;PidAlgoMdtHardCuts");
353  theAnalysis->FillList(piplusloose, "PionLoosePlus", "PidAlgoMvd;PidAlgoStt;PidAlgoDrc;PidAlgoDisc");
354  theAnalysis->FillList(piminusloose, "PionLooseMinus", "PidAlgoMvd;PidAlgoStt;PidAlgoDrc;PidAlgoDisc");
355 
356  jpsiloose.Combine(muplusloose, muminusloose);
357  for (j=0;j<jpsiloose.GetLength();++j) hjpsim_lpid->Fill( jpsiloose[j]->M() );
358  //cout << jpsiloose.GetLength() << " jpsisloose "
359  //<< muplusloose.GetLength() << " muplusloose "
360  //<< muminusloose.GetLength() << " muminusloose "
361  //<< piplusloose.GetLength() << " piplusloose "
362  //<< piminusloose.GetLength() << " piminusloose "
363  //<< endl;
364  jpsiloose.Select(jpsiMassSel);
365 
366  psi2sloose.Combine(jpsiloose, piplusloose, piminusloose);
367  for (j=0;j<psi2sloose.GetLength();++j) hpsim_lpid->Fill( psi2sloose[j]->M() );
368 
369 
370  // ***
371  // *** TIGHT PID combinatorics
372  // ***
373  // *** and again with PidAlgoMvd;PidAlgoStt and tight selection
374  theAnalysis->FillList(muplustight, "MuonTightPlus", "PidAlgoMdtHardCuts");
375  theAnalysis->FillList(muminustight, "MuonTightMinus", "PidAlgoMdtHardCuts");
376  theAnalysis->FillList(piplustight, "PionLoosePlus", "PidAlgoMvd;PidAlgoStt;PidAlgoDrc");
377  theAnalysis->FillList(piminustight, "PionLooseMinus", "PidAlgoMvd;PidAlgoStt;PidAlgoDrc");
378 
379  jpsitight.Combine(muplustight, muminustight);
380  for (j=0;j<jpsitight.GetLength();++j) hjpsim_tpid->Fill( jpsitight[j]->M() );
381  //cout << jpsitight.GetLength() << " jpsistight "
382  //<< muplustight.GetLength() << " muplustight "
383  //<< muminustight.GetLength() << " muminustight "
384  //<< piplustight.GetLength() << " piplustight "
385  //<< piminustight.GetLength() << " piminustight "
386  //<< endl;
387  jpsitight.Select(jpsiMassSel);
388 
389  psi2stight.Combine(jpsitight, piplustight, piminustight);
390  for (j=0;j<psi2stight.GetLength();++j) hpsim_tpid->Fill( psi2stight[j]->M() );
391 
392  }
393 
394  // *** write out all the histos
395  cout<<"Write histograms to file "<<out->GetName()<<endl;
396  out->cd();
397 
398  hmomtrk->Write();
399  hthttrk->Write();
400 
401  hjpsim_all->Write();
402  hpsim_all->Write();
403  hjpsim_lpid->Write();
404  hpsim_lpid->Write();
405  hjpsim_tpid->Write();
406  hpsim_tpid->Write();
407  hjpsim_trpid->Write();
408  hpsim_trpid->Write();
409 
410  hjpsim_ftm->Write();
411  hpsim_ftm->Write();
412  hjpsim_nm->Write();
413  hpsim_nm->Write();
414 
415  hpsim_diff->Write();
416  hjpsim_diff->Write();
417 
418  hjpsim_vf->Write();
419  hjpsim_4cf->Write();
420  hjpsim_mcf->Write();
421 
422  hjpsi_chi2_vf->Write();
423  hpsi_chi2_4c->Write();
424  hjpsi_chi2_mf->Write();
425 
426  hjpsi_prob_vf->Write();
427  hpsi_prob_4c->Write();
428  hjpsi_prob_mf->Write();
429 
430  hvpos->Write();
431 
432  out->Save();
433  cout<<"Write histograms to file "<<out->GetName()<<" done."<<endl;
434 
435  // Extract the maximal used memory an add is as Dart measurement
436  // This line is filtered by CTest and the value send to CDash
437  FairSystemInfo sysInfo;
438  Float_t maxMemory=sysInfo.GetMaxMemory();
439  cout << "<DartMeasurement name=\"MaxMemory\" type=\"numeric/double\">";
440  cout << maxMemory;
441  cout << "</DartMeasurement>" << endl;
442 
443  fTimer.Stop();
444  Double_t rtime = fTimer.RealTime();
445  Double_t ctime = fTimer.CpuTime();
446 
447  Float_t cpuUsage=ctime/rtime;
448  cout << "<DartMeasurement name=\"CpuLoad\" type=\"numeric/double\">";
449  cout << cpuUsage;
450  cout << "</DartMeasurement>" << endl;
451 
452  cout << endl;
453  cout << "Real time " << rtime << " s, CPU time " << ctime
454  << "s" << endl;
455  cout << "CPU usage " << cpuUsage*100. << "%" << endl;
456  cout << "Max Memory " << maxMemory << " MB" << endl;
457 
458  cout << "Macro finished successfully." << endl;
459 
460  CloseGeoManager();
461  return 0;
462 
463 }
Int_t GetEntries()
int SelectTruePid(PndAnalysis *ana, RhoCandList &l)
Int_t i
Definition: run_full.C:25
TVector3 Pos() const
Definition: RhoCandidate.h:186
Int_t GetLength() const
Definition: RhoCandList.h:46
TH2F * hvpos
Definition: plot_eta_c.C:47
Bool_t FillList(RhoCandList &l, TString listkey="All", TString pidTcaNames="", int trackHypothesis=-1)
CandList piplus
void CloseGeoManager()
Definition: QA/auxi.C:11
FairRunAna * fRun
Definition: hit_dirc.C:58
CandList muplus
void Combine(RhoCandList &l1, RhoCandList &l2)
Double_t
void Select(RhoParticleSelectorBase *pidmgr)
FairRuntimeDb * rtdb
Definition: hit_dirc.C:66
void SetType(const TParticlePDG *pdt, int start=0)
TFile * out
Definition: reco_muo.C:20
Double_t M() const
void countDoubles(RhoCandList &l, int &n1, int &n2, int &n3)
Double_t ctime
Definition: hit_dirc.C:114
GeV c P
CandList piminus
Bool_t McTruthMatch(RhoCandidate *cand, Int_t level=2, bool verbose=false)
Int_t GetEvent(Int_t n=-1)
CandList muminus
Double_t rtime
Definition: hit_dirc.C:113
void countDoubles ( RhoCandList l,
int &  n1,
int &  n2,
int &  n3 
)

Definition at line 32 of file ana_multi.C.

References d, fabs(), RhoCandList::GetLength(), and i.

33 {
34  int n_smc = 0;
35  int n_strk = 0;
36  int n_both = 0;
37  double d = 0.00001;
38 
39  for (int i=0;i<l.GetLength()-1;++i)
40  {
41  for (int j=i+1;j<l.GetLength();++j)
42  {
43  TLorentzVector dl = l[i]->P4() - l[j]->P4();
44 
45  bool chkmc = (l[i]->GetMcTruth()==l[j]->GetMcTruth());
46  bool chktrk = (fabs(dl.X())<d) && (fabs(dl.Y())<d) && (fabs(dl.Z())<d) && (fabs(dl.E())<d);
47  if (chkmc) n_smc++;
48  if (chktrk) n_strk++;
49  if (chktrk && chkmc) n_both++;
50  }
51  }
52  n1 = n_strk;
53  n2 = n_smc;
54  n3 = n_both;
55 }
TObjArray * d
Int_t i
Definition: run_full.C:25
Int_t GetLength() const
Definition: RhoCandList.h:46
friend F32vec4 fabs(const F32vec4 &a)
Definition: P4_F32vec4.h:47
void printCand ( RhoCandidate c)

Definition at line 25 of file ana_multi.C.

References RhoCandidate::P4(), and RhoCandidate::PdgCode().

26 {
27  TLorentzVector lv=c->P4();
28 
29  cout <<c->PdgCode()<<" ("<<lv.X()<<"/"<<lv.Y()<<"/"<<lv.Z()<<"/"<<lv.E()<<")"<<endl;
30 }
TLorentzVector P4() const
Definition: RhoCandidate.h:195
int SelectTruePid ( PndAnalysis ana,
RhoCandList l 
)

Definition at line 9 of file ana_multi.C.

References RhoCandList::GetLength(), PndAnalysis::McTruthMatch(), and RhoCandList::Remove().

10 {
11  int removed = 0;
12 
13  for (int ii=l.GetLength()-1;ii>=0;--ii)
14  {
15  if ( !(ana->McTruthMatch(l[ii])) )
16  {
17  l.Remove(l[ii]);
18  removed++;
19  }
20  }
21 
22  return removed;
23 }
Int_t GetLength() const
Definition: RhoCandList.h:46
Int_t Remove(RhoCandidate *)
Bool_t McTruthMatch(RhoCandidate *cand, Int_t level=2, bool verbose=false)