GSI Forum
GSI Helmholtzzentrum für Schwerionenforschung

Home » PANDA » PandaRoot » Bugs, Fixes, Releases » EmcCluster: Map version 0 does not exist
icon4.gif  EmcCluster: Map version 0 does not exist [message #6917] Sat, 14 June 2008 15:37 Go to next message
Jens Sören Lange is currently offline  Jens Sören Lange
Messages: 193
Registered: June 2005
first-grade participant
From: *physik.uni-giessen.de
Hi all,

another problem.

I have a root file and I can see that in the cbmsim there is EmcCluster and I can even click in the TBrowser on EmcCluster.fEnergy and see that there are entries.

However, when I try to access them in a macro:

TClonesArray* cluster_array=new TClonesArray("PndEmcCluster");
chain->SetBranchAddress("EmcCluster",&cluster_array);

for (Int_t i5=0; i5<cluster_array->GetEntriesFast(); i5++) {
PndEmcCluster *cluster=(PndEmcCluster*)cluster_array->At(i5);
cout << "cluster energy " << cluster.energy() << "\n";
}

I get for every event:

Map version 0 does not exist

and I cannot access any of the clusters.

(I remember roughly that Stefano already saw this, but I don't know if there was a solution to it).

Any idea?

Soeren
Re: EmcCluster: Map version 0 does not exist [message #6919 is a reply to message #6917] Sat, 14 June 2008 18:23 Go to previous messageGo to next message
StefanoSpataro is currently offline  StefanoSpataro
Messages: 2736
Registered: June 2005
Location: Torino
first-grade participant

From: *211-62-r.retail.telecomitalia.it
Hi,
in theory this should be just a warning, and the cluster should be given anyhow.

In each case, in order to avoid the problem, you should add your simulation file as friend of your analyzed tree. I.e., if your tree is called "chain", after you create your tree you have to type:

chain->AddFriend("cbmsim","simulationfile.root");
PndEmcMapper *emcMap=PndEmcMapper::Instance(1);


In simulationfile.root there should be the geometry, and then PndEmcMapper should be able to create the proper map.
If this does not work, try to set the branch address of the digi:

TClonesArray* digi_array=new TClonesArray("PndDigiCluster");
chain->SetBranchAddress("EmcDigi",&digi_array);


If this still does not work... I have no idea, ask Dima Smile


Re: EmcCluster: Map version 0 does not exist [message #6925 is a reply to message #6917] Sun, 15 June 2008 16:14 Go to previous messageGo to next message
Dima Melnychuk is currently offline  Dima Melnychuk
Messages: 213
Registered: April 2004
Location: National Centre for Nucle...
first-grade participant
From: *fuw.edu.pl
Hi Soeren,

Did suggestion of Stefano work for you?

I mean:
chain->AddFriend("cbmsim","simulationfile.root");
PndEmcMapper *emcMap=PndEmcMapper::Instance(1);

But it's strange that the code you posted does not access the energy of EmcCluster.
I have just checked and for me the message
"Map version 0 does not exist" is only a warning but energy is accessed.

Dima
Re: EmcCluster: Map version 0 does not exist [message #6951 is a reply to message #6917] Mon, 16 June 2008 19:45 Go to previous messageGo to next message
Jens Sören Lange is currently offline  Jens Sören Lange
Messages: 193
Registered: June 2005
first-grade participant
From: *web.vodafone.de
This works now (thanks to Dima).

The correct sequence is (load the sim file first for the map):

TFile* fsim = new TFile("simfile.root");
TTree *tsim=(TTree *) fsim->Get("cbmsim");
PndEmcMapper *emcMap=PndEmcMapper::Instance(1);
TChain *chain = new TChain("cbmsim");
chain->Add("recofile.root");
TClonesArray* cluster_array=new TClonesArray("PndEmcCluster");
chain->SetBranchAddress("EmcCluster",&cluster_array);
...

Re: EmcCluster: Map version 0 does not exist [message #7425 is a reply to message #6917] Thu, 16 October 2008 18:11 Go to previous messageGo to next message
Vishwajeet Jha is currently offline  Vishwajeet Jha
Messages: 9
Registered: August 2008
occasional visitor
From: *ikp.kfa-juelich.de
Hi.....

When I run the macro

/macro/fsim/writeMicro.C with the simulation and reconstruction file generated through runMC.C and runReco.C I get the following error

Map version 0 doesn't exist

(For the EMC clusters)

The solution provided earlier for the similar problem as quoted
doesn't help.

What is wrong??

Vishwajeet Jha



Jens Soeren Lange wrote on Sat, 14 June 2008 15:37

Hi all,

another problem.

I have a root file and I can see that in the cbmsim there is EmcCluster and I can even click in the TBrowser on EmcCluster.fEnergy and see that there are entries.

However, when I try to access them in a macro:

TClonesArray* cluster_array=new TClonesArray("PndEmcCluster");
chain->SetBranchAddress("EmcCluster",&cluster_array);

for (Int_t i5=0; i5<cluster_array->GetEntriesFast(); i5++) {
PndEmcCluster *cluster=(PndEmcCluster*)cluster_array->At(i5);
cout << "cluster energy " << cluster.energy() << "\n";
}

I get for every event:

Map version 0 does not exist

and I cannot access any of the clusters.

(I remember roughly that Stefano already saw this, but I don't know if there was a solution to it).

Any idea?

Soeren

































Re: EmcCluster: Map version 0 does not exist [message #7426 is a reply to message #7425] Fri, 17 October 2008 09:28 Go to previous messageGo to next message
Aleksandra Biegun is currently offline  Aleksandra Biegun
Messages: 64
Registered: May 2007
Location: Groningen
continuous participant
From: *KVI.nl
Hello Vishwajeet Jha,

try to change map version number from 1 to 2, i.e.

from:
TFile* fsim = new TFile("simfile.root");
TTree *tsim=(TTree *) fsim->Get("cbmsim");
PndEmcMapper *emcMap=PndEmcMapper::Instance(1);
...

to:
TFile* fsim = new TFile("simfile.root");
TTree *tsim=(TTree *) fsim->Get("cbmsim");
PndEmcMapper *emcMap=PndEmcMapper::Instance(2);

Now, we use map version number 2.
You can check which map version you use in the parametrisation file in ./trunk/macro/params/emc.par

Do not edit this file via "jed", use for instance "emacs" or just
loot into in via "more" or "less" programs.

I hope it will work for you.


Regards,
Aleksandra.




Aleksandra Biegun
University of Groningen/KVI
Zernikelaan 25, 9747 AA Groningen
tel. +31 50 363 3630
fax. +31 50 363 4003
Re: EmcCluster: Map version 0 does not exist [message #7427 is a reply to message #7426] Fri, 17 October 2008 09:38 Go to previous messageGo to next message
StefanoSpataro is currently offline  StefanoSpataro
Messages: 2736
Registered: June 2005
Location: Torino
first-grade participant

From: *dip.t-dialin.net
Aleksandra Biegun wrote on Fri, 17 October 2008 09:28


TFile* fsim = new TFile("simfile.root");
TTree *tsim=(TTree *) fsim->Get("cbmsim");
PndEmcMapper *emcMap=PndEmcMapper::Instance(2);



Instead of the previous lines, you can use the much more compact form:
PndEmcMapper *emcMap=PndEmcMapper::Instance(2,"simfile.root");

which is doing exactly the same thing.
Re: EmcCluster: Map version 0 does not exist [message #7429 is a reply to message #7427] Fri, 17 October 2008 15:53 Go to previous messageGo to next message
Vishwajeet Jha is currently offline  Vishwajeet Jha
Messages: 9
Registered: August 2008
occasional visitor
From: *ikp.kfa-juelich.de
Hi...

It still doesn't solve my problem specifically in

/macro/fsim/writeMicro.C

I get the error

CBMGeom object is not found.

I have the geometries loaded and the simulation file included in the macro.

Regards
Vishwajeet
Re: EmcCluster: Map version 0 does not exist [message #7431 is a reply to message #7429] Fri, 17 October 2008 16:18 Go to previous messageGo to next message
StefanoSpataro is currently offline  StefanoSpataro
Messages: 2736
Registered: June 2005
Location: Torino
first-grade participant

From: *physik.uni-giessen.de
Where have you copied exactly those command lines?
Re: EmcCluster: Map version 0 does not exist [message #7435 is a reply to message #7431] Fri, 17 October 2008 17:36 Go to previous messageGo to next message
Vishwajeet Jha is currently offline  Vishwajeet Jha
Messages: 9
Registered: August 2008
occasional visitor
From: *ikp.kfa-juelich.de
I have added at

in /macro/fsim/writeMicro.C

after the reco and simulation files are loaded.

Vishwajeet
Re: EmcCluster: Map version 0 does not exist [message #7436 is a reply to message #7435] Fri, 17 October 2008 17:38 Go to previous messageGo to next message
StefanoSpataro is currently offline  StefanoSpataro
Messages: 2736
Registered: June 2005
Location: Torino
first-grade participant

From: *physik.uni-giessen.de
Question:
if you open your sim file, do you find the object called CBMGeom ?
Re: EmcCluster: Map version 0 does not exist [message #7437 is a reply to message #6917] Fri, 17 October 2008 17:50 Go to previous messageGo to next message
Dima Melnychuk is currently offline  Dima Melnychuk
Messages: 213
Registered: April 2004
Location: National Centre for Nucle...
first-grade participant
From: *fuw.edu.pl
Just an idea,

Try to add
fRunA->LoadGeometry();

before
//append the analysis task
PndMicroWriter *tcandTask=new PndMicroWriter();
fRunA->AddTask(tcandTask);

Dima
Re: EmcCluster: Map version 0 does not exist [message #7438 is a reply to message #7437] Fri, 17 October 2008 18:08 Go to previous messageGo to next message
Vishwajeet Jha is currently offline  Vishwajeet Jha
Messages: 9
Registered: August 2008
occasional visitor
From: *ikp.kfa-juelich.de

I had tried appending

fRunA-> LoadGeometry();

It doesn't help.

I do find object CBMGeom when i open my simulation file.
(generated thr' macro )
/macro/fsim/runMC.C

Vishwajeet
Re: EmcCluster: Map version 0 does not exist [message #7439 is a reply to message #7438] Fri, 17 October 2008 18:39 Go to previous messageGo to next message
StefanoSpataro is currently offline  StefanoSpataro
Messages: 2736
Registered: June 2005
Location: Torino
first-grade participant

From: *physik.uni-giessen.de
I have tried to run the macros runMC.C, runReco.C and I have modified writeMacro.C, adding after line 53 the following line:

       fRunA->SetOutputFile.Data());
->     PndEmcMapper *emcMap = PndEmcMapper(2,simfile);


and I have no errors.
Are you sure you have written everything correctly?

Re: EmcCluster: Map version 0 does not exist [message #7453 is a reply to message #7439] Tue, 21 October 2008 15:38 Go to previous message
Vishwajeet Jha is currently offline  Vishwajeet Jha
Messages: 9
Registered: August 2008
occasional visitor
From: *ikp.kfa-juelich.de
Hi...

I tried few things as suggested by adding lines in
writeMicro.C, none work for me , I list the errors which I get

i) PndEmcMapper *emcMap = PndEmcMapper (2,simfile);

-I- CbmRunAna Input file: output.evt.mc.root is connected to friend: output.evt.mcreco.root
Error: Symbol null is not defined in current scope writeMicro.C:71:
*** Interpreter error recovered ***

ii) PndEmcMapper *emcMap = PndEmcMapper::Instance(2,simfile);

-I- CbmRunAna Input file: output.evt.mc.root is connected to friend: output.evt.mcreco.root
Error: Incorrect assignment to emcMap, wrong type 'Reflex::Instance' writeMicro.C:57:
*** Interpreter error recovered ***

iii) PndEmcMapper *emcMap = PndEmcMapper::Instance(2);

In this case we had to add the simfile first and recofile as the friend (opposite to what is there in macro), then the CBMGeom object is recognized, but now the error is

create PndFieldPar container PndConstPar
create PndFieldPar container PndMultiFieldPar

*** Break *** segmentation violation
Using host libthread_db library "/lib/libthread_db.so.1".
Attaching to program: /proc/9046/exe, process 9046
[Thread debugging using libthread_db enabled]
[New Thread -1228196144 (LWP 9046)]
0xb7f44410 in __kernel_vsyscall ()
#1 0xb6d735c3 in __waitpid_nocancel () from /lib/libc.so.6
................

Without including the EMC in the simfile everything runs fine for me. That's not all. Same thing in another computer (of Tobias) has problems in runReco.C itself in Kalman

double Kalman::getChi2Hit(AbsRecoHit* hit, AbsTrackRep* rep)
assert(chisq.GetNoElements()==1;

Regards,
Vishwajeet
Previous Topic: simpleEvtGen for fast simulation limited (?)
Next Topic: Fix in lhetrack
Goto Forum:
  


Current Time: Thu Nov 07 08:23:04 CET 2024

Total time taken to generate the page: 0.00887 seconds