CbmRoot
Loading...
Searching...
No Matches
PairAnalysisTrackRotator.h
Go to the documentation of this file.
1/* Copyright (C) 2015-2020 Justus-Liebig-Universitaet Giessen, Giessen
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Julian Book [committer] */
4
5#ifndef DILEPTONTRACKROTATOR_H
6#define DILEPTONTRACKROTATOR_H
7
8//#############################################################
9//# #
10//# Class PairAnalysisTrackRotator #
11//# #
12//# Authors: #
13//# Julian Book, Uni Ffm / Julian.Book@cern.ch #
14//# #
15//#############################################################
16
17#include <TMath.h>
18#include <TNamed.h>
19#include <TRandom3.h>
20
21class PairAnalysisTrackRotator : public TNamed {
22public:
29
31 PairAnalysisTrackRotator(const char* name, const char* title);
32
34
35 //Setters
36 void SetIterations(UInt_t niter) { fIterations = niter; }
38 void SetStartAnglePhi(Double_t phi) { fStartAnglePhi = phi; }
39 void SetConeAnglePhi(Double_t phi) { fConeAnglePhi = phi; }
40
41 //Getters
42 Int_t GetIterations() const { return fIterations; }
44 Double_t GetStartAnglePhi() const { return fStartAnglePhi; }
45 Double_t GetConeAnglePhi() const { return fConeAnglePhi; }
46
47 Double_t GetAngle() const { return fStartAnglePhi + (2 * gRandom->Rndm() - 1) * fConeAnglePhi; }
48 Double_t GetCharge() const { return TMath::Nint(gRandom->Rndm()); }
49
50private:
51 UInt_t fIterations = 1; // number of iterations
53 Double_t fStartAnglePhi = TMath::Pi(); // starting angle for rotation
54 Double_t fConeAnglePhi = TMath::Pi(); // opening angle in phi for multiple rotation
55
58
59 ClassDef(PairAnalysisTrackRotator, 1) // Track rotation configuration
60};
61
62
63#endif
PairAnalysisTrackRotator & operator=(const PairAnalysisTrackRotator &c)
void SetRotationType(ERotationType type)
PairAnalysisTrackRotator(const PairAnalysisTrackRotator &c)
ERotationType GetRotationType() const