Difference between revisions of "Kyle's Log"

From Nuclear Physics Group Documentation Pages
Jump to navigationJump to search
Line 317: Line 317:
  
 
mariecurie seems to have gone down for some reason. We are trying to transition to Elog.
 
mariecurie seems to have gone down for some reason. We are trying to transition to Elog.
 +
 +
Updating GEMC. I will try to get a variable written out through the generated info tree.
  
 
</pre>
 
</pre>

Revision as of 18:47, 11 August 2008

Progress and Task Log for Kyle

Schedule

Tasks

Shared G4 libraries - Testing
Single G4 source - Testing
Review GEMC Output code
Determine coordinate system
Replicate more graphs, put in Elog

Notes

Getting a histo from GEMC ROOT data

To get a histogram from GEMC data do something akin to:
  TH2F *edep_p = new TH2F("edep_p","edep vs p (Protons)",100,0.0,4000.0,100,0.0,2.2);
  edep_p->SetMarkerColor(40);  
  edep_p->SetMarkerSize(20.0); 
  bst->Draw("Edep:p>>edep_p","Edep<2");
First we create the histo, set up some attributes, and then finally we pipe a graph into
it. After this, you probably want to use Clear() in whatever pad your using to remove
any graphs it draws in the process.

Specifying exactly which histo to grab

In something like:
  bst->Draw("Edep:p","Edep<2");
Edep may be in the bst tree while p is in the generated tree. To specify which ones to use:
  bst->Draw("Edep:genT.p","Edep<2");

Drawing A Legend

Try something like:
  TLegend *leg = new TLegend(0.4,0.6,0.89,0.89);
  leg->SetTextSize(.03);	
  leg->AddEntry(histo,"title","p"); //p specifies marker as key
  leg->SetFillColor(0); //white BG instead of yellow default
  leg->Draw();
And to change the marker color of a histo:
  histo->SetMarkerColor(int color);

Log

Kyle's Old Logs

June

Wed 4

In 12:00pm
Sarah gave Dan and I example root scripts which we are to modify for use with data collected in GEMC.
Can now open root files from interpreter or program, explore trees and draw histos. I want to be able
to recreate some of these: http://clasweb.jlab.org/wiki/index.php/First_SVT_results
Out 4:00pm

Thur 5

In 1:00pm
Made theta dependence event detection graph. Recreated Edep vs. p graph using AddFriend method on TTree svt.
Then everything took a strange turn as root began to fail to do things. Worked with sarah trying to figure 
out what was going on. Affecting different programs, different versions of root.
Out 4:00pm

Tue 10

In 1:00pm
Met with Sarah, Maurik. Frustratingly tried to manipulate GEMC data trees. Finally reached the point 
where we can create copies of histograms. Many root things not working or working strangely. 
Need to get bin content of individual histos and manipulate them manually.
Out 4:00pm

Wed 11

In 12:00pm
Trying to create one 2d histogram from two 1d histograms...can't find anything similar online. 
Maurizio got back to us, piped output into a 2d histogram and it worked. Changed drawing, 
binning options. Looks great! Dan is running a 50000 event simulation with the same inputs 
as our current 5000 event data for further refined data.

gemc_evio2root has been updated and our current version of root does not have RIO libraries.
 Another version did but we found it to be incompatible. 
Out 3:45pm 

Wed 18

In 2:00pm
The hub is not working, Hovannes, Dan and I tried to get ennui and benfranklin up to no avail. 
Hovannes and I just used our laptops, with Dan on benfranklin going direct to an ethernet jack in the wall.
Talked to sarah, recreating graphs. Have Edep v. p, working on theta with threshold cutting and phi v. z. 
Our Phi v. z plot is very sparsely populated. I emailed maurizio about this.
One can see two distinct signals in the proton & pion edep v p graph, however we may need to widen
 our energy scale (lower) to see this more clearly. Running simulation with wider energy allowances.
Out 5:00pm

Tue 24

In 1:00
Elog is up but needs a proper template - Dan is on that. Making images of the graphs to put in elog. Fixed wiki log error.
Running 500,000 events proton and pion simultaneously. Need more statistics to replicate Maurizio's graphs. Proton data was
damaged and I am running it again. Running another pion experiment to add to our current one.
Out 3:30
Ran to James hall fossil/map giveaway
In 4:15
Creating pion-proton graph with new data
Out 4:30

Thur 26

In 11:15am
Working on pion-proton graph.
Out 12:00pm Lunch

In 1:15
Had Katie sign timesheets
I cannot figure out why our data isn't succesfully piping to histograms.
Talked to sarah, she didn't know. Checking root documentation.
Can we directly refer to histograms? 
Out 4:30

Mon 30

In 12:15
Contacted jlab, my password has changed and I can't svn or get my email.
Dan gone until tommorow, he's in NJ. I shall investigate why my program
isn't working.
Finally fixed the pion & proton edep_p graph! Cool!
Updated some wiki information on availability and versions of programs
in the CLAS12ROOT directory. Created a notes section for me, in this log.
Updated summer, fall schedule.

Made theta graph with current data. Maurizio's cuts are different than mine.
Making phi vs. z graph. I need to combine lots of data for a statistical view,
running more proton simulations.
Out 3:15pm

July

Tue 1st

In 1:30pm
Organized goals with Sarah. Dan has elog running on mariecurie, but does Maurik want
us using it? Emailing maurizio for coordinate system and other things.
Maurizio got back to us. /home ran out of space! We alerted matt and spoke with him
about the new server. Organized CLAS12ROOT. Data will now be in CLAS12ROOT/Experiments/data
to keep home directories smaller. Removed older data.
Out 4:45pm

