[Frost] gsim and rootbeer issues

Franz Klein fklein at jlab.org
Wed Sep 21 11:20:14 EDT 2011


Mike,
I tried to reproduce your claimed error in vertex smearing ...
Where did you run the code? Did you check out the changes I put under cvs 
a few weeks ago?
I guess you used gsim_bat from the clasg9 account ... which was NOT 
updated! (You should have got a geant3 message like: volume "BEAM" 
redefined ... during initialization). For the CLAS cryo targets the target 
position is related to the start counter position (at least, you moving 
TGPOS or STZOFF too much was prevented by some internal checks using the
tgpar_save array), that is not initialized the same way for newer targets, 
including frost and hd.
I just updated gsim in /home/clasg9 and rebuilt gsim_int, gsim_bat

MCTK and MCVX banks are "multi-sector" banks (actually the wrong term for 
the fact that BOS banks can have more than 1 record): use MCTK_NS and 
MCVX_NS in rootbeer. Meaning: MCTK[0], MCVX[0] contain primary particle 
info, MCTK[1], MCVX[1] secondaries (produced by geant3). If begin- or 
end-vertex numbers are negative, look up the other bank record, e.g.

           int id_Lvtx=0;
 	  int id_lambda=0;
           for(int i=0; i<MCTK_NH[0]; i++) {
             if(MCTK[0][i].id==MCID_PHOTON && MCTK[0][i].end_vtx>0) {
               // beam photon:
p4_mcPhot.SetXYZM(MCTK[0][i].cx*MCTK[0][i].pmom,MCTK[0][i].cy*MCTK[0][i].pmom,MCTK[0][i].cz*MCTK[0][i].pmom,0.0);
             }
             if(MCTK[0][i].id==MCID_LAMBDA) {
               id_lambda = i;

p4_mcLambda.SetXYZM(MCTK[0][i].cx*MCTK[0][i].pmom,MCTK[0][i].cy*MCTK[0][i].pmom,MCTK[0][i].cz*MCTK[0][i].pmom,M_LAMBDA);
               id_Lvtx = MCTK[0][i].end_vtx;
             }
           }
           if(id_Lvtx) {
             if(id_Lvtx>0) {
               // Lambda decay vertex
Lvtx_mc.SetXYZ(MCVX[0][id_Lvtx-1].x,MCVX[0][id_Lvtx-1].y,MCVX[0][id_Lvtx-1].z);
               for(int i=0; i<MCTK_NH[0]; i++) {
                 if(MCTK[0][i].id==MCID_PROTON) {

p4_mcProt.SetXYZM(MCTK[0][i].cx*MCTK[id][i].pmom,MCTK[0][i].cy*MCTK[0][i].pmom,MCTK[0][i].cz*MCTK[0][i].pmom,M_PROTON);
                   break;
                 }
               }
             }
             else {

Lvtx_mc.SetXYZ(MCVX[1][1-id_Lvtx].x,MCVX[1][1-id_Lvtx].y,MCVX[1][1-id_Lvtx].z);
               for(int i=0; i<MCTK_NH[1]; i++) {
                 if(MCTK[1][i].id==MCID_PROTON) {

p4_mcProt.SetXYZM(MCTK[1][i].cx*MCTK[1][i].pmom,MCTK[1][i].cy*MCTK[1][i].pmom,MCTK[1][i].cz*MCTK[1][i].pmom,M_PROTON);
                   break;
                 }
               }
             }
           }


Good luck
Franz

On Tue, 20 Sep 2011, Michael Dugger wrote:

>
> Hi,
>
> GSIM issue:
> GSIM is smearing the target vertex wrong. The event generator I use sets
> all of my reaction vertexes at 0,0,0 but after gsim the target is smeared
> and the center ends up being at approximately + 4cm.
>
> In the gsim_frost.ffread file, the target center is set to zero:
> TGPOS 0.0 0.0 0.0
>
> The start counter offset:
> STZOFF 4.0
> is the same as the offset I am seeing for the vertexes. Is this just a
> coincidence?
>
> The way I determine that the target is offset by 4 cm is by looking at
> vertex from MVRT and TBTR (passed through GPID). I am having difficulties
> plotting directly from MCVX (more on this later). I spot checked the MCVX
> bank from the event generator to make sure the vertex was always at zero.
> When I bosdump the output from gsim_bat (on the Jlab CUE) the
> smeared vertex from MCVX appears to be consistently shifted downstream
> consistent with the shift being about 4 cm.
>
> ROOTBEER issue:
> When I print out the MCTK_NH or MCVX_NH variables I always get 0. I have
> checked that the root file I process has the MCTK and MCVX banks by
> looking at the output of the bankdump command. When I try to compile the
> code accessing individual members of the banks (MCTK and MCVX), I get
> errors like:
> /home/dugger/g9Ana/test/testDST.C:348: error: request for member z in *
> MCVX, which is of non-class type MCVX_t*
>
> The code I am using has for the bank definitions:
> char *mybanks[]={"RUNC","GPID","MVRT","BEAM","TAGR","TGBI","null","MCVX","MCTK"};
>
> And I try to access the z-vertex of the MCVX bank like this:
> hVertMCVX->Fill(MCVX[0].z);
>
> Should I be accessing the z-vertex from MCVX in a different way?
>
> Thanks for your time.
>
> Sincerely,
> Michael
>
> _______________________________________________
> Frost mailing list
> Frost at jlab.org
> https://mailman.jlab.org/mailman/listinfo/frost
>

===============================================================
                   Franz J. Klein, Associate Professor
                   CUA, Department of Physics
                   Washington, DC 20064
   office: Hannan Hall 206          phone: 202-319-6190
   or: Jefferson Lab,CC F-243       phone: 757-269-6672
---------------------------------------------------------------


More information about the Frost mailing list