Project

General

Profile

Using the Cosmic Tracker » History » Version 10

Muhammad Elnimr, 02/12/2015 01:32 PM

1 1 Muhammad Elnimr
h1. Using the Cosmic Tracker
2 1 Muhammad Elnimr
3 2 Muhammad Elnimr
#######################
4 2 Muhammad Elnimr
5 2 Muhammad Elnimr
 Some indespensible information:
6 2 Muhammad Elnimr
7 3 Muhammad Elnimr
8 3 Muhammad Elnimr
#######################
9 2 Muhammad Elnimr
 (1) What is a Hit/Cluster/Spacepoint/Track/......?
10 2 Muhammad Elnimr
     Look for the private members here:
11 2 Muhammad Elnimr
    https://cdcvs.fnal.gov/redmine/projects/lardata/repository/revisions/develop/entry/RecoBase/Hit.h
12 2 Muhammad Elnimr
    and others
13 2 Muhammad Elnimr
    Cluster.h
14 2 Muhammad Elnimr
    Track.h
15 2 Muhammad Elnimr
    ....
16 2 Muhammad Elnimr
17 2 Muhammad Elnimr
 (2) Michelle's getting started:
18 2 Muhammad Elnimr
   ~mstancar/getting_started_*
19 2 Muhammad Elnimr
20 2 Muhammad Elnimr
21 2 Muhammad Elnimr
22 2 Muhammad Elnimr
 (3) Twiki tutorial:
23 2 Muhammad Elnimr
24 2 Muhammad Elnimr
 https://cdcvs.fnal.gov/redmine/projects/lbnecode/wiki/_Tutorial_
25 2 Muhammad Elnimr
26 2 Muhammad Elnimr
27 2 Muhammad Elnimr
28 2 Muhammad Elnimr
 (4) Hot fix: commit changes to quickly LArSoft before anybody notices (and
29 2 Muhammad Elnimr
    without being on a branch):
30 2 Muhammad Elnimr
31 2 Muhammad Elnimr
 Make sure all your modifications work/ready/tested/compiles with
32 2 Muhammad Elnimr
  the latest larsoft.
33 2 Muhammad Elnimr
  Check out the latest larsoft.
34 2 Muhammad Elnimr
  Copy your stuff over.
35 2 Muhammad Elnimr
  Do git add
36 2 Muhammad Elnimr
         commit -m 'some text'
37 2 Muhammad Elnimr
        push 
38 2 Muhammad Elnimr
39 2 Muhammad Elnimr
(5) ...
40 1 Muhammad Elnimr
41 1 Muhammad Elnimr
42 6 Muhammad Elnimr
##########################
43 1 Muhammad Elnimr
44 6 Muhammad Elnimr
LArSoft v02_05_02 or higher is needed.
45 1 Muhammad Elnimr
46 6 Muhammad Elnimr
###########################
47 1 Muhammad Elnimr
48 1 Muhammad Elnimr
49 1 Muhammad Elnimr
#####
50 1 Muhammad Elnimr
51 1 Muhammad Elnimr
52 1 Muhammad Elnimr
 Running the anatree and trkanact:
53 1 Muhammad Elnimr
54 1 Muhammad Elnimr
55 1 Muhammad Elnimr
#####
56 1 Muhammad Elnimr
57 1 Muhammad Elnimr
Look at standard_reco_lbne35t.fcl for the module names and other stuff
58 1 Muhammad Elnimr
to run anatree and trkanact.
59 1 Muhammad Elnimr
60 4 Muhammad Elnimr
What you find in the fcl that you need to uncomment:
61 4 Muhammad Elnimr
62 4 Muhammad Elnimr
{
63 4 Muhammad Elnimr
  cluster:    @local::standard_fuzzycluster
64 4 Muhammad Elnimr
  spacepts:   @local::standard_spacepts
65 4 Muhammad Elnimr
  ct:         @local::standard_cosmictracker
66 4 Muhammad Elnimr
}
67 4 Muhammad Elnimr
68 4 Muhammad Elnimr
{
69 4 Muhammad Elnimr
  anatree:  @local::anatree_anatree
70 4 Muhammad Elnimr
  trkana:   @local::standard_trackanact
71 4 Muhammad Elnimr
}
72 4 Muhammad Elnimr
73 4 Muhammad Elnimr
 reco: [caldata, hitcheat, cluster, spacepts, ct]
74 4 Muhammad Elnimr
75 4 Muhammad Elnimr
 ana:  [anatree]
76 4 Muhammad Elnimr
 ana2:  [trkana]
77 4 Muhammad Elnimr
78 4 Muhammad Elnimr
 end_paths:     [ ana,ana2, stream1]  
79 4 Muhammad Elnimr
80 5 Muhammad Elnimr
and then run like this:
81 5 Muhammad Elnimr
82 5 Muhammad Elnimr
lar -c standard_reco_lbne35t.fcl -s someGeneratedFile.root
83 5 Muhammad Elnimr
84 5 Muhammad Elnimr
85 5 Muhammad Elnimr
86 7 Muhammad Elnimr
TO-DO: Currently the tracks are not stitched, if you want to stitch them just
87 1 Muhammad Elnimr
run the stitch module right after the cosmictracker.
88 1 Muhammad Elnimr
89 1 Muhammad Elnimr
#####
90 1 Muhammad Elnimr
91 8 Muhammad Elnimr
 Working with the anatree branch:
92 1 Muhammad Elnimr
93 1 Muhammad Elnimr
94 1 Muhammad Elnimr
####
95 1 Muhammad Elnimr
96 1 Muhammad Elnimr
Be careful the anatree has different "sets" of leafs, lets say ones
97 1 Muhammad Elnimr
belonging to tracks and ones belonging to hits (may be third belonging
98 1 Muhammad Elnimr
to clusters). Lets say you wanna draw the x coordinate of track
99 1 Muhammad Elnimr
spacepoints (trkx) so you need to not draw the entries belonging to
100 4 Muhammad Elnimr
hits (-999 entries) since the tree is filled with hits and tracks at
101 1 Muhammad Elnimr
the same time and definitely there are more hits than tracks in any
102 4 Muhammad Elnimr
given event.
103 1 Muhammad Elnimr
So you just do:
104 1 Muhammad Elnimr
105 1 Muhammad Elnimr
106 1 Muhammad Elnimr
treename->Draw("trkx","trkx>-9999");
107 1 Muhammad Elnimr
108 1 Muhammad Elnimr
because if you do just:
109 1 Muhammad Elnimr
110 1 Muhammad Elnimr
treename->Draw("trkx"); 
111 1 Muhammad Elnimr
112 1 Muhammad Elnimr
you get all the entries with -999 (think of it as a static array with
113 1 Muhammad Elnimr
empty elements filled with this big negative number).
114 1 Muhammad Elnimr
115 1 Muhammad Elnimr
116 1 Muhammad Elnimr
#####
117 1 Muhammad Elnimr
118 1 Muhammad Elnimr
119 8 Muhammad Elnimr
Working with the trkana branch:
120 1 Muhammad Elnimr
121 1 Muhammad Elnimr
####
122 6 Muhammad Elnimr
Inside this branch you will find all the histograms made using the TrackAnaCT module 
123 6 Muhammad Elnimr
(https://cdcvs.fnal.gov/redmine/projects/larreco/repository/revisions/develop/entry/TrackFinder/TrackAnaCT_module.cc)
124 9 Muhammad Elnimr
125 9 Muhammad Elnimr
126 9 Muhammad Elnimr
127 9 Muhammad Elnimr
128 9 Muhammad Elnimr
129 9 Muhammad Elnimr
130 9 Muhammad Elnimr
###########################
131 9 Muhammad Elnimr
132 9 Muhammad Elnimr
###########################
133 9 Muhammad Elnimr
#####
134 9 Muhammad Elnimr
135 9 Muhammad Elnimr
136 9 Muhammad Elnimr
Analysis macro:
137 9 Muhammad Elnimr
138 9 Muhammad Elnimr
####
139 9 Muhammad Elnimr
To read the AnaTree I have a pair of files (.C/.h) that reads the tree and makes plots. The files were created (then heavily modified) using the ROOT function treeName->MakeClass().
140 9 Muhammad Elnimr
To run the macro I do:
141 9 Muhammad Elnimr
142 9 Muhammad Elnimr
.L makeEffHist.C
143 9 Muhammad Elnimr
makeEffHist g("fileName.root","treeNamePrefex")
144 9 Muhammad Elnimr
g.Loop(nEvents,"_histAppendedName")
145 9 Muhammad Elnimr
146 9 Muhammad Elnimr
147 10 Muhammad Elnimr
And the anahist.root file I am currently working on is located at:
148 10 Muhammad Elnimr
/lbne/data/users/tjyang/v03_08_01/mergeana/AntiMuonCutEvents_LSU_v2_lbne35t/anahist.root
149 10 Muhammad Elnimr
150 9 Muhammad Elnimr
Enjoy.