EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ParticleMCS.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file ParticleMCS.h
1 
10 #ifndef INCLUDE_EICSMEAR_SMEAR_PARTICLEMCS_H_
11 #define INCLUDE_EICSMEAR_SMEAR_PARTICLEMCS_H_
12 
13 #include <cmath>
14 #include <TLorentzVector.h>
15 
16 #include "eicsmear/erhic/Pid.h"
19 #include <iostream>
20 
21 namespace Smear {
22 
23 class Event;
24 
29 
30  public:
34  virtual ~ParticleMCS();
35 
41  ParticleMCS();
42 
46  ParticleMCS(const TLorentzVector&, int pdg, int status);
47 
48  // Let's kill all else
49  ParticleMCS(const ParticleMCS&) =delete;
50  ParticleMCS& operator=(const ParticleMCS&) =delete;
51 
52 
53  // ---------------
54  // --- Getters ---
55  // ---------------
59  virtual Double_t GetPx() const;
60 
64  virtual Double_t GetPy() const;
65 
69  virtual Double_t GetPz() const;
70 
74  virtual Double_t GetE() const;
75 
79  virtual TLorentzVector Get4Vector() const;
80 
84  virtual TLorentzVector PxPyPzE() const { return Get4Vector(); }
85 
95  virtual Double_t GetM() const;
96 
101  virtual Double_t GetPt() const;
102 
107  virtual TVector3 GetVertex() const;
108 
112  virtual Double_t GetP() const;
113 
117  virtual Double_t GetTheta() const;
118 
122  virtual Double_t GetPhi() const;
123 
127  virtual Double_t GetRapidity() const;
128 
132  virtual Double_t GetEta() const;
133 
138  virtual UShort_t GetStatus() const;
139 
143  virtual ::erhic::Pid Id() const;
144 
148  double GetNumSigma() const;
149 
153  int GetNumSigmaType() const;
154 
159  virtual bool IsSmeared() const;
160  virtual bool IsESmeared() const; //< E smeared?
161  virtual bool IsPSmeared() const; //< Total momentum smeared?
162  virtual bool IsPtSmeared() const; //< P_t smeared?
163  virtual bool IsPxSmeared() const; //< P_x smeared?
164  virtual bool IsPySmeared() const; //< P_y smeared?
165  virtual bool IsPzSmeared() const; //< P_z smeared?
166  virtual bool IsThetaSmeared() const; //< &theta; smeared?
167  virtual bool IsPhiSmeared() const; //< &phi; smeared?
168  virtual bool IsIdSmeared() const; //< pdg Id smeared?
169  virtual bool IsNumSigmaSmeared() const; //< PID numSigma smeared?
170 
171  // ---------------
172  // --- Setters ---
173  // ---------------
177  virtual void SetE(const Double_t value, const bool CheckSetSmearFlag=true);
178 
182  virtual void SetP(const Double_t value, const bool CheckSetSmearFlag=true);
183 
187  virtual void SetPt(const Double_t value, const bool CheckSetSmearFlag=true);
188 
192  virtual void SetPx(const Double_t value, const bool CheckSetSmearFlag=true);
193 
197  virtual void SetPy(const Double_t value, const bool CheckSetSmearFlag=true);
198 
202  virtual void SetPz(const Double_t value, const bool CheckSetSmearFlag=true);
203 
207  virtual void SetPhi(const Double_t value, const bool CheckSetSmearFlag=true);
208 
212  virtual void SetTheta(const Double_t value, const bool CheckSetSmearFlag=true);
213 
217  virtual void SetId(Int_t value, const bool CheckSetSmearFlag=true);
218 
221  virtual void SetNumSigma( const double d, const bool CheckSetSmearFlag=true);
222 
225  virtual void SetNumSigmaType( const int i);
226 
227  virtual void SetSmeared( bool flag=true); //< Particle smeared
228  virtual void SetESmeared( bool flag=true); //< E smeared
229  virtual void SetPSmeared( bool flag=true); //< Total momentum smeared
230  virtual void SetPtSmeared( bool flag=true); //< P_t smeared
231  virtual void SetPxSmeared( bool flag=true); //< P_x smeared
232  virtual void SetPySmeared( bool flag=true); //< P_y smeared
233  virtual void SetPzSmeared( bool flag=true); //< P_z smeared
234  virtual void SetThetaSmeared( bool flag=true); //< &theta; smeared
235  virtual void SetPhiSmeared( bool flag=true); //< &phi; smeared
236  virtual void SetIdSmeared( bool flag=true); //< pdg Id smeared
237  virtual void SetNumSigmaSmeared( bool flag=true); //< PID numSigma smeared
238 
239 
243  void Set4Vector(const TLorentzVector&) { }
244 
245  virtual void SetStatus(Int_t);
246 
247  virtual UShort_t GetParentIndex() const { return 0; }
248 
253  virtual void Print(Option_t* = "") const;
254 
259  virtual void SetVertex(const TVector3&) { }
260 
264  virtual void SetVariable(const double z, const KinType kin);
265 
270  void HandleBogusValues( const KinType kin );
271 
272 
273  protected:
274 
279  bool kParticleSmeared=false;
280  bool kESmeared=false;
281  bool kPSmeared=false;
282  bool kPtSmeared=false;
283  bool kPxSmeared=false;
284  bool kPySmeared=false;
285  bool kPzSmeared=false;
286  bool kThetaSmeared=false;
287  bool kPhiSmeared=false;
288  bool kIdSmeared=false;
289  bool kNumSigmaSmeared=false;
290 
291 
292  UShort_t status;
293  Int_t id;
294  Double32_t px;
295  Double32_t py;
296  Double32_t pz;
297  Double32_t E;
298  Double32_t pt;
299  Double32_t p;
300  Double32_t theta;
301  Double32_t phi;
302 
303  double numSigma;
305 
306  ClassDef(Smear::ParticleMCS, 3)
307 };
308 
309 
310 } // namespace Smear
311 
312 #endif // INCLUDE_EICSMEAR_SMEAR_PARTICLEMCS_H_