TS RunGroupC

From New IAC Wiki
Jump to navigation Jump to search

Inclusive electron scattering

Theta and Phi graphs

Solenoid off

TS 11162015 GenTheta.pngTS 11162015 Theta.png


Solenoid On

Inclusive Track Reconstruction efficiencies

Plot the reconstruction efficiency for an electron as a function of the angles Theta and Phi

I used the following: UBUNTU 14, coat-java-1.0

No Solenoid gcard:

<!-- minumal detectors for HB tracking -->

        <detector name="../../../../clas12/fc/forwardCarriage" factory="TEXT" variation="original"/>
        <detector name="../../../../clas12/dc/dc"            factory="TEXT" variation="original"/>
        <detector name="../../../../clas12/ftof/ftof"            factory="TEXT" variation="original"/>
        <option name="SCALE_FIELD" value="clas12-torus-big, -1"/>
        <option name="OUTPUT" value="evio,eg12.ev"/>

        <!-- Solenoid apparatus and field -->


        <!--detector name="../../../../clas12/magnets/solenoid" factory="TEXT" variation="original"/-->
          <!--option name="HALL_FIELD"  value="clas12-solenoid"/-->

<!-- other CLAS detectors -->

c       <detector name="../../../../clas12/ec/ec"            factory="TEXT" variation="original"/>
       <detector name="../../../../clas12/ctof/ctof"            factory="TEXT" variation="original"/>
       <detector name="../../../../clas12/htcc/htcc"            factory="TEXT" variation="original"/>
       <detector name="../../../../clas12/pcal/pcal"            factory="TEXT" variation="javageom"/>
       <detector name="../../../../clas12/micromegas/micromegas"  factory="TEXT" variation="original"/>


<!-- Beamline material -->
         <!--detector name="../../../../clas12/beamline/beamline" factory="TEXT" variation="ft"/-->


          <option name="BEAM_P"   value="e-, 4.0*GeV, 20.0*deg, 0*deg"/>
           <option name="SPREAD_P" value="0.0*GeV, 20*deg, 180*deg"/>
           <!-- option name="RANDOM" value="TIME"/ -->
</gcard>



<!-- minumal detectors for HB tracking -->

        <detector name="../../../../clas12/fc/forwardCarriage" factory="TEXT" variation="original"/>
        <detector name="../../../../clas12/dc/dc"            factory="TEXT" variation="original"/>
        <detector name="../../../../clas12/ftof/ftof"            factory="TEXT" variation="original"/>
        <option name="SCALE_FIELD" value="clas12-torus-big, -1"/>
        <option name="OUTPUT" value="evio,eg12.ev"/>


gcard for Solenoid

<!-- minumal detectors for HB tracking -->

        <detector name="../../../../clas12/fc/forwardCarriage" factory="TEXT" variation="origi\
\
nal"/>
        <detector name="../../../../clas12/dc/dc"            factory="TEXT" variation="origina\
\
l"/>
        <detector name="../../../../clas12/ftof/ftof"            factory="TEXT" variation="ori\
\
ginal"/>
        <option name="SCALE_FIELD" value="clas12-torus-big, -1"/>
        <option name="OUTPUT" value="evio,eg12.ev"/>

        <!-- Solenoid apparatus and field -->


        <!detector name="../../../../clas12/magnets/solenoid" factory="TEXT" variation="original"/>
          <option name="HALL_FIELD"  value="clas12-solenoid"/>

<!-- other CLAS detectors -->

c       <detector name="../../../../clas12/ec/ec"            factory="TEXT" variation="original"/>
       <detector name="../../../../clas12/ctof/ctof"            factory="TEXT" variation="original"/>
       <detector name="../../../../clas12/htcc/htcc"            factory="TEXT" variation="original"/>
       <detector name="../../../../clas12/pcal/pcal"            factory="TEXT" variation="javageom"/>
       <detector name="../../../../clas12/micromegas/micromegas"  factory="TEXT" variation="original"/>


<!-- Beamline material -->
         <!--detector name="../../../../clas12/beamline/beamline" factory="TEXT" variation="ft"/-->


          <option name="BEAM_P"   value="e-, 4.0*GeV, 20.0*deg, 0*deg"/>
           <option name="SPREAD_P" value="0.0*GeV, 20*deg, 180*deg"/>
           <!-- option name="RANDOM" value="TIME"/ -->
</gcard>



<!-- minumal detectors for HB tracking -->

        <detector name="../../../../clas12/fc/forwardCarriage" factory="TEXT" variation="original"/>
        <detector name="../../../../clas12/dc/dc"            factory="TEXT" variation="original"/>
        <detector name="../../../../clas12/ftof/ftof"            factory="TEXT" variation="original"/>
        <option name="SCALE_FIELD" value="clas12-torus-big, -1"/>
        <option name="OUTPUT" value="evio,eg12.ev"/>



