@@ -109,12 +109,14 @@ struct femtoDreamProducerTask {
109109
110110 Configurable<std::vector<float >> ConfDCAV0DaughMax{" ConfDCAV0DaughMax" , std::vector<float >{1 .2f , 1 .5f }, " V0 sel: Max. DCA daugh from SV (cm)" };
111111 Configurable<std::vector<float >> ConfCPAV0Min{" ConfCPAV0Min" , std::vector<float >{0 .9f , 0 .995f }, " V0 sel: Min. CPA" };
112+ Configurable<std::vector<float >> ConfV0PtMin{" ConfV0PtMin" , std::vector<float >{0 .3f , 0 .4f , 0 .5f }, " V0 sel: Min. Pt" };
113+
112114 MutableConfigurable<float > V0DecVtxMax{" V0DecVtxMax" , 100 .f , " V0 sel: Max. distance from Vtx (cm)" };
113115 MutableConfigurable<float > V0TranRadV0Min{" V0TranRadV0Min" , 0 .2f , " V0 sel: Min. transverse radius (cm)" };
114116 MutableConfigurable<float > V0TranRadV0Max{" V0TranRadV0Max" , 100 .f , " V0 sel: Max. transverse radius (cm)" };
115117
116118 Configurable<std::vector<float >> ConfV0DaughTPCnclsMin{" ConfV0DaughTPCnclsMin" , std::vector<float >{80 .f , 70 .f , 60 .f }, " V0 Daugh sel: Min. nCls TPC" };
117- Configurable<std::vector<float >> ConfV0DaughDCAMax{ " ConfV0DaughDCAMax " , std::vector<float >{0 .05f , 0 .06f }, " V0 Daugh sel: Max. DCA Daugh to PV (cm)" };
119+ Configurable<std::vector<float >> ConfV0DaughDCAMin{ " ConfV0DaughDCAMin " , std::vector<float >{0 .05f , 0 .06f }, " V0 Daugh sel: Max. DCA Daugh to PV (cm)" };
118120 Configurable<std::vector<float >> ConfV0DaughPIDnSigmaMax{" ConfV0DaughPIDnSigmaMax" , std::vector<float >{5 .f , 4 .f }, " V0 Daugh sel: Max. PID nSigma TPC" };
119121
120122 // / \todo should we add filter on min value pT/eta of V0 and daughters?
@@ -147,15 +149,21 @@ struct femtoDreamProducerTask {
147149
148150 v0Cuts.setSelection (ConfDCAV0DaughMax, femtoDreamV0Selection::kDCAV0DaughMax , femtoDreamSelection::kUpperLimit );
149151 v0Cuts.setSelection (ConfCPAV0Min, femtoDreamV0Selection::kCPAV0Min , femtoDreamSelection::kLowerLimit );
152+ v0Cuts.setSelection (ConfV0PtMin, femtoDreamV0Selection::kpTV0Min, femtoDreamSelection::kLowerLimit );
153+
150154 v0Cuts.setChildCuts (femtoDreamV0Selection::kPosTrack , ConfTrkCharge, femtoDreamTrackSelection::kSign , femtoDreamSelection::kEqual );
155+ v0Cuts.setChildCuts (femtoDreamV0Selection::kPosTrack , ConfTrkEta, femtoDreamTrackSelection::kEtaMax , femtoDreamSelection::kAbsUpperLimit );
151156 v0Cuts.setChildCuts (femtoDreamV0Selection::kPosTrack , ConfV0DaughTPCnclsMin, femtoDreamTrackSelection::kTPCnClsMin , femtoDreamSelection::kLowerLimit );
152- v0Cuts.setChildCuts (femtoDreamV0Selection::kPosTrack , ConfV0DaughDCAMax , femtoDreamTrackSelection::kDCAzMax , femtoDreamSelection::kAbsUpperLimit );
157+ // v0Cuts.setChildCuts(femtoDreamV0Selection::kPosTrack, ConfV0DaughDCAMin , femtoDreamTrackSelection::kDCAMin , femtoDreamSelection::kAbsLowerLimit );
153158 v0Cuts.setChildCuts (femtoDreamV0Selection::kPosTrack , ConfV0DaughPIDnSigmaMax, femtoDreamTrackSelection::kPIDnSigmaMax , femtoDreamSelection::kAbsUpperLimit );
154159 v0Cuts.setChildCuts (femtoDreamV0Selection::kNegTrack , ConfTrkCharge, femtoDreamTrackSelection::kSign , femtoDreamSelection::kEqual );
160+ v0Cuts.setChildCuts (femtoDreamV0Selection::kNegTrack , ConfTrkEta, femtoDreamTrackSelection::kEtaMax , femtoDreamSelection::kAbsUpperLimit );
155161 v0Cuts.setChildCuts (femtoDreamV0Selection::kNegTrack , ConfV0DaughTPCnclsMin, femtoDreamTrackSelection::kTPCnClsMin , femtoDreamSelection::kLowerLimit );
156- v0Cuts.setChildCuts (femtoDreamV0Selection::kNegTrack , ConfV0DaughDCAMax , femtoDreamTrackSelection::kDCAzMax , femtoDreamSelection::kAbsUpperLimit );
162+ // v0Cuts.setChildCuts(femtoDreamV0Selection::kNegTrack, ConfV0DaughDCAMin , femtoDreamTrackSelection::kDCAMin , femtoDreamSelection::kAbsLowerLimit );
157163 v0Cuts.setChildCuts (femtoDreamV0Selection::kNegTrack , ConfV0DaughPIDnSigmaMax, femtoDreamTrackSelection::kPIDnSigmaMax , femtoDreamSelection::kAbsUpperLimit );
158- v0Cuts.init <aod::femtodreamparticle::ParticleType::kV0 , aod::femtodreamparticle::cutContainerType>(&qaRegistry);
164+ v0Cuts.setChildPIDSpecies (femtoDreamV0Selection::kPosTrack , ConfTrkTPIDspecies);
165+ v0Cuts.setChildPIDSpecies (femtoDreamV0Selection::kNegTrack , ConfTrkTPIDspecies);
166+ v0Cuts.init <aod::femtodreamparticle::ParticleType::kV0 , aod::femtodreamparticle::ParticleType::kV0Child , aod::femtodreamparticle::cutContainerType>(&qaRegistry);
159167 }
160168
161169 void process (aod::FilteredFullCollision const & col,
@@ -198,30 +206,43 @@ struct femtoDreamProducerTask {
198206 }
199207 }
200208
209+ printf (" V0 Loop\n " );
201210 for (auto & v0 : fullV0s) {
211+ // printf("pT of V0 candidates before selection = %.2f\n", v0.pt());
202212 auto postrack = v0.posTrack_as <aod::FilteredFullTracks>();
203213 auto negtrack = v0.negTrack_as <aod::FilteredFullTracks>(); // /\tocheck funnily enough if we apply the filter the sign of Pos and Neg track is always negative
214+ // printf("+++++ In Producer 1\n");
215+ const auto dcaXYpos = postrack.dcaXY ();
216+ const auto dcaZpos = postrack.dcaZ ();
217+ const auto dcapos = std::sqrt (pow (dcaXYpos, 2 .) + pow (dcaZpos, 2 .));
218+ // printf("dcaxy Positive Daughter = %.2f\n", dcaXYpos);
219+ // printf("dcaz Positive Daughter = %.2f\n", dcaZpos);
220+ // printf("dca Positive Daughter = %.2f\n", dcapos);
221+ // printf("isSelectedMinimal V0 = %i\n", v0Cuts.isSelectedMinimal(col, v0, postrack, negtrack));
204222 if (!v0Cuts.isSelectedMinimal (col, v0, postrack, negtrack)) {
205223 continue ;
206224 }
207- v0Cuts.fillQA (col, v0); // /\todo fill QA also for daughters
225+ // printf("+++++2\n");
226+ v0Cuts.fillQA <aod::femtodreamparticle::ParticleType::kV0 , aod::femtodreamparticle::ParticleType::kV0Child >(col, v0, postrack, negtrack); // /\todo fill QA also for daughters
208227 auto cutContainerV0 = v0Cuts.getCutContainer <aod::femtodreamparticle::cutContainerType>(col, v0, postrack, negtrack);
228+ // printf("Container in V0\n");
229+ // printf("cutContainerV0.at(0) = %i\n", cutContainerV0.at(0));
209230 if ((cutContainerV0.at (0 ) > 0 ) && (cutContainerV0.at (1 ) > 0 ) && (cutContainerV0.at (2 ) > 0 )) {
231+ // printf("pT of V0 candidates after selection = %.2f\n", v0.pt());
232+ // printf("Inside Cut container!!!!!!\n");
210233 int postrackID = v0.posTrackId ();
211234 int rowInPrimaryTrackTablePos = -1 ;
212235 rowInPrimaryTrackTablePos = getRowDaughters (postrackID, tmpIDtrack);
213236 childIDs[0 ] = rowInPrimaryTrackTablePos;
214237 childIDs[1 ] = 0 ;
215- ROOT ::Math::PxPyPzMVector postrackVec (v0.pxpos (), v0.pypos (), v0.pzpos (), 0 .);
216- ROOT ::Math::PxPyPzMVector negtrackVec (v0.pxneg (), v0.pyneg (), v0.pzneg (), 0 .);
217- outputTracks (outputCollision.lastIndex (), postrackVec.Pt (), postrackVec.Eta (), postrackVec.Phi (), aod::femtodreamparticle::ParticleType::kV0Child , cutContainerV0.at (1 ), cutContainerV0.at (2 ), 0 ., childIDs);
238+ outputTracks (outputCollision.lastIndex (), v0.positivept (), v0.positiveeta (), v0.positivephi (), aod::femtodreamparticle::ParticleType::kV0Child , cutContainerV0.at (1 ), cutContainerV0.at (2 ), 0 ., childIDs);
218239 const int rowOfPosTrack = outputTracks.lastIndex ();
219240 int negtrackID = v0.negTrackId ();
220241 int rowInPrimaryTrackTableNeg = -1 ;
221242 rowInPrimaryTrackTableNeg = getRowDaughters (negtrackID, tmpIDtrack);
222243 childIDs[0 ] = 0 ;
223244 childIDs[1 ] = rowInPrimaryTrackTableNeg;
224- outputTracks (outputCollision.lastIndex (), negtrackVec. Pt (), negtrackVec. Eta (), negtrackVec. Phi (), aod::femtodreamparticle::ParticleType::kV0Child , cutContainerV0.at (3 ), cutContainerV0.at (4 ), 0 ., childIDs);
245+ outputTracks (outputCollision.lastIndex (), v0. negativept (), v0. negativeeta (), v0. negativephi (), aod::femtodreamparticle::ParticleType::kV0Child , cutContainerV0.at (3 ), cutContainerV0.at (4 ), 0 ., childIDs);
225246 const int rowOfNegTrack = outputTracks.lastIndex ();
226247 int indexChildID[2 ] = {rowOfPosTrack, rowOfNegTrack};
227248 outputTracks (outputCollision.lastIndex (), v0.pt (), v0.eta (), v0.phi (), aod::femtodreamparticle::ParticleType::kV0 , cutContainerV0.at (0 ), 0 , v0.v0cosPA (col.posX (), col.posY (), col.posZ ()), indexChildID);
0 commit comments