ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitEdm/DataFormats/src/DecayPart.cc
Revision: 1.3
Committed: Thu Jul 31 13:29:35 2008 UTC (16 years, 9 months ago) by bendavid
Content type: text/plain
Branch: MAIN
CVS Tags: MITHEP_2_0_x
Changes since 1.2: +4 -64 lines
Log Message:
Cleaned up MitEdm classes

File Contents

# User Rev Content
1 bendavid 1.3 // $Id: DecayPart.cc,v 1.2 2008/07/29 22:52:55 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.3 DecayPart::DecayPart(int pid, DecayType decayType) :
10     BasePart (pid),
11 loizides 1.1 decayType_ (decayType),
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 bendavid 1.2 position_ (0,0,0)
35 loizides 1.1 {
36     }
37    
38     void DecayPart::print(ostream &os) const
39     {
40 bendavid 1.3 os << " DecayPart::print - pid: " << pid_ << " mass: " << mass()
41 loizides 1.1 << " decayType: " << decayType_ << endl
42     << " Decays to \n";
43 bendavid 1.2 for (BasePartBaseRefVector::const_iterator ip=children_.begin(); ip!=children_.end(); ip++) {
44 loizides 1.1 os << " "; (*ip)->print(os);
45     }
46     os << " -- end decays to -------\n";
47     os << " Vertex fit (c2,ndof,prob): " << chi2() << ", " << ndof() << ", " << prob() << "\n\n" ;
48     }
49    
50     void DecayPart::doAction(BasePartAction *action) const
51     {
52    
53     if (action->getActionType() == BasePartAction::NonRecursive) {
54     action->doAction(this);
55     return;
56     }
57    
58     if (action->getActionType() == BasePartAction::TopDown)
59     action->doAction(this);
60    
61 bendavid 1.2 for (BasePartBaseRefVector::const_iterator ip=children_.begin(); ip!=children_.end(); ip++) {
62     action->incLevel(); (ip->get())->doAction(action); action->decLevel();
63 loizides 1.1 }
64    
65     if (action->getActionType() == BasePartAction::BottomUp)
66     action->doAction(this);
67    
68     return;
69     }