GSI Forum
GSI Helmholtzzentrum für Schwerionenforschung

Home » PANDA » PandaRoot » EMC » Access to clusters properties
Re: Access to clusters properties [message #11767 is a reply to message #11759] Tue, 10 May 2011 13:05 Go to previous message
Ronald Kunne is currently offline  Ronald Kunne
Messages: 32
Registered: October 2009
continuous participant
From: *in2p3.fr
Hi Dima,


Thanks for the info. I looked through your collection of macros and found an easy solution there. I got 1) to work as I described above with the following for the "hypothetical loop":
                Int_t ndigi= digi_array->GetEntriesFast();
                Double_t digiEsum=0;
		for (Int_t i=0; i<ndigi; i++) {
		  PndEmcDigi *digi=(PndEmcDigi*)digi_array->At(i);
		  Double_t digi_energy=digi->GetEnergy();
                  digiEsum+=digi_energy;
		}

After the loop the sum over the digi energies is equal to the cluster energy as it should. I found this method in your /macro/emc/dedicated/digi_analys.C

2) does work indeed for
PndEmcClusterEnergySums esum(*cl, digi_array);
(which is the example in your reco_analys.C).

But when using instead
PndEmcXClMoments mom(*cl, digi_array);
I get the error message: "gGeoManager does not exist" with root ending without a crash.

But with access to the digis I can calculate my own moments anyway.

Greetings,
Ronald Kunne
 
Read Message
Read Message
Read Message
Previous Topic: Uniform particle generation in solid angle
Next Topic: New FwEndCap geometry implemented
Goto Forum:
  


Current Time: Fri Mar 29 00:10:30 CET 2024

Total time taken to generate the page: 0.00856 seconds