GSI Forum
GSI Helmholtzzentrum für Schwerionenforschung

Home » Fairroot » General Discussion » Implementing Magnetic field and Fast simulations in fairroot.
Implementing Magnetic field and Fast simulations in fairroot. [message #13403] Wed, 25 April 2012 03:31 Go to previous message
Raghav Kunnawalkam is currently offline  Raghav Kunnawalkam
Messages: 63
Registered: February 2012
Location: Stony Brook, New York
continuous participant
From: *
Hi All

I have been trying to get a magnetic field set up in my experiment and i tried a couple of ways of doing it. Both not working with different reasons.

first one was to get the field directory from pandaroot and just put the whole thing in fairroot with changing the names wherever appropriate and calling that function. Even though this did not give me any error, it made no difference to the trajectories of the particle.
i did it like this:
FairConstField* fMagField = new FairConstField();
fMagField->SetField(40.,0.,0.);//values are in kG, 1T = 10kG
fMagField->SetFieldRegion(-5000.,5000.,5000.,5000.,-5000.,5000.); // in cm


Second way, i saw that fairroot had a fairfield class inside base directory and tried to define my field using that (i just wanted to define a Bx), which i am pretty sure that i should do, and it keeps telling me that i have to implement Bx, By and Bz. i have no idea what to do with it.

Also in example Tutorial2, i am pretty sure that you guys have defined a magnetic field using FairFieldPar class, which is definitely not present in fairroot. In that example the field part has been commented out for some reason which i have no idea about.

I also wanted to be able to do fast simulations, so as usual i went to panda and copied all the fsim classes and tried building fairroot with them (again, i changed the names of classes and variables to be suitable). I am getting a lot of errors, which i think i can fix, but my main question is that can i do this?. The architecture of both of them are the same i think?

Some time back i asked about analyzing radiation length data and Mohammad pointed me to an example in Panda by Ralf, materialana.C. I went through it and pretty much tried to run it on the file that i produced from my detector and root gives me a lot of errors.
(in the errors following below, i just want to make clear that the macro did load the TClonesArray class without any problem, i just cant figure out what it is telling me after that)

Processing rad_length_ana.C...
Error: Symbol queue<TClonesArray*>second is not defined in current scope _pair.h:34:
Error: Symbol queue is not defined in current scope /Users/raghav/fairsoft/tools/root/cint/cint/lib/prec_stl/utility:19:
Error: Symbol TClonesArray is not defined in current scope /Users/raghav/fairsoft/tools/root/cint/cint/lib/prec_stl/utility:19:
Error: G__getvariable: expression /Users/raghav/fairsoft/tools/root/cint/cint/lib/prec_stl/utility:19:
Error: Symbol second is not defined in current scope /Users/raghav/fairsoft/tools/root/cint/cint/lib/prec_stl/utility:19:
Error: no such template queue<TClonesArray*> /Users/raghav/fairsoft/tools/root/cint/cint/lib/prec_stl/map:66:
Error: Symbol queue is not defined
.... (and so on)

I cant even run it in panda, because some of the required files are not there. If there is an example which i can run properly and make some small changes and see how it works etc, that would be great.

Thanks a lot for all your help
Read Message
Read Message
Read Message
Previous Topic: Doing collisions and input information.
Next Topic: Getting Hits by detectors registered in the output root file
Goto Forum:

Current Time: Thu Jul 18 06:14:41 CEST 2024

Total time taken to generate the page: 0.00794 seconds