Home » PANDA » PandaRoot » Fast Simulations » [FIXED] first try with fast simulation problem (error and break and aborting execution)
Re: first try with fast simulation problem [message #16393 is a reply to message #16282] |
Tue, 22 April 2014 10:58 |
Alexandros
Messages: 51 Registered: January 2014 Location: KVI
|
continuous participant |
From: *kvi-cart.rug.nl
|
|
I changed my code in the new form:
// *** some variables
int i=0,j=0, k=0, l=0;
//gStyle->SetOptFit(1011);
// *** the output file for FairRunAna
TString OutFile="psi4160_out.root";
// *** initialization
FairLogger::GetLogger()->SetLogToFile(kFALSE);
FairRunAna* fRun = new FairRunAna();
fRun->SetWriteRunInfoFile(kFALSE);
fRun->SetInputFile(InFile);
fRun->SetOutputFile(OutFile); // only dummy; the real output is psi4160.root
fRun->Init();
// *** take constant field; needed for PocaVtx
RhoCalculationTools::ForceConstantBz(20.0);
// *** create an output file for all histograms
TFile *out = TFile::Open("psi4160.root","RECREATE");
// *** create some ntuples
RhoTuple *npsi4160 = new RhoTuple("npsi4160", "psi4160 analysis");
RhoTuple *nd0 = new RhoTuple("nd0", "d0 analysis");
RhoTuple *nantid0 = new RhoTuple("nantid0", "antid0 analysis");
RhoTuple *nmc = new RhoTuple("nmc", "mctruth info");
//
// Now the analysis stuff comes...
//
// *** the data reader object
PndAnalysis* theAnalysis = new PndAnalysis();
if (nevts==0) nevts= theAnalysis->GetEntries();
// *** name of the only PidAlgo TClonesArray in fsim
TString pidalg = "PidChargedProbability";
// *** QA tool for simple dumping of analysis results in RhoRuple
PndRhoTupleQA qa(theAnalysis, pbarmom);
// *** RhoCandLists for the analysis
RhoCandList psi4160, d0, antid0, kplus, kminus, piplus, piminus, all, mclist;
// *** Mass selector for the d0 cands
double m0_d0 = TDatabasePDG::Instance()->GetParticle("D0")->Mass(); // Get nominal PDG mass of the D0/anti-D0
RhoMassParticleSelector *d0MassSel=new RhoMassParticleSelector("d0",m0_d0,1.0);
// *** the lorentz vector of the initial psi(4160)
TLorentzVector ini(0, 0, 8.000, 9.016);
// ***
// the event loop
// ***
while (theAnalysis->GetEvent() && i++<nevts)
and so on, but now it gives me an error saying:
-I- FairRunTimeDB::InitContainer() FairBaseParSet
[ERROR ] init() FairBaseParSet not initialized
-I- FairRunTimeDB::InitContainer() ANAPidSelections
[ERROR ] init() ANAPidSelections not initialized
Error in <FairRuntimeDb::initContainers()>: Error occured during initialization
[INFO ] The number of entries in chain is 10000
*** Break *** segmentation violation
Do you have any idea of what is wrong???
|
|
|
Goto Forum:
Current Time: Sun Nov 24 13:26:27 CET 2024
Total time taken to generate the page: 0.00728 seconds
|