#include "AliFemtoV0SharedDaughterCut.h"
AliFemtoV0SharedDaughterCut::AliFemtoV0SharedDaughterCut() { }
AliFemtoV0SharedDaughterCut::~AliFemtoV0SharedDaughterCut() { }
AliFemtoV0Collection AliFemtoV0SharedDaughterCut::AliFemtoV0SharedDaughterCutCollection(AliFemtoV0Collection *V0Collection,
AliFemtoV0Cut *pCut) {
Int_t collectionSize = V0Collection->size();
Int_t positionInCollection=0;
Int_t count_pass=0;
Int_t *IdPosArray = new Int_t[collectionSize];
Int_t *IdNegArray = new Int_t[collectionSize];
Double_t *dcaToPrimVertex = new Double_t[collectionSize];
bool acceptV0 = false;
AliFemtoV0Collection V0CorrectedCollection;
AliFemtoV0* pParticle;
AliFemtoV0Iterator iterator;
AliFemtoV0Iterator start = V0Collection->begin();
AliFemtoV0Iterator end = V0Collection->end();
for (iterator=start;iterator!=end;iterator++){
pParticle = *iterator;
bool tmpPassV0 = pCut->Pass(pParticle);
pCut->FillCutMonitor(pParticle,tmpPassV0);
if(tmpPassV0) {
acceptV0=true;
IdPosArray[count_pass] = pParticle->IdPos();
IdNegArray[count_pass] = pParticle->IdNeg();
dcaToPrimVertex[count_pass] = pParticle->DcaV0ToPrimVertex();
for(Int_t ii=0; ii<count_pass; ii++) {
if( (IdPosArray[count_pass]==IdPosArray[ii]) || (IdNegArray[count_pass]==IdNegArray[ii]) ) {
if(dcaToPrimVertex[count_pass] < dcaToPrimVertex[ii]) {
for(AliFemtoV0Iterator iter=V0CorrectedCollection.begin(); iter!=V0CorrectedCollection.end(); iter++ ) {
if(positionInCollection==ii) {
V0CorrectedCollection.insert(iter, 1, pParticle);
V0CorrectedCollection.erase(iter);
IdPosArray[ii] = IdPosArray[count_pass];
IdNegArray[ii] = IdNegArray[count_pass];
dcaToPrimVertex[ii] = dcaToPrimVertex[count_pass];
break;
}
positionInCollection++;
}
positionInCollection=0;
}
acceptV0=false;
break;
}
}
if(acceptV0) {
V0CorrectedCollection.push_back(pParticle);
count_pass++;
}
}
}
delete [] IdPosArray;
delete [] IdNegArray;
delete [] dcaToPrimVertex;
return V0CorrectedCollection;
}
AliFemtoV0SharedDaughterCut.cxx:1 AliFemtoV0SharedDaughterCut.cxx:2 AliFemtoV0SharedDaughterCut.cxx:3 AliFemtoV0SharedDaughterCut.cxx:4 AliFemtoV0SharedDaughterCut.cxx:5 AliFemtoV0SharedDaughterCut.cxx:6 AliFemtoV0SharedDaughterCut.cxx:7 AliFemtoV0SharedDaughterCut.cxx:8 AliFemtoV0SharedDaughterCut.cxx:9 AliFemtoV0SharedDaughterCut.cxx:10 AliFemtoV0SharedDaughterCut.cxx:11 AliFemtoV0SharedDaughterCut.cxx:12 AliFemtoV0SharedDaughterCut.cxx:13 AliFemtoV0SharedDaughterCut.cxx:14 AliFemtoV0SharedDaughterCut.cxx:15 AliFemtoV0SharedDaughterCut.cxx:16 AliFemtoV0SharedDaughterCut.cxx:17 AliFemtoV0SharedDaughterCut.cxx:18 AliFemtoV0SharedDaughterCut.cxx:19 AliFemtoV0SharedDaughterCut.cxx:20 AliFemtoV0SharedDaughterCut.cxx:21 AliFemtoV0SharedDaughterCut.cxx:22 AliFemtoV0SharedDaughterCut.cxx:23 AliFemtoV0SharedDaughterCut.cxx:24 AliFemtoV0SharedDaughterCut.cxx:25 AliFemtoV0SharedDaughterCut.cxx:26 AliFemtoV0SharedDaughterCut.cxx:27 AliFemtoV0SharedDaughterCut.cxx:28 AliFemtoV0SharedDaughterCut.cxx:29 AliFemtoV0SharedDaughterCut.cxx:30 AliFemtoV0SharedDaughterCut.cxx:31 AliFemtoV0SharedDaughterCut.cxx:32 AliFemtoV0SharedDaughterCut.cxx:33 AliFemtoV0SharedDaughterCut.cxx:34 AliFemtoV0SharedDaughterCut.cxx:35 AliFemtoV0SharedDaughterCut.cxx:36 AliFemtoV0SharedDaughterCut.cxx:37 AliFemtoV0SharedDaughterCut.cxx:38 AliFemtoV0SharedDaughterCut.cxx:39 AliFemtoV0SharedDaughterCut.cxx:40 AliFemtoV0SharedDaughterCut.cxx:41 AliFemtoV0SharedDaughterCut.cxx:42 AliFemtoV0SharedDaughterCut.cxx:43 AliFemtoV0SharedDaughterCut.cxx:44 AliFemtoV0SharedDaughterCut.cxx:45 AliFemtoV0SharedDaughterCut.cxx:46 AliFemtoV0SharedDaughterCut.cxx:47 AliFemtoV0SharedDaughterCut.cxx:48 AliFemtoV0SharedDaughterCut.cxx:49 AliFemtoV0SharedDaughterCut.cxx:50 AliFemtoV0SharedDaughterCut.cxx:51 AliFemtoV0SharedDaughterCut.cxx:52 AliFemtoV0SharedDaughterCut.cxx:53 AliFemtoV0SharedDaughterCut.cxx:54 AliFemtoV0SharedDaughterCut.cxx:55 AliFemtoV0SharedDaughterCut.cxx:56 AliFemtoV0SharedDaughterCut.cxx:57 AliFemtoV0SharedDaughterCut.cxx:58 AliFemtoV0SharedDaughterCut.cxx:59 AliFemtoV0SharedDaughterCut.cxx:60 AliFemtoV0SharedDaughterCut.cxx:61 AliFemtoV0SharedDaughterCut.cxx:62 AliFemtoV0SharedDaughterCut.cxx:63 AliFemtoV0SharedDaughterCut.cxx:64 AliFemtoV0SharedDaughterCut.cxx:65 AliFemtoV0SharedDaughterCut.cxx:66 AliFemtoV0SharedDaughterCut.cxx:67 AliFemtoV0SharedDaughterCut.cxx:68 AliFemtoV0SharedDaughterCut.cxx:69 AliFemtoV0SharedDaughterCut.cxx:70 AliFemtoV0SharedDaughterCut.cxx:71 AliFemtoV0SharedDaughterCut.cxx:72 AliFemtoV0SharedDaughterCut.cxx:73 AliFemtoV0SharedDaughterCut.cxx:74 AliFemtoV0SharedDaughterCut.cxx:75 AliFemtoV0SharedDaughterCut.cxx:76 AliFemtoV0SharedDaughterCut.cxx:77 AliFemtoV0SharedDaughterCut.cxx:78 AliFemtoV0SharedDaughterCut.cxx:79 AliFemtoV0SharedDaughterCut.cxx:80 AliFemtoV0SharedDaughterCut.cxx:81