Line | |
---|
1 | #ifndef MARS_MSrcPosFromStars
|
---|
2 | #define MARS_MSrcPosFromStars
|
---|
3 |
|
---|
4 | #ifndef ROOT_TArrayF
|
---|
5 | #include "TArrayF.h"
|
---|
6 | #endif
|
---|
7 |
|
---|
8 | #ifndef ROOT_TMath
|
---|
9 | #include "TMath.h"
|
---|
10 | #endif
|
---|
11 |
|
---|
12 | #ifndef MARS_MSrcPlace
|
---|
13 | #include "MSrcPlace.h"
|
---|
14 | #endif
|
---|
15 |
|
---|
16 | class MStarLocalCam;
|
---|
17 | class MSrcPosCam;
|
---|
18 |
|
---|
19 | class MSrcPosFromStars : public MSrcPlace
|
---|
20 | {
|
---|
21 | private:
|
---|
22 |
|
---|
23 | MStarLocalCam *fStars;
|
---|
24 |
|
---|
25 | UInt_t fNumStars;
|
---|
26 | TArrayF fDistances;
|
---|
27 |
|
---|
28 | virtual Int_t ComputeNewSrcPosition();
|
---|
29 | virtual Int_t PreProcess(MParList *plist);
|
---|
30 |
|
---|
31 | public:
|
---|
32 |
|
---|
33 | MSrcPosFromStars(const char *name=NULL, const char *title=NULL);
|
---|
34 |
|
---|
35 |
|
---|
36 | // This fuction is to compute the probability using a ring distribution
|
---|
37 | Double_t Prob(Double_t d, Double_t dist, Double_t sigma)
|
---|
38 | {
|
---|
39 | return TMath::Exp(-(d-dist)*(d-dist)/(2*sigma*sigma));///(sigma*TMath::Sqrt(2*3.141592654));
|
---|
40 | }
|
---|
41 |
|
---|
42 | Double_t Dist(Double_t x1, Double_t x2, Double_t y1, Double_t y2)
|
---|
43 | {
|
---|
44 | return TMath::Sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2));
|
---|
45 | }
|
---|
46 |
|
---|
47 | void SetDistances(TArrayF dist) { fDistances = dist; }
|
---|
48 |
|
---|
49 | ClassDef(MSrcPosFromStars, 0) // task to calculate the position of the source using the position of stars
|
---|
50 | };
|
---|
51 |
|
---|
52 | #endif
|
---|
Note:
See
TracBrowser
for help on using the repository browser.