but sorted in tracking one.
--- /dev/null
+#include "AliITSUClusterPix.h"
+#include "AliITSUGeomTGeo.h"
+#include "AliLog.h"
+#include <TGeoMatrix.h>
+#include <TMath.h>
+using namespace TMath;
+
+ClassImp(AliITSUClusterPix)
+
+AliITSUGeomTGeo* AliITSUClusterPix::fgGeom = 0;
+UInt_t AliITSUClusterPix::fgMode = 0;
+
+//_____________________________________________________
+AliITSUClusterPix::AliITSUClusterPix()
+ : fNxNz(0)
+{
+ // default constructor
+}
+
+//_____________________________________________________
+AliITSUClusterPix::~AliITSUClusterPix()
+{
+ // default destructor
+}
+
+//_____________________________________________________
+AliITSUClusterPix::AliITSUClusterPix(const AliITSUClusterPix& cluster)
+ :AliCluster(cluster)
+ ,fNxNz(cluster.fNxNz)
+{
+ // copy constructor
+}
+
+//______________________________________________________________________________
+AliITSUClusterPix& AliITSUClusterPix::operator=(const AliITSUClusterPix& cluster)
+{
+ // = op
+ if(&cluster == this) return *this;
+ fNxNz = cluster.fNxNz;
+ TObject::operator=(cluster);
+ AliCluster::operator=(cluster);
+ return *this;
+}
+
+//______________________________________________________________________________
+const TGeoHMatrix* AliITSUClusterPix::GetTracking2LocalMatrix() const
+{
+ // get tracking to local matrix (sensor!!!)
+ return (TGeoHMatrix*)fgGeom->GetMatrixT2L(GetVolumeId());
+}
+
+//______________________________________________________________________________
+TGeoHMatrix* AliITSUClusterPix::GetMatrix(Bool_t ) const
+{
+ // get module matrix (sensor!)
+ return (TGeoHMatrix*)fgGeom->GetMatrixSens(GetVolumeId());
+}
+
+//______________________________________________________________________________
+void AliITSUClusterPix::Print(Option_t* /*option*/) const
+{
+ // Print cluster information.
+ printf("Cluster of module %5d, <nx>=%3d <nz>=%3d |Err^2:%.3e %.3e %+.3e |",GetVolumeId(),GetNx(),GetNz(),
+ GetSigmaY2(),GetSigmaZ2(),GetSigmaYZ());
+ printf("XYZ: %+.4e %+.4e %+.4e in frame ",GetX(),GetY(),GetZ());
+ if (IsFrameLoc()) printf("LOC");
+ else if (IsFrameGlo()) printf("GLO");
+ else if (IsFrameTrk()) printf("TRK");
+ if (!IsFrameGlo() && fgGeom) {
+ Float_t g[3];
+ GetGlobalXYZ(g);
+ printf(" (%+.4e %+.4e %+.4e in GLO)",g[0],g[1],g[2]);
+ }
+ printf("\n");
+ //
+}
+
+//______________________________________________________________________________
+Bool_t AliITSUClusterPix::GetGlobalXYZ(Float_t xyz[3]) const
+{
+ // Get the global coordinates of the cluster
+ // All the needed information is taken only
+ // from TGeo.
+ if (IsFrameGlo()) {
+ xyz[0] = GetX();
+ xyz[1] = GetY();
+ xyz[2] = GetZ();
+ }
+ //
+ Double_t lxyz[3] = {0, 0, 0};
+ if (IsFrameTrk()) {
+ const TGeoHMatrix *mt = GetTracking2LocalMatrix();
+ if (!mt) return kFALSE;
+ Double_t txyz[3] = {GetX(), GetY(), GetZ()};
+ mt->LocalToMaster(txyz,lxyz);
+ }
+ else {
+ lxyz[0] = GetX(); lxyz[1] = GetY(); lxyz[2] = GetZ();
+ }
+ //
+ TGeoHMatrix *ml = GetMatrix();
+ if (!ml) return kFALSE;
+ Double_t gxyz[3] = {0, 0, 0};
+ ml->LocalToMaster(lxyz,gxyz);
+ xyz[0] = gxyz[0]; xyz[1] = gxyz[1]; xyz[2] = gxyz[2];
+ return kTRUE;
+}
+
+//______________________________________________________________________________
+Bool_t AliITSUClusterPix::GetGlobalCov(Float_t cov[6]) const
+{
+ // Get the global covariance matrix of the cluster coordinates
+ // All the needed information is taken only
+ // from TGeo.
+ // Note: regardless on in which frame the coordinates are, the errors are always in tracking frame
+ //
+ return AliCluster::GetGlobalCov(cov);
+}
+
+//______________________________________________________________________________
+Bool_t AliITSUClusterPix::GetXRefPlane(Float_t &xref) const
+{
+ // Get the distance between the origin and the ref.plane.
+ // All the needed information is taken only from TGeo.
+ return AliCluster::GetXRefPlane(xref);
+}
+
+//______________________________________________________________________________
+void AliITSUClusterPix::GoToFrameGlo()
+{
+ // convert to global frame
+ if (IsFrameGlo()) return;
+ double loc[3],glo[3];
+ //
+ if (IsFrameTrk()) {
+ double curr[3]={GetX(),GetY(),GetZ()};
+ GetTracking2LocalMatrix()->LocalToMaster(curr,loc);
+ ResetBit(kFrameTrk);
+ }
+ else {
+ loc[0] = GetX(); loc[1] = GetY(); loc[2] = GetZ();
+ ResetBit(kFrameLoc);
+ }
+ GetMatrix()->LocalToMaster(loc,glo);
+ SetX(glo[0]);
+ SetY(glo[1]);
+ SetZ(glo[2]);
+ SetBit(kFrameGlo);
+ //
+}
+
+//______________________________________________________________________________
+void AliITSUClusterPix::GoToFrameLoc()
+{
+ // convert to local frame
+ if (IsFrameLoc()) return;
+ //
+ double loc[3],glo[3];
+ if (IsFrameTrk()) {
+ double curr[3]={GetX(),GetY(),GetZ()};
+ GetTracking2LocalMatrix()->LocalToMaster(curr,loc);
+ ResetBit(kFrameTrk);
+ }
+ else {
+ glo[0] = GetX(); glo[1] = GetY(); glo[2] = GetZ();
+ GetMatrix()->MasterToLocal(glo,loc);
+ ResetBit(kFrameLoc);
+ }
+ SetBit(kFrameLoc);
+ SetX(loc[0]);
+ SetY(loc[1]);
+ SetZ(loc[2]);
+ //
+}
+
+//______________________________________________________________________________
+void AliITSUClusterPix::GetLocalXYZ(Float_t xyz[3]) const
+{
+ // get local coordinates
+ if (IsFrameLoc()) {
+ xyz[0] = GetX(); xyz[1] = 0; xyz[2] = GetZ();
+ return;
+ }
+ double loc[3],glo[3];
+ if (IsFrameTrk()) {
+ double curr[3]={GetX(),GetY(),GetZ()};
+ GetTracking2LocalMatrix()->LocalToMaster(curr,loc);
+ }
+ else {
+ glo[0] = GetX(); glo[1] = GetY(); glo[2] = GetZ();
+ GetMatrix()->MasterToLocal(glo,loc);
+ }
+ for (int i=3;i--;) xyz[i] = loc[i];
+ //
+}
+
+//______________________________________________________________________________
+void AliITSUClusterPix::GoToFrameTrk()
+{
+ // convert to tracking frame
+ if (IsFrameTrk()) return;
+ //
+ double loc[3],trk[3];
+ if (IsFrameGlo()) {
+ double glo[3]={GetX(),GetY(),GetZ()};
+ GetMatrix()->MasterToLocal(glo,loc);
+ ResetBit(kFrameGlo);
+ }
+ else {
+ loc[0] = GetX(); loc[1] = GetY(); loc[2] = GetZ();
+ ResetBit(kFrameLoc);
+ }
+ // now in local frame
+ GetTracking2LocalMatrix()->MasterToLocal(loc,trk);
+ SetBit(kFrameTrk);
+ SetX(trk[0]);
+ SetY(trk[1]);
+ SetZ(trk[2]);
+ //
+}
+
+//______________________________________________________________________________
+void AliITSUClusterPix::GetTrackingXYZ(Float_t xyz[3]) const
+{
+ // convert to tracking frame
+ if (IsFrameTrk()) {
+ xyz[0] = GetX(); xyz[1] = GetY(); xyz[2] = GetZ();
+ return;
+ }
+ //
+ double loc[3],trk[3];
+ if (IsFrameGlo()) {
+ double glo[3]={GetX(),GetY(),GetZ()};
+ GetMatrix()->MasterToLocal(glo,loc);
+ }
+ else {
+ loc[0] = GetX(); loc[1] = GetY(); loc[2] = GetZ();
+ }
+ // now in local frame
+ GetTracking2LocalMatrix()->MasterToLocal(loc,trk);
+ for (int i=3;i--;) xyz[i] = loc[i];
+ //
+}
+
+//______________________________________________________________________________
+Int_t AliITSUClusterPix::Compare(const TObject* obj) const
+{
+ // compare clusters accodring to specific mode
+ const AliITSUClusterPix* px = dynamic_cast<const AliITSUClusterPix*>(obj);
+ float xyz[3],xyz1[3];
+ if (fgMode & kSortLoc) { // sorting in local frame
+ GetLocalXYZ(xyz);
+ px->GetLocalXYZ(xyz1);
+ if (xyz[2]<xyz1[2]) return -1; // sort in Z then in X
+ if (xyz[2]>xyz1[2]) return 1;
+ if (xyz[0]<xyz1[0]) return -1;
+ if (xyz[0]>xyz1[0]) return 1;
+ return 0;
+ }
+ if (fgMode & kSortTrk) { // sorting in tracking frame
+ GetTrackingXYZ(xyz);
+ px->GetTrackingXYZ(xyz1);
+ if (xyz[2]<xyz1[2]) return -1; // sort in Z then in Y
+ if (xyz[2]>xyz1[2]) return 1;
+ if (xyz[1]<xyz1[1]) return -1;
+ if (xyz[1]>xyz1[1]) return 1;
+ return 0;
+ }
+ AliFatal(Form("Unknown modr for sorting: %d",fgMode));
+ return 0;
+}
+
+//______________________________________________________________________________
+Bool_t AliITSUClusterPix::IsEqual(const TObject* obj) const
+{
+ // compare clusters accodring to specific mode
+ const AliITSUClusterPix* px = dynamic_cast<const AliITSUClusterPix*>(obj);
+ const Float_t kTol = 1e-5;
+ float xyz[3],xyz1[3];
+ if (fgMode & kSortLoc) { // sorting in local frame
+ GetLocalXYZ(xyz);
+ px->GetLocalXYZ(xyz1);
+ if (Abs(xyz[2]-xyz1[2])<kTol && Abs(xyz[0]-xyz1[0])<kTol) return kTRUE;
+ return kFALSE;
+ }
+ if (fgMode & kSortTrk) { // sorting in tracking frame
+ GetTrackingXYZ(xyz);
+ px->GetTrackingXYZ(xyz1);
+ if (Abs(xyz[2]-xyz1[2])<kTol && Abs(xyz[1]-xyz1[1])<kTol) return kTRUE;
+ return kFALSE;
+ }
+ AliFatal(Form("Unknown modr for sorting: %d",fgMode));
+ return kFALSE;
+}
--- /dev/null
+#ifndef ALIITSUCLUSTERPIX_H
+#define ALIITSUCLUSTERPIX_H
+
+#include "AliCluster.h"
+
+class TGeoHMatrix;
+class AliITSUGeomTGeo;
+
+
+class AliITSUClusterPix : public AliCluster
+{
+ public:
+ enum { // frame in which the track is currently defined
+ kFrameLoc = BIT(16)
+ ,kFrameTrk = BIT(17)
+ ,kFrameGlo = BIT(18)
+ ,kFrameBits = kFrameLoc|kFrameTrk|kFrameGlo
+ };
+ //
+ enum SortMode_t { // various modes
+ kSortLoc = BIT(0)
+ ,kSortTrk = BIT(1)
+ ,kSortBits = kSortLoc|kSortTrk
+ };
+
+ public:
+ AliITSUClusterPix();
+ AliITSUClusterPix(const AliITSUClusterPix& cluster);
+ AliITSUClusterPix &operator=(const AliITSUClusterPix& cluster);
+ virtual ~AliITSUClusterPix();
+ //
+ Bool_t IsFrameLoc() const {return TestBit(kFrameLoc);}
+ Bool_t IsFrameGlo() const {return TestBit(kFrameGlo);}
+ Bool_t IsFrameTrk() const {return TestBit(kFrameTrk);}
+ void SetFrameLoc() {ResetBit(kFrameBits); SetBit(kFrameLoc);}
+ void SetFrameGlo() {ResetBit(kFrameBits); SetBit(kFrameGlo);}
+ void SetFrameTrk() {ResetBit(kFrameTrk); SetBit(kFrameTrk);}
+ //
+ void GoToFrameGlo();
+ void GoToFrameLoc();
+ void GoToFrameTrk();
+ void GetLocalXYZ(Float_t xyz[3]) const;
+ void GetTrackingXYZ(Float_t xyz[3]) const;
+ //
+ void SetNxNz(UChar_t nx,UChar_t nz) {fNxNz = (nx<<8) + nz;}
+ Int_t GetNx() const {return fNxNz>>8;}
+ Int_t GetNz() const {return fNxNz&0xff;}
+ //
+ virtual void Print(Option_t* option = "") const;
+ virtual const TGeoHMatrix* GetTracking2LocalMatrix() const;
+ virtual TGeoHMatrix* GetMatrix(Bool_t original = kFALSE) const;
+ virtual Bool_t GetGlobalXYZ(Float_t xyz[3]) const;
+ virtual Bool_t GetGlobalCov(Float_t cov[6]) const;
+ virtual Bool_t GetXRefPlane(Float_t &xref) const;
+ //
+ virtual Bool_t IsSortable() const {return kTRUE;}
+ virtual Bool_t IsEqual(const TObject* obj) const;
+ virtual Int_t Compare(const TObject* obj) const;
+ //
+ static void SetGeom(AliITSUGeomTGeo* gm) {fgGeom = gm;}
+ static void SetSortMode(SortMode_t md) {fgMode &= ~kSortBits; fgMode |= md;}
+ static UInt_t GetSortMode() {return fgMode|kSortBits;}
+ static UInt_t GetMode() {return fgMode;}
+ static SortMode_t SortModeTrkID() {return kSortTrk;}
+ static SortMode_t SortModeLocID() {return kSortLoc;}
+ //
+ protected:
+ //
+ UShort_t fNxNz; // effective cluster size in X (1st byte) and Z (2nd byte) directions
+ static UInt_t fgMode; // general mode (sorting mode etc)
+ static AliITSUGeomTGeo* fgGeom; // pointer on the geometry data
+
+ ClassDef(AliITSUClusterPix,1)
+};
+
+#endif
+#include <TTree.h>
+#include <TObjArray.h>
+#include <TMath.h>
+#include <AliITSUSegmentationPix.h>
#include "AliITSUClusterizer.h"
-
+#include "AliITSUClusterPix.h"
+#include "AliITSUGeomTGeo.h"
+#include "AliITSUSegmentationPix.h"
+#include "AliITSdigit.h"
+#include "AliITSURecoParam.h"
+using namespace TMath;
ClassImp(AliITSUClusterizer)
AliITSUClusterizer::AliITSUClusterizer(Int_t initNRow)
: fVolID(-1)
,fSegm(0)
+ ,fRecoParam(0)
,fInputDigits(0)
,fInputDigitsReadIndex(0)
,fOutputClusters(0)
}
//______________________________________________________________________________
-void AliITSUClusterizer::Transform(AliCluster *cluster,AliITSUClusterizerClusterCand *cand)
+void AliITSUClusterizer::Transform(AliITSUClusterPix *cluster,AliITSUClusterizerClusterCand *cand)
{
- // convert set of digits to clusted data
- Double_t su=0.,sv=0.;
+ // convert set of digits to cluster data in LOCAL frame
+ const double k1to12 = 1./12;
+ //
Int_t n=0;
cand->fLastDigit->fNext=0;
+ double x=0,z=0,xmn=1e9,xmx=-1e9,zmn=1e9,zmx=-1e9,px=0,pz=0;
+ float cx,cz;
for (AliITSUClusterizerClusterDigit *idigit=cand->fFirstDigit;idigit;idigit=idigit->fNext) {
- su+=idigit->fU;
- sv+=idigit->fV;
+ fSegm->GetPadCxz(idigit->fV,idigit->fU,cx,cz);
+ x += cx;
+ z += cz;
+ if (cx<xmn) xmn=cx;
+ if (cx>xmx) xmx=cx;
+ if (cz<zmn) zmn=cz;
+ if (cz>zmx) zmx=cz;
+ px += fSegm->Dpx(idigit->fV);
+ pz += fSegm->Dpz(idigit->fU);
++n;
}
- Double_t fac=1./n; // Todo: weighting by signal
- Double_t detX = fac*sv, detZ = fac*su;
-
- // Set local coordinates
- Float_t x = detX, z = detZ;
- if (fSegm) { // local coordinates in cm
- x = (-0.5*fSegm->Dx() + detX*fSegm->Dpx() + 0.5*fSegm->Dpx());
- z = (-0.5*fSegm->Dz() + detZ*fSegm->Dpz(0)+ 0.5*fSegm->Dpz(0));
+ UChar_t nx=1,nz=1;
+ double dx = xmx-xmn, dz = zmx-zmn;
+ if (n>1) {
+ double fac=1./n;
+ x *= fac; // mean coordinates
+ z *= fac;
+ px *= fac; // mean pitch
+ pz *= fac;
+ nx = 1+Nint(dx/px);
+ nz = 1+Nint(dz/pz);
}
cluster->SetX(x);
cluster->SetZ(z);
+ cluster->SetY(0);
+ cluster->SetSigmaZ2(dz*dz*k1to12);
+ cluster->SetSigmaY2(dx*dx*k1to12);
+ cluster->SetSigmaYZ(0);
+ cluster->SetFrameLoc();
+ cluster->SetNxNz(nx,nz);
+ //
// Set Volume id
cluster->SetVolumeId(fVolID);
// printf("mod %d: (%.4lf,%.4lf)cm\n",fVolID,x,z);
void AliITSUClusterizer::CloseCand(AliITSUClusterizerClusterCand *cand)
{
// finish cluster
- AliCluster *cluster=NextCluster();
+ AliITSUClusterPix *cluster = (AliITSUClusterPix*)NextCluster();
Transform(cluster,cand);
DeallocDigits(cand->fFirstDigit,cand->fLastDigit);
DeallocCand(cand);
#ifndef ALIITSUCLUSTERIZER_H\r
#define ALIITSUCLUSTERIZER_H\r
\r
-#include <AliCluster.h>\r
-#include <AliITSdigit.h>\r
-#include <TTree.h>\r
-#include <TObjArray.h>\r
#include <TClonesArray.h>\r
-#include <AliITSUSegmentationPix.h>\r
+class TTree;\r
+class TObjAray;\r
+class AliITSUSegmentationPix;\r
+class AliITSdigit;\r
+class AliCluster;\r
+class AliITSUClusterPix;\r
+class AliITSURecoParam;\r
\r
class AliITSUClusterizer : public TObject \r
{\r
virtual ~AliITSUClusterizer();\r
void Clusterize();\r
void SetSegmentation(const AliITSUSegmentationPix *segm);\r
+ void SetRecoParam(const AliITSURecoParam* param) {fRecoParam = param;}\r
void SetVolID(Int_t id) {fVolID = id;}\r
void SetNRow(Int_t nrow);\r
// interface methods\r
void SetRecPointTreeAddress(TTree */*treeR*/) {};\r
void DigitsToRecPoints(const TObjArray */*digList*/) {};\r
\r
- void SetDigits(TClonesArray *digits) {fInputDigits=digits;fInputDigitsReadIndex=0;}\r
+ void SetDigits(const TClonesArray *digits) {fInputDigits=digits;fInputDigitsReadIndex=0;}\r
void SetClusters(TClonesArray *clusters) {fOutputClusters=clusters;}\r
\r
protected: // transient data types\r
// input "iterator"\r
AliITSUClusterizerClusterDigit* NextDigit();\r
// output "iterator"\r
- AliCluster* NextCluster() {return new( (*fOutputClusters)[fOutputClusters->GetEntries()] ) AliCluster();}\r
+ AliCluster* NextCluster() {return (AliCluster*)fOutputClusters->New(fOutputClusters->GetEntriesFast());}\r
\r
// modifiers\r
void AttachDigitToCand(AliITSUClusterizerClusterCand *cand,AliITSUClusterizerClusterDigit *digit);\r
void AttachPartToCand(AliITSUClusterizerClusterCand *cand,AliITSUClusterizerClusterPart *part);\r
void DetachPartFromCand(AliITSUClusterizerClusterCand *cand,AliITSUClusterizerClusterPart *part);\r
void MergeCands(AliITSUClusterizerClusterCand *a,AliITSUClusterizerClusterCand *b);\r
-\r
- void Transform(AliCluster *cluster,AliITSUClusterizerClusterCand *cand);\r
+ void Transform(AliITSUClusterPix *cluster, AliITSUClusterizerClusterCand *cand);\r
void CloseCand(AliITSUClusterizerClusterCand *cand);\r
void ClosePart(AliITSUClusterizerClusterPart *part);\r
\r
//\r
Int_t fVolID; // Volume id (module index)\r
const AliITSUSegmentationPix* fSegm; // Segmentation or local coord calc.\r
+ const AliITSURecoParam* fRecoParam; // reco params\r
//\r
// Digit Input\r
- TClonesArray *fInputDigits;\r
- Int_t fInputDigitsReadIndex;\r
+ const TClonesArray *fInputDigits; // supplied digits\r
+ Int_t fInputDigitsReadIndex; // digits counter\r
// Cluster Output\r
- TClonesArray *fOutputClusters;\r
- \r
+ TClonesArray *fOutputClusters; // external container to store clusters\r
+ //\r
// temporary variables\r
- AliITSUClusterizerClusterDigit *fDigitFreelist ; //! \r
- AliITSUClusterizerClusterPart *fPartFreelist ; //!\r
- AliITSUClusterizerClusterCand *fCandFreelist ; //!\r
- AliITSUClusterizerClusterDigit *fDigitFreelistBptrFirst; //!\r
- AliITSUClusterizerClusterDigit *fDigitFreelistBptrLast ; //!\r
- AliITSUClusterizerClusterPart *fPartFreelistBptr ; //!\r
- AliITSUClusterizerClusterCand *fCandFreelistBptr ; //!\r
+ AliITSUClusterizerClusterDigit *fDigitFreelist ; //! pool of local digits\r
+ AliITSUClusterizerClusterPart *fPartFreelist ; //! pool of unfinished clusters\r
+ AliITSUClusterizerClusterCand *fCandFreelist ; //! pool of clusters\r
+ AliITSUClusterizerClusterDigit *fDigitFreelistBptrFirst; //! pointer in the pool\r
+ AliITSUClusterizerClusterDigit *fDigitFreelistBptrLast ; //! pointer in the pool\r
+ AliITSUClusterizerClusterPart *fPartFreelistBptr ; //! pointer in the pool\r
+ AliITSUClusterizerClusterCand *fCandFreelistBptr ; //!pointer in the pool\r
//\r
private:\r
AliITSUClusterizer(const AliITSUClusterizer&); //Not implemented\r
#include "AliITSUSegmentationPix.h"
#include "AliITSUDigitPix.h"
#include "AliITSUClusterizer.h"
+#include "AliITSUClusterPix.h"
ClassImp(AliITSUReconstructor)
if (fGM) AliFatal("was already done, something is wrong...");
//
fGM = new AliITSUGeomTGeo(kTRUE,kTRUE);
+ AliITSUClusterPix::SetGeom(fGM);
//
AliITSUClusterizer* clusPIX = 0;
TClonesArray* rpArrayPix = 0;
int tpDet = fGM->GetLayerDetTypeID(ilr)/AliITSUGeomTGeo::kMaxSegmPerDetType;
if (tpDet == AliITSUGeomTGeo::kDetTypePix) {
if (!clusPIX) clusPIX = new AliITSUClusterizer();
- if (!rpArrayPix) rpArrayPix = new TClonesArray(AliCluster::Class());
+ if (!rpArrayPix) rpArrayPix = new TClonesArray(AliITSUClusterPix::Class());
//
fClusterFinders.AddAtAndExpand(clusPIX, ilr);
fRecPoints.AddAtAndExpand(rpArrayPix, ilr);
//
for (int ilr=0;ilr<fGM->GetNLayers();ilr++) {
//
+ rpClones[ilr]->Clear();
clFinder = (AliITSUClusterizer*)fClusterFinders[ilr];
clFinder->SetSegmentation((AliITSUSegmentationPix*)fGM->GetSegmentation(ilr));
clFinder->SetClusters(rpClones[ilr]);
+ clFinder->SetRecoParam(GetRecoParam()); // RS: Do we need to set it for every event?
//
int modF=fGM->GetFirstModIndex(ilr);
int modL=fGM->GetLastModIndex(ilr)+1;
clFinder->Clusterize();
}
//
+ AliITSUClusterPix::SetSortMode( AliITSUClusterPix::SortModeTrkID());
+ rpClones[ilr]->Sort();
AliDebug(1,Form(" -> Lr%d : %d Cluster",ilr,rpClones[ilr]->GetEntries()));
lrBranch[ilr]->Fill();
- rpClones[ilr]->Clear();
}
clustersTree->SetEntries();
//
void AliITSUSegmentationPix::GetPadCxz(Int_t ix,Int_t iz,Float_t &x,Float_t&z) const
{
// Transform from pixel to real local coordinates
- // returns x, z in cm. RS: TO CHECK if indexing starts from 1 or 0
- x = (ix>0) ? Float_t((ix-0.5)*fPitchX) : Float_t((ix+0.5)*fPitchX);
+ // returns x, z in cm.
+ x = Float_t((ix+0.5)*fPitchX);
z = Col2Z(iz);
//
}
AliITSURecoSens.cxx
AliITSURecoLayer.cxx
AliITSURecoDet.cxx
+ AliITSUClusterPix.cxx
#
# v0/AliITSlayerUpgrade.cxx
# v0/AliITStrackerUpgrade.cxx
#pragma link C++ class AliITSURecoSens+;
#pragma link C++ class AliITSURecoLayer+;
#pragma link C++ class AliITSURecoDet+;
+#pragma link C++ class AliITSUClusterPix+;
//
AliGeomManager::LoadGeometry("geometry.root");
AliITSUGeomTGeo* gm = new AliITSUGeomTGeo(kTRUE);
Int_t nLayers = gm->GetNLayers();
+ AliITSUClusterPix::SetGeom(gm);
TH2F *xyGlob = new TH2F("xyGlob"," X - Y Global coordinates ",500,-50,50,500,-50,50);
xyGlob->SetXTitle("cm");
Double_t loc[3]={cl->GetX(),cl->GetY(),cl->GetZ()};
Double_t glob[3];
gm->LocalToGlobal(cl->GetVolumeId(),loc,glob);
+ cl->Print();
printf("%d: mod %d: loc(%.4lf,%.4lf,%.4lf); glob(%.4lf,%.4lf,%.4lf); \n",icl,cl->GetVolumeId(),
loc[0],loc[1],loc[2],glob[0],glob[1],glob[2]);