@@ -3,13 +3,11 @@ int External()
33 int checkPdgSignal = 4132 ;
44 int checkPdgDecayPi = 211 ;
55 int checkPdgDecayXi = 3312 ;
6- int checkPdgDecayLambda = 3122 ;
7- int checkPdgDecayP = 2212 ;
86 int checkPdgQuark = 4 ;
97 float ratioTrigger = 1. /3 ; // one event triggered out of 3
108
119 std ::string path {"o2sim_Kine.root" };
12- std ::cout << "Check for\nsignal PDG " << checkPdgSignal << "\ndecay PDG " << checkPdgDecayPi << " and " << checkPdgDecayPi << "\n" ;
10+ std ::cout << "Check for\nsignal PDG " << checkPdgSignal << "\ndecay PDG " << checkPdgDecayXi << " and " << checkPdgDecayPi << "\n" ;
1311 TFile file (path .c_str (), "READ ");
1412 if (file .IsZombie ())
1513 {
@@ -34,8 +32,6 @@ int External()
3432 int nSignalAntiPart {};
3533
3634 int nDecayXic {};
37- int nDecayXi {};
38- int nDecayLambda {};
3935 int nFullDecayChain {};
4036
4137 auto nEvents = tree -> GetEntries ();
@@ -94,80 +90,14 @@ int External()
9490 {
9591 auto childCasc0 = o2 ::mcutils ::MCTrackNavigator ::getDaughter0 (* child0 , * tracks );
9692 auto childCasc1 = o2 ::mcutils ::MCTrackNavigator ::getDaughter1 (* child0 , * tracks );
97- if (childCasc0 != nullptr && childCasc1 != nullptr )
98- {
99- if ((std ::abs (childCasc0 -> GetPdgCode ()) == checkPdgDecayLambda && std ::abs (childCasc1 -> GetPdgCode ()) == checkPdgDecayPi ) || (std ::abs (childCasc1 -> GetPdgCode ()) == checkPdgDecayLambda && std ::abs (childCasc0 -> GetPdgCode ()) == checkPdgDecayPi ))
100- {
101- nDecayXi ++ ;
102- // lambda is childCasc0
103- if (std ::abs (childCasc0 -> GetPdgCode ()) == checkPdgDecayLambda )
104- {
105- auto childLam0 = o2 ::mcutils ::MCTrackNavigator ::getDaughter0 (* childCasc0 , * tracks );
106- auto childLam1 = o2 ::mcutils ::MCTrackNavigator ::getDaughter1 (* childCasc0 , * tracks );
107- if (childLam0 != nullptr && childLam1 != nullptr )
108- {
109- if ((std ::abs (childLam0 -> GetPdgCode ()) == checkPdgDecayP && std ::abs (childLam1 -> GetPdgCode ()) == checkPdgDecayPi ) || (std ::abs (childLam1 -> GetPdgCode ()) == checkPdgDecayP && std ::abs (childLam0 -> GetPdgCode ()) == checkPdgDecayPi ))
110- {
111- nDecayLambda ++ ;
112- nFullDecayChain ++ ;
113- }
114- }
115- }
116- else if (std ::abs (childCasc1 -> GetPdgCode ()) == checkPdgDecayLambda )
117- { // lambda is childCasc1
118- auto childLam0 = o2 ::mcutils ::MCTrackNavigator ::getDaughter0 (* childCasc1 , * tracks );
119- auto childLam1 = o2 ::mcutils ::MCTrackNavigator ::getDaughter1 (* childCasc1 , * tracks );
120- if (childLam0 != nullptr && childLam1 != nullptr )
121- {
122- if ((std ::abs (childLam0 -> GetPdgCode ()) == checkPdgDecayP && std ::abs (childLam1 -> GetPdgCode ()) == checkPdgDecayPi ) || (std ::abs (childLam1 -> GetPdgCode ()) == checkPdgDecayP && std ::abs (childLam0 -> GetPdgCode ()) == checkPdgDecayPi ))
123- {
124- nDecayLambda ++ ;
125- nFullDecayChain ++ ;
126- }
127- }
128- }
129- }
130- }
93+ nFullDecayChain ++ ;
13194 }
13295
13396 else if (std ::abs (pdg1 ) == checkPdgDecayXi )
13497 { // ------------- cascade is child1 -------------
13598 auto childCasc0 = o2 ::mcutils ::MCTrackNavigator ::getDaughter0 (* child1 , * tracks );
13699 auto childCasc1 = o2 ::mcutils ::MCTrackNavigator ::getDaughter1 (* child1 , * tracks );
137- if (childCasc0 != nullptr && childCasc1 != nullptr )
138- {
139- if ((std ::abs (childCasc0 -> GetPdgCode ()) == checkPdgDecayLambda && std ::abs (childCasc1 -> GetPdgCode ()) == checkPdgDecayPi ) || (std ::abs (childCasc1 -> GetPdgCode ()) == checkPdgDecayLambda && std ::abs (childCasc0 -> GetPdgCode ()) == checkPdgDecayPi ))
140- {
141- nDecayXi ++ ;
142- // lambda is chilCasc0
143- if (std ::abs (childCasc0 -> GetPdgCode ()) == checkPdgDecayLambda )
144- {
145- auto childLam0 = o2 ::mcutils ::MCTrackNavigator ::getDaughter0 (* childCasc0 , * tracks );
146- auto childLam1 = o2 ::mcutils ::MCTrackNavigator ::getDaughter1 (* childCasc0 , * tracks );
147- if (childLam0 != nullptr && childLam1 != nullptr )
148- {
149- if ((std ::abs (childLam0 -> GetPdgCode ()) == checkPdgDecayP && std ::abs (childLam1 -> GetPdgCode ()) == checkPdgDecayPi ) || (std ::abs (childLam1 -> GetPdgCode ()) == checkPdgDecayP && std ::abs (childLam0 -> GetPdgCode ()) == checkPdgDecayPi ))
150- {
151- nDecayLambda ++ ;
152- nFullDecayChain ++ ;
153- }
154- }
155- }
156- else if (std ::abs (childCasc1 -> GetPdgCode ()) == checkPdgDecayLambda )
157- { // lambda is childCasc1
158- auto childLam0 = o2 ::mcutils ::MCTrackNavigator ::getDaughter0 (* childCasc1 , * tracks );
159- auto childLam1 = o2 ::mcutils ::MCTrackNavigator ::getDaughter1 (* childCasc1 , * tracks );
160- if (childLam0 != nullptr && childLam1 != nullptr )
161- {
162- if ((std ::abs (childLam0 -> GetPdgCode ()) == checkPdgDecayP && std ::abs (childLam1 -> GetPdgCode ()) == checkPdgDecayPi ) || (std ::abs (childLam1 -> GetPdgCode ()) == checkPdgDecayP && std ::abs (childLam0 -> GetPdgCode ()) == checkPdgDecayPi ))
163- {
164- nDecayLambda ++ ;
165- nFullDecayChain ++ ;
166- }
167- }
168- }
169- }
170- }
100+ nFullDecayChain ++ ;
171101 }
172102 }
173103 }
@@ -187,8 +117,6 @@ int External()
187117 << "#signal anti-particles: " << nSignalAntiPart << "\n"
188118 << "#Daughter pairs: " << nDauPairs << "\n"
189119 << "#Correct Xic decays: " << nDecayXic << "\n"
190- << "#Correct Xi decays: " << nDecayXi << "\n"
191- << "#Correct Lambda decays: " << nDecayLambda << "\n"
192120 << "#Correct full decay chain: " << nFullDecayChain << "\n" ;
193121
194122 if (nDauPairs == 0 )
@@ -211,20 +139,9 @@ int External()
211139 std ::cerr << "At least one among number of pi and number of anti-pi should be greater than 1.\n" ;
212140 return 1 ;
213141 }
214- // check all the steps in the decay chain
215- if (nDecayXic != nDecayXi )
216- {
217- std ::cerr << "The Xi decay chain is not the expected one (Xic -> Xi pi -> (Lambda pi) pi).\n" ;
218- return 1 ;
219- }
220- if (nDecayXic != nDecayLambda )
221- {
222- std ::cerr << "The Lambda decay chain is not the expected one (Xic -> Xi pi -> (Lambda pi) pi -> ((p pi) pi) pi).\n" ;
223- return 1 ;
224- }
225142 if (nDecayXic != nFullDecayChain )
226143 {
227- std ::cerr << "The full OmegaC decay chain is not the expected one (Xic -> Xi pi -> (Lambda pi) pi -> ((p pi) pi) pi ).\n" ;
144+ std ::cerr << "The full OmegaC decay chain is not the expected one (Xic -> Xi pi).\n" ;
228145 return 1 ;
229146 }
230147 if (nQuark < 2 * nEvents * ratioTrigger ) // we expect anyway more because the same quark is repeated several time, after each gluon radiation
0 commit comments