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 |
Raghav Kunnawalkam
Messages: 63 Registered: February 2012 Location: Stony Brook, New York
|
continuous participant |
From: *dyn.optonline.net
|
|
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
run->SetField(fMagField);
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
Cheers
Raghav
|
|
|
Re: Implementing Magnetic field and Fast simulations in fairroot. [message #13411 is a reply to message #13403] |
Wed, 25 April 2012 11:42 |
StefanoSpataro
Messages: 2736 Registered: June 2005 Location: Torino
|
first-grade participant |
From: *57-82-r.retail.telecomitalia.it
|
|
Raghav Kunnawalkam wrote on Wed, 25 April 2012 03:31 |
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
run->SetField(fMagField);
|
Probably it should be:
fMagField->SetFieldRegion(-5000.,5000.,-5000.,5000.,-5000.,5000.); // in cm
|
|
|
Re: Implementing Magnetic field and Fast simulations in fairroot. [message #13413 is a reply to message #13411] |
Wed, 25 April 2012 15:30 |
Raghav Kunnawalkam
Messages: 63 Registered: February 2012 Location: Stony Brook, New York
|
continuous participant |
From: *physics.sunysb.edu
|
|
Hi Stefano
That was a typo when i when wrote it in the forum. Here is what actually is going on. I put the magnetic field over whole of my space (the size of my cave) and i just figured out that the particle is actually circling due to the magnetic field but it is doing it very very far away.
here is what i mean.
FairConstField* fMagField = new FairConstField();
fMagField->SetField(40.,0.,0.);//values are in kG, 1T = 10kG
fMagField->SetFieldRegion(-20000.,20000.,-20000.,20000.,-20000.,20000.); // in cm
run->SetField(fMagField);
|
|
|
Goto Forum:
Current Time: Thu Dec 05 07:59:14 CET 2024
Total time taken to generate the page: 0.00733 seconds
|