<pre>

=== Solenoid Off===
Generated with no solenoid.
[[File:ThetaPhiNoSolGen.png]]
Reconstructed with no solenoid.
[[File:ThetaPhiRecNoSol.png]]
reconstructed divided by generated with no solenoid.
[[File:ThetaPhiDivNoSol.png]]

===Solenoid On ===

Generated with solenoid.
[[File:ThetaPhiGenSol.png]]
Reconstructed with solenoid.
[[File:ThetaPhiRecSol.png]]
Reconstructed divided by generated with solenoid.
[[File:DivThetaPhiSol.png]]

=== Ratio Solenoid Off / On ===

No solenoid reconstructed divided by solenoid reconstructed.
[[File:NSRecDivRec.png]]

===Phi angle shift===

Phi angle Solenoid on - off difference

spread from 0 to 5 GeV.

=== Observations===

 Why does the Solenoid off events only extend to 25 degrees whereas the solenoid on go to 40.

 Insert the two cards and normalized graphs.

=Vertex Reconstruction=

== For particle at origin==

 plot Generated xpos - Reconstructed x position


==With Beam rastering==

=Commands=
==Simulation commands==

<pre>
tcsh
cd ~/src/CLAS/GEMC
source setup
cd experiments/eg12/lh2
gemc -HALL_MATERIAL="Vacuum" eg12.gcard
gemc -USE_GUI=0 -HALL_MATERIAL="Vacuum" -N=10 eg12.gcard

to edit files

emacs -nw filename

without solenoid

~/src/CLAS/coatjava-1.0/bin/clas12-reconstruction -config DCHB::torus=1.0 -config DCHB::solenoid=0.0 -config DCTB::kalman=true  -s DCHB:DCTB:EC:FTOF:EB -i eg12.ev -o eg12_rec.evio

with solenoid

~/src/CLAS/coatjava-1.0/bin/clas12-reconstruction -s FMT:DCHB:DCTB:FTOF:EC:EB -config MAG::fields=nominal -i eg12_5GeVe.evio -o eg12_rec.evio

evio analysis program

~/src/CLAS/coatjava-1.0/bin/run-groovy Analysis.groovy eg12_rec.0.evio


dump file contents

~/src/CLAS/coatjava-1.0/bin/evio-dump -i eg12_rec.0.evio


batch job cheat

nohup gemc -USE_GUI=0 -HALL_MATERIAL="Vacuum" -N=75000 eg12.gcard > /dev/null &

Analysis commands

cat Analysis.groovy Analysis.groovy.old1 Sim.dat > trash


Converting files to ROOT

~/src/CLAS/coatjava-1.0/bin/run-groovy Evio2Text.groovy eg12_rec.0.evio > Sim.dat

edit Sim.dat and remove the first few lines until you have only numbers

minerve2:~/src/CLAS/GEMC/experiments/eg12/lh2> root -l

root [0] .L Asci2Root.C

root [1] Asci2Root("Sim.dat");

Using ROOT to analyze a file

minerve2:~/src/CLAS/GEMC/experiments/eg12/lh2> root -l Sim.root

root [0] Attaching file Sim.root as _file0...

root [1] new TBrowser();

root [2] CLAS12Sim->Draw("evt.Theta");

root [3] CLAS12Sim->Draw("evt.Theta:evt.Phi");

root [4] CLAS12Sim->Draw("evt.Theta:evt.Phi","","colz");


root [5] TH2D *Rec=new TH2D("Rec","Rec",400,-200,200, 50, 0,50);

root [6] CLAS12Sim->Draw("evt.Theta:evt.Phi>>Rec","","colz");

root [7] TH2D *Gen=new TH2D("Gen","Gen",400,-200,200, 50, 0,50);

root [9] CLAS12Sim->Draw("evt.Theta:evt.Phi>>Gen","","colz");

root [10] Gen->Draw("colz")

root [11] Rec->Draw("colz")

root [12] Rec->Divide(Gen)


root [4] TH1D *RecPhi=new TH1D("RecPhi","RecPhi",400, -200,200); root [5] CLAS12Sim->Draw("evt.Phi>>RecPhi");

go to Generated Events File

root [8] CLAS12Sim->Draw("evt.Phi>>GenPhi"); root [9] RecPhi->Divide(GenPhi);

return to ROOT file with reconstructed events and do

root [6] RecPhi->Divide(GenPhi); root [7] RecPhi->Draw();

scp to laptop

scp stoktyle@minerve2.cose.isu.edu:src/CLAS/GEMC/experiments/eg12/lh2/Sim.root ./

EG12#Tyler_Stokes_EG12_studies