+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * *
+ * Author: The ALICE Off-line Project. *
+ * Contributors are mentioned in the code where appropriate. *
+ * *
+ * Permission to use, copy, modify and distribute this software and its *
+ * documentation strictly for non-commercial purposes is hereby granted *
+ * without fee, provided that the above copyright notice appears in all *
+ * copies and that both the copyright notice and this permission notice *
+ * appear in the supporting documentation. The authors make no claims *
+ * about the suitability of this software for any purpose. It is *
+ * provided "as is" without express or implied warranty. *
+ **************************************************************************/
+
+/* $Id$ */
+
//____________________________________________________________________
//
// AliITSMultReconstructor - find clusters in the pixels (theta and
// The parameter AssociationChoice allows to control if two clusters
// in layer 2 can be associated to the same cluster in layer 1 or not.
//
+// Two methods return the number of traklets and the number of clusters
+// in the first SPD layer (GetNTracklets GetNSingleClusters)
+//
// -----------------------------------------------------------------
//
// NOTE: The cuts on phi and zeta depends on the interacting system (p-p
// or Pb-Pb). Please, check the file AliITSMultReconstructor.h and be
// sure that SetPhiWindow and SetZetaWindow are defined accordingly.
//
+// Author : Tiziano Virgili
//
//
//
//____________________________________________________________________
-#include "AliITSMultReconstructor.h"
-
-#include "TTree.h"
-#include "TH1F.h"
-#include "TH2F.h"
+#include <TClonesArray.h>
+#include <TH1F.h>
+#include <TH2F.h>
+#include <TTree.h>
+#include "AliITSMultReconstructor.h"
#include "AliITSRecPoint.h"
#include "AliITSgeom.h"
#include "AliLog.h"
//____________________________________________________________________
-AliITSMultReconstructor::AliITSMultReconstructor() {
+AliITSMultReconstructor::AliITSMultReconstructor():
+fGeometry(0),
+fClustersLay1(0),
+fClustersLay2(0),
+fTracklets(0),
+fSClusters(0),
+fAssociationFlag(0),
+fNClustersLay1(0),
+fNClustersLay2(0),
+fNTracklets(0),
+fNSingleCluster(0),
+fPhiWindow(0),
+fZetaWindow(0),
+fOnlyOneTrackletPerC2(0),
+fHistOn(0),
+fhClustersDPhiAcc(0),
+fhClustersDThetaAcc(0),
+fhClustersDZetaAcc(0),
+fhClustersDPhiAll(0),
+fhClustersDThetaAll(0),
+fhClustersDZetaAll(0),
+fhDPhiVsDThetaAll(0),
+fhDPhiVsDThetaAcc(0),
+fhDPhiVsDZetaAll(0),
+fhDPhiVsDZetaAcc(0),
+fhetaTracklets(0),
+fhphiTracklets(0),
+fhetaClustersLay1(0),
+fhphiClustersLay1(0){
// Method to reconstruct the charged particles multiplicity with the
// SPD (tracklets).
fClustersLay1 = new Float_t*[300000];
fClustersLay2 = new Float_t*[300000];
fTracklets = new Float_t*[300000];
+ fSClusters = new Float_t*[300000];
fAssociationFlag = new Bool_t[300000];
for(Int_t i=0; i<300000; i++) {
fClustersLay1[i] = new Float_t[3];
fClustersLay2[i] = new Float_t[3];
fTracklets[i] = new Float_t[3];
+ fSClusters[i] = new Float_t[2];
fAssociationFlag[i] = kFALSE;
}
}
//______________________________________________________________________
-AliITSMultReconstructor::AliITSMultReconstructor(const AliITSMultReconstructor &mr) : TObject(mr) {
+AliITSMultReconstructor::AliITSMultReconstructor(const AliITSMultReconstructor &mr) : TObject(mr),
+fGeometry(mr.fGeometry),
+fClustersLay1(mr.fClustersLay1),
+fClustersLay2(mr.fClustersLay2),
+fTracklets(mr.fTracklets),
+fSClusters(mr.fSClusters),
+fAssociationFlag(mr.fAssociationFlag),
+fNClustersLay1(mr.fNClustersLay1),
+fNClustersLay2(mr.fNClustersLay2),
+fNTracklets(mr.fNTracklets),
+fNSingleCluster(mr.fNSingleCluster),
+fPhiWindow(mr.fPhiWindow),
+fZetaWindow(mr.fZetaWindow),
+fOnlyOneTrackletPerC2(mr.fOnlyOneTrackletPerC2),
+fHistOn(mr.fHistOn),
+fhClustersDPhiAcc(mr.fhClustersDPhiAcc),
+fhClustersDThetaAcc(mr.fhClustersDThetaAcc),
+fhClustersDZetaAcc(mr.fhClustersDZetaAcc),
+fhClustersDPhiAll(mr.fhClustersDPhiAll),
+fhClustersDThetaAll(mr.fhClustersDThetaAll),
+fhClustersDZetaAll(mr.fhClustersDZetaAll),
+fhDPhiVsDThetaAll(mr.fhDPhiVsDThetaAll),
+fhDPhiVsDThetaAcc(mr.fhDPhiVsDThetaAcc),
+fhDPhiVsDZetaAll(mr.fhDPhiVsDZetaAll),
+fhDPhiVsDZetaAcc(mr.fhDPhiVsDZetaAcc),
+fhetaTracklets(mr.fhetaTracklets),
+fhphiTracklets(mr.fhphiTracklets),
+fhetaClustersLay1(mr.fhetaClustersLay1),
+fhphiClustersLay1(mr.fhphiClustersLay1) {
// Copy constructor
- // Copies are not allowed. The method is protected to avoid misuse.
- Error("AliITSMultReconstructor","Copy constructor not allowed\n");
+
}
//______________________________________________________________________
-AliITSMultReconstructor& AliITSMultReconstructor::operator=(const AliITSMultReconstructor& /* mr */){
+AliITSMultReconstructor& AliITSMultReconstructor::operator=(const AliITSMultReconstructor& mr){
// Assignment operator
- // Assignment is not allowed. The method is protected to avoid misuse.
- Error("= operator","Assignment operator not allowed\n");
+ this->~AliITSMultReconstructor();
+ new(this) AliITSMultReconstructor(mr);
return *this;
}
//______________________________________________________________________
AliITSMultReconstructor::~AliITSMultReconstructor(){
// Destructor
- if(fhClustersDPhiAcc)delete fhClustersDPhiAcc;
- if(fhClustersDThetaAcc)delete fhClustersDThetaAcc;
- if(fhClustersDZetaAcc)delete fhClustersDZetaAcc;
- if(fhClustersDPhiAll)delete fhClustersDPhiAll;
- if(fhClustersDThetaAll)delete fhClustersDThetaAll;
- if(fhClustersDZetaAll)delete fhClustersDZetaAll;
- if(fhDPhiVsDThetaAll)delete fhDPhiVsDThetaAll;
- if(fhDPhiVsDThetaAcc)delete fhDPhiVsDThetaAcc;
- if(fhDPhiVsDZetaAll)delete fhDPhiVsDZetaAll;
- if(fhDPhiVsDZetaAcc)delete fhDPhiVsDZetaAcc;
- if(fhetaTracklets)delete fhetaTracklets;
- if(fhphiTracklets)delete fhphiTracklets;
- if(fhetaClustersLay1)delete fhetaClustersLay1;
- if(fhphiClustersLay1)delete fhphiClustersLay1;
- if(fClustersLay1){
- for(Int_t i=0; i<300000; i++) {
- delete [] fClustersLay1[i];
- delete [] fClustersLay2[i];
- delete [] fTracklets[i];
- }
- delete fClustersLay1;
- delete fClustersLay2;
- delete fTracklets;
+
+ // delete histograms
+ delete fhClustersDPhiAcc;
+ delete fhClustersDThetaAcc;
+ delete fhClustersDZetaAcc;
+ delete fhClustersDPhiAll;
+ delete fhClustersDThetaAll;
+ delete fhClustersDZetaAll;
+ delete fhDPhiVsDThetaAll;
+ delete fhDPhiVsDThetaAcc;
+ delete fhDPhiVsDZetaAll;
+ delete fhDPhiVsDZetaAcc;
+ delete fhetaTracklets;
+ delete fhphiTracklets;
+ delete fhetaClustersLay1;
+ delete fhphiClustersLay1;
+
+ // delete arrays
+ for(Int_t i=0; i<300000; i++) {
+ delete [] fClustersLay1[i];
+ delete [] fClustersLay2[i];
+ delete [] fTracklets[i];
+ delete [] fSClusters[i];
}
- if(fAssociationFlag)delete fAssociationFlag;
+ delete [] fClustersLay1;
+ delete [] fClustersLay2;
+ delete [] fTracklets;
+ delete [] fSClusters;
+
+ delete [] fAssociationFlag;
}
//____________________________________________________________________
fNClustersLay1 = 0;
fNClustersLay2 = 0;
fNTracklets = 0;
-
+ fNSingleCluster = 0;
// loading the clusters
LoadClusterArrays(clusterTree);
// store the cluster
- fTracklets[fNTracklets][0] = fClustersLay1[iC1][0];
- fTracklets[fNTracklets][1] = fClustersLay1[iC1][1];
- // Store a flag. This will indicate that the "tracklet"
- // was indeed a single cluster!
- fTracklets[fNTracklets][2] = -999999.;
+ fSClusters[fNSingleCluster][0] = fClustersLay1[iC1][0];
+ fSClusters[fNSingleCluster][1] = fClustersLay1[iC1][1];
AliDebug(1,Form(" Adding a single cluster %d (cluster %d of layer 1)",
- fNTracklets, iC1));
- fNTracklets++;
+ fNSingleCluster, iC1));
+ fNSingleCluster++;
}
} // end of loop over clusters in layer 1