// ESAF : Euso Simulation and Analysis Framework // $Id: ProfileModule.hh,v 1.4 2005/10/19 17:52:05 moreggia Exp $ // Author: Anne Stutz Jun, 6 2005 /***************************************************************************** * ESAF: Euso Simulation and Analysis Framework * * * * Id: ProfileModule * * Package: * * Coordinator: * * * *****************************************************************************/ #ifndef __PROFILEMODULE_HH_ #define __PROFILEMODULE_HH_ #include "euso.hh" #include "RecoModule.hh" #include "EarthVector.hh" #include "TArrayD.h" #include "TAxis.h" #include class RecoEvent; class RecoRootEvent; //////////////////////////////////////////////////////////////////////////////// // // // ProfileModule // // // // // // // //////////////////////////////////////////////////////////////////////////////// class ProfileModule : public RecoModule { public: // ctor ProfileModule(); // dtor virtual ~ProfileModule(); // Init method: called at the beginning of a run Bool_t Init(); // called before each event process Bool_t PreProcess(); // event processing Bool_t Process( RecoEvent* ); // called after processing an event Bool_t PostProcess(); // save root output virtual Bool_t SaveRootData( RecoRootEvent* ); // called at the end of each run Bool_t Done(); // memory clean void UserMemoryClean(); // load previous modules void LoadModules(); // transform photons on pupil to photons emitted isotropically at shower track void MakeFluoAtTrack(); // calculate number of charged particles in each depth bin void LightToSize(); // Get track coordinate corresponding to a given time on pupil Double_t GetTrackCoordinate(Double_t t_on_p); EsafConfigClass(Reco,ProfileModule) private: inline void SetArraysSize( Int_t size ); inline void SetFluoMaxPos(const EarthVector&); inline Double_t GetFluoHmax() const {return fFluoMaxPos.Zv();} inline const EarthVector& EUSO() const {return fEUSO;} inline Double_t EusoRadius() const {return fEusoRadius;} inline Double_t EusoOmega(const EarthVector& v); // fit fluo profile on pupil, parameters stored in fPar void FitFluoOnPupil(); // fit shower profile, with required parametrization // GHF, GIL, GFA parametrizations available void FitShowerProfile(string type); // Get fluo mean transmission Double_t FluoMeanTransmission(const EarthVector& pos); RecoEvent *fEvent; // informations from previous modules Double_t fTheta; // local zenith angle (not in MES) Double_t fPhi; EarthVector fFluoMaxPos; //TArrayD fPhOnPupil; TAxis fGtuAxis; Int_t fNGtu; // fluo on pupil TH1F* fFluoPhP; // Xaxis in microseconds Double_t fTmin; // low edge of first GTU Double_t fTmax; // up edge of last GTU Double_t fTimeAtMax; // time of fluo profile maximum // parameters for 3D reco EarthVector fEUSO; // detector position Double_t fEusoRadius; // detector radius EarthVector fTrackDir; // shower track 3D-direction (in MES) EarthVector fImpactParameter; // position of shower impact parameter (on the track) Double_t fLhmax; // dist(EUSO,Fluomax) Double_t fLh; // shower impact parameter Double_t fSh; // shower impact parameter position, expressed in tracklength coordinate Double_t fShmax; // FluoMax position, expressed in tracklength coordinate // Photons at Track TH1F* fFluoAtTrack; // Xaxis in km (see line below) TArrayD fFluoAtTrack_array; // in km //TArrayD fPhFluoOnPupil; // Nb of charged at particles TH1F* fShowerSize; // Xaxis in g/cm2 (see line below) TArrayD fShowerSize_array; // in g/cm2 string fPrimaryType; // for shower profile fit // initialisation parameters string fPrevious; // data origin (simu truth data, reco data) string fParamFormula; // parametrization used to fit shower profile // results Double_t fNmax; // reco shower maximum amplitude Double_t fXmax; // reco depth of maximum Double_t fSigma; // reco sigma if GFA used Double_t fX0; // reco X0 if GHF used Double_t fLambda; // reco lambda if GHF used Double_t fChiSquare; // Chi2 value ClassDef(ProfileModule,0) }; // inline functions //_____________________________________________________________________________ inline void ProfileModule::SetArraysSize( Int_t size ) { // // // //fPhOnPupil.Set(size); //fPhFluoOnPupil.Set(size); fFluoAtTrack_array.Set(size); fShowerSize_array.Set(size); } //_____________________________________________________________________________ // inline functions inline void ProfileModule::SetFluoMaxPos(const EarthVector& pos) { // // // fFluoMaxPos.SetXYZ(pos.X(),pos.Y(),pos.Z()); } //_____________________________________________________________________________ inline Double_t ProfileModule::EusoOmega(const EarthVector& v) { // // // EarthVector inter = EUSO() - v; return TMath::Pi()*fEusoRadius*fEusoRadius*cos(inter.Theta())/inter.Mag2(); } #endif /* __PROFILEMODULE_HH_ */