Skip to content

Commit

Permalink
Make pointer to vertex position constant
Browse files Browse the repository at this point in the history
  • Loading branch information
mfasDa authored and dberzano committed Mar 16, 2016
1 parent d1f4744 commit c43ccb2
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions STEER/AOD/AliAODCaloCluster.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ Bool_t AliAODCaloCluster::HasTrackMatched(TObject *trk) const
/// " Double_t vertex[3] ; esd->GetVertex()->GetXYZ(vertex) ; "
///
//_______________________________________________________________________
void AliAODCaloCluster::GetMomentum(TLorentzVector& p, Double_t *vertex ) const
void AliAODCaloCluster::GetMomentum(TLorentzVector& p, const Double_t *vertex ) const
{
Double32_t energy = E();
Float_t pos[3];
Expand Down Expand Up @@ -310,7 +310,7 @@ void AliAODCaloCluster::GetMomentum(TLorentzVector& p, Double_t *vertex ) const
/// " Double_t vertex[3] ; esd->GetVertex()->GetXYZ(vertex) ; "
///
//_______________________________________________________________________
void AliAODCaloCluster::GetMomentum(TLorentzVector& p, Double_t *vertex, VCluUserDefEnergy_t t ) const
void AliAODCaloCluster::GetMomentum(TLorentzVector& p, const Double_t *vertex, VCluUserDefEnergy_t t ) const
{
Double32_t energy = GetUserDefEnergy(t);
Float_t pos[3];
Expand Down
4 changes: 2 additions & 2 deletions STEER/AOD/AliAODCaloCluster.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ class AliAODCaloCluster : public AliAODCluster {
fTOF = tof ;
}

void GetMomentum(TLorentzVector& p, Double_t * vertexPosition ) const;
void GetMomentum(TLorentzVector& p, Double_t * vertexPosition, VCluUserDefEnergy_t t ) const;
void GetMomentum(TLorentzVector& p, const Double_t * vertexPosition ) const;
void GetMomentum(TLorentzVector& p, const Double_t * vertexPosition, VCluUserDefEnergy_t t ) const;

/// Add reference to associated track to cluster.
/// Make sure we attach the object to correct process number.
Expand Down
4 changes: 2 additions & 2 deletions STEER/ESD/AliESDCaloCluster.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ void AliESDCaloCluster::SetPID(const Float_t *p)
/// " Double_t vertex[3] ; esd->GetVertex()->GetXYZ(vertex) ; "
///
//_______________________________________________________________________
void AliESDCaloCluster::GetMomentum(TLorentzVector& p, Double_t *vertex ) const
void AliESDCaloCluster::GetMomentum(TLorentzVector& p, const Double_t *vertex ) const
{
Double32_t pos[3]={ fGlobalPos[0], fGlobalPos[1], fGlobalPos[2]};
if(vertex){//calculate direction from vertex
Expand All @@ -360,7 +360,7 @@ void AliESDCaloCluster::GetMomentum(TLorentzVector& p, Double_t *vertex ) const
/// " Double_t vertex[3] ; esd->GetVertex()->GetXYZ(vertex) ; "
///
//_______________________________________________________________________
void AliESDCaloCluster::GetMomentum(TLorentzVector& p, Double_t *vertex, VCluUserDefEnergy_t t ) const
void AliESDCaloCluster::GetMomentum(TLorentzVector& p, const Double_t *vertex, VCluUserDefEnergy_t t ) const
{
Double32_t energy = GetUserDefEnergy(t);
Float_t pos[3];
Expand Down
4 changes: 2 additions & 2 deletions STEER/ESD/AliESDCaloCluster.h
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,8 @@ class AliESDCaloCluster : public AliVCluster
UInt_t GetNLabels() const { if (fLabels) return fLabels->GetSize();
else return (0);}

void GetMomentum(TLorentzVector& p, Double_t * vertexPosition ) const;
void GetMomentum(TLorentzVector& p, Double_t * vertexPosition, VCluUserDefEnergy_t t ) const;
void GetMomentum(TLorentzVector& p, const Double_t * vertexPosition ) const;
void GetMomentum(TLorentzVector& p, const Double_t * vertexPosition, VCluUserDefEnergy_t t ) const;

void SetNCells(Int_t n) { fNCells = n;}
Int_t GetNCells() const { return fNCells;}
Expand Down
4 changes: 2 additions & 2 deletions STEER/STEERBase/AliVCluster.h
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,8 @@ class AliVCluster : public TObject
Double_t GetHadCorrEnergy() const { return GetUserDefEnergy(kHadCorr) ; }
void SetHadCorrEnergy(Double_t e) { SetUserDefEnergy(kHadCorr, e) ; }

virtual void GetMomentum(TLorentzVector &/*tl*/, Double_t * /*v*/) const { ; }
virtual void GetMomentum(TLorentzVector &/*tl*/, Double_t * /*v*/, VCluUserDefEnergy_t /*t*/) const { ; }
virtual void GetMomentum(TLorentzVector &/*tl*/, const Double_t * /*v*/) const { ; }
virtual void GetMomentum(TLorentzVector &/*tl*/, const Double_t * /*v*/, VCluUserDefEnergy_t /*t*/) const { ; }

/// \cond CLASSIMP
ClassDef(AliVCluster,0) ; //VCluster
Expand Down

0 comments on commit c43ccb2

Please sign in to comment.