// ESAF : Euso Simulation and Analysis Framework // $Id: TrackDirection2Module.hh,v 1.8 2005/06/23 07:31:42 pesce Exp $ // Author: elena Nov, 19 2004 /***************************************************************************** * ESAF: Euso Simulation and Analysis Framework * * * * Id: TrackDirection2Module * * Package: Fitting * * Coordinator: * * * *****************************************************************************/ #ifndef __TRACKDIRECTION2MODULE_HH_ #define __TRACKDIRECTION2MODULE_HH_ #include "euso.hh" #include "RecoModule.hh" #include class TDirectory; class RecoEvent; class RecoRootEvent; //////////////////////////////////////////////////////////////////////////////// // // // TrackDirection2Module // // // // Reconstruction module devoted to the search of the direction of the EAS // // track. // // In this version are implemented four different algorithms numerical and // // analytical, exact and approximate. // // For further details see the comments to the code and the documentation. // // // //////////////////////////////////////////////////////////////////////////////// struct ContainerData: public TObject { void Clear(); vector fPixXYZ; vector fPos; vector fErr; vector fSpPos; vector fSpErr; vector fSpPosSel; vector fTime; vector fTimeSel; vector fAlpha; vector fSigmaPhi; vector fSigmaTheta; vector fSigmaPhiSel; vector fSigmaThetaSel; vector fHits; vector fHitsSel; Int_t fNumPoints; Int_t fNumHits; TVector3 fCentroid; TVector3 fMedDir; TVector3 VectorRmax; Double_t fMedTime,fMedAlpha; Int_t fApparentTimeLenght; Double_t fGtuLength; ClassDef(ContainerData,0) }; class TrackDirection2Module : public RecoModule { public: TrackDirection2Module();// ctor virtual ~TrackDirection2Module();// dtor Bool_t Init();// Init method: called at the beginning of a run Bool_t PreProcess();// called before each event process Bool_t Process( RecoEvent* );// event processing Bool_t PostProcess();// called after processing an event virtual Bool_t SaveRootData( RecoRootEvent* );// save root output Bool_t Done();// called at the end of each run void UserMemoryClean();// memory clean ContainerData fData; EsafConfigClass(Reco, TrackDirection2Module) private: RecoEvent *fEv; vector fPointsId; vector vecDeltaEASDir; vector vecDeltaEASDirAA1; vector vecDeltaEASDirAA2; vector vecDeltaEASDirNE1; vector vecDeltaEASDirNE2; vector vecDeltaEASDirAE1; vector vecDeltaTDP; Int_t fNumPoints; Int_t fNumHits; Int_t fNumPointsSel; Int_t fNumHitsSel; Int_t fQuality; Int_t fRecoEventsCounter; TVector3 fCentroid; TVector3 fNorm; TVector3 fNormsel; TVector3 fW; TVector3 fU; TVector3 fTrueDir; TVector3 fTrueNorm; TVector3 fTrueMax; TVector3 fEASDir; Double_t fAngularSpeed; Double_t fBeta,fBetaInit; Double_t fHmax, fRmax; Double_t fTrueTheta,fTruePhi; Double_t fTHETAloc,fTHETAreco,fPHIreco; Double_t fTmaxFit; Double_t fDeltaTheta,fDeltaPhi,fDeltaEASDir,fDeltaTDP; Double_t fDeltaEASDirAA1,fTHETArecoAA1,fPHIrecoAA1; Double_t fDeltaEASDirAA2,fTHETArecoAA2,fPHIrecoAA2; Double_t fDeltaEASDirNE1,fTHETArecoNE1,fPHIrecoNE1; Double_t fDeltaEASDirNE2,fTHETArecoNE2,fPHIrecoNE2; Double_t fDeltaEASDirAE1,fTHETArecoAE1,fPHIrecoAE1; Double_t FindHmax( Double_t theta ); Double_t CalculateRmax( Double_t hmax ); void CalculatefromBetaEASdir(); void FindPlane(); void UseShapeandFindPlane(); void UseHoughandFindPlane(); //different algorithms to reconstruct EAS direction void AA1(); void NE1(); void AA2(); void NE2(); void AE1(); void all(); // statistics of the reconstructed events void DoStat(vector err,string namemethod); //variables read by Init() and from config files Int_t fNumPointsMin; Int_t fNumHitsMinimum; Bool_t fDoGraphUseShape; Bool_t fDoHough; Bool_t fOptionSelectionHough; Double_t fErrAngle; Double_t fHISS; // space station altitude Bool_t fDoShapeSelection; Bool_t fUseShapeSelectioninModules; Int_t fMethodIdentifier; Bool_t fFixTmaxNumeric; Bool_t fAA1done; // true if the AA1module is already done Bool_t fAA1nan; // true if the AA1 method returns a nan Float_t fStat1,fStat2; Float_t fMulti1,fMulti2; Bool_t useLFplane, useMFplane, useHFplane; // fit method for TDP Bool_t useLFaa1, useMFaa1, useHFaa1; // fit method in AA1 Bool_t fDebugInfo; // if true compute and display some debug infos // useful methods for math-geometrical calculus Double_t DeltaX(Double_t, Double_t, Double_t, Double_t); Double_t DeltaY(Double_t, Double_t, Double_t, Double_t); // gtu time-length in microseconds Double_t fGtuLength; Int_t fMinuitOutputLevel; // output level for TMinuit ClassDef(TrackDirection2Module,0) }; #endif /* __TrackDirection2MODULE_HH_ */