+ // itsLoader->SetVerticesContName(name);
+ Int_t rc = itsLoader->PostVertex(fCurrentVertex);
+ rc = itsLoader->WriteVertices();
+}
+
+//______________________________________________________________________
+void AliITSVertexer::Clusters2RecPoints
+(const TClonesArray *clusters, Int_t idx, TClonesArray *points) {
+ //------------------------------------------------------------
+ // Conversion AliITSclusterV2 -> AliITSRecPoints for the ITS
+ // module "idx" (entry in the tree with the clusters).
+ // Simplified version, supposed to work with the pixels only !
+ //------------------------------------------------------------
+ const Int_t lastSPD1=79; //let's hope the number of the SPDs will not change
+ const Int_t lastSPD2=239;//let's hope the number of the SPDs will not change
+
+ Float_t yshift = 0; //see AliITSclustererV2.cxx about these shifts
+ Float_t zshift[4] = {-10.708000, -3.536000, 3.536000, 10.708000}; //let's hope the positioning of the SPDs will not change
+
+ if (idx<=lastSPD1) {
+ yshift=0.248499; //let's hope the positioning of the SPDs will not change
+ } else if (idx<=lastSPD2) {
+ yshift=3.096207; //let's hope the positioning of the SPDs will not change
+ } else {
+ Fatal("Clusters2RecPoints","This is not an SPD module ! %d",idx);
+ }
+
+ TClonesArray &pn=*points;
+ Int_t ncl=clusters->GetEntriesFast();
+ for (Int_t i=0; i<ncl; i++) {
+ AliITSRecPoint p;
+ AliITSclusterV2 *c = (AliITSclusterV2 *)clusters->UncheckedAt(i);
+
+ Float_t x=c->GetY(); if (idx<=lastSPD1) x=-x;
+ x+=yshift;
+
+ Float_t z=c->GetZ();
+ z=-z; z+=zshift[idx%4];
+
+ p.SetX(x);
+ p.SetZ(z);
+ p.SetQ(c->GetQ());
+ p.SetSigmaX2(c->GetSigmaY2());
+ p.SetSigmaZ2(c->GetSigmaZ2());
+ p.SetLabel(0,c->GetLabel(0));
+ p.SetLabel(1,c->GetLabel(1));
+ p.SetLabel(2,c->GetLabel(2));
+
+ new (pn[i]) AliITSRecPoint(p);
+ }
+