1 | #include "SampleAnalyzer/User/Analyzer/atlas_susy_2018_32.h"
|
---|
2 | using namespace MA5;
|
---|
3 | using namespace std;
|
---|
4 |
|
---|
5 | template<typename T1, typename T2> std::vector<const T1*>
|
---|
6 | Removal(std::vector<const T1*>&, std::vector<const T2*>&, const MAdouble64 &);
|
---|
7 |
|
---|
8 | // -----------------------------------------------------------------------------
|
---|
9 | // Initialize
|
---|
10 | // function called one time at the beginning of the analysis
|
---|
11 | // -----------------------------------------------------------------------------
|
---|
12 | bool atlas_susy_2018_32::Initialize(const MA5::Configuration& cfg, const std::map<std::string,std::string>& parameters)
|
---|
13 | {
|
---|
14 |
|
---|
15 | INFO << " <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>" << endmsg;
|
---|
16 | INFO << " <> Analysis : ATLAS-SUSY-2018-32, arXiv:1908.08215 <>" << endmsg;
|
---|
17 | INFO << " <> (Ewkinos/sleptons: dilepton) <>" << endmsg;
|
---|
18 | INFO << " <> Recaster : J.Y. Araz, B. Fuks <>" << endmsg;
|
---|
19 | INFO << " <> Contact : jack.araz@durham.ac.uk, fuks@lpthe.jussieu.fr <>" << endmsg;
|
---|
20 | INFO << " <> <>" << endmsg;
|
---|
21 | INFO << " <> Based on MadAnalysis 5 v1.8 <>" << endmsg;
|
---|
22 | INFO << " <> DOI: XX.YYYY/ZZZ <>" << endmsg;
|
---|
23 | INFO << " <> <>" << endmsg;
|
---|
24 | INFO << " <> For more information, see <>" << endmsg;
|
---|
25 | INFO << " <> http://madanalysis.irmp.ucl.ac.be/wiki/PublicAnalysisDatabase <>" << endmsg;
|
---|
26 | INFO << " <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>" << endmsg;
|
---|
27 |
|
---|
28 | // Declaration of the signal regions
|
---|
29 | Manager()->AddRegionSelection("SR_DF_0J_MT2_100_105");
|
---|
30 | Manager()->AddRegionSelection("SR_DF_0J_MT2_105_110");
|
---|
31 | Manager()->AddRegionSelection("SR_DF_0J_MT2_110_120");
|
---|
32 | Manager()->AddRegionSelection("SR_DF_0J_MT2_120_140");
|
---|
33 | Manager()->AddRegionSelection("SR_DF_0J_MT2_140_160");
|
---|
34 | Manager()->AddRegionSelection("SR_DF_0J_MT2_160_180");
|
---|
35 | Manager()->AddRegionSelection("SR_DF_0J_MT2_180_220");
|
---|
36 | Manager()->AddRegionSelection("SR_DF_0J_MT2_220_260");
|
---|
37 | Manager()->AddRegionSelection("SR_DF_0J_MT2_260_inf");
|
---|
38 | Manager()->AddRegionSelection("SR_DF_0J_MT2_100_inf");
|
---|
39 | Manager()->AddRegionSelection("SR_DF_0J_MT2_160_inf");
|
---|
40 | Manager()->AddRegionSelection("SR_DF_0J_MT2_100_120");
|
---|
41 | Manager()->AddRegionSelection("SR_DF_0J_MT2_120_160");
|
---|
42 |
|
---|
43 | Manager()->AddRegionSelection("SR_DF_1J_MT2_100_105");
|
---|
44 | Manager()->AddRegionSelection("SR_DF_1J_MT2_105_110");
|
---|
45 | Manager()->AddRegionSelection("SR_DF_1J_MT2_110_120");
|
---|
46 | Manager()->AddRegionSelection("SR_DF_1J_MT2_120_140");
|
---|
47 | Manager()->AddRegionSelection("SR_DF_1J_MT2_140_160");
|
---|
48 | Manager()->AddRegionSelection("SR_DF_1J_MT2_160_180");
|
---|
49 | Manager()->AddRegionSelection("SR_DF_1J_MT2_180_220");
|
---|
50 | Manager()->AddRegionSelection("SR_DF_1J_MT2_220_260");
|
---|
51 | Manager()->AddRegionSelection("SR_DF_1J_MT2_260_inf");
|
---|
52 | Manager()->AddRegionSelection("SR_DF_1J_MT2_100_inf");
|
---|
53 | Manager()->AddRegionSelection("SR_DF_1J_MT2_160_inf");
|
---|
54 | Manager()->AddRegionSelection("SR_DF_1J_MT2_100_120");
|
---|
55 | Manager()->AddRegionSelection("SR_DF_1J_MT2_120_160");
|
---|
56 |
|
---|
57 | Manager()->AddRegionSelection("SR_SF_0J_MT2_100_105");
|
---|
58 | Manager()->AddRegionSelection("SR_SF_0J_MT2_105_110");
|
---|
59 | Manager()->AddRegionSelection("SR_SF_0J_MT2_110_120");
|
---|
60 | Manager()->AddRegionSelection("SR_SF_0J_MT2_120_140");
|
---|
61 | Manager()->AddRegionSelection("SR_SF_0J_MT2_140_160");
|
---|
62 | Manager()->AddRegionSelection("SR_SF_0J_MT2_160_180");
|
---|
63 | Manager()->AddRegionSelection("SR_SF_0J_MT2_180_220");
|
---|
64 | Manager()->AddRegionSelection("SR_SF_0J_MT2_220_260");
|
---|
65 | Manager()->AddRegionSelection("SR_SF_0J_MT2_260_inf");
|
---|
66 | Manager()->AddRegionSelection("SR_SF_0J_MT2_100_inf");
|
---|
67 | Manager()->AddRegionSelection("SR_SF_0J_MT2_160_inf");
|
---|
68 | Manager()->AddRegionSelection("SR_SF_0J_MT2_100_120");
|
---|
69 | Manager()->AddRegionSelection("SR_SF_0J_MT2_120_160");
|
---|
70 |
|
---|
71 | Manager()->AddRegionSelection("SR_SF_1J_MT2_100_105");
|
---|
72 | Manager()->AddRegionSelection("SR_SF_1J_MT2_105_110");
|
---|
73 | Manager()->AddRegionSelection("SR_SF_1J_MT2_110_120");
|
---|
74 | Manager()->AddRegionSelection("SR_SF_1J_MT2_120_140");
|
---|
75 | Manager()->AddRegionSelection("SR_SF_1J_MT2_140_160");
|
---|
76 | Manager()->AddRegionSelection("SR_SF_1J_MT2_160_180");
|
---|
77 | Manager()->AddRegionSelection("SR_SF_1J_MT2_180_220");
|
---|
78 | Manager()->AddRegionSelection("SR_SF_1J_MT2_220_260");
|
---|
79 | Manager()->AddRegionSelection("SR_SF_1J_MT2_260_inf");
|
---|
80 | Manager()->AddRegionSelection("SR_SF_1J_MT2_100_inf");
|
---|
81 | Manager()->AddRegionSelection("SR_SF_1J_MT2_160_inf");
|
---|
82 | Manager()->AddRegionSelection("SR_SF_1J_MT2_100_120");
|
---|
83 | Manager()->AddRegionSelection("SR_SF_1J_MT2_120_160");
|
---|
84 |
|
---|
85 | // Declaration of the preselection cuts
|
---|
86 | Manager()->AddCut("OS dilep. with $p^l_T>25$ [GeV]");
|
---|
87 | Manager()->AddCut("$m_{l_1,l_2}>25$ [GeV]");
|
---|
88 | Manager()->AddCut("b veto");
|
---|
89 |
|
---|
90 | // SF vs DF and Njet cuts
|
---|
91 | std::string SF[] = { "SR_SF_0J_MT2_100_105", "SR_SF_0J_MT2_105_110",
|
---|
92 | "SR_SF_0J_MT2_110_120", "SR_SF_0J_MT2_120_140", "SR_SF_0J_MT2_140_160",
|
---|
93 | "SR_SF_0J_MT2_160_180", "SR_SF_0J_MT2_180_220", "SR_SF_0J_MT2_220_260",
|
---|
94 | "SR_SF_0J_MT2_260_inf", "SR_SF_0J_MT2_100_inf", "SR_SF_0J_MT2_160_inf",
|
---|
95 | "SR_SF_0J_MT2_100_120", "SR_SF_0J_MT2_120_160", "SR_SF_1J_MT2_100_105",
|
---|
96 | "SR_SF_1J_MT2_105_110", "SR_SF_1J_MT2_110_120", "SR_SF_1J_MT2_120_140",
|
---|
97 | "SR_SF_1J_MT2_140_160", "SR_SF_1J_MT2_160_180", "SR_SF_1J_MT2_180_220",
|
---|
98 | "SR_SF_1J_MT2_220_260", "SR_SF_1J_MT2_260_inf", "SR_SF_1J_MT2_100_inf",
|
---|
99 | "SR_SF_1J_MT2_160_inf", "SR_SF_1J_MT2_100_120", "SR_SF_1J_MT2_120_160" };
|
---|
100 | std::string DF[] = { "SR_DF_0J_MT2_100_105", "SR_DF_0J_MT2_105_110",
|
---|
101 | "SR_DF_0J_MT2_110_120", "SR_DF_0J_MT2_120_140", "SR_DF_0J_MT2_140_160",
|
---|
102 | "SR_DF_0J_MT2_160_180", "SR_DF_0J_MT2_180_220", "SR_DF_0J_MT2_220_260",
|
---|
103 | "SR_DF_0J_MT2_260_inf", "SR_DF_0J_MT2_100_inf", "SR_DF_0J_MT2_160_inf",
|
---|
104 | "SR_DF_0J_MT2_100_120", "SR_DF_0J_MT2_120_160", "SR_DF_1J_MT2_100_105",
|
---|
105 | "SR_DF_1J_MT2_105_110", "SR_DF_1J_MT2_110_120", "SR_DF_1J_MT2_120_140",
|
---|
106 | "SR_DF_1J_MT2_140_160", "SR_DF_1J_MT2_160_180", "SR_DF_1J_MT2_180_220",
|
---|
107 | "SR_DF_1J_MT2_220_260", "SR_DF_1J_MT2_260_inf", "SR_DF_1J_MT2_100_inf",
|
---|
108 | "SR_DF_1J_MT2_160_inf", "SR_DF_1J_MT2_100_120", "SR_DF_1J_MT2_120_160" };
|
---|
109 |
|
---|
110 | std::string SF0J[] = { "SR_SF_0J_MT2_100_105", "SR_SF_0J_MT2_105_110",
|
---|
111 | "SR_SF_0J_MT2_110_120", "SR_SF_0J_MT2_120_140", "SR_SF_0J_MT2_140_160",
|
---|
112 | "SR_SF_0J_MT2_160_180", "SR_SF_0J_MT2_180_220", "SR_SF_0J_MT2_220_260",
|
---|
113 | "SR_SF_0J_MT2_260_inf", "SR_SF_0J_MT2_100_inf", "SR_SF_0J_MT2_160_inf",
|
---|
114 | "SR_SF_0J_MT2_100_120", "SR_SF_0J_MT2_120_160"};
|
---|
115 | std::string SF1J[] = { "SR_SF_1J_MT2_100_105",
|
---|
116 | "SR_SF_1J_MT2_105_110", "SR_SF_1J_MT2_110_120", "SR_SF_1J_MT2_120_140",
|
---|
117 | "SR_SF_1J_MT2_140_160", "SR_SF_1J_MT2_160_180", "SR_SF_1J_MT2_180_220",
|
---|
118 | "SR_SF_1J_MT2_220_260", "SR_SF_1J_MT2_260_inf", "SR_SF_1J_MT2_100_inf",
|
---|
119 | "SR_SF_1J_MT2_160_inf", "SR_SF_1J_MT2_100_120", "SR_SF_1J_MT2_120_160"};
|
---|
120 |
|
---|
121 | std::string DF0J[] = { "SR_DF_0J_MT2_100_105", "SR_DF_0J_MT2_105_110",
|
---|
122 | "SR_DF_0J_MT2_110_120", "SR_DF_0J_MT2_120_140", "SR_DF_0J_MT2_140_160",
|
---|
123 | "SR_DF_0J_MT2_160_180", "SR_DF_0J_MT2_180_220", "SR_DF_0J_MT2_220_260",
|
---|
124 | "SR_DF_0J_MT2_260_inf", "SR_DF_0J_MT2_100_inf", "SR_DF_0J_MT2_160_inf",
|
---|
125 | "SR_DF_0J_MT2_100_120", "SR_DF_0J_MT2_120_160"};
|
---|
126 | std::string DF1J[] = { "SR_DF_1J_MT2_100_105",
|
---|
127 | "SR_DF_1J_MT2_105_110", "SR_DF_1J_MT2_110_120", "SR_DF_1J_MT2_120_140",
|
---|
128 | "SR_DF_1J_MT2_140_160", "SR_DF_1J_MT2_160_180", "SR_DF_1J_MT2_180_220",
|
---|
129 | "SR_DF_1J_MT2_220_260", "SR_DF_1J_MT2_260_inf", "SR_DF_1J_MT2_100_inf",
|
---|
130 | "SR_DF_1J_MT2_160_inf", "SR_DF_1J_MT2_100_120", "SR_DF_1J_MT2_120_160"};
|
---|
131 |
|
---|
132 | Manager()->AddCut("DF dilep. \\& $N_j=0$", DF0J);
|
---|
133 | Manager()->AddCut("DF dilep. \\& $N_j=1$", DF1J);
|
---|
134 | Manager()->AddCut("SF dilep. \\& $N_j=0$", SF0J);
|
---|
135 | Manager()->AddCut("SF dilep. \\& $N_j=1$", SF1J);
|
---|
136 |
|
---|
137 | Manager()->AddCut("$m_{l_1,l_2} > 100$ [GeV]", DF);
|
---|
138 | Manager()->AddCut("$m_{l_1,l_2} > 121.2$ [GeV]", SF);
|
---|
139 |
|
---|
140 | // Other preselection cuts
|
---|
141 | Manager()->AddCut("$\\slashed{E}_T > 110$ [GeV]");
|
---|
142 | Manager()->AddCut("$\\slashed{E}_T$ Sig. $> 10$ [$\\sqrt{\\rm GeV}$]");
|
---|
143 |
|
---|
144 | // MT2 cuts
|
---|
145 | std::string mt2_100_105[] = {"SR_DF_0J_MT2_100_105", "SR_DF_1J_MT2_100_105",
|
---|
146 | "SR_SF_0J_MT2_100_105", "SR_SF_1J_MT2_100_105"};
|
---|
147 | std::string mt2_105_110[] = {"SR_DF_0J_MT2_105_110", "SR_DF_1J_MT2_105_110",
|
---|
148 | "SR_SF_0J_MT2_105_110", "SR_SF_1J_MT2_105_110"};
|
---|
149 | std::string mt2_110_120[] = {"SR_DF_0J_MT2_110_120", "SR_DF_1J_MT2_110_120",
|
---|
150 | "SR_SF_0J_MT2_110_120", "SR_SF_1J_MT2_110_120"};
|
---|
151 | std::string mt2_120_140[] = {"SR_DF_0J_MT2_120_140", "SR_DF_1J_MT2_120_140",
|
---|
152 | "SR_SF_0J_MT2_120_140", "SR_SF_1J_MT2_120_140"};
|
---|
153 | std::string mt2_140_160[] = {"SR_DF_0J_MT2_140_160", "SR_DF_1J_MT2_140_160",
|
---|
154 | "SR_SF_0J_MT2_140_160", "SR_SF_1J_MT2_140_160"};
|
---|
155 | std::string mt2_160_180[] = {"SR_DF_0J_MT2_160_180", "SR_DF_1J_MT2_160_180",
|
---|
156 | "SR_SF_0J_MT2_160_180", "SR_SF_1J_MT2_160_180"};
|
---|
157 | std::string mt2_180_220[] = {"SR_DF_0J_MT2_180_220", "SR_DF_1J_MT2_180_220",
|
---|
158 | "SR_SF_0J_MT2_180_220", "SR_SF_1J_MT2_180_220"};
|
---|
159 | std::string mt2_220_260[] = {"SR_DF_0J_MT2_220_260", "SR_DF_1J_MT2_220_260",
|
---|
160 | "SR_SF_0J_MT2_220_260", "SR_SF_1J_MT2_220_260"};
|
---|
161 | std::string mt2_260_inf[] = {"SR_DF_0J_MT2_260_inf", "SR_DF_1J_MT2_260_inf",
|
---|
162 | "SR_SF_0J_MT2_260_inf", "SR_SF_1J_MT2_260_inf"};
|
---|
163 | std::string mt2_100_inf[] = {"SR_DF_0J_MT2_100_inf", "SR_DF_1J_MT2_100_inf",
|
---|
164 | "SR_SF_0J_MT2_100_inf", "SR_SF_1J_MT2_100_inf"};
|
---|
165 | std::string mt2_160_inf[] = {"SR_DF_0J_MT2_160_inf", "SR_DF_1J_MT2_160_inf",
|
---|
166 | "SR_SF_0J_MT2_160_inf", "SR_SF_1J_MT2_160_inf"};
|
---|
167 | std::string mt2_100_120[] = {"SR_DF_0J_MT2_100_120", "SR_DF_1J_MT2_100_120",
|
---|
168 | "SR_SF_0J_MT2_100_120", "SR_SF_1J_MT2_100_120"};
|
---|
169 | std::string mt2_120_160[] = {"SR_DF_0J_MT2_120_160", "SR_DF_1J_MT2_120_160",
|
---|
170 | "SR_SF_0J_MT2_120_160", "SR_SF_1J_MT2_120_160"};
|
---|
171 |
|
---|
172 | Manager()->AddCut("$M_{T2} \\in [100, 105]$ [GeV]", mt2_100_105);
|
---|
173 | Manager()->AddCut("$M_{T2} \\in [105, 110]$ [GeV]", mt2_105_110);
|
---|
174 | Manager()->AddCut("$M_{T2} \\in [110, 120]$ [GeV]", mt2_110_120);
|
---|
175 | Manager()->AddCut("$M_{T2} \\in [120, 140]$ [GeV]", mt2_120_140);
|
---|
176 | Manager()->AddCut("$M_{T2} \\in [140, 160]$ [GeV]", mt2_140_160);
|
---|
177 | Manager()->AddCut("$M_{T2} \\in [160, 180]$ [GeV]", mt2_160_180);
|
---|
178 | Manager()->AddCut("$M_{T2} \\in [180, 220]$ [GeV]", mt2_180_220);
|
---|
179 | Manager()->AddCut("$M_{T2} \\in [220, 260]$ [GeV]", mt2_220_260);
|
---|
180 | Manager()->AddCut("$M_{T2} \\in [260, \\infty[$ [GeV]", mt2_260_inf);
|
---|
181 | Manager()->AddCut("$M_{T2} \\in [100, \\infty[$ [GeV]", mt2_100_inf);
|
---|
182 | Manager()->AddCut("$M_{T2} \\in [160, \\infty[$ [GeV]", mt2_160_inf);
|
---|
183 | Manager()->AddCut("$M_{T2} \\in [100, 120]$ [GeV]", mt2_100_120);
|
---|
184 | Manager()->AddCut("$M_{T2} \\in [120, 160]$ [GeV]", mt2_120_160);
|
---|
185 |
|
---|
186 | // Histogram declaration
|
---|
187 | Manager()->AddHisto("MT2-SF-0J",9, 100., 280., SF0J);
|
---|
188 | Manager()->AddHisto("MT2-SF-1J",9, 100., 280., SF1J);
|
---|
189 | Manager()->AddHisto("MT2-DF-0J",9, 100., 280., DF0J);
|
---|
190 | Manager()->AddHisto("MT2-DF-1J",9, 100., 280., DF1J);
|
---|
191 |
|
---|
192 | // Exit
|
---|
193 | return true;
|
---|
194 | }
|
---|
195 |
|
---|
196 | // -----------------------------------------------------------------------------
|
---|
197 | // Finalize
|
---|
198 | // function called one time at the end of the analysis
|
---|
199 | // -----------------------------------------------------------------------------
|
---|
200 | void atlas_susy_2018_32::Finalize(const SampleFormat& summary,
|
---|
201 | const std::vector<SampleFormat>& files){}
|
---|
202 |
|
---|
203 | // -----------------------------------------------------------------------------
|
---|
204 | // Execute
|
---|
205 | // function called each time one event is read
|
---|
206 | // -----------------------------------------------------------------------------
|
---|
207 | bool atlas_susy_2018_32::Execute(SampleFormat& sample, const EventFormat& event)
|
---|
208 | {
|
---|
209 | // Event weight
|
---|
210 | MAdouble64 myWeight;
|
---|
211 | if(Configuration().IsNoEventWeight()) myWeight=1.;
|
---|
212 | else if(event.mc()->weight()!=0.) myWeight=event.mc()->weight();
|
---|
213 | else { return false; }
|
---|
214 | Manager()->InitializeForNewEvent(myWeight);
|
---|
215 |
|
---|
216 | // Security for empty events
|
---|
217 | if (event.rec()==0) return true;
|
---|
218 |
|
---|
219 | // Electrons
|
---|
220 | std::vector<const RecLeptonFormat*> SignalElectrons;
|
---|
221 | for(MAuint32 i=0; i<event.rec()->electrons().size(); i++)
|
---|
222 | {
|
---|
223 | const RecLeptonFormat *Lep = &(event.rec()->electrons()[i]);
|
---|
224 |
|
---|
225 | // Kinematics
|
---|
226 | MAdouble64 eta = Lep->abseta();
|
---|
227 | MAdouble64 pt = Lep->pt();
|
---|
228 |
|
---|
229 | // Isolation
|
---|
230 | MAdouble64 iso_dR = std::min(10./pt,0.2);
|
---|
231 | MAdouble64 iso_tracks = PHYSICS->Isol->tracker->relIsolation(Lep, event.rec(), iso_dR, 0.);
|
---|
232 | MAdouble64 iso_all = PHYSICS->Isol->calorimeter->relIsolation(Lep, event.rec(), 0.2, 0.);
|
---|
233 | MAbool iso = (iso_tracks<0.15 && iso_all<0.20);
|
---|
234 | if (pt>200.) { iso = (iso_all<std::max(0.015*pt, 3.5)); }
|
---|
235 |
|
---|
236 | // Signal leptons
|
---|
237 | if(eta<2.47 && pt>10. && iso) { SignalElectrons.push_back(Lep);}
|
---|
238 | }
|
---|
239 |
|
---|
240 |
|
---|
241 | // Muons
|
---|
242 | std::vector<const RecLeptonFormat*> SignalMuons;
|
---|
243 | for(MAuint32 i=0; i<event.rec()->muons().size(); i++)
|
---|
244 | {
|
---|
245 | const RecLeptonFormat *Lep = &(event.rec()->muons()[i]);
|
---|
246 |
|
---|
247 | // Kinematics
|
---|
248 | MAdouble64 eta = Lep->abseta();
|
---|
249 | MAdouble64 pt = Lep->pt();
|
---|
250 |
|
---|
251 | // Isolation
|
---|
252 | MAdouble64 iso_dR = std::min(10./pt,0.3);
|
---|
253 | MAdouble64 iso_tracks = PHYSICS->Isol->tracker->relIsolation(Lep, event.rec(), iso_dR, 0.);
|
---|
254 | MAdouble64 iso_all = PHYSICS->Isol->calorimeter->relIsolation(Lep, event.rec(), 0.2, 0.);
|
---|
255 | MAbool iso = (iso_tracks<0.15 && iso_all<0.30);
|
---|
256 |
|
---|
257 | // Signal leptons
|
---|
258 | if(eta<2.7 && pt>10. && iso) { SignalMuons.push_back(Lep);}
|
---|
259 | }
|
---|
260 |
|
---|
261 | // Jets
|
---|
262 | std::vector <const RecJetFormat*> Jets;
|
---|
263 | for(MAuint32 i=0; i<event.rec()->jets().size(); i++)
|
---|
264 | {
|
---|
265 | const RecJetFormat *Jet = &(event.rec()->jets()[i]);
|
---|
266 | MAdouble64 eta = Jet->abseta();
|
---|
267 | MAdouble64 pt = Jet->pt();
|
---|
268 | if(pt>20. && eta<2.4) { Jets.push_back(Jet); }
|
---|
269 | }
|
---|
270 |
|
---|
271 | // Object overlap removal
|
---|
272 | Jets = PHYSICS->Isol->JetCleaning(Jets, SignalElectrons, 0.2);
|
---|
273 | Jets = PHYSICS->Isol->JetCleaning(Jets, SignalMuons, 0.4);
|
---|
274 | SignalElectrons = Removal(SignalElectrons, SignalMuons, 0.2);
|
---|
275 |
|
---|
276 | // Bjets and HT
|
---|
277 | MAuint32 nb = 0;
|
---|
278 | MAdouble64 HT= 0.;
|
---|
279 | for (MAuint32 i=0; i<Jets.size(); i++)
|
---|
280 | {
|
---|
281 | if(Jets[i]->btag()) { nb++; }
|
---|
282 | HT += Jets[i]->pt();
|
---|
283 | }
|
---|
284 |
|
---|
285 | // Leptons
|
---|
286 | std::vector<const RecLeptonFormat*> SignalLeptons;
|
---|
287 | for(MAuint32 i=0; i<SignalMuons.size(); i++)
|
---|
288 | { SignalLeptons.push_back(SignalMuons[i]); }
|
---|
289 | for(MAuint32 i=0; i<SignalElectrons.size(); i++)
|
---|
290 | { SignalLeptons.push_back(SignalElectrons[i]); }
|
---|
291 | SORTER->sort(SignalLeptons, PTordering);
|
---|
292 |
|
---|
293 | // MET
|
---|
294 | MAdouble64 MET = event.rec()->MET().pt();
|
---|
295 |
|
---|
296 | // DiLepton reconstruction
|
---|
297 | MAuint32 hasOS = 0;
|
---|
298 | MAuint32 hasOSSF = 0;
|
---|
299 | MAuint32 hasOSOF = 0;
|
---|
300 | for (MAuint32 lid = 0; lid < SignalLeptons.size(); lid++)
|
---|
301 | {
|
---|
302 | for (MAuint32 sid = 0; (sid < SignalLeptons.size()) && (sid != lid); sid++)
|
---|
303 | {
|
---|
304 | int sumflvr = -(SignalLeptons[lid]->isMuon()) * 13 * SignalLeptons[lid]->charge() -\
|
---|
305 | (SignalLeptons[lid]->isElectron()) * 11 * SignalLeptons[lid]->charge() -\
|
---|
306 | (SignalLeptons[sid]->isMuon()) * 13 * SignalLeptons[sid]->charge() -\
|
---|
307 | (SignalLeptons[sid]->isElectron()) * 11 * SignalLeptons[sid]->charge();
|
---|
308 | // OS: 0, 2, OSSF : 0
|
---|
309 | // SSOF : 24, SSSF : 22, 26
|
---|
310 | // SSOF : 24, OSOF : 2
|
---|
311 | if (std::abs(sumflvr) == 0) {hasOSSF++; hasOS++;}
|
---|
312 | else if (std::abs(sumflvr) == 2) {hasOSOF++; hasOS++;}
|
---|
313 | }
|
---|
314 | }
|
---|
315 |
|
---|
316 | //==================//
|
---|
317 | //==== Cut Flow ====//
|
---|
318 | //==================//
|
---|
319 |
|
---|
320 | // Trigger efficiency
|
---|
321 | Manager()->SetCurrentEventWeight(myWeight*0.85);
|
---|
322 |
|
---|
323 | MAbool is_pt = false;
|
---|
324 | if (SignalLeptons.size()>1) is_pt = (SignalLeptons[1]->pt()>25.);
|
---|
325 | if(!Manager()->ApplyCut(hasOS==1 && SignalLeptons.size()==2 && is_pt,
|
---|
326 | "OS dilep. with $p^l_T>25$ [GeV]")) return true;
|
---|
327 |
|
---|
328 |
|
---|
329 | MAdouble64 mll = (SignalLeptons[0]->momentum() + SignalLeptons[1]->momentum()).M();
|
---|
330 | if(!Manager()->ApplyCut(mll>25.,"$m_{l_1,l_2}>25$ [GeV]")) return true;
|
---|
331 |
|
---|
332 | if(!Manager()->ApplyCut(nb==0,"b veto")) return true;
|
---|
333 |
|
---|
334 | // SF vs DF & Njets
|
---|
335 | MAuint32 nj = Jets.size();
|
---|
336 |
|
---|
337 | // SF-DF & Njet cuts
|
---|
338 | if(!Manager()->ApplyCut(hasOSOF==1 && nj==0, "DF dilep. \\& $N_j=0$")) return true;
|
---|
339 | if(!Manager()->ApplyCut(hasOSOF==1 && nj==1, "DF dilep. \\& $N_j=1$")) return true;
|
---|
340 | if(!Manager()->ApplyCut(hasOSSF==1 && nj==0, "SF dilep. \\& $N_j=0$")) return true;
|
---|
341 | if(!Manager()->ApplyCut(hasOSSF==1 && nj==1, "SF dilep. \\& $N_j=1$")) return true;
|
---|
342 |
|
---|
343 | if(!Manager()->ApplyCut(mll>100., "$m_{l_1,l_2} > 100$ [GeV]")) return true;
|
---|
344 | if(!Manager()->ApplyCut(mll>121.2, "$m_{l_1,l_2} > 121.2$ [GeV]")) return true;
|
---|
345 |
|
---|
346 | // Other preselection cuts
|
---|
347 | MAdouble64 METSig = -1.;
|
---|
348 | if (HT>0) METSig = MET/sqrt(HT);
|
---|
349 | if(!Manager()->ApplyCut(MET>110., "$\\slashed{E}_T > 110$ [GeV]")) return true;
|
---|
350 | if(!Manager()->ApplyCut(METSig>10., "$\\slashed{E}_T$ Sig. $> 10$ [$\\sqrt{\\rm GeV}$]")) return true;
|
---|
351 |
|
---|
352 | // Histograms
|
---|
353 | MAdouble64 mt2 = PHYSICS->Transverse->MT2(SignalLeptons[0],SignalLeptons[1],event.rec()->MET(),0.);
|
---|
354 | Manager()->FillHisto("MT2-SF-0J",mt2);
|
---|
355 | Manager()->FillHisto("MT2-SF-1J",mt2);
|
---|
356 | Manager()->FillHisto("MT2-DF-0J",mt2);
|
---|
357 | Manager()->FillHisto("MT2-DF-1J",mt2);
|
---|
358 |
|
---|
359 | // MT2
|
---|
360 | if(!Manager()->ApplyCut(mt2>100. && mt2<105.,"$M_{T2} \\in [100, 105]$ [GeV]")) return true;
|
---|
361 | if(!Manager()->ApplyCut(mt2>105. && mt2<110.,"$M_{T2} \\in [105, 110]$ [GeV]")) return true;
|
---|
362 | if(!Manager()->ApplyCut(mt2>110. && mt2<120.,"$M_{T2} \\in [110, 120]$ [GeV]")) return true;
|
---|
363 | if(!Manager()->ApplyCut(mt2>120. && mt2<140.,"$M_{T2} \\in [120, 140]$ [GeV]")) return true;
|
---|
364 | if(!Manager()->ApplyCut(mt2>140. && mt2<160.,"$M_{T2} \\in [140, 160]$ [GeV]")) return true;
|
---|
365 | if(!Manager()->ApplyCut(mt2>160. && mt2<180.,"$M_{T2} \\in [160, 180]$ [GeV]")) return true;
|
---|
366 | if(!Manager()->ApplyCut(mt2>180. && mt2<220.,"$M_{T2} \\in [180, 220]$ [GeV]")) return true;
|
---|
367 | if(!Manager()->ApplyCut(mt2>220. && mt2<260.,"$M_{T2} \\in [220, 260]$ [GeV]")) return true;
|
---|
368 | if(!Manager()->ApplyCut(mt2>260. ,"$M_{T2} \\in [260, \\infty[$ [GeV]")) return true;
|
---|
369 | if(!Manager()->ApplyCut(mt2>100. ,"$M_{T2} \\in [100, \\infty[$ [GeV]")) return true;
|
---|
370 | if(!Manager()->ApplyCut(mt2>160. ,"$M_{T2} \\in [160, \\infty[$ [GeV]")) return true;
|
---|
371 | if(!Manager()->ApplyCut(mt2>100. && mt2<120.,"$M_{T2} \\in [100, 120]$ [GeV]")) return true;
|
---|
372 | if(!Manager()->ApplyCut(mt2>120. && mt2<160.,"$M_{T2} \\in [120, 160]$ [GeV]")) return true;
|
---|
373 |
|
---|
374 | // Exit
|
---|
375 | return true;
|
---|
376 | }
|
---|
377 |
|
---|
378 | // Overlap Removal
|
---|
379 | template<typename T1, typename T2> std::vector<const T1*>
|
---|
380 | Removal(std::vector<const T1*> &v1, std::vector<const T2*> &v2, const MAdouble64 &drmin)
|
---|
381 | {
|
---|
382 | // Determining with objects should be removed
|
---|
383 | std::vector<bool> mask(v1.size(),false);
|
---|
384 | for (MAuint32 j=0;j<v1.size();j++)
|
---|
385 | for (MAuint32 i=0;i<v2.size();i++)
|
---|
386 | if (v2[i]->dr(v1[j]) < drmin)
|
---|
387 | {
|
---|
388 | mask[j]=true;
|
---|
389 | break;
|
---|
390 | }
|
---|
391 |
|
---|
392 | // Building the cleaned container
|
---|
393 | std::vector<const T1*> cleaned_v1;
|
---|
394 | for (MAuint32 i=0;i<v1.size();i++)
|
---|
395 | if (!mask[i]) cleaned_v1.push_back(v1[i]);
|
---|
396 |
|
---|
397 | return cleaned_v1;
|
---|
398 | }
|
---|
399 |
|
---|