14 #include "StEStructEvent.h"
15 #include "StEStructTrack.h"
16 #include "StEStructCentrality.h"
18 #include "PhysicalConstants.h"
28 fTracks =
new TClonesArray(
"StEStructTrack", 1200);
31 mTrackCollectionM =
new StEStructTrackCollection();
32 mTrackCollectionP =
new StEStructTrackCollection();
41 mEventTime = e.EventTime();
48 mZDCCoincidence = e.ZDCCoincidence();
50 StEStructTrack::BField = e.BField();
52 fTracks =
new TClonesArray(
"StEStructTrack", 1200);
53 for(
int i=0;i<e.Ntrack();i++){
58 mTrackCollectionM =
new StEStructTrackCollection();
59 mTrackCollectionP =
new StEStructTrackCollection();
60 FillChargeCollections();
67 StEStructEvent::~StEStructEvent(){
87 TClonesArray &tracks = *fTracks;
93 void StEStructEvent::Clear(Option_t *option) {
95 mTrackCollectionP->Clear();
96 mTrackCollectionM->Clear();
97 fTracks->Clear(option);
103 void StEStructEvent::FillChargeCollections(){
109 int time = mEventTime;
115 for(
int i=0;i<num;i++){
117 if(!aTrack->isComplete()){
118 aTrack->FillTransientData();
119 aTrack->FillTpcReferencePoints();
120 aTrack->SetComplete();
123 if(aTrack->Charge()==-1){
124 TrackCollectionM()->push_back(aTrack);
125 }
else if(aTrack->Charge()==1){
126 TrackCollectionP()->push_back(aTrack);
128 cout<<
" Track Charge = "<<aTrack->Charge()<<endl;
136 StEStructTrackCollection * StEStructEvent::TrackCollectionM()
const {
return mTrackCollectionM;};
137 StEStructTrackCollection * StEStructEvent::TrackCollectionP()
const {
return mTrackCollectionP;};
140 TVector2 StEStructEvent::Q() {
144 Float_t mQx=0., mQy=0.;
170 double order = (double)(harN + 1);
172 StEStructTrackIterator itr;
173 for (itr = TrackCollectionM()->begin();
174 itr != TrackCollectionM()->end(); itr++) {
179 Float_t phi = pFlowTrack->Phi();
181 mQx += phiWgt * cos(phi * order);
182 mQy += phiWgt * sin(phi * order);
185 for (itr = TrackCollectionP()->begin();
186 itr != TrackCollectionP()->end(); itr++) {
189 Float_t phi = pFlowTrack->Phi();
191 mQx += phiWgt * cos(phi * order);
192 mQy += phiWgt * sin(phi * order);
202 void StEStructEvent::CalculatePsi() {
207 float order = (float)(harN + 1);
213 psi= mQ.Phi() / order;
214 if (psi < 0.) { psi += twopi / order; }
223 Float_t StEStructEvent::Psi() {
228 void StEStructEvent::ShiftPhi() {
232 StEStructTrackIterator itr;
233 for (itr = TrackCollectionM()->begin();
234 itr != TrackCollectionM()->end(); itr++) {
236 Float_t phi = pTrack->Phi();
238 if(phi<-pi) {phi += twopi;}
241 for (itr = TrackCollectionP()->begin();
242 itr != TrackCollectionP()->end(); itr++) {
244 Float_t phi = pTrack->Phi();
246 if(phi<-pi) {phi += twopi;}
253 void StEStructEvent::SetPhiWgt(
const char* weightFile) {
254 TFile* tf=
new TFile(weightFile);
255 TString hname(
"PhiWgt");
256 mPhiWgt = (TH1F *) tf->Get(hname.Data());
StEStructEvent()
Phi weights.