]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Changes for report #62312: AliMultiplicity does not contain labels for single cluster...
authorhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 14 Jul 2010 15:20:38 +0000 (15:20 +0000)
committerhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 14 Jul 2010 15:20:38 +0000 (15:20 +0000)
ITS/AliITSMultReconstructor.cxx
ITS/AliITSMultReconstructor.h
ITS/AliITSVertexer.cxx
STEER/AliMultiplicity.cxx
STEER/AliMultiplicity.h

index b6a3c139c896747c94f4a5b9b2408d652b47ebf9..72451c6861bd3332adcf8509fa28466273704038 100644 (file)
@@ -58,6 +58,7 @@
 //     - RS: Clusters are sorted in Z in roder to have the same numbering as in the ITS reco
 //     - RS: Clusters used by ESDtrack are flagged, this information is passed to AliMulitiplicity object 
 //           when storing the tracklets and single cluster info
 //     - RS: Clusters are sorted in Z in roder to have the same numbering as in the ITS reco
 //     - RS: Clusters used by ESDtrack are flagged, this information is passed to AliMulitiplicity object 
 //           when storing the tracklets and single cluster info
+//     - MN: first MC label of single clusters stored  
 //_________________________________________________________________________
 
 #include <TClonesArray.h>
 //_________________________________________________________________________
 
 #include <TClonesArray.h>