Thur 3rd

In 7:45am
Edited RHEL5_x64 env script to reflect a new $DATA variable pointing to the folder containing
all the data from gemc runs.

The data I set running Tue 1st seems to have not been properly closed. Someone must have killed
benfranklin's internet connection before my run finished last night. Rerunning.

I created an Index.txt in $DATA in which we can keep the command used to generate data next to
it's filename, alleviating the need for long rootfile names.

I don't understand why we register so few hits in layers 2, 3, and 4 in our data, for the theta
graph. You can see it again, in the Edep graphs. 

I do not know the cause of the phenomenon, but I nearly sure there are 8 layers in total between
all four barrels of the SVT. I would think this would mean 2 per layer but histograms I have
generated beg to differ. Made x_y_z for all 8 layers.
Out 10:30am

Thur 10th

In 12:00pm
Hobo and Ben Franklin are not of good health, so Dan and I are using the physics lounge computers. 
We asked maurizio about the layers confusion and it works as such:

"layer[0] == 1 means "plot all events where the first hit was in layer 1".
layer[1] == 2 means "plot all events where the second hit was in layer 2"  - that means the first hit is somewhere else
layer[4] == 3 means "plot all events where the fifth hit was in layer 3"  - that means the first 4 hits are somewhere else (very unlikely)."

So my question is how do I specify showing the hits in just a single layer?
out 2:45

Tue 15th

In 1:00
Prepared for meeting with Maurik. Fixed X_Y_Z graph.
Lunch 2:45
In 3:45
Looking through gemc's output code. Trying to find evio documentation.
Out 4:30

16th-19th

Trying to decipher GEMC and gemc2evio code. Just following it, not producing anything
so I'm not recording any hours.

Tue 22

In 1:00
Checking out GEMC code. Trying to form questions to ask Maurik.
Out 2:00

Our advisors were busy! Reading code. Perhaps if we can create our own dummy item in gemc and 
run it through the processes until we can see it in a root file we will understand more.

Thur 24

In 3:00pm
Did timesheets for past two weeks.
Inside output/evio_output.cc is an interesting method, called WriteGenerated, which takes a vector<MGeneratedParticle>
called MGP. I'm trying to find where WriteGenerated is called to see where MGP originates.

WriteGenerated is referenced in src/MEventAction.cc

More interesting things inside /hitprocess/clas12/svt/BST_hitprocess.cc
Out:4:30

Fri 25

Supposed to come in 8-11am, stuck in Hanover with brake problems.
Will work monday afternoon for three hours.

Mon 28

Came in at 12:15 but the physics lounge computers were inaccessable. Tried to boot up BF but it was 
taking a long time so I went to an early lunch. Saw Maurik! Meeting with Sarah later. Amrit may have
a student? Also need to coordinate a time to move computers in the nuc server room.

In 1:30
Physics lounge still being buffed. Bypassed router in JLAB room, BF booted up fine. It occurred to me
during lunch that MGeneratedParticle is probably a Geant4 object and I can use the G4 documentation.

-Strike that. Haven't found anything online. $GEMC/grep -R -i mgeneratedparticle ./ 

Nice find: /src/MHit.cc:
int MHit::mc_number_scheme(string pid)
{
 if(pid=="e-")            return 11;
 if(pid=="e+")            return -11;
 if(pid=="gamma")         return 22;
 if(pid=="neutron")       return 2112;
 if(pid=="proton")        return 2212;
 if(pid=="kaon+")         return 321;
 if(pid=="kaon-")         return -321;
 if(pid=="kaon0")         return 311;
 if(pid=="kaon0L")        return 130;
 if(pid=="pi+")           return 211;
 if(pid=="pi-")           return -211;
 if(pid=="p0")            return 111;
 if(pid=="opticalphoton") return -22;
 else return 0;
}
  
Made some changes to GEMC code. MHit.cc and MSensitiveDetector.cc. compiled, but not putting my changes into the output.

Out 4:30

Tue 29

In 11:30

   "G4Colour colour_touch (0.0, 0.0, 1.0);
    G4Colour colour_hit   (1.0, 0.0, 0.0);
    G4Colour colour_passby(0.0, 1.0, 0.0);

    // If the energy is above threshold, red circle.
    // If the energy is below threshold, blue smaller circle.
    // If no energy deposited, green smaller circle."

Added extra output to GEMC. Trying to get it through evio2root but getting segfaults.

Met with Maurik at 2:00. 

Out 2:30

August

Move Week

Dan and I were here Mon-Thur for 8-9 hours a day helping, but I'm not sure if it's work or not. 
We recorded three hours a day, will check with sarah.

Mon 11

In 11:30
Dan is investigating Elog problems. Sarah has the guidelines for the electrical output methods 
that we are to implement, but I am still reading the code, trying to write a variable out.

I'm trying to identify a clear chain of events in processing a hit, and writing it out. It's not yet
completely clear where we will need to interrupt this chain to insert our ADC to TDC code
however it has become apparent to me that evio_output.cc has a much higher importance than
I had originally given it in processing and writing an event.

2:00 - ran to nesmith, getting a table for dawn.
2:10 - back

mariecurie seems to have gone down for some reason. We are trying to transition to Elog.

Updating GEMC. I will try to get a variable written out through the generated info tree.