39 Double_t invmassRecoPi0, vector<TH1*> BGCases)
85 if (TMath::Abs(pdg1) != 11) NumOfOthers++;
86 if (TMath::Abs(pdg2) != 11) NumOfOthers++;
87 if (TMath::Abs(pdg3) != 11) NumOfOthers++;
88 if (TMath::Abs(pdg4) != 11) NumOfOthers++;
91 if (NumOfOthers == 4) BGCases[9]->Fill(invmassRecoPi0);
92 if (NumOfOthers == 3) BGCases[8]->Fill(invmassRecoPi0);
94 if (NumOfOthers == 2) {
95 BGCases[7]->Fill(invmassRecoPi0);
96 BGCases[10]->Fill(pdg1);
97 BGCases[10]->Fill(pdg2);
98 BGCases[10]->Fill(pdg3);
99 BGCases[10]->Fill(pdg4);
114 if (TMath::Abs(pdg1) != 11 && motherId1 != -1) mother1N = (
CbmMCTrack*)
fMcTracks->At(motherId1);
115 if (TMath::Abs(pdg2) != 11 && motherId2 != -1) mother2N = (
CbmMCTrack*)
fMcTracks->At(motherId2);
116 if (TMath::Abs(pdg3) != 11 && motherId3 != -1) mother3N = (
CbmMCTrack*)
fMcTracks->At(motherId3);
117 if (TMath::Abs(pdg4) != 11 && motherId4 != -1) mother4N = (
CbmMCTrack*)
fMcTracks->At(motherId4);
119 if (
nullptr != mother1) BGCases[11]->Fill(mother1->
GetPdgCode());
120 if (
nullptr != mother2) BGCases[11]->Fill(mother2->
GetPdgCode());
121 if (
nullptr != mother3) BGCases[11]->Fill(mother3->
GetPdgCode());
122 if (
nullptr != mother4) BGCases[11]->Fill(mother4->
GetPdgCode());
124 std::vector<int> testM;
125 if (TMath::Abs(pdg1) == 11) testM.push_back(motherId1);
126 if (TMath::Abs(pdg2) == 11) testM.push_back(motherId2);
127 if (TMath::Abs(pdg3) == 11) testM.push_back(motherId3);
128 if (TMath::Abs(pdg4) == 11) testM.push_back(motherId4);
130 if (testM.size() == 2 && testM[0] == testM[1]) {
131 BGCases[12]->Fill(invmassRecoPi0);
132 if (testM[0] != -1) {
135 if (Mam->
GetPdgCode() == 111) BGCases[19]->Fill(invmassRecoPi0);
138 if (TMath::Abs(pdg1) != 11 && motherId1 != -1) {
139 BGCases[23]->Fill(pdg1);
141 BGCases[25]->Fill(invmassRecoPi0);
143 if (TMath::Abs(pdg2) != 11 && motherId2 != -1) {
144 BGCases[23]->Fill(pdg2);
146 BGCases[25]->Fill(invmassRecoPi0);
148 if (TMath::Abs(pdg3) != 11 && motherId3 != -1) {
149 BGCases[23]->Fill(pdg3);
151 BGCases[25]->Fill(invmassRecoPi0);
153 if (TMath::Abs(pdg4) != 11 && motherId4 != -1) {
154 BGCases[23]->Fill(pdg4);
156 BGCases[25]->Fill(invmassRecoPi0);
159 if (TMath::Abs(pdg1) != 11 && motherId1 == -1) {
160 BGCases[26]->Fill(pdg1);
161 BGCases[27]->Fill(invmassRecoPi0, 0.5);
162 BGCases[28]->Fill(mctrack1->
GetP());
163 BGCases[29]->Fill(mctrack1->
GetPt());
165 if (TMath::Abs(pdg2) != 11 && motherId2 == -1) {
166 BGCases[26]->Fill(pdg2);
167 BGCases[27]->Fill(invmassRecoPi0, 0.5);
168 BGCases[28]->Fill(mctrack2->
GetP());
169 BGCases[29]->Fill(mctrack2->
GetPt());
171 if (TMath::Abs(pdg3) != 11 && motherId3 == -1) {
172 BGCases[26]->Fill(pdg3);
173 BGCases[27]->Fill(invmassRecoPi0, 0.5);
174 BGCases[28]->Fill(mctrack3->
GetP());
175 BGCases[29]->Fill(mctrack3->
GetPt());
177 if (TMath::Abs(pdg4) != 11 && motherId4 == -1) {
178 BGCases[26]->Fill(pdg4);
179 BGCases[27]->Fill(invmassRecoPi0, 0.5);
180 BGCases[28]->Fill(mctrack4->
GetP());
181 BGCases[29]->Fill(mctrack4->
GetPt());
185 std::vector<int> testGR;
186 if (TMath::Abs(pdg1) == 11 &&
nullptr != mother1) testGR.push_back(mother1->
GetMotherId());
187 if (TMath::Abs(pdg2) == 11 &&
nullptr != mother2) testGR.push_back(mother2->
GetMotherId());
188 if (TMath::Abs(pdg3) == 11 &&
nullptr != mother3) testGR.push_back(mother3->
GetMotherId());
189 if (TMath::Abs(pdg4) == 11 &&
nullptr != mother4) testGR.push_back(mother4->
GetMotherId());
191 if (testGR.size() == 2) {
192 if (testGR[0] == testGR[1]) { BGCases[13]->Fill(invmassRecoPi0); }
199 if (TMath::Abs(pdg1) != 11 && motherId1 == -1) BGCases[16]->Fill(mctrack1->
GetPdgCode());
200 if (TMath::Abs(pdg2) != 11 && motherId2 == -1) BGCases[16]->Fill(mctrack2->
GetPdgCode());
201 if (TMath::Abs(pdg3) != 11 && motherId3 == -1) BGCases[16]->Fill(mctrack3->
GetPdgCode());
202 if (TMath::Abs(pdg4) != 11 && motherId4 == -1) BGCases[16]->Fill(mctrack4->
GetPdgCode());
205 if (TMath::Abs(pdg1) != 11 &&
nullptr != mother1N) {
207 BGCases[17]->Fill(pdg1);
208 if (mother1N->
GetPdgCode() == 2112 || mother1N->
GetPdgCode() == 2212) BGCases[20]->Fill(invmassRecoPi0);
209 if (mother1N->
GetPdgCode() == 221) BGCases[21]->Fill(invmassRecoPi0);
210 if (mother1N->
GetPdgCode() == 310) BGCases[22]->Fill(invmassRecoPi0);
212 if (TMath::Abs(pdg2) != 11 &&
nullptr != mother2N) {
214 BGCases[17]->Fill(pdg2);
215 if (mother2N->
GetPdgCode() == 2112 || mother2N->
GetPdgCode() == 2212) BGCases[20]->Fill(invmassRecoPi0);
216 if (mother2N->
GetPdgCode() == 221) BGCases[21]->Fill(invmassRecoPi0);
217 if (mother2N->
GetPdgCode() == 310) BGCases[22]->Fill(invmassRecoPi0);
219 if (TMath::Abs(pdg3) != 11 &&
nullptr != mother3N) {
221 BGCases[17]->Fill(pdg3);
222 if (mother3N->
GetPdgCode() == 2112 || mother3N->
GetPdgCode() == 2212) BGCases[20]->Fill(invmassRecoPi0);
223 if (mother3N->
GetPdgCode() == 221) BGCases[21]->Fill(invmassRecoPi0);
224 if (mother3N->
GetPdgCode() == 310) BGCases[22]->Fill(invmassRecoPi0);
226 if (TMath::Abs(pdg4) != 11 &&
nullptr != mother4N) {
228 BGCases[17]->Fill(pdg4);
229 if (mother4N->
GetPdgCode() == 2112 || mother4N->
GetPdgCode() == 2212) BGCases[20]->Fill(invmassRecoPi0);
230 if (mother4N->
GetPdgCode() == 221) BGCases[21]->Fill(invmassRecoPi0);
231 if (mother4N->
GetPdgCode() == 310) BGCases[22]->Fill(invmassRecoPi0);
235 if (NumOfOthers == 1) BGCases[6]->Fill(invmassRecoPi0);
237 if (NumOfOthers == 0) {
238 if (motherId1 != -1 && motherId2 != -1 && motherId3 != -1 && motherId4 != -1) {
243 if (
nullptr != mother1 &&
nullptr != mother2 &&
nullptr != mother3 &&
nullptr != mother4) {
253 if (motherId1 == motherId2 && motherId3 == motherId4 && grandmotherId1 == grandmotherId3) {
254 if (grandmotherId1 != -1) {
258 BGCases[0]->Fill(invmassRecoPi0);
264 if (motherId1 != motherId2 && motherId3 != motherId4) {
265 if (grandmotherId1 == grandmotherId3 && grandmotherId1 == grandmotherId4
266 && grandmotherId1 == grandmotherId2) {
267 BGCases[1]->Fill(invmassRecoPi0);
270 BGCases[5]->Fill(invmassRecoPi0);
274 if (motherId1 == motherId2 && motherId3 == motherId4 && grandmotherId1 != grandmotherId3)
275 BGCases[2]->Fill(invmassRecoPi0);
277 if ((motherId1 == motherId2 && motherId3 != motherId4) || (motherId1 != motherId2 && motherId3 == motherId4)) {
278 if ((grandmotherId1 == grandmotherId3 && grandmotherId1 == grandmotherId4 && grandmotherId1 != grandmotherId2)
279 || (grandmotherId1 == grandmotherId2 && grandmotherId1 == grandmotherId4
280 && grandmotherId1 != grandmotherId3)
281 || (grandmotherId1 == grandmotherId2 && grandmotherId1 == grandmotherId3
282 && grandmotherId1 != grandmotherId4)
283 || (grandmotherId2 == grandmotherId3 && grandmotherId2 == grandmotherId4
284 && grandmotherId2 != grandmotherId1)
285 || (grandmotherId2 == grandmotherId1 && grandmotherId2 == grandmotherId4
286 && grandmotherId2 != grandmotherId3)
287 || (grandmotherId2 == grandmotherId1 && grandmotherId2 == grandmotherId3
288 && grandmotherId2 != grandmotherId4)
289 || (grandmotherId3 == grandmotherId1 && grandmotherId3 == grandmotherId2
290 && grandmotherId3 != grandmotherId4)
291 || (grandmotherId3 == grandmotherId1 && grandmotherId3 == grandmotherId4
292 && grandmotherId3 != grandmotherId2)
293 || (grandmotherId3 == grandmotherId2 && grandmotherId3 == grandmotherId4
294 && grandmotherId3 != grandmotherId1)
295 || (grandmotherId4 == grandmotherId1 && grandmotherId4 == grandmotherId2
296 && grandmotherId4 != grandmotherId3)
297 || (grandmotherId4 == grandmotherId1 && grandmotherId4 == grandmotherId3
298 && grandmotherId4 != grandmotherId2)
299 || (grandmotherId4 == grandmotherId2 && grandmotherId4 == grandmotherId3
300 && grandmotherId4 != grandmotherId1)) {
301 BGCases[3]->Fill(invmassRecoPi0);
304 BGCases[4]->Fill(invmassRecoPi0);