3 #include "StChargedPionJet.h"
6 #include "StChargedPionEvent.h"
7 #include "StChargedPionJetParticle.h"
13 StChargedPionJet::StChargedPionJet(
const StChargedPionJet& t) : TLorentzVector(t), mParticles(t.mParticles) {
15 mTpcCount = t.mTpcCount;
16 mBtowCount = t.mBtowCount;
17 mEtowCount = t.mEtowCount;
18 mTpcEtSum = t.mTpcEtSum;
19 mBtowEtSum = t.mBtowEtSum;
20 mEtowEtSum = t.mEtowEtSum;
21 mVertexZ = t.mVertexZ;
24 StChargedPionJet::~StChargedPionJet() {
28 void StChargedPionJet::Clear(Option_t * o) {
33 float StChargedPionJet::detectorEta()
const {
34 return this->detectorEta(mVertexZ);
37 float StChargedPionJet::detectorEta(
float vz,
float r)
const {
38 float hold(0.),denom(0.);
39 if (Theta()==TMath::PiOver2()) {
40 if (vz==0) {hold = TMath::PiOver2();}
41 else {hold = atan2(r,vz);}
45 denom = (r/tan(Theta()))+vz;
46 if (denom==0.) {hold = TMath::PiOver2();}
47 if (denom!=0.) {hold = atan2(r,denom);}
49 return -TMath::Log(TMath::Tan(hold/2));
52 bool StChargedPionJet::isTrigger(
unsigned int trigId)
const {
53 return mGeomTriggers & StChargedPionEvent::triggerBit(trigId);
56 void StChargedPionJet::addTrigger(
unsigned int trigId) {
57 mGeomTriggers |= StChargedPionEvent::triggerBit(trigId);
61 mParticles.push_back(*p);
66 for(
unsigned i=0; i< particles().size(); i++) {
67 if(!p) p = &(particles()[i]);
69 if(p->z(*
this) < particles()[i].z(*
this) )
70 p = &(particles()[i]);