]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Fixes for report #63608: Obsolete Calorimeter information in ESDs removal (Gustavo)
authorhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 22 Apr 2010 13:31:27 +0000 (13:31 +0000)
committerhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 22 Apr 2010 13:31:27 +0000 (13:31 +0000)
ESDCheck/AliEMCALQATask.cxx
ESDCheck/AliPHOSQATask.cxx
STEER/AliESDCaloCluster.cxx
STEER/AliESDCaloCluster.h
STEER/AliESDEvent.cxx
STEER/AliESDEvent.h

index 0657786aa8d2adc79906ffb7f3d13d9c92ec9061..475a11b43619040a084ff7aa20f41460ad680a2d 100644 (file)
@@ -196,9 +196,9 @@ void AliEMCALQATask::Exec(Option_t *)
        caloCluster->GetPosition(pos) ;
        fhEMCALPos->Fill(pos[0],pos[1],pos[2]) ;
        fhEMCALEnergy->Fill(caloCluster->E()) ;
-       fhEMCALDigits->Fill(entry, caloCluster->GetNumberOfDigits()) ;
+       fhEMCALDigits->Fill(entry, caloCluster->GetNCells()) ;
        numberOfEmcalClustersv1++ ;
-       numberOfDigitsInEmcal += caloCluster->GetNumberOfDigits() ;    
+       numberOfDigitsInEmcal += caloCluster->GetNCells() ;    
        // Float_t * pid = clus->GetPid() ;
        // if(pid[AliPID::kPhoton]>0.9){
        emcalVector[numberOfPhotonsInEmcal] = new TVector3(pos[0],pos[1],pos[2]) ;
index 53269ef408548f7da3849d2f362e9a13eb2ef577..591769f86c817fc9cea288a025e2e783e47e1264 100644 (file)
@@ -196,8 +196,8 @@ void AliPHOSQATask::Exec(Option_t *)
       caloCluster->GetPosition( pos ) ;
       fhPHOSEnergy->Fill( caloCluster->E() ) ;
       fhPHOSPos->Fill( pos[0], pos[1], pos[2] ) ;
-      fhPHOSDigits->Fill(entry, caloCluster->GetNumberOfDigits() ) ;
-      numberOfDigitsInPhos += caloCluster->GetNumberOfDigits() ;
+      fhPHOSDigits->Fill(entry, caloCluster->GetNCells() ) ;
+      numberOfDigitsInPhos += caloCluster->GetNCells() ;
       Double_t * pid = caloCluster->GetPid() ;
       if(pid[AliPID::kPhoton] > 0.9) {
        phosVector[numberOfPhotonsInPhos] = new TVector3(pos[0],pos[1],pos[2]) ;
index 4554b97fbe8f1ba1aa136af3752f4590597fa49b..d305651cbd5a18412ee21824162d18083a95dac2 100644 (file)
@@ -37,9 +37,6 @@ AliESDCaloCluster::AliESDCaloCluster() :
   fNCells(0),
   fCellsAbsId(0x0),
   fCellsAmpFraction(0x0),
-  fDigitAmplitude(0x0),//not in use
-  fDigitTime(0x0),//not in use
-  fDigitIndex(0x0),//not in use
   fEnergy(0),
   fDispersion(0),
   fChi2(0),
@@ -67,9 +64,6 @@ AliESDCaloCluster::AliESDCaloCluster(const AliESDCaloCluster& clus) :
   fNCells(clus.fNCells),
   fCellsAbsId(),
   fCellsAmpFraction(),
-  fDigitAmplitude(clus.fDigitAmplitude?new TArrayS(*clus.fDigitAmplitude):0x0),//not in use
-  fDigitTime(clus.fDigitTime?new TArrayS(*clus.fDigitTime):0x0),//not in use
-  fDigitIndex(clus.fDigitIndex?new TArrayS(*clus.fDigitIndex):0x0),//not in use
   fEnergy(clus.fEnergy),
   fDispersion(clus.fDispersion),
   fChi2(clus.fChi2),
@@ -186,45 +180,12 @@ AliESDCaloCluster &AliESDCaloCluster::operator=(const AliESDCaloCluster& source)
     fLabels = 0;
   }
 
