StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
EEmcParticleCandidate.cxx
1 /*
2  * Created by S. Gliske, May 2012
3  *
4  * Description: see header.
5  *
6  */
7 
8 // z location of the EEMC SMD layer in cm
9 #define SMDZ 279.542
10 
11 #include "StRoot/StEEmcPool/./EEmcTreeContainers/EEmcParticleCandidate.h"
12 #include "StRoot/StEEmcPool/./EEmcTreeContainers/EEmcHit.h"
13 
14 EEmcParticleCandidate_t::EEmcParticleCandidate_t( Int_t hitIdx_, const EEmcHit_t& hit, TVector3& vertex ) :
15  PID(1000), hitIdx1(hitIdx_), E(hit.eTow), M(0), PT(0),
16  position( hit.x, hit.y, SMDZ ),
17  momentum( (position-vertex).Unit()*E )
18 {
19  // invalid vertex, assume vertex at the origin
20  if( vertex.Z() < -300 )
21  momentum = position.Unit()*E;
22 
23  // do this after above check
24  PT = momentum.Perp();
25 };
26 
27 ClassImp( EEmcParticleCandidate_t );
28 
29 /*
30  * $Id: EEmcParticleCandidate.cxx,v 1.1 2012/11/26 19:04:30 sgliske Exp $
31  * $Log: EEmcParticleCandidate.cxx,v $
32  * Revision 1.1 2012/11/26 19:04:30 sgliske
33  * moved from offline/users/sgliske/StRoot/StEEmcPool/EEmcTreeContainers to StRoot/StEEmcPool/EEmcTreeContainers
34  *
35  *
36  */