Revision: | 1.6 |
Committed: | Fri Oct 3 23:53:49 2008 UTC (16 years, 7 months ago) by loizides |
Content type: | text/plain |
Branch: | MAIN |
CVS Tags: | Mit_032, Mit_031, Mit_025c_branch2, Mit_025c_branch1, Mit_030, Mit_029c, Mit_029b, Mit_030_pre1, Mit_029a, Mit_029, Mit_029_pre1, Mit_028a, Mit_025c_branch0, Mit_028, Mit_027a, Mit_027, Mit_026, Mit_025e, Mit_025d, Mit_025c, Mit_025b, Mit_025a, Mit_025, Mit_025pre2, Mit_024b, Mit_025pre1, Mit_024a, Mit_024, Mit_023, Mit_022a, Mit_022, Mit_020d, TMit_020d, Mit_020c, Mit_021, Mit_021pre2, Mit_021pre1, Mit_020b, Mit_020a, Mit_020, Mit_020pre1, Mit_018, Mit_017, Mit_017pre3, Mit_017pre2, Mit_017pre1, V07-05-00, Mit_016, Mit_015b, Mit_015a, Mit_015, Mit_014e, Mit_014d, Mit_014c, Mit_014b, ConvRejection-10-06-09, Mit_014a, Mit_014, Mit_014pre3, Mit_014pre2, Mit_014pre1, Mit_013d, Mit_013c, Mit_013b, Mit_013a, Mit_013, Mit_013pre1, Mit_012i, Mit_012h, Mit_012g, Mit_012f, Mit_012e, Mit_012d, Mit_012c, Mit_012b, Mit_012a, Mit_012, Mit_011a, Mit_011, Mit_010a, Mit_010, Mit_009c, Mit_009b, Mit_009a, Mit_009, Mit_008, Mit_008pre2, Mit_008pre1, Mit_006b, Mit_006a, Mit_006, Mit_005, HEAD |
Branch point for: | Mit_025c_branch |
Changes since 1.5: | +4 -2 lines |
Log Message: | Cosmetics and coding conventions. |
# | User | Rev | Content |
---|---|---|---|
1 | loizides | 1.6 | // $Id: DecayPart.cc,v 1.5 2008/09/30 12:57:43 bendavid Exp $ |
2 | loizides | 1.1 | |
3 | #include "MitEdm/DataFormats/interface/BasePartAction.h" | ||
4 | #include "MitEdm/DataFormats/interface/DecayPart.h" | ||
5 | |||
6 | using namespace std; | ||
7 | using namespace mitedm; | ||
8 | |||
9 | bendavid | 1.5 | DecayPart::DecayPart() : |
10 | BasePart (0), | ||
11 | decayType_ (Fast), | ||
12 | prob_ (0), | ||
13 | chi2_ (0), | ||
14 | ndof_ (0), | ||
15 | fittedMass_ (0), | ||
16 | fittedMassError_(0), | ||
17 | lxy_ (0), | ||
18 | lxyError_ (0), | ||
19 | lxyToPv_ (0), | ||
20 | lxyToPvError_ (0), | ||
21 | dxy_ (0), | ||
22 | dxyError_ (0), | ||
23 | dxyToPv_ (0), | ||
24 | dxyToPvError_ (0), | ||
25 | lz_ (0), | ||
26 | lzError_ (0), | ||
27 | lzToPv_ (0), | ||
28 | lzToPvError_ (0), | ||
29 | cTau_ (0), | ||
30 | cTauError_ (0), | ||
31 | pt_ (0), | ||
32 | ptError_ (0), | ||
33 | fourMomentum_ (0,0,0,0), | ||
34 | position_ (0,0,0) | ||
35 | { | ||
36 | } | ||
37 | |||
38 | DecayPart::DecayPart(int pid) : | ||
39 | BasePart (pid), | ||
40 | decayType_ (Fast), | ||
41 | prob_ (0), | ||
42 | chi2_ (0), | ||
43 | ndof_ (0), | ||
44 | fittedMass_ (0), | ||
45 | fittedMassError_(0), | ||
46 | lxy_ (0), | ||
47 | lxyError_ (0), | ||
48 | lxyToPv_ (0), | ||
49 | lxyToPvError_ (0), | ||
50 | dxy_ (0), | ||
51 | dxyError_ (0), | ||
52 | dxyToPv_ (0), | ||
53 | dxyToPvError_ (0), | ||
54 | lz_ (0), | ||
55 | lzError_ (0), | ||
56 | lzToPv_ (0), | ||
57 | lzToPvError_ (0), | ||
58 | cTau_ (0), | ||
59 | cTauError_ (0), | ||
60 | pt_ (0), | ||
61 | ptError_ (0), | ||
62 | fourMomentum_ (0,0,0,0), | ||
63 | position_ (0,0,0) | ||
64 | { | ||
65 | } | ||
66 | |||
67 | bendavid | 1.3 | DecayPart::DecayPart(int pid, DecayType decayType) : |
68 | BasePart (pid), | ||
69 | loizides | 1.1 | decayType_ (decayType), |
70 | prob_ (0), | ||
71 | chi2_ (0), | ||
72 | ndof_ (0), | ||
73 | fittedMass_ (0), | ||
74 | fittedMassError_(0), | ||
75 | lxy_ (0), | ||
76 | lxyError_ (0), | ||
77 | lxyToPv_ (0), | ||
78 | lxyToPvError_ (0), | ||
79 | dxy_ (0), | ||
80 | dxyError_ (0), | ||
81 | dxyToPv_ (0), | ||
82 | dxyToPvError_ (0), | ||
83 | lz_ (0), | ||
84 | lzError_ (0), | ||
85 | lzToPv_ (0), | ||
86 | lzToPvError_ (0), | ||
87 | cTau_ (0), | ||
88 | cTauError_ (0), | ||
89 | pt_ (0), | ||
90 | ptError_ (0), | ||
91 | fourMomentum_ (0,0,0,0), | ||
92 | bendavid | 1.2 | position_ (0,0,0) |
93 | loizides | 1.1 | { |
94 | } | ||
95 | |||
96 | void DecayPart::print(ostream &os) const | ||
97 | { | ||
98 | bendavid | 1.3 | os << " DecayPart::print - pid: " << pid_ << " mass: " << mass() |
99 | loizides | 1.1 | << " decayType: " << decayType_ << endl |
100 | << " Decays to \n"; | ||
101 | bendavid | 1.5 | for (int i=0; i<nChild(); ++i) { |
102 | os << " "; getDaughterPtr(i)->print(os); | ||
103 | loizides | 1.1 | } |
104 | os << " -- end decays to -------\n"; | ||
105 | os << " Vertex fit (c2,ndof,prob): " << chi2() << ", " << ndof() << ", " << prob() << "\n\n" ; | ||
106 | } | ||
107 | |||
108 | void DecayPart::doAction(BasePartAction *action) const | ||
109 | { | ||
110 | |||
111 | if (action->getActionType() == BasePartAction::NonRecursive) { | ||
112 | action->doAction(this); | ||
113 | return; | ||
114 | } | ||
115 | |||
116 | if (action->getActionType() == BasePartAction::TopDown) | ||
117 | action->doAction(this); | ||
118 | |||
119 | bendavid | 1.5 | for (int i=0; i<nChild(); ++i) { |
120 | loizides | 1.6 | action->incLevel(); |
121 | getDaughterPtr(i)->doAction(action); | ||
122 | action->decLevel(); | ||
123 | loizides | 1.1 | } |
124 | |||
125 | if (action->getActionType() == BasePartAction::BottomUp) | ||
126 | action->doAction(this); | ||
127 | |||
128 | return; | ||
129 | } |