Home » PANDA » PandaRoot » Analysis » Using Rho without MC info
Re: Using Rho without MC info [message #18506 is a reply to message #18401] |
Wed, 16 September 2015 16:37 |
Ralf Kliemt
Messages: 507 Registered: May 2007 Location: GSI, Darmstadt
|
first-grade participant |
From: *gsi.de
|
|
Hi Marcel,
As far as the Analysis & Rho side is concerned, try the patch in the spoiler below. Basically now it tries to create MC Cands even if we have no MC Track array. This results in a message for each event. With the patch that message won't appear.
As the pi0 combinations go:
RhoCandList gammas, pi0s;
while (theAnalysis->GetEvent() && i++<nevts){
theAnalysis->FillList(gammas, "Neutral");
pi0s.Combine(gammas,gammas);
...
}
Cheers!
Ralf
Toggle Spoiler
Index: PndAnalysis.cxx
===================================================================
--- PndAnalysis.cxx (revision 28526)
+++ PndAnalysis.cxx (working copy)
@@ -143,13 +143,13 @@
if ( ! fMcTracks && fVerbose ) {
std::cout << "-W- PndAnalysis::Init(): No \"MCTrack\" array found. No MC info available." << std::endl;
- }
+ } else {
+ fBuildMcCands = true;
+ fMcCands = new TClonesArray ( "RhoCandidate" );
+ // next line commented by KG, 07/2012
+ fRootManager->Register ( "PndMcTracks","PndMcTracksFolder", fMcCands, kFALSE );
+ }
- fMcCands =new TClonesArray ( "RhoCandidate" );
-
- // next line commented by KG, 07/2012
- fRootManager->Register ( "PndMcTracks","PndMcTracksFolder", fMcCands, kFALSE );
- fBuildMcCands = true;
}
fChainEntries = ( fRootManager->GetInChain() )->GetEntries();
@@ -440,18 +440,17 @@
{
int i;
// Make Monte-carlo truth candidates by the reconstructed particles up to the initial state (if available)
- if ( !fMcCands ){
- Warning("PndAnalysis::BuildMcCands","No array to store candidates...");
- return;
- }
if ( !fBuildMcCands ) {
if(fVerbose) Info("PndAnalysis::BuildMcCands","No mc to build...");
return;
}
+ if ( !fMcCands ){
+ Warning("PndAnalysis::BuildMcCands","No array to store candidates...");
+ return;
+ }
if ( fMcCands->GetEntriesFast() != 0 ) {
fMcCands->Delete();
}
-
if ( fMcTracks == 0 ) {
Error ( "BuildMcCands","MC track Array does not exist." );
return;
|
|
|
Goto Forum:
Current Time: Sun Nov 10 02:26:39 CET 2024
Total time taken to generate the page: 0.00667 seconds
|