GSI Forum
GSI Helmholtzzentrum für Schwerionenforschung

Home » PANDA » PandaRoot » Bugs, Fixes, Releases » Field maps in Macros
Field maps in Macros [message #9828] Tue, 01 December 2009 19:31 Go to previous message
Mohammad Al-Turany is currently offline  Mohammad Al-Turany
Messages: 518
Registered: April 2004
Location: GSI, Germany
first-grade participant
From: *dip.t-dialin.net
Hi,

I have simplified the PndMultiField, it has now a new ctor:

PndMultiField(TString Map)

The Map can be:

1. Full
which is equivalent to adding all maps in the macro i.e:

PndDipoleMap *map_d1= new PndDipoleMap("DipoleMap1", "R");
PndDipoleMap *map_d2= new PndDipoleMap("DipoleMap2", "R");
PndSolenoidMap *map_s1= new PndSolenoidMap("SolenoidMap1", "R");
PndSolenoidMap *map_s2= new PndSolenoidMap("SolenoidMap2", "R");
PndSolenoidMap *map_s3= new PndSolenoidMap("SolenoidMap3", "R");
PndSolenoidMap *map_s4= new PndSolenoidMap("SolenoidMap4", "R");
AddField(map_t);
AddField(map_d1);
AddField(map_d2);
AddField(map_s1);
AddField(map_s2);
AddField(map_s3);
AddField(map_s4);

2. Dipole:

equivalent to:

PndDipoleMap *map_d1= new PndDipoleMap("DipoleMap1", "R");
PndDipoleMap *map_d2= new PndDipoleMap("DipoleMap2", "R");
AddField(map_d1);
AddField(map_d2);

3. Solenoid:

equivalent to

PndSolenoidMap *map_s1= new PndSolenoidMap("SolenoidMap1", "R");
PndSolenoidMap *map_s2= new PndSolenoidMap("SolenoidMap2", "R");
PndSolenoidMap *map_s3= new PndSolenoidMap("SolenoidMap3", "R");
PndSolenoidMap *map_s4= new PndSolenoidMap("SolenoidMap4", "R");
AddField(map_s1);
AddField(map_s2);
AddField(map_s3);
AddField(map_s4);


so in the macro one can simply write:

Quote:

//---------------------Create and Set the Field(s)----------
PndMultiField *fField= new PndMultiField("FULL");
fRun->SetField(fField);


also the parameter handling for the field is done now in the field itself so the lines:

(PndMultiFieldPar*) rtdb->getContainer("PndMultiFieldPar");
if(fField) { fieldPar->SetParameters(fField); }
fieldPar->setInputVersion(fRun->GetRunId(),1);
fieldPar->setChanged(kTRUE);

are not needed any more (see macro/run/run_sim.C )


regards

Mohammad





[Updated on: Mon, 08 February 2010 00:05] by Moderator

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: pandaroot feb10 release
Next Topic: [FIXED] problem with GEANT4 materials
Goto Forum:
  


Current Time: Sat Oct 12 03:36:38 CEST 2024

Total time taken to generate the page: 0.00822 seconds