-
-  if(source.fDigitAmplitude){
-    // assign or copy construct
-    if(fDigitAmplitude) *fDigitAmplitude = *source.fDigitAmplitude;
-    else fDigitAmplitude = new TArrayS(*source.fDigitAmplitude);
-   }
-  else{
-    delete fDigitAmplitude;
-    fDigitAmplitude = 0;
-  }
-
-
-
-  if(source.fDigitTime){
-    // assign or copy construct
-    if(fDigitTime) *fDigitTime = *source.fDigitTime;
-    else fDigitTime = new TArrayS(*source.fDigitTime);
-  }
-  else{
-    delete fDigitTime;
-    fDigitTime = 0;
-  }
-
-
-
-  if(source.fDigitIndex){
-    // assign or copy construct
-    if(fDigitIndex) *fDigitIndex = *source.fDigitIndex;
-    else fDigitIndex = new TArrayS(*source.fDigitIndex);
-  }
-  else{
-    delete fDigitIndex;
-    fDigitIndex = 0;
-  }
   
   return *this;
 
 }
 
+//_______________________________________________________________________
 void AliESDCaloCluster::Copy(TObject &obj) const {
   
   // this overwrites the virtual TOBject::Copy()
@@ -245,9 +206,6 @@ AliESDCaloCluster::~AliESDCaloCluster(){
   //
   if(fTracksMatched)delete fTracksMatched;fTracksMatched = 0;
   if(fLabels) delete fLabels; fLabels = 0;
-  delete fDigitAmplitude;  //not in use
-  delete fDigitTime;  //not in use
-  delete fDigitIndex;  //not in use
   if(fCellsAmpFraction){ delete[] fCellsAmpFraction; fCellsAmpFraction=0;}
   if(fCellsAbsId){ delete[] fCellsAbsId;  fCellsAbsId = 0;}
 }
@@ -291,18 +249,16 @@ void AliESDCaloCluster::GetMomentum(TLorentzVector& p, Double_t *vertex ) {
   //Vertex can be recovered with esd pointer doing:  
   //" Double_t vertex[3] ; esd->GetVertex()->GetXYZ(vertex) ; "
 
-  if(vertex){//calculate direction from vertex
-    fGlobalPos[0]-=vertex[0];
-    fGlobalPos[1]-=vertex[1];
-    fGlobalPos[2]-=vertex[2];
-  }
-  
-  Double_t r = TMath::Sqrt(fGlobalPos[0]*fGlobalPos[0]+
-                           fGlobalPos[1]*fGlobalPos[1]+
-                           fGlobalPos[2]*fGlobalPos[2]   ) ; 
-
-  p.SetPxPyPzE( fEnergy*fGlobalPos[0]/r,  fEnergy*fGlobalPos[1]/r,  fEnergy*fGlobalPos[2]/r,  fEnergy) ; 
-  
+       Double32_t pos[3]={ fGlobalPos[0], fGlobalPos[1], fGlobalPos[2]};
+       if(vertex){//calculate direction from vertex
+               pos[0]-=vertex[0];
+               pos[1]-=vertex[1];
+               pos[2]-=vertex[2];
+       }
+       
+       Double_t r = TMath::Sqrt(pos[0]*pos[0]+pos[1]*pos[1]+pos[2]*pos[2]   ) ; 
+       
+       p.SetPxPyPzE( fEnergy*pos[0]/r,  fEnergy*pos[1]/r,  fEnergy*pos[2]/r,  fEnergy) ;   
 }
 
 //_______________________________________________________________________
index 91e3522f8bb4e5b7d0585ba5766c421395ca412c..575c1de38abaf45461af197550237d8c73b86302 100644 (file)
@@ -134,17 +134,6 @@ public:
     if (fCellsAmpFraction && i >=0 && i < fNCells ) return fCellsAmpFraction[i];    
     else return -1;}
     
