Skip to content

Commit

Permalink
fix: Remove copy-pasted doc from ShipParticle
Browse files Browse the repository at this point in the history
Fixes #424.
Also clang-formatted the file
  • Loading branch information
olantwin committed Mar 5, 2025
1 parent 4320cea commit 93807e4
Showing 1 changed file with 45 additions and 49 deletions.
94 changes: 45 additions & 49 deletions shipdata/ShipParticle.h
Original file line number Diff line number Diff line change
@@ -1,82 +1,78 @@
// -------------------------------------------------------------------------
// ----- ShipParticle header file -----
// -------------------------------------------------------------------------
#ifndef SHIPDATA_SHIPPARTICLE_H_
#define SHIPDATA_SHIPPARTICLE_H_ 1


/** ShipParticle.h
** Data class for storing Monte Carlo tracks processed by the ShipStack.
** A MCTrack can be a primary track put into the simulation or a
** secondary one produced by the transport through decay or interaction.
**/


#ifndef ShipParticle_H
#define ShipParticle_H 1

#include "TParticle.h" // for TParticle
#include "ShipDetectorList.h" // for DetectorId
#include "Rtypes.h" // for Double_t, Int_t, Double32_t, etc
#include "TLorentzVector.h" // for TLorentzVector
#include "TMath.h" // for Sqrt
#include "TVector3.h" // for TVector3
#include "TMatrixDSym.h" //
#include "Rtypes.h" // for Double_t, Int_t, Double32_t, etc
#include "ShipDetectorList.h" // for DetectorId
#include "TLorentzVector.h" // for TLorentzVector
#include "TMath.h" // for Sqrt
#include "TMatrixDSym.h" //
#include "TParticle.h" // for TParticle
#include "TVector3.h" // for TVector3

class TParticle;

class ShipParticle : public TParticle
{

public:


/** Default constructor **/
ShipParticle();
ShipParticle(Int_t pdg, Int_t status,
Int_t mother1, Int_t mother2,
Int_t daughter1, Int_t daughter2,
Double_t px, Double_t py, Double_t pz, Double_t etot,
Double_t vx, Double_t vy, Double_t vz, Double_t time);
ShipParticle(Int_t pdg, Int_t status,
Int_t mother1, Int_t mother2,
Int_t daughter1, Int_t daughter2,
const TLorentzVector &p,
const TLorentzVector &v);
ShipParticle(Int_t pdg,
Int_t status,
Int_t mother1,
Int_t mother2,
Int_t daughter1,
Int_t daughter2,
Double_t px,
Double_t py,
Double_t pz,
Double_t etot,
Double_t vx,
Double_t vy,
Double_t vz,
Double_t time);
ShipParticle(Int_t pdg,
Int_t status,
Int_t mother1,
Int_t mother2,
Int_t daughter1,
Int_t daughter2,
const TLorentzVector& p,
const TLorentzVector& v);
/** Destructor **/
virtual ~ShipParticle();

/** Output to screen **/
void Print(Int_t iTrack=0) const;
void Print(Int_t iTrack = 0) const;

/** Accessors **/
void GetMomentum(TLorentzVector& momentum);
Double_t GetMass();
void GetVertex(TVector3& vertex);
TMatrixDSym* GetCovP();
TMatrixDSym* GetCovV();
void SetCovP(Double_t *x);
void SetCovV(Double_t *x);
Double_t GetDoca() const { return doca; }
void SetDoca(Double_t x) {doca=x;}
TMatrixDSym* GetCovP();
TMatrixDSym* GetCovV();
void SetCovP(Double_t* x);
void SetCovV(Double_t* x);
Double_t GetDoca() const { return doca; }
void SetDoca(Double_t x) { doca = x; }

private:
TMatrixDSym fCovP;
TMatrixDSym fCovV;
TMatrixDSym fCovP;
TMatrixDSym fCovV;
Double_t doca;
ClassDef(ShipParticle,2);
ClassDef(ShipParticle, 2);
};

// ========== Inline functions ========================================


inline TMatrixDSym* ShipParticle::GetCovP()
{
return &fCovP;
return &fCovP;
}


inline TMatrixDSym* ShipParticle::GetCovV()
{
return &fCovV;
return &fCovV;
}


#endif
#endif // SHIPDATA_SHIPPARTICLE_H_

0 comments on commit 93807e4

Please sign in to comment.