GSI Forum
GSI Helmholtzzentrum für Schwerionenforschung

Home » PANDA » PandaRoot » EMC » EMC mapper and other modifications
EMC mapper and other modifications [message #10313] Fri, 26 February 2010 12:10 Go to previous message
Dima Melnychuk is currently offline  Dima Melnychuk
Messages: 213
Registered: April 2004
Location: National Centre for Nucle...
first-grade participant
From: *
Hi all,

I made some changes in PndEmcMapper class to make its usage more transparent.
Initial implementation of EmcMapper was a singleton, but it appeared to be not the best idea since theoretically different runs can be simulated with different geometry and correspondingly with different mappers.

So now PndEmcMapper is initialized with the Init() method and can be reinitialized if necessary with different input parameter. And mapper is accessed with static Instance() method which now does not have input parameters.

Second modification is that I removed from the mapper procedure to create neighboring elements for each crystal. Initial purpose of Mapper is to map to unique crystal ID two coordinates in (theta, phi) for barrel or (X,Y) for Endcaps, which are used in clusterisation algorithm. The creation of neighbors was extension of this functionality but probably not in proper place.

Initially neighbors for each crystal were filled in EmcMapper to check in clusterisation algorithm if one element is in neighbor list of another then they are neighbors. However it appeared to be more time consuming then the check which is used now in PndEmcTwoCoordIndex.cxx.

The difficulty with creation of neighbors was that it depended on geometry (gGeoManager) and this created difficulty with initialization of EmcMapper from RunTimeDataBase.

So here I come to another important point, i.e. initialization of EmcMapper from RunTimeDataBase. Some time ago Ola Biegun introduced functionality in PndEmc.cxx class to store mapper version in RTDB depending on chosen geometry. This will allow to avoid mismatching between geometry and mapper in emc reconstruction. However this functionality was not fully used by now.

So I removed mapper version from PndEmcDigiPar parameter container and it accessed everywhere in the code from PndEmcGeoPar which is filled in PndEmc::SetGeometryVersion(). So from now I would propose to use this method to set geometry for simulation


instead of


Important remark here is that in simulation macro the RunTimeDataBase should be initialized and especially output be set
  FairRuntimeDb* rtdb = fRun->GetRuntimeDb();
  FairParAsciiFileIo* parIo1 = new FairParAsciiFileIo();
  Bool_t kParameterMerged=kTRUE;
  FairParRootFileIo* output=new   FairParRootFileIo(kParameterMerged);

before the call

to store the mapper version properly.

In PndEmcGeoPar I introduced the method PndEmcGeoPar::InitEmcMapper() which is actually initialise PndEmcMapper from RTDB.

So the proper method to initialize EmcMapper in analysis macro would be (as it is implemented now in /macro/qa/emc/QAmacro_emc_3.C)
	FairRunAna *fRun= new FairRunAna();
	FairRuntimeDb* rtdb = fRun->GetRuntimeDb();
	FairParRootFileIo* parInput1 = new FairParRootFileIo();
  	TString emcAsciiPar = gSystem->Getenv("VMCWORKDIR");
	emcAsciiPar += "/macro/params/";
	emcAsciiPar += "emc.par";
	FairParAsciiFileIo* parInput2 = new FairParAsciiFileIo();
	PndEmcGeoPar *geoPar = (PndEmcGeoPar*) rtdb->getContainer("PndEmcGeoPar");

however shortcut

will work if you know proper mapper version.

In addition I introduced small modification in EMC digitisation.
In PndEmcHitsToWaveform by now waveforms were produced in the crystals with hits and their neighbors. Now by default waveforms are not produced in neighbors of hited crystals however I introduced a flag NoiseAllChannels in PndEmcDigiPar, which by default if off. When it is on waveforms are produced in all the channels of EMC and they will contain electronic noise. It will allow to study the effect of noise excess over the threshold. However this option is very time consuming.

I hope these modifications will not have unpredicted side effects.

I have updated macros in

so if there will be problems with other macros please look there for examples.

Best regards,


Read Message
Read Message
Read Message
Read Message
Previous Topic: EMC WorkPackages
Next Topic: EMC energy & theta corrections for photons
Goto Forum:

Current Time: Fri Jun 21 12:16:57 CEST 2024

Total time taken to generate the page: 0.01006 seconds