-  //_____________________________________________________
-  //Not used anymore, kept to avoid backward incompatibility
-  void AddDigitIndex(TArrayS & array)     { fDigitIndex   = new TArrayS(array) ; Warning("AddDigitAmplitude","This method is no more in use") ;}
-  void AddDigitAmplitude(TArrayS & array) {  fDigitAmplitude   = new TArrayS(array) ; Warning("AddDigitAmplitude","This method is no more in use") ;}
-  void AddDigitTime(TArrayS & array)      {  fDigitTime   = new TArrayS(array) ;Warning("AddDigitTime","This method is no more in use") ;}
-  TArrayS * GetDigitAmplitude() const {return  fDigitAmplitude;}
-  TArrayS * GetDigitTime() const      {return  fDigitTime;}
-  TArrayS * GetDigitIndex() const     {return  fDigitIndex;}
-  Int_t GetNumberOfDigits() const        { return -1;}
- //_____________________________________________________
-
 protected:
 
   TArrayI * fTracksMatched; //Index of tracks close to cluster. First entry is the most likely match.
@@ -155,12 +144,6 @@ protected:
   UShort_t *fCellsAbsId;   //[fNCells] array of cell absId numbers
   Double32_t *fCellsAmpFraction;    //[fNCells][0.,1.,16] array with cell amplitudes fraction.
 
-  //__________________________________________________________
-  //Not in use
-  TArrayS * fDigitAmplitude;   //digit energy (integer units) 
-  TArrayS * fDigitTime;        //time of this digit (integer units) 
-  TArrayS * fDigitIndex;       //calorimeter digit index 
-  //_________________________________________________________
 
   Double32_t   fGlobalPos[3];     // position in global coordinate systemD
   Double32_t   fEnergy;           // energy measured by calorimeter
@@ -180,7 +163,7 @@ protected:
   Char_t  fClusterType;      // Flag for different cluster type/versions
   Double32_t fTOF; //[0,0,12] time-of-flight
 
-  ClassDef(AliESDCaloCluster,9)  //ESDCaloCluster 
+  ClassDef(AliESDCaloCluster,10)  //ESDCaloCluster 
 };
 
 #endif 
index 4b923f7cc998f667caf755e402f6829434379df8..14be40f4e7c11c418b39a7120581cb2afe4c19ca 100644 (file)
@@ -132,11 +132,7 @@ AliESDEvent::AliESDEvent():
   fESDOld(0),
   fESDFriendOld(0),
   fConnected(kFALSE),
-  fUseOwnList(kFALSE),
-  fEMCALClusters(0), 
-  fFirstEMCALCluster(-1),
-  fPHOSClusters(0), 
-  fFirstPHOSCluster(-1)
+  fUseOwnList(kFALSE)
 {
 }
 //______________________________________________________________________________
@@ -172,11 +168,7 @@ AliESDEvent::AliESDEvent(const AliESDEvent& esd):
   fESDOld(esd.fESDOld ? new AliESD(*esd.fESDOld) : 0),
   fESDFriendOld(esd.fESDFriendOld ? new AliESDfriend(*esd.fESDFriendOld) : 0),
   fConnected(esd.fConnected),
