/************************************************************************* * Copyright(c) 1998-2008, ALICE Experiment at CERN, All rights reserved. * * * * Author: The ALICE Off-line Project. * * Contributors are mentioned in the code where appropriate. * * * * Permission to use, copy, modify and distribute this software and its * * documentation strictly for non-commercial purposes is hereby granted * * without fee, provided that the above copyright notice appears in all * * copies and that both the copyright notice and this permission notice * * appear in the supporting documentation. The authors make no claims * * about the suitability of this software for any purpose. It is * * provided "as is" without express or implied warranty. * **************************************************************************/ #define AliFlowAnalysisWithLYZEventPlane_cxx // AliFlowLYZEventPlane: // // Class to calculate the event plane and event weight from the LYZ method // It needs input from the standard LYZ first and second run // author: N. van der Kolk (kolk@nikhef.nl) #include "Riostream.h" #include "TProfile.h" #include "TFile.h" #include "TComplex.h" #include "AliFlowVector.h" #include "AliFlowLYZConstants.h" #include "AliFlowEventSimple.h" #include "AliFlowLYZEventPlane.h" class AliFlowTrackSimple; ClassImp(AliFlowLYZEventPlane) //----------------------------------------------------------------------- AliFlowLYZEventPlane::AliFlowLYZEventPlane(): fSecondRunFile(0), fSecondRunFileName("noname.ESD"), fWR(0), fPsi(0), fSecondReDtheta(0), fSecondImDtheta(0), fFirstr0theta(0) { // Constructor. } //----------------------------------------------------------------------- AliFlowLYZEventPlane::~AliFlowLYZEventPlane() { //destructor } //----------------------------------------------------------------------- void AliFlowLYZEventPlane::Init() { //Declare histograms & get input files cout<<"---Lee Yang Zeros Event Plane Method---"<IsZombie()){ //check if file exists cout << "Error opening file, run first regular LYZ second run" << endl; exit(-1); } else if (fSecondRunFile->IsOpen()){ cout<<"----secondRunFile is open----"<Get("cobj1"); fSecondReDtheta = ( TProfile*)list->FindObject("Second_FlowPro_ReDtheta_LYZ"); fSecondImDtheta = ( TProfile*)list->FindObject("Second_FlowPro_ImDtheta_LYZ"); fFirstr0theta = ( TProfile*)list->FindObject("First_FlowPro_r0theta_LYZ"); } } //----------------------------------------------------------------------- void AliFlowLYZEventPlane::CalculateRPandW(AliFlowVector aQ) { //declare variables Int_t iNtheta = AliFlowLYZConstants::kTheta; Double_t dCosTerm = 0; Double_t dSinTerm = 0; TComplex cDtheta; TComplex cRatio; for (Int_t theta=0;thetaGetBinContent(theta+1); //cerr<<"dR0 = "<GetBinContent(theta+1); //cerr<<"dReDtheta = "<GetBinContent(theta+1); //cerr<<"dImDtheta = "<