Data members of AliITSdigit classes defined as protected (They were public)
authormasera <masera@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 11 Sep 2003 13:48:52 +0000 (13:48 +0000)
committermasera <masera@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 11 Sep 2003 13:48:52 +0000 (13:48 +0000)
ITS/AliITSClusterFinderSDD.cxx
ITS/AliITSClusterFinderSPD.cxx
ITS/AliITSClusterFinderSPDdubna.cxx
ITS/AliITSDDLRawData.cxx
ITS/AliITSMapA1.cxx
ITS/AliITSMapA2.cxx
ITS/AliITSdigit.h
ITS/AliITSsimulationSPDdubna.cxx

index db8e6ed..103ff46 100644 (file)
@@ -15,6 +15,9 @@
 /*
   $Id$
   $Log$
+  Revision 1.33  2003/07/21 14:20:51  masera
+  Fix to track labes in SDD Rec-points
+
   Revision 1.31.2.1  2003/07/16 13:18:04  masera
   Proper fix to track labels associated to SDD rec-points
 
@@ -1300,9 +1303,9 @@ void AliITSClusterFinderSDD::GetRecPoints(){
         rnew.SetSigmaX2(kRMSx*kRMSx);
         rnew.SetSigmaZ2(kRMSz*kRMSz);
 
-        if(dig) rnew.fTracks[0]=dig->fTracks[0];
-        if(dig) rnew.fTracks[1]=dig->fTracks[1];
-        if(dig) rnew.fTracks[2]=dig->fTracks[2];
+        if(dig) rnew.fTracks[0]=dig->GetTrack(0);
+        if(dig) rnew.fTracks[1]=dig->GetTrack(1);
+        if(dig) rnew.fTracks[2]=dig->GetTrack(2);
 
         iTS->AddRecPoint(rnew);
     } // I clusters
index ff953df..31fdda8 100644 (file)
@@ -109,29 +109,29 @@ void AliITSClusterFinderSPD::FindRawClusters(Int_t module){
 //    scanf("%d",ndig);
     for(ndig=0; ndig<ndigits; ndig++) {
        dig= (AliITSdigitSPD*)fDigits->UncheckedAt(ndig);
-       digx[digitcount] = dig->fCoord2+1;  //starts at 1
-       digz[digitcount] = dig->fCoord1+1;  //starts at 1
-       digtr1[digitcount] = dig->fTracks[0];
+       digx[digitcount] = dig->GetCoord2()+1;  //starts at 1
+       digz[digitcount] = dig->GetCoord1()+1;  //starts at 1
+       digtr1[digitcount] = dig->GetTrack(0);
        digtr2[digitcount] = -3;
        digtr3[digitcount] = -3;
        //cout << "digtr1["<<digitcount <<"]="<<digtr1[digitcount];
        //cout << " fTracks["<<0<<"]="<<dig->fTracks[0]<<": ";
        i=1;
-       while(digtr1[digitcount]==dig->fTracks[i] && i<dig->GetNTracks()) i++;
+       while(digtr1[digitcount]==dig->GetTrack(i) && i<dig->GetNTracks()) i++;
        //cout << " fTracks["<<i<<"]="<<dig->fTracks[i];
        if(i<dig->GetNTracks()){
-           digtr2[digitcount] = dig->fTracks[i];
+           digtr2[digitcount] = dig->GetTrack(i);
            //cout << "digtr2["<<digitcount <<"]="<<digtr2[digitcount]<<": ";
-           while((digtr1[digitcount]==dig->fTracks[i] || 
-                  digtr2[digitcount]==dig->fTracks[i] )&&
+           while((digtr1[digitcount]==dig->GetTrack(i) || 
+                  digtr2[digitcount]==dig->GetTrack(i))&&
                  i<=dig->GetNTracks()) i++;
-           if(i<dig->GetNTracks()) digtr3[digitcount] = dig->fTracks[i];
+           if(i<dig->GetNTracks()) digtr3[digitcount] = dig->GetTrack(i);
            //cout << " fTracks["<<i<<"]=";
            //if(i<dig->GetNTracks()) cout <<dig->fTracks[i];
            //cout << "digtr3["<<digitcount <<"]="<<digtr3[digitcount];
        } // end if
        //cout<<endl;
-       digtr4[digitcount] = dig->fSignal;
+       digtr4[digitcount] = dig->GetSignal();
        digitcount++;
     } // end for ndig
     ClusterFinder(digitcount,digx,digz,digtr1,digtr2,digtr3,digtr4,
index 37b6804..1bfd446 100644 (file)
@@ -272,7 +272,7 @@ void AliITSClusterFinderSPDdubna::TracksInCluster(){
                if(ind == 0 && iz == 0 && ix == 0 && i > 0) continue;
                AliITSdigitSPD *dig = (AliITSdigitSPD*)fMap->GetHit(jz,jx);
                for(itr=0; itr<3; itr++) { 
-                   tracki = dig->fTracks[itr];
+                   tracki = dig->GetTrack(i);
                    if(tracki >= 0) {
                        ii += 1;
                        if(ii < 99) cltracks[ii-1] = tracki;
index 417b34c..cdf0f75 100644 (file)
@@ -83,9 +83,9 @@ void AliITSDDLRawData::GetDigitsSSD(TClonesArray *ITSdigits,Int_t mod,Int_t modR
     }
     for (Int_t digit=0;digit<ndigits;digit++) {
       digs = (AliITSdigit*)ITSdigits->UncheckedAt(digit);
-      iz=digs->fCoord1;  // If iz==0, N side and if iz=1 P side
-      ix=digs->fCoord2;  // Strip Numbar
-      is=digs->fSignal;  // ADC Signal
+      iz=digs->GetCoord1();  // If iz==0, N side and if iz=1 P side
+      ix=digs->GetCoord2();  // Strip Numbar
+      is=digs->GetSignal();  // ADC Signal
       // cout<<" Module:"<<mod-500<<" N/P side:"<<iz<<" Strip Number:"<<ix<<" Amplidute:"<<is-1<<endl;
       if (fVerbose==2)
        ftxt<<"DDL:"<<ddl<<" Mod: "<<modR<<" N/P: "<<iz<<" Strip: "<<ix<<" Value: "<<is-1<<endl;
@@ -127,9 +127,9 @@ void AliITSDDLRawData::GetDigitsSDD(TClonesArray *ITSdigits,Int_t mod,Int_t modR
       ftxt.open("SDDdigits.txt",ios::app);
     for (Int_t digit=0;digit<ndigits;digit++) {
       digs = (AliITSdigit*)ITSdigits->UncheckedAt(digit);
-      iz=digs->fCoord1;  // Anode
-      ix=digs->fCoord2;  // Time
-      is=digs->fSignal;  // ADC Signal
+      iz=digs->GetCoord1();  // Anode
+      ix=digs->GetCoord2();  // Time
+      is=digs->GetSignal();  // ADC Signal
       if (fVerbose==2)
        ftxt<<"DDL:"<<ddl<<" MID:"<<modR<<" An:"<<iz<<" T:"<<ix<<" A:"<<is<<endl;
       //      cout<<"Amplitude value:"<<is<<" Time Bucket:"<<ix<<" Anode:"<<iz<<endl;
@@ -199,8 +199,8 @@ void AliITSDDLRawData::GetDigitsSPD(TClonesArray *ITSdigits,Int_t mod,Int_t ddl,
        *     So, the cell number in Z direction varies from 0 to 159.  Therefore,
        *     to get the chip address (0 to 4), we need to divide column number by 32.
        *     ---------------------------------------------------------------------*/
-      iz=digs->fCoord1;  // Cell number in Z direction 
-      ix=digs->fCoord2;  // Cell number in X direction
+      iz=digs->GetCoord1();  // Cell number in Z direction 
+      ix=digs->GetCoord2();  // Cell number in X direction
       chipNo=iz/32;
       if(fVerbose==2)
        ftxt<<"DDL:"<<ddl<<" Mod:"<<mod<<" Row:"<<ix<<" Col:"<<iz<<endl;
index 78ac731..f4f5f47 100644 (file)
@@ -151,8 +151,8 @@ void  AliITSMapA1::FillMap(){
     AliITSdigit *dig;
     for (Int_t ndig=0; ndig<ndigits; ndig++) {
        dig = (AliITSdigit*)fObjects->UncheckedAt(ndig);
-       if(dig->fSignal > fMapThreshold) {
-           SetHit(dig->fCoord1,dig->fCoord2,ndig);
+       if(dig->GetSignal() > fMapThreshold) {
+           SetHit(dig->GetCoord1(),dig->GetCoord2(),ndig);
        } // end if fSignal > fMapthreshold
     } // end for ndig
 }
@@ -194,7 +194,7 @@ Double_t AliITSMapA1::GetSignal(Int_t iz, Int_t ix){
     Double_t signal;
 
     AliITSdigit *dig = (AliITSdigit*)GetHit(iz,ix);
-    if(dig) signal=(Double_t)dig->fSignal;
+    if(dig) signal=(Double_t)dig->GetSignal();
     else signal=0.;
     return signal;
 }
index ae7e1b1..74f6e4a 100644 (file)
@@ -146,8 +146,8 @@ void  AliITSMapA2::FillMap(){
     AliITSdigit *dig;
     for (Int_t ndig=0; ndig<ndigits; ndig++) {
        dig = (AliITSdigit*)fObjects->UncheckedAt(ndig);
-       Double_t signal = (Double_t)(dig->fSignal);
-       if (signal > fMapThresholdD) SetHit(dig->fCoord1,dig->fCoord2,signal);
+       Double_t signal = (Double_t)(dig->GetSignal());
+       if (signal > fMapThresholdD) SetHit(dig->GetCoord1(),dig->GetCoord2(),signal);
     } // end for ndig
 }
 //______________________________________________________________________
index 0d1563e..059e0bd 100644 (file)
@@ -46,7 +46,7 @@ class AliITSdigit: public TObject  {
     void Print(ostream *os); // Class ascii print function
     void Read(istream *os);  // Class ascii read function
 
- public:
+ protected:
     Int_t fCoord1; // Cell number on Z axis (SPD+SDD), flag for side type (SSD)
     Int_t fCoord2; // Cell number on X axis (SPD+SDD), strip number (SSD)
     Int_t fSignal; // Signal in ADC counts
@@ -68,6 +68,8 @@ class AliITSdigitSPD: public AliITSdigit {
     virtual ~AliITSdigitSPD(){/*destructor*/}
     // returns the array size used to store Tracks and Hits
     static Int_t GetNTracks() {return fkSspd;}
+    // returns the signal in electrons
+    Int_t GetSignalSPD() {return fSignalSPD;}
     // returns pointer to the array of tracks which make this digit
     virtual Int_t *GetTracks() {return &fTracks[0];}
      //returns the pointer to the array of hits which made this digit
@@ -81,6 +83,8 @@ class AliITSdigitSPD: public AliITSdigit {
     //copy the array trks[fkSspd] into fTracks
     virtual void SetTracks(const Int_t *trks){
        for(Int_t i=0;i<fkSspd;i++) fTracks[i]=trks[i];}
+    // set signal in electrons
+    void SetSignalSPD(Int_t sig) {fSignalSPD = sig;}
     //copy the array hits[fkSspd] into fHits
     virtual void SetHits(const Int_t *hits){
        for(Int_t i=0;i<fkSspd;i++) fHits[i]=hits[i];}
@@ -91,10 +95,9 @@ class AliITSdigitSPD: public AliITSdigit {
     void Print(ostream *os); // Class ascii print function
     void Read(istream *os);  // Class ascii read function
 
- private:
+ protected:
     static const Int_t fkSspd = 10; // size of fTracks and fHits arrays
     
- public:  
     // debugging  -- goes to the dictionary
     Int_t fTracks[fkSspd]; //[fkSspd] tracks making this digit 
     Int_t fHits[fkSspd];   //[fkSspd] hits associated to the tracks
@@ -145,10 +148,9 @@ class AliITSdigitSDD: public AliITSdigit {
     void Print(ostream *os); // Class ascii print function
     void Read(istream *os);  // Class ascii read function
 
- private:
+ protected:
     static const Int_t fkSsdd = 10; // size of fTracks and fHits arrays
     
- public:
     // debugging  -- goes to the dictionary
     Int_t   fTracks[fkSsdd];   //[fkSsdd] tracks making this digit 
     Int_t   fHits[fkSsdd];     //[fkSsdd] hits associated to the tracks
@@ -184,7 +186,7 @@ class AliITSTransientDigit : public AliITSdigitSDD {
     void Print(ostream *os); // Class ascii print function
     void Read(istream *os);  // Class ascii read function
 
- public:
+ protected:
     TObjArray *fTrackList;  // track list 
 
     ClassDef(AliITSTransientDigit,1)  // Transient digit for set: ITS
@@ -232,10 +234,9 @@ class AliITSdigitSSD: public AliITSdigit {
     void Print(ostream *os); // Class ascii print function
     void Read(istream *os);  // Class ascii read function
 
- private:
+ protected:
     static const Int_t fkSssd = 10; // size of fTracks and fHits arrays
     
- public:
     // debugging  -- goes to the dictionary
     Int_t fTracks[fkSssd]; //[fkSssd] tracks making this digit 
     Int_t fHits[fkSssd];   //[fkSssd] hits associated to the tracks
index 29a1cda..2782072 100644 (file)
@@ -846,28 +846,19 @@ void AliITSsimulationSPDdubna::ChargeToSignal(AliITSpList *pList){
 //              << endl;
 #endif
            if (sig+electronics > threshold) {
-               dig.fCoord1 = iz;
-               dig.fCoord2 = ix;
-               dig.fSignal = 1;
-               dig.fSignalSPD = (Int_t) pList->GetSignal(iz+1,ix+1);
-               /*
-               digits[0] = iz;
-               digits[1] = ix;
-               digits[2] = 1; */
+               dig.SetCoord1(iz);
+               dig.SetCoord2(ix);
+               dig.SetSignal(1);
+               Int_t sigspd = (Int_t) pList->GetSignal(iz+1,ix+1);
+               dig.SetSignalSPD(sigspd);
                for(j=0;j<nmaxtrk;j++){
 //                 charges[j] = 0.0;
                    if (j<pList->GetNEnteries()) {
-                       dig.fTracks[j] = pList->GetTrack(iz+1,ix+1,j);
-                       dig.fHits[j]   = pList->GetHit(iz+1,ix+1,j);
-                       /*
-                       tracks[j] = pList->GetTrack(iz+1,ix+1,j);
-                       hits[j]   = pList->GetHit(iz+1,ix+1,j);
-                       */
+                       dig.SetTrack(j,pList->GetTrack(iz+1,ix+1,j));
+                       dig.SetHit(j,pList->GetHit(iz+1,ix+1,j));
                    }else { // Default values
-                       dig.fTracks[j] = -3;
-                       dig.fHits[j]   = -1;
-/*                     tracks[j] = -2; //noise
-                       hits[j]   = -1;  */
+                       dig.SetTrack(j,-3);
+                       dig.SetHit(j,-3);
                    } // end if pList
                } // end for j
 //             charges[0] = (Float_t) pList->GetSumSignal(iz+1,ix+1);