-  fUseOwnList(esd.fUseOwnList),
-  fEMCALClusters(esd.fEMCALClusters), 
-  fFirstEMCALCluster(esd.fFirstEMCALCluster),
-  fPHOSClusters(esd.fPHOSClusters), 
-  fFirstPHOSCluster(esd.fFirstPHOSCluster)
+  fUseOwnList(esd.fUseOwnList)
 
 {
   // CKB init in the constructor list and only add here ...
@@ -297,11 +289,6 @@ AliESDEvent & AliESDEvent::operator=(const AliESDEvent& source) {
 
   fConnected = source.fConnected;
   fUseOwnList = source.fUseOwnList;
-  fEMCALClusters = source.fEMCALClusters;
-  fFirstEMCALCluster = source.fFirstEMCALCluster;
-  fPHOSClusters = source.fPHOSClusters;
-  fFirstPHOSCluster = source.fFirstPHOSCluster;
-
 
   return *this;
 
@@ -448,10 +435,6 @@ void AliESDEvent::ResetStdContent()
 
   // don't reset fconnected fConnected and the list
 
-  fEMCALClusters=0; 
-  fFirstEMCALCluster=-1; 
-  fPHOSClusters=0; 
-  fFirstPHOSCluster=-1; 
 }
 
 
@@ -507,8 +490,6 @@ void AliESDEvent::Print(Option_t *) const
   if(fEMCALCells)printf("                 EMCALCells %d\n", fEMCALCells->GetNumberOfCells());
   else printf("                 EMCALCells not in the Event\n");
   printf("                 CaloClusters %d\n", GetNumberOfCaloClusters());
-  printf("                 phos      %d\n", GetNumberOfPHOSClusters());
-  printf("                 emcal     %d\n", GetNumberOfEMCALClusters());
   printf("                 FMD       %s\n", (fESDFMD ? "yes" : "no"));
   printf("                 VZERO     %s\n", (fESDVZERO ? "yes" : "no"));
   TObject* pHLTDecision=GetHLTTriggerDecision();
index 230eeb05223bdd9f47e6dbb6284e6df2e1971456..34c29bb0e4c3bae6fb47c2a7d8b3f3b1d24c78ba 100644 (file)
@@ -368,19 +368,6 @@ public:
 
   void SetUseOwnList(Bool_t b){fUseOwnList = b;}
   Bool_t GetUseOwnList() const {return fUseOwnList;}
-  
-  // Remove this stuff CKB?
-  //---------------------------------------------------
-  Int_t GetNumberOfEMCALClusters() const {return fEMCALClusters;}
-  void  SetNumberOfEMCALClusters(Int_t clus) {fEMCALClusters = clus;}
-  Int_t GetFirstEMCALCluster() const {return fFirstEMCALCluster;}
-  void  SetFirstEMCALCluster(Int_t index) {fFirstEMCALCluster = index;}
-  Int_t GetNumberOfPHOSClusters() const {return fPHOSClusters;}
-  void  SetNumberOfPHOSClusters(Int_t part) { fPHOSClusters = part ; }
-  void  SetFirstPHOSCluster(Int_t index) { fFirstPHOSCluster = index ; } 
-  Int_t GetFirstPHOSCluster() const  { return fFirstPHOSCluster ; }
-  //-------------------------------------------------------
 
   TArrayF *GetEMCALTriggerPosition() const {return  fEMCALTrigger?fEMCALTrigger->GetTriggerPosition():0x0;}
   TArrayF *GetEMCALTriggerAmplitudes() const {return  fEMCALTrigger?fEMCALTrigger->GetTriggerAmplitudes():0x0;}
@@ -449,14 +436,7 @@ protected:
 
   static const char* fgkESDListName[kESDListN]; //!
 
-  // Remove this stuff CKB
-  Int_t        fEMCALClusters;   // Number of EMCAL clusters (subset of caloclusters)
-  Int_t        fFirstEMCALCluster; // First EMCAL cluster in the fCaloClusters list 
-
-  Int_t        fPHOSClusters;     // Number of PHOS clusters (subset of caloclusters)
-  Int_t        fFirstPHOSCluster; // First PHOS cluster in the fCaloClusters list 
-
-  ClassDef(AliESDEvent,10)  //ESDEvent class 
+  ClassDef(AliESDEvent,11)  //ESDEvent class 
 };
 #endif