Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 0 additions & 59 deletions MIP_fitter/README.txt

This file was deleted.

5 changes: 4 additions & 1 deletion MIP_fitter/mipFitterTree.C
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,11 @@ void Loop(unsigned int layer,unsigned int skiroc,unsigned int channel)
RooRealVar sl0("SigmaL","Landau sigma",5,0.,30) ;
RooLandau landau1("l1","Single MIP distribution",x,ml0,sl0) ;

// If X~Landau(µ1, c1) and Y~Landau(µ2, c2), then X+Y~Landau(µ1+µ2, c1+c2)
// https://en.wikipedia.org/wiki/Landau_distribution#Properties
RooFormulaVar ml1("MPV1","Laudau MPV for 2-MIP peak","2*@0",ml0) ;
RooLandau landau2("l2","Two-MIP distribution",x,ml1,sl0) ;
RooFormulaVar sl1("SigmaL1","Laudau sigma for 2-MIP peak","2*@0",sl0) ;
RooLandau landau2("l2","Two-MIP distribution",x,ml1,sl1) ;

RooFFTConvPdf l1xg("l1xg","landau1 (X) gauss",x,landau1,mipG0) ;
RooFFTConvPdf l2xg("l2xg","landau2 (X) gauss",x,landau2,mipG0) ;
Expand Down
79 changes: 79 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# HGCAL_analysis_code

CMSSW version: CMSSW_9_3_0_pre3 (do `cmsenv`).

### Downlaod scripts <br/>
`git clone -b OctTB_MIP_analysis git@github.com:spandeyehep/HGCAL_analysis_code.git .` <br/>


## MIP analysis code



### How to run the script: <br/>

`cd tracking_inclusion`<br/>
`make`<br/>
<br/>
`./analyzeHGCOctTB <file_list> outFileName.root data alpha`<br/>


`<file_list.txt>` : contains muon runs to be analyzed (see for example: `Data_muon_config1_v9.txt`)<br/>

Example: <br/>
`./analyzeHGCOctTB Data_muon_config1_v9.txt out.root data alpha`

### Descrition of scripts: <br/>
`AnalyzeHGCOctTB.cc` : Main analysis code <br/>
`AnalyzeHGCOctTB.h` : Initialize histos here <br/>
`HGCNtupleVariables.h`: Tree variable initialization <br/>
<br/>

## MIP fitting and value extraction <br/>

`cd MIP_fitter` <br/>
use output file from previous step as input by specifying the path in `mipFitterTree.C` <br/>
<br/>
> To run the fit on a single channel: <br/>
<br/>
`root -l`<br/>
`.L mipFitterTree.C+`<br/>
`Loop(0,0,0)`<br/>
<br/>
<br/>
### Loop(unsigned int layer,unsigned int skiroc,unsigned int channel)<br/>
layer : 0 to 27<br/>
skiroc : 0 to 3<br/>
channel : 0 to 62<br/>
<br/>
<br/>

> To run on one skiroc chip:<br/>

`root -l`<br/>
`.L mipFitterTree.C+`<br/>
`runAllChannel(0, 0)`<br/>
<br/>
<br/>
### runAllChannel(unsigned int layer,unsigned int skiroc) <br/>
layer : 0 to 27 <br/>
skiroc : 0 to 3<br/>
<br/>
<br/>
> To run on one layer:<br/>
`root -l`<br/>
`.L mipFitterTree.C+`<br/>
`runAllSkiROC(0)`<br/>
<br/>
<br/>
### runAllSkiROC(unsigned int layer)<br/>
layer : 0 to 27<br/>
<br/>
<br/>
> To run on ENTIRE layers:<br/>
`root -l`<br/>
`.L mipFitterTree.C+`<br/>
`runAllLayers(0,27)`<br/>
<br/>
### runAllLayers(unsigned int layer_start, unsigned int layer_end)<br/>
layer : 0 to 27<br/>
94 changes: 94 additions & 0 deletions config_maps/moduleMAP_config1.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
78 0 1 0
90 0 2 0
89 0 3 0
88 0 4 0
77 0 5 0
85 0 6 0
84 0 7 0
32 0 8 0
69 0 9 0
79 0 10 0
76 0 11 0
83 0 12 0
70 0 13 0
73 0 14 0
86 0 15 0
87 0 16 0
82 0 17 0
72 0 18 0
67 0 19 0
65 0 20 0
35 0 21 0
36 0 22 0
44 0 23 0
51 0 24 0
142 0 25 0
143 0 26 0
145 0 27 0
144 0 28 0
115 1 1 1
40 1 1 2
101 1 1 3
96 1 1 4
98 1 1 5
95 1 1 6
105 1 1 7
122 1 2 1
104 1 2 2
100 1 2 3
106 1 2 4
123 1 2 5
34 1 2 6
113 1 2 7
99 1 3 1
121 1 3 2
114 1 3 3
94 1 3 4
97 1 3 5
111 1 3 6
37 1 3 7
124 1 4 1
108 1 4 2
109 1 4 3
102 1 4 4
118 1 4 5
107 1 4 6
120 1 4 7
141 1 5 1
147 1 5 2
137 1 5 3
139 1 5 4
136 1 5 5
140 1 5 6
138 1 5 7
91 1 6 1
130 1 6 2
133 1 6 3
131 1 6 4
134 1 6 5
132 1 6 6
146 1 6 7
125 1 7 1
129 1 7 2
128 1 7 3
119 1 7 4
127 1 7 5
126 1 7 6
135 1 7 7
38 1 8 1
39 1 8 2
42 1 8 3
45 1 8 4
53 1 8 5
46 1 8 6
48 1 8 7
75 1 9 1
59 1 9 2
71 1 9 3
64 1 9 4
55 1 9 5
63 1 9 6
66 1 9 7
62 1 10 4
54 1 11 4
43 1 12 4
93 changes: 93 additions & 0 deletions config_maps/moduleMAP_config2.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
78 0 1 0
90 0 2 0
89 0 3 0
88 0 4 0
77 0 5 0
85 0 6 0
84 0 7 0
32 0 8 0
69 0 9 0
79 0 10 0
76 0 11 0
83 0 12 0
70 0 13 0
73 0 14 0
86 0 15 0
87 0 16 0
82 0 17 0
72 0 18 0
67 0 19 0
65 0 20 0
35 0 21 0
36 0 22 0
44 0 23 0
51 0 24 0
142 0 25 0
143 0 26 0
145 0 27 0
144 0 28 0
62 1 1 4
54 1 2 4
38 1 3 1
39 1 3 2
43 1 3 3
45 1 3 4
53 1 3 5
46 1 3 6
48 1 3 7
141 1 4 1
147 1 4 2
137 1 4 3
139 1 4 4
136 1 4 5
140 1 4 6
138 1 4 7
91 1 5 1
130 1 5 2
133 1 5 3
131 1 5 4
134 1 5 5
132 1 5 6
146 1 5 7
125 1 6 1
129 1 6 2
128 1 6 3
119 1 6 4
127 1 6 5
126 1 6 6
135 1 6 7
115 1 7 1
40 1 7 2
101 1 7 3
96 1 7 4
98 1 7 5
95 1 7 6
105 1 7 7
75 1 8 1
59 1 8 4
71 1 8 3
64 1 8 2
55 1 8 5
63 1 8 6
66 1 8 7
122 1 9 1
104 1 9 2
100 1 9 3
106 1 9 4
123 1 9 5
34 1 9 6
113 1 9 7
99 1 10 1
121 1 10 2
114 1 10 3
94 1 10 4
97 1 10 5
111 1 10 6
37 1 10 7
124 1 11 1
108 1 11 2
109 1 11 3
102 1 11 4
118 1 11 5
107 1 11 6
120 1 11 7
Loading