@@ -349,17 +350,7 @@ AliITSMultReconstructor::~AliITSMultReconstructor(){
 
 //____________________________________________________________________
 void AliITSMultReconstructor::Reconstruct(AliESDEvent* esd, TTree* treeRP) 
 
 //____________________________________________________________________
 void AliITSMultReconstructor::Reconstruct(AliESDEvent* esd, TTree* treeRP) 
-{
-  //
-  // - calls LoadClusterArrays that finds the position of the clusters
-  //   (in global coord) 
-  // - convert the cluster coordinates to theta, phi (seen from the
-  //   interaction vertex). 
-  // - makes an array of tracklets 
-  //   
-  // After this method has been called, the clusters of the two layers
-  // and the tracklets can be retrieved by calling the Get'er methods.
-
+{  
   if (!treeRP) { AliError(" Invalid ITS cluster tree !\n"); return; }
   if (!esd) {AliError("ESDEvent is not available, use old reconstructor"); return;}
   // reset counters
   if (!treeRP) { AliError(" Invalid ITS cluster tree !\n"); return; }
   if (!esd) {AliError("ESDEvent is not available, use old reconstructor"); return;}
   // reset counters
@@ -405,15 +396,7 @@ void AliITSMultReconstructor::Reconstruct(AliESDEvent* esd, TTree* treeRP)
 void AliITSMultReconstructor::Reconstruct(TTree* clusterTree, Float_t* vtx, Float_t* /* vtxRes*/) {
   //
   // RS NOTE - this is old reconstructor invocation, to be used from VertexFinder
 void AliITSMultReconstructor::Reconstruct(TTree* clusterTree, Float_t* vtx, Float_t* /* vtxRes*/) {
   //
   // RS NOTE - this is old reconstructor invocation, to be used from VertexFinder
-  //
-  // - calls LoadClusterArray that finds the position of the clusters
-  //   (in global coord) 
-  // - convert the cluster coordinates to theta, phi (seen from the
-  //   interaction vertex). 
-  // - makes an array of tracklets 
-  //   
-  // After this method has been called, the clusters of the two layers
-  // and the tracklets can be retrieved by calling the Get'er methods.
+
   if (fMult) delete fMult; fMult = 0;
   fNClustersLay1 = 0;
   fNClustersLay2 = 0;
   if (fMult) delete fMult; fMult = 0;
   fNClustersLay1 = 0;
   fNClustersLay2 = 0;
@@ -432,6 +415,17 @@ void AliITSMultReconstructor::Reconstruct(TTree* clusterTree, Float_t* vtx, Floa
 //____________________________________________________________________
 void AliITSMultReconstructor::FindTracklets(const Float_t *vtx) 
 {
 //____________________________________________________________________
 void AliITSMultReconstructor::FindTracklets(const Float_t *vtx) 
 {
+
+  // - calls LoadClusterArrays that finds the position of the clusters
+  //   (in global coord) 
+  // - convert the cluster coordinates to theta, phi (seen from the
+  //   interaction vertex). 
+  // - makes an array of tracklets 
+  //   
+  // After this method has been called, the clusters of the two layers
+  // and the tracklets can be retrieved by calling the Get'er methods.
+
+
   // Find tracklets converging to vertex
   //
   LoadClusterArrays(fTreeRP);
   // Find tracklets converging to vertex
   //
   LoadClusterArrays(fTreeRP);
@@ -521,8 +515,8 @@ void AliITSMultReconstructor::FindTracklets(const Float_t *vtx)
     // Loop on layer 1 
     for (Int_t iC1=0; iC1<fNClustersLay1; iC1++) {    
 
     // Loop on layer 1 
     for (Int_t iC1=0; iC1<fNClustersLay1; iC1++) {    
 
-      // already used or in the overlap ?
-      if (associatedLay1[iC1] != 0 || fOverlapFlagClustersLay1[iC1]) continue;
+      // already used ?
+      if (associatedLay1[iC1] != 0) continue; 
 
       found++;
 
 
       found++;
 
@@ -534,8 +528,6 @@ void AliITSMultReconstructor::FindTracklets(const Float_t *vtx)
       // Loop on layer 2 
       for (Int_t iC2=0; iC2<fNClustersLay2; iC2++) {      
 
       // Loop on layer 2 
       for (Int_t iC2=0; iC2<fNClustersLay2; iC2++) {      
 
-        // in the overlap ?
-        if (fOverlapFlagClustersLay2[iC2]) continue;
        float* clPar2 = GetClusterLayer2(iC2);
 
         if (blacklist[iC1]) {
        float* clPar2 = GetClusterLayer2(iC2);
 
         if (blacklist[iC1]) {
@@ -550,7 +542,7 @@ void AliITSMultReconstructor::FindTracklets(const Float_t *vtx)
         }
 
        // find the difference in angles
         }
 
        // find the difference in angles
-       Double_t dTheta = TMath::Abs(clPar2[kClTh] - clPar1[kClTh]);
+       Double_t dTheta = TMath::Abs(clPar2[kClTh] - clPar1[kClTh]);  
        Double_t dPhi   = TMath::Abs(clPar2[kClPh] - clPar1[kClPh]);
         // take into account boundary condition
         if (dPhi>pi) dPhi=2.*pi-dPhi;
        Double_t dPhi   = TMath::Abs(clPar2[kClPh] - clPar1[kClPh]);
         // take into account boundary condition
         if (dPhi>pi) dPhi=2.*pi-dPhi;
@@ -697,6 +689,7 @@ void AliITSMultReconstructor::FindTracklets(const Float_t *vtx)
       fSClusters[fNSingleCluster] = new Float_t[kClNPar];
       fSClusters[fNSingleCluster][kSCTh] = clPar1[kClTh];
       fSClusters[fNSingleCluster][kSCPh] = clPar1[kClPh];
       fSClusters[fNSingleCluster] = new Float_t[kClNPar];
       fSClusters[fNSingleCluster][kSCTh] = clPar1[kClTh];
       fSClusters[fNSingleCluster][kSCPh] = clPar1[kClPh];
+      fSClusters[fNSingleCluster][kSCLab] = clPar1[kClMC0]; 
       fSClusters[fNSingleCluster][kSCID] = iC1;
       AliDebug(1,Form(" Adding a single cluster %d (cluster %d  of layer 1)",
                 fNSingleCluster, iC1));
       fSClusters[fNSingleCluster][kSCID] = iC1;
       AliDebug(1,Form(" Adding a single cluster %d (cluster %d  of layer 1)",
                 fNSingleCluster, iC1));
@@ -755,7 +748,7 @@ void AliITSMultReconstructor::LoadClusterArrays(TTree* itsClusterTree)
   // - store them in the internal arrays
   // - count the number of cluster-fired chips
   //
   // - store them in the internal arrays
   // - count the number of cluster-fired chips
   //
-  // RS: This method was strongly modified wrt original by Jan Fiete. In order to have the same numbering
+  // RS: This method was strongly modified wrt original. In order to have the same numbering 
   // of clusters as in the ITS reco I had to introduce sorting in Z
   // Also note that now the clusters data are stored not in float[6] attached to float**, but in 1-D array
   
   // of clusters as in the ITS reco I had to introduce sorting in Z
   // Also note that now the clusters data are stored not in float[6] attached to float**, but in 1-D array
   
@@ -847,7 +840,7 @@ void AliITSMultReconstructor::LoadClusterArrays(TTree* itsClusterTree)
 //____________________________________________________________________
 void
 AliITSMultReconstructor::LoadClusterFiredChips(TTree* itsClusterTree) {
 //____________________________________________________________________
 void
 AliITSMultReconstructor::LoadClusterFiredChips(TTree* itsClusterTree) {
-  // This method
+  // This method    
   // - gets the clusters from the cluster tree 
   // - counts the number of (cluster)fired chips
   
   // - gets the clusters from the cluster tree 
   // - counts the number of (cluster)fired chips
   
@@ -856,7 +849,7 @@ AliITSMultReconstructor::LoadClusterFiredChips(TTree* itsClusterTree) {
   fNFiredChips[0] = 0;
   fNFiredChips[1] = 0;
   
   fNFiredChips[0] = 0;
   fNFiredChips[1] = 0;
   
-  AliITSsegmentationSPD seg;
+  AliITSsegmentationSPD seg;   
   AliITSRecPointContainer* rpcont=AliITSRecPointContainer::Instance();
   TClonesArray* itsClusters=rpcont->FetchClusters(0,itsClusterTree);
   if(!rpcont->IsSPDActive()){
   AliITSRecPointContainer* rpcont=AliITSRecPointContainer::Instance();
   TClonesArray* itsClusters=rpcont->FetchClusters(0,itsClusterTree);
   if(!rpcont->IsSPDActive()){
index 2f8e17acb8089df51a09e3ce5c06604cce81642d..c8e5b092a3b2961a8fd471ca715878ec00be5ece 100644 (file)
@@ -36,7 +36,7 @@ public:
   //
   enum {kClTh,kClPh,kClZ,kClMC0,kClMC1,kClMC2,kClNPar};
   enum {kTrTheta,kTrPhi,kTrDPhi,kTrDTheta,kTrLab1,kTrLab2,kClID1,kClID2,kTrNPar};
   //
   enum {kClTh,kClPh,kClZ,kClMC0,kClMC1,kClMC2,kClNPar};
   enum {kTrTheta,kTrPhi,kTrDPhi,kTrDTheta,kTrLab1,kTrLab2,kClID1,kClID2,kTrNPar};
-  enum {kSCTh,kSCPh,kSCID,kSCNPar};
+  enum {kSCTh,kSCPh,kSCLab,kSCID,kSCNPar};   
   enum {kITSTPC,kITSSAP,kITSTPCBit=BIT(kITSTPC),kITSSAPBit=BIT(kITSSAP)}; // RS
   AliITSMultReconstructor();
   virtual ~AliITSMultReconstructor();
   enum {kITSTPC,kITSSAP,kITSTPCBit=BIT(kITSTPC),kITSSAPBit=BIT(kITSSAP)}; // RS
   AliITSMultReconstructor();
   virtual ~AliITSMultReconstructor();
index 0944a9b84346c0e485514001c68100cd57e11a0d..85f47cd3e120575f43a3689bd5d79486b98251c8 100644 (file)
@@ -97,7 +97,7 @@ void AliITSVertexer::FindMultiplicity(TTree *itsClusterTree){
     multReco.LoadClusterFiredChips(itsClusterTree);
     Short_t nfcL1 = multReco.GetNFiredChips(0);
     Short_t nfcL2 = multReco.GetNFiredChips(1);
     multReco.LoadClusterFiredChips(itsClusterTree);
     Short_t nfcL1 = multReco.GetNFiredChips(0);
     Short_t nfcL2 = multReco.GetNFiredChips(1);
-    fMult = new AliMultiplicity(0,0,0,0,0,0,0,0,0,0,nfcL1,nfcL2,fastOrFiredMap);
+    fMult = new AliMultiplicity(0,0,0,0,0,0,0,0,0,0,0,nfcL1,nfcL2,fastOrFiredMap);
     fMult->SetFiredChipMap(firedChipMap);
     AliITSRecPointContainer* rcont = AliITSRecPointContainer::Instance();
     fMult->SetITSClusters(0,rcont->GetNClustersInLayer(1,itsClusterTree));
     fMult->SetFiredChipMap(firedChipMap);
     AliITSRecPointContainer* rcont = AliITSRecPointContainer::Instance();
     fMult->SetITSClusters(0,rcont->GetNClustersInLayer(1,itsClusterTree));
@@ -135,13 +135,15 @@ void AliITSVertexer::FindMultiplicity(TTree *itsClusterTree){
   Int_t nosingleclus=multReco.GetNSingleClusters();
   Float_t *ths = new Float_t [nosingleclus];
   Float_t *phs = new Float_t [nosingleclus];
   Int_t nosingleclus=multReco.GetNSingleClusters();
   Float_t *ths = new Float_t [nosingleclus];
   Float_t *phs = new Float_t [nosingleclus];
+  Int_t *labelss = new Int_t [nosingleclus];
   for(Int_t i=0;i<nosingleclus;i++){
     ths[i] = multReco.GetCluster(i)[0];
     phs[i] = multReco.GetCluster(i)[1];
   for(Int_t i=0;i<nosingleclus;i++){
     ths[i] = multReco.GetCluster(i)[0];
     phs[i] = multReco.GetCluster(i)[1];
+    labelss[i] = multReco.GetCluster(i)[2];
   }
   Short_t nfcL1 = multReco.GetNFiredChips(0);
   Short_t nfcL2 = multReco.GetNFiredChips(1);
   }
   Short_t nfcL1 = multReco.GetNFiredChips(0);
   Short_t nfcL2 = multReco.GetNFiredChips(1);
-  fMult = new AliMultiplicity(notracks,tht,phi,dtht,dphi,labels,labelsL2,nosingleclus,ths,phs,nfcL1,nfcL2,fastOrFiredMap);
+  fMult = new AliMultiplicity(notracks,tht,phi,dtht,dphi,labels,labelsL2,nosingleclus,ths,phs,labelss,nfcL1,nfcL2,fastOrFiredMap);
   fMult->SetFiredChipMap(firedChipMap);
   AliITSRecPointContainer* rcont = AliITSRecPointContainer::Instance();
   fMult->SetITSClusters(0,rcont->GetNClustersInLayer(1,itsClusterTree));
   fMult->SetFiredChipMap(firedChipMap);
   AliITSRecPointContainer* rcont = AliITSRecPointContainer::Instance();
   fMult->SetITSClusters(0,rcont->GetNClustersInLayer(1,itsClusterTree));
@@ -156,6 +158,7 @@ void AliITSVertexer::FindMultiplicity(TTree *itsClusterTree){
   delete [] phs;
   delete [] labels;
   delete [] labelsL2;
   delete [] phs;
   delete [] labels;
   delete [] labelsL2;
+  delete [] labelss;
 
   return;
 }
 
   return;
 }
index 001f08ae6c9dd36866cbcc08f8bfb78f4c76cb74..7bfd0b8572eccd78783d03e2013ba69f6c654749 100644 (file)
@@ -17,6 +17,7 @@ AliMultiplicity::AliMultiplicity():
   fDeltPhi(0),
   fThsingle(0),
   fPhisingle(0),
   fDeltPhi(0),
   fThsingle(0),
   fPhisingle(0),
+  fLabelssingle(0),
   fFastOrFiredChips(1200),
   fClusterFiredChips(1200)
 {
   fFastOrFiredChips(1200),
   fClusterFiredChips(1200)
 {
@@ -27,7 +28,7 @@ AliMultiplicity::AliMultiplicity():
 }
 
 //______________________________________________________________________
 }
 
 //______________________________________________________________________
-AliMultiplicity::AliMultiplicity(Int_t ntr, Float_t *th,  Float_t *ph, Float_t *dth, Float_t *dph, Int_t *labels, Int_t* labelsL2, Int_t ns, Float_t *ts, Float_t *ps, Short_t nfcL1, Short_t nfcL2, const TBits & fFastOr):
+AliMultiplicity::AliMultiplicity(Int_t ntr, Float_t *th,  Float_t *ph, Float_t *dth, Float_t *dph, Int_t *labels, Int_t* labelsL2, Int_t ns, Float_t *ts, Float_t *ps, Int_t *labelss, Short_t nfcL1, Short_t nfcL2, const TBits & fFastOr):
   TObject(),
   fNtracks(ntr),
   fNsingle(ns),
   TObject(),
   fNtracks(ntr),
   fNsingle(ns),
@@ -39,6 +40,7 @@ AliMultiplicity::AliMultiplicity(Int_t ntr, Float_t *th,  Float_t *ph, Float_t *
   fDeltPhi(0),
   fThsingle(0),
   fPhisingle(0),
   fDeltPhi(0),
   fThsingle(0),
   fPhisingle(0),
+  fLabelssingle(0),
   fFastOrFiredChips(1200),
   fClusterFiredChips(1200)
 {
   fFastOrFiredChips(1200),
   fClusterFiredChips(1200)
 {
@@ -62,9 +64,11 @@ AliMultiplicity::AliMultiplicity(Int_t ntr, Float_t *th,  Float_t *ph, Float_t *
   if(ns>0){
     fThsingle = new Double_t [ns];
     fPhisingle = new Double_t [ns];
   if(ns>0){
     fThsingle = new Double_t [ns];
     fPhisingle = new Double_t [ns];
+    fLabelssingle = new Int_t [ns];
     for(Int_t i=0;i<fNsingle;i++){
       fThsingle[i]=ts[i];
       fPhisingle[i]=ps[i];
     for(Int_t i=0;i<fNsingle;i++){
       fThsingle[i]=ts[i];
       fPhisingle[i]=ps[i];
+      fLabelssingle[i]=labelss[i];
     }
   }
   fFiredChips[0] = nfcL1;
     }
   }
   fFiredChips[0] = nfcL1;
@@ -86,6 +90,7 @@ AliMultiplicity::AliMultiplicity(Int_t ntr, Int_t ns, Short_t nfcL1, Short_t nfc
   fDeltPhi(0),
   fThsingle(0),
   fPhisingle(0),
   fDeltPhi(0),
   fThsingle(0),
   fPhisingle(0),
+  fLabelssingle(0),
   fFastOrFiredChips(1200),
   fClusterFiredChips(1200)
 {
   fFastOrFiredChips(1200),
   fClusterFiredChips(1200)
 {
@@ -105,7 +110,8 @@ AliMultiplicity::AliMultiplicity(Int_t ntr, Int_t ns, Short_t nfcL1, Short_t nfc
   if(ns>0){
     fThsingle  = new Double_t [ns];
     fPhisingle = new Double_t [ns];
   if(ns>0){
     fThsingle  = new Double_t [ns];
     fPhisingle = new Double_t [ns];
-    for(Int_t i=fNsingle;i--;) fThsingle[i] = fPhisingle[i] = 0;
+    fLabelssingle = new Int_t [ns];
+    for(Int_t i=fNsingle;i--;) fThsingle[i] = fPhisingle[i] = fLabelssingle[i] = 0;
   }
   fFiredChips[0] = nfcL1;
   fFiredChips[1] = nfcL2;
   }
   fFiredChips[0] = nfcL1;
   fFiredChips[1] = nfcL2;
@@ -126,6 +132,7 @@ AliMultiplicity::AliMultiplicity(const AliMultiplicity& m):
   fDeltPhi(0),
   fThsingle(0),
   fPhisingle(0),
   fDeltPhi(0),
   fThsingle(0),
   fPhisingle(0),
+  fLabelssingle(0),
   fFastOrFiredChips(1200),
   fClusterFiredChips(1200)
 {
   fFastOrFiredChips(1200),
   fClusterFiredChips(1200)
 {
@@ -147,6 +154,7 @@ AliMultiplicity &AliMultiplicity::operator=(const AliMultiplicity& m){
   if(fLabelsL2)delete [] fLabelsL2;fLabelsL2 = 0;
   if(fThsingle)delete [] fThsingle;fThsingle = 0;
   if(fPhisingle)delete [] fPhisingle;fPhisingle = 0;
   if(fLabelsL2)delete [] fLabelsL2;fLabelsL2 = 0;
   if(fThsingle)delete [] fThsingle;fThsingle = 0;
   if(fPhisingle)delete [] fPhisingle;fPhisingle = 0;
+  if(fLabelssingle)delete [] fLabelssingle;fLabelssingle = 0;
   Duplicate(m);
 
   return *this;
   Duplicate(m);
 
   return *this;
@@ -190,10 +198,12 @@ void AliMultiplicity::Duplicate(const AliMultiplicity& m){
   if(fNsingle>0){
     fThsingle = new Double_t[fNsingle];
     fPhisingle = new Double_t[fNsingle];
   if(fNsingle>0){
     fThsingle = new Double_t[fNsingle];
     fPhisingle = new Double_t[fNsingle];
+    fLabelssingle = new Int_t[fNsingle];
   }
   else {
     fThsingle = 0;
     fPhisingle = 0;
   }
   else {
     fThsingle = 0;
     fPhisingle = 0;
+    fLabelssingle = 0;
   }
   if(m.fTh)memcpy(fTh,m.fTh,fNtracks*sizeof(Double_t));
   if(m.fPhi)memcpy(fPhi,m.fPhi,fNtracks*sizeof(Double_t));
   }
   if(m.fTh)memcpy(fTh,m.fTh,fNtracks*sizeof(Double_t));
   if(m.fPhi)memcpy(fPhi,m.fPhi,fNtracks*sizeof(Double_t));
@@ -203,7 +213,7 @@ void AliMultiplicity::Duplicate(const AliMultiplicity& m){
   if(m.fLabelsL2)memcpy(fLabelsL2,m.fLabelsL2,fNtracks*sizeof(Int_t));
   if(m.fThsingle)memcpy(fThsingle,m.fThsingle,fNsingle*sizeof(Double_t));
   if(m.fPhisingle)memcpy(fPhisingle,m.fPhisingle,fNsingle*sizeof(Double_t));
   if(m.fLabelsL2)memcpy(fLabelsL2,m.fLabelsL2,fNtracks*sizeof(Int_t));
   if(m.fThsingle)memcpy(fThsingle,m.fThsingle,fNsingle*sizeof(Double_t));
   if(m.fPhisingle)memcpy(fPhisingle,m.fPhisingle,fNsingle*sizeof(Double_t));
-
+  if(m.fLabelssingle)memcpy(fLabelssingle,m.fLabelssingle,fNsingle*sizeof(Int_t));
   fFiredChips[0] = m.fFiredChips[0];
   fFiredChips[1] = m.fFiredChips[1];
   for(Int_t ilayer = 0; ilayer < 6; ilayer++){
   fFiredChips[0] = m.fFiredChips[0];
   fFiredChips[1] = m.fFiredChips[1];
   for(Int_t ilayer = 0; ilayer < 6; ilayer++){
@@ -230,7 +240,7 @@ AliMultiplicity::~AliMultiplicity(){
   if(fLabelsL2)delete [] fLabelsL2;fLabelsL2 = 0;
   if(fThsingle)delete [] fThsingle;fThsingle = 0;
   if(fPhisingle)delete [] fPhisingle;fPhisingle = 0;
   if(fLabelsL2)delete [] fLabelsL2;fLabelsL2 = 0;
   if(fThsingle)delete [] fThsingle;fThsingle = 0;
   if(fPhisingle)delete [] fPhisingle;fPhisingle = 0;
-
+  if(fLabelssingle)delete [] fLabelssingle;fLabelssingle = 0;
 }
 
 //______________________________________________________________________
 }
 
 //______________________________________________________________________
@@ -246,6 +256,7 @@ void AliMultiplicity::Clear(Option_t*)
   if(fLabelsL2)delete [] fLabelsL2;fLabelsL2 = 0;
   if(fThsingle)delete [] fThsingle;fThsingle = 0;
   if(fPhisingle)delete [] fPhisingle;fPhisingle = 0;
   if(fLabelsL2)delete [] fLabelsL2;fLabelsL2 = 0;
   if(fThsingle)delete [] fThsingle;fThsingle = 0;
   if(fPhisingle)delete [] fPhisingle;fPhisingle = 0;
+  if(fLabelssingle)delete [] fLabelssingle;fLabelssingle = 0;
   fNtracks = fNsingle = 0;
   for (int i=6;i--;) fITSClusters[0] = 0;
   fFiredChips[0] = fFiredChips[1] = 0;
   fNtracks = fNsingle = 0;
   for (int i=6;i--;) fITSClusters[0] = 0;
   fFiredChips[0] = fFiredChips[1] = 0;
@@ -275,6 +286,18 @@ void AliMultiplicity::SetLabel(Int_t i, Int_t layer, Int_t label)
     Error("SetLabel","Invalid track number %d or layer %d",i,layer);
 }
 
     Error("SetLabel","Invalid track number %d or layer %d",i,layer);
 }
 
+//______________________________________________________________________
+void AliMultiplicity::SetLabelSingle(Int_t i, Int_t label) 
+{
+    if(i>=0 && i<fNsingle) {
+      if (fLabelssingle) {
+        fLabelssingle[i] = label;
+        return;
+      }
+    }
+    Error("SetLabelSingle","Invalid single cluster number %d",i);
+}
+
 //______________________________________________________________________
 UInt_t AliMultiplicity::GetNumberOfITSClusters(Int_t layMin, Int_t layMax) const {
 
 //______________________________________________________________________
 UInt_t AliMultiplicity::GetNumberOfITSClusters(Int_t layMin, Int_t layMax) const {
 
@@ -320,6 +343,7 @@ void AliMultiplicity::SetSingleClusterData(Int_t id, const Float_t* scl, UInt_t
   if (id>=fNsingle) {AliError(Form("Number of declared singles %d < %d",fNsingle,id)); return;}
   fThsingle[id]  = scl[0];
   fPhisingle[id] = scl[1];
   if (id>=fNsingle) {AliError(Form("Number of declared singles %d < %d",fNsingle,id)); return;}
   fThsingle[id]  = scl[0];
   fPhisingle[id] = scl[1];
+  fLabelssingle[id] = scl[2]; 
   if (bits&BIT(0)) fUsedClusS[0].SetBitNumber(id);
   if (bits&BIT(1)) fUsedClusS[1].SetBitNumber(id);
   //
   if (bits&BIT(0)) fUsedClusS[0].SetBitNumber(id);
   if (bits&BIT(1)) fUsedClusS[1].SetBitNumber(id);
   //
@@ -351,8 +375,8 @@ void AliMultiplicity::Print(Option_t *opt) const
   }
   if (opts.Contains("s")) {
     for (int i=0;i<fNsingle;i++) 
   }
   if (opts.Contains("s")) {
     for (int i=0;i<fNsingle;i++) 
-      printf("S#%3d| Th:%+6.3f Phi:%+6.3f U0:%d U1:%d\n",
-            i,fThsingle[i],fPhisingle[i],
+      printf("S#%3d| Th:%+6.3f Phi:%+6.3f L:%4d U0:%d U1:%d\n",
+            i,fThsingle[i],fPhisingle[i],fLabelssingle[i], 
             FreeClustersTracklet(i,0),FreeClustersTracklet(i,1));
   }
   //
             FreeClustersTracklet(i,0),FreeClustersTracklet(i,1));
   }
   //
index f7b8c299f34f985c37e2a106a53571a71ec65248..7bb595f5fdecf6bd14d8c0a54fdda5a0cd641d01 100644 (file)
@@ -17,7 +17,7 @@ class AliMultiplicity : public TObject {
   AliMultiplicity();               // default constructor
   // standard constructor
   AliMultiplicity(Int_t ntr,Float_t *th, Float_t *ph, Float_t *dth, Float_t *dph, Int_t *labels,
   AliMultiplicity();               // default constructor
   // standard constructor
   AliMultiplicity(Int_t ntr,Float_t *th, Float_t *ph, Float_t *dth, Float_t *dph, Int_t *labels,
-         Int_t* labelsL2, Int_t ns, Float_t *ts, Float_t *ps, Short_t nfcL1, Short_t nfcL2, const TBits & fFastOrFiredChips);
+         Int_t* labelsL2, Int_t ns, Float_t *ts, Float_t *ps, Int_t *labelss, Short_t nfcL1, Short_t nfcL2, const TBits & fFastOrFiredChips);
   AliMultiplicity(Int_t ntr, Int_t ns, Short_t nfcL1, Short_t nfcL2, const TBits & fFastOr);
   AliMultiplicity(const AliMultiplicity& m);
   AliMultiplicity& operator=(const AliMultiplicity& m);
   AliMultiplicity(Int_t ntr, Int_t ns, Short_t nfcL1, Short_t nfcL2, const TBits & fFastOr);
   AliMultiplicity(const AliMultiplicity& m);
   AliMultiplicity& operator=(const AliMultiplicity& m);
@@ -49,6 +49,9 @@ class AliMultiplicity : public TObject {
 
   Int_t GetLabel(Int_t i, Int_t layer) const;
   void  SetLabel(Int_t i, Int_t layer, Int_t label);
 
   Int_t GetLabel(Int_t i, Int_t layer) const;
   void  SetLabel(Int_t i, Int_t layer, Int_t label);
+  Int_t GetLabelSingle(Int_t i) const;
+  void  SetLabelSingle(Int_t i, Int_t label);
+
 
   Bool_t FreeClustersTracklet(Int_t i, Int_t mode) const {return (mode>=0&&mode<2&&i>=0&&i<fNtracks) ? !fUsedClusT[mode].TestBitNumber(i):kFALSE;}
   Bool_t FreeSingleCluster(Int_t i, Int_t mode)    const {return (mode>=0&&mode<2&&i>=0&&i<fNsingle) ? !fUsedClusS[mode].TestBitNumber(i):kFALSE;}
 
   Bool_t FreeClustersTracklet(Int_t i, Int_t mode) const {return (mode>=0&&mode<2&&i>=0&&i<fNtracks) ? !fUsedClusT[mode].TestBitNumber(i):kFALSE;}
   Bool_t FreeSingleCluster(Int_t i, Int_t mode)    const {return (mode>=0&&mode<2&&i>=0&&i<fNsingle) ? !fUsedClusS[mode].TestBitNumber(i):kFALSE;}
@@ -91,8 +94,9 @@ class AliMultiplicity : public TObject {
   Double_t* GetDeltPhi()     const {return (Double_t*)fDeltPhi;}
   Double_t* GetThetaSingle() const {return (Double_t*)fThsingle;}
   Double_t* GetPhiSingle()   const {return (Double_t*)fPhisingle;}
   Double_t* GetDeltPhi()     const {return (Double_t*)fDeltPhi;}
   Double_t* GetThetaSingle() const {return (Double_t*)fThsingle;}
   Double_t* GetPhiSingle()   const {return (Double_t*)fPhisingle;}
-  Int_t*    GetLabels()      const {return (Int_t*)fLabels;}
+  Int_t*    GetLabels()      const {return (Int_t*)fLabels;}  
   Int_t*    GetLabels2()     const {return (Int_t*)fLabelsL2;}
   Int_t*    GetLabels2()     const {return (Int_t*)fLabelsL2;}
+  Int_t*    GetLabelsSingle()      const {return (Int_t*)fLabelssingle;} 
   
   void SetTrackletData(Int_t id, const Float_t* tlet, UInt_t bits);
   void SetSingleClusterData(Int_t id, const Float_t* scl,UInt_t bits);
   
   void SetTrackletData(Int_t id, const Float_t* tlet, UInt_t bits);
   void SetSingleClusterData(Int_t id, const Float_t* scl,UInt_t bits);
@@ -114,14 +118,15 @@ class AliMultiplicity : public TObject {
   Double32_t *fDeltPhi;      //[fNtracks] array with delta phi values
   Double32_t *fThsingle;     //[fNsingle] array with theta values of L1 clusters
   Double32_t *fPhisingle;    //[fNsingle] array with phi values of L1 clusters
   Double32_t *fDeltPhi;      //[fNtracks] array with delta phi values
   Double32_t *fThsingle;     //[fNsingle] array with theta values of L1 clusters
   Double32_t *fPhisingle;    //[fNsingle] array with phi values of L1 clusters
+  Int_t *fLabelssingle;      //[fNsingle] array with labels of clusters in L1 not used for tracklets 
   Short_t fFiredChips[2];    // Number of fired chips in the two SPD layers
   Short_t fFiredChips[2];    // Number of fired chips in the two SPD layers
-  UInt_t fITSClusters[6];   // Number of ITS cluster per layer
+  UInt_t fITSClusters[6];    // Number of ITS cluster per layer
   TBits fFastOrFiredChips;   // Map of FastOr fired chips
   TBits fClusterFiredChips;  // Map of fired chips (= at least one cluster)
   TBits fUsedClusT[2];       // flag that at least one of tracklets clusters is used by TPC/ITS+ITS_SA (0) or ITS_SA_PURE tracks (1)
   TBits fUsedClusS[2];       // flag that the single clusters is used by TPC/ITS+ITS_SA (0) or ITS_SA_PURE tracks
 
   TBits fFastOrFiredChips;   // Map of FastOr fired chips
   TBits fClusterFiredChips;  // Map of fired chips (= at least one cluster)
   TBits fUsedClusT[2];       // flag that at least one of tracklets clusters is used by TPC/ITS+ITS_SA (0) or ITS_SA_PURE tracks (1)
   TBits fUsedClusS[2];       // flag that the single clusters is used by TPC/ITS+ITS_SA (0) or ITS_SA_PURE tracks
 
-  ClassDef(AliMultiplicity,13);
+  ClassDef(AliMultiplicity,14);
 };
 
 inline Int_t AliMultiplicity::GetLabel(Int_t i, Int_t layer) const
 };
 
 inline Int_t AliMultiplicity::GetLabel(Int_t i, Int_t layer) const
@@ -144,4 +149,18 @@ inline Int_t AliMultiplicity::GetLabel(Int_t i, Int_t layer) const
     }
     return -9999;
 }
     }
     return -9999;
 }
+
+inline Int_t AliMultiplicity::GetLabelSingle(Int_t i) const 
+{
+    if(i>=0 && i<fNsingle) {
+      return fLabelssingle[i];
+    } else {
+        Error("GetLabelSingle","Invalid cluster number %d",i); return -9999;
+    }
+    return -9999;
+}
+
+
+
+
 #endif
 #endif