X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=ITS%2FAliITSNeuralPoint.cxx;h=960a8405cb0807894f06d1320247cf473904e6b7;hb=572f41f931dc4e5b2a5d1089c1e40e6a00fb4af5;hp=299b868fd4b272344598e46be0c440726e84de1a;hpb=b9d722bcf30601c29773d1f67a2c09566ed728ec;p=u%2Fmrichter%2FAliRoot.git diff --git a/ITS/AliITSNeuralPoint.cxx b/ITS/AliITSNeuralPoint.cxx index 299b868fd4b..960a8405cb0 100644 --- a/ITS/AliITSNeuralPoint.cxx +++ b/ITS/AliITSNeuralPoint.cxx @@ -1,10 +1,17 @@ -#include -#include +/////////////////////////////////////////////////////////////// +// AliITSneuralPoint // +// // +// A class which resumes the information of ITS clusters // +// in the global reference frame. // +// Author: A. Pulvirenti // +/////////////////////////////////////////////////////////////// +//#include +//#include #include #include "AliITSRecPoint.h" -#include "AliITSclusterV2.h" +#include "AliITSRecPoint.h" #include "AliITSgeom.h" #include "AliITSgeomMatrix.h" @@ -15,39 +22,71 @@ ClassImp(AliITSNeuralPoint) // //------------------------------------------------------------------------------------------------------ // -AliITSNeuralPoint::AliITSNeuralPoint() -{ +AliITSNeuralPoint::AliITSNeuralPoint(): +fX(0), +fY(0), +fZ(0), +fConfX(0), +fConfY(0), +fEX(0), +fEY(0), +fEZ(0), +fCharge(0), +fModule(0), +fIndex(0), +fLayer(0), +fUser(0), +fZSort(0){ // Default constructor. // Defines the point as a noise point in the origin. - fX = fY = fZ = 0.; - fEX = fEY = fEZ = 0.; - fLayer = 0; fLabel[0] = fLabel[1] = fLabel[2] = -1; - fModule = 0; - fIndex = 0; - fUser = 0; + } // //------------------------------------------------------------------------------------------------------ // AliITSNeuralPoint::AliITSNeuralPoint(AliITSNeuralPoint *p) : -fX(p->fX), fY(p->fY), fZ(p->fZ), fEX(p->fEX), fEY(p->fEY), fEZ(p->fEZ) +fX(p->fX), +fY(p->fY), +fZ(p->fZ), +fConfX(p->fConfX), +fConfY(p->fConfY), +fEX(p->fEX), +fEY(p->fEY), +fEZ(p->fEZ), +fCharge(p->fCharge), +fModule(p->fModule), +fIndex(p->fIndex), +fLayer(p->fLayer), +fUser(p->fUser), +fZSort(p->fZSort) { // Modified copy constructor. // Accepts a pointer to a like object and copies its datamembers. - fLayer = p->fLayer; + for (Int_t i = 0; i < 3; i++) fLabel[i] = p->fLabel[i]; - fModule = p->fModule; - fIndex = p->fIndex; - fUser = p->fUser; - fCharge = p->fCharge; + } // //------------------------------------------------------------------------------------------------------ // -AliITSNeuralPoint::AliITSNeuralPoint(AliITSRecPoint *rp, AliITSgeomMatrix *gm) +AliITSNeuralPoint::AliITSNeuralPoint(AliITSRecPoint *rp, AliITSgeomMatrix *gm): +fX(0), +fY(0), +fZ(0), +fConfX(0), +fConfY(0), +fEX(0), +fEY(0), +fEZ(0), +fCharge(0), +fModule(0), +fIndex(0), +fLayer(0), +fUser(0), +fZSort(0) { // Conversion constructor. // Accepts a AliITSRecPoint and a AliITSgeomMatrix, @@ -64,25 +103,25 @@ AliITSNeuralPoint::AliITSNeuralPoint(AliITSRecPoint *rp, AliITSgeomMatrix *gm) } // local to global conversions of coords - locPos[0] = rp->fX; + locPos[0] = rp->GetDetLocalX(); locPos[1] = 0.0; - locPos[2] = rp->fZ; + locPos[2] = rp->GetDetLocalZ(); gm->LtoGPosition(locPos, globPos); fX = globPos[0]; fY = globPos[1]; fZ = globPos[2]; // local to global conversions of sigmas - locErr[0][0] = rp->fSigmaX2; - locErr[2][2] = rp->fSigmaZ2; + locErr[0][0] = rp->GetSigmaDetLocX2(); + locErr[2][2] = rp->GetSigmaZ2(); gm->LtoGPositionError(locErr, globErr); - for (i = 0; i < 3; i++) fLabel[i] = rp->fTracks[i]; + for (i = 0; i < 3; i++) fLabel[i] = rp->GetLabel(i); fEX = TMath::Sqrt(globErr[0][0]); fEY = TMath::Sqrt(globErr[1][1]); fEZ = TMath::Sqrt(globErr[2][2]); // copy of other data-members - fCharge = rp->fQ; + fCharge = rp->GetQ(); fLayer = 0; fIndex = 0; fModule = 0; @@ -91,9 +130,26 @@ AliITSNeuralPoint::AliITSNeuralPoint(AliITSRecPoint *rp, AliITSgeomMatrix *gm) // //------------------------------------------------------------------------------------------------- // -AliITSNeuralPoint::AliITSNeuralPoint -(AliITSclusterV2 *rp, AliITSgeom *geom, Short_t module, Short_t index) +AliITSNeuralPoint::AliITSNeuralPoint(AliITSRecPoint *rp, AliITSgeom *geom, Short_t module, Short_t index): +fX(0), +fY(0), +fZ(0), +fConfX(0), +fConfY(0), +fEX(0), +fEY(0), +fEZ(0), +fCharge(0), +fModule(0), +fIndex(0), +fLayer(0), +fUser(0), +fZSort(0) { + // Conversion constructor. + // Accepts a AliITSRecPoint and an AliITSgeom, + // and converts the local coord of the AliITSRecPoint object into global + Int_t mod = (Int_t)module, lay, lad, det; fModule = module; fIndex = index; @@ -124,8 +180,8 @@ AliITSNeuralPoint::AliITSNeuralPoint //------------------------------------------------------------------------------------------------- // Double_t AliITSNeuralPoint::GetPhi() const -// Returns the azimuthal coordinate in the range 0-2pi { + // Returns the azimuthal coordinate in the range 0-2pi Double_t q; q = TMath::ATan2(fY,fX); if (q >= 0.) @@ -137,6 +193,7 @@ Double_t AliITSNeuralPoint::GetPhi() const //------------------------------------------------------------------------------------------------------ // Double_t AliITSNeuralPoint::GetError(Option_t *option) +{ // Returns the error or the square error of // values related to the coordinates in different systems. // The option argument specifies the coordinate error desired: @@ -149,7 +206,7 @@ Double_t AliITSNeuralPoint::GetError(Option_t *option) // // In order to get the error on the cartesian coordinates // reference to the inline ErrX(), ErrY() adn ErrZ() methods. -{ + TString opt(option); Double_t errorSq = 0.0; opt.ToUpper(); @@ -181,10 +238,10 @@ Double_t AliITSNeuralPoint::GetError(Option_t *option) // //------------------------------------------------------------------------------------------------------ // -Bool_t AliITSNeuralPoint::HasID(Int_t ID) +Bool_t AliITSNeuralPoint::HasID(Int_t ID) const +{ // Checks if the recpoint belongs to the GEANT track // whose label is specified in the argument -{ if (ID<0) return kFALSE; else @@ -193,7 +250,8 @@ Bool_t AliITSNeuralPoint::HasID(Int_t ID) // //------------------------------------------------------------------------------------------------------ // -Int_t* AliITSNeuralPoint::SharedID(AliITSNeuralPoint *p) +Int_t* AliITSNeuralPoint::SharedID(AliITSNeuralPoint *p) const +{ // Checks if there is a GEANT track owning both // and the recpoint in the argument // The return value is an array of 4 integers. @@ -202,7 +260,7 @@ Int_t* AliITSNeuralPoint::SharedID(AliITSNeuralPoint *p) // The other three return the matched labels. // If a NULL pointer is passed, the array will be returned as: // {0, -1, -1, -1} -{ + Int_t i, *shared = new Int_t[4]; for (i = 0; i < 4; i++) shared[i] = -1; shared[0] = 0; @@ -218,6 +276,8 @@ Int_t* AliITSNeuralPoint::SharedID(AliITSNeuralPoint *p) // void AliITSNeuralPoint::ConfMap(Double_t vx, Double_t vy) { +// Performs conformal mapping vertex-constrained + Double_t dx = fX - vx; Double_t dy = vy - fY; Double_t r2 = dx*dx + dy*dy;