// ESAF : Euso Simulation and Analysis Framework // $Id: TrackDirection2Module.hh,v 1.4 2005/02/17 19:16:58 etaddei Exp $ // Author: elena Nov, 19 2004 /***************************************************************************** * ESAF: Euso Simulation and Analysis Framework * * * * Id: TrackDirection2Module * * Package: * * Coordinator: * * * *****************************************************************************/ #ifndef __TRACKDIRECTION2MODULE_HH_ #define __TRACKDIRECTION2MODULE_HH_ #include "euso.hh" #include "RecoModule.hh" #include class TDirectory; class RecoEvent; class RecoRootEvent; //////////////////////////////////////////////////////////////////////////////// // // // TrackDirection2Module // // // //////////////////////////////////////////////////////////////////////////////// struct ContainerData: public TObject { void Clear(); 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; 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; 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(); //different algorithm to reconstruct EAS direction void AA1(); void NE1(); void AA2(); void NE2(); void AE1(); void all(); Bool_t DoStat(vector err,string namemethod); //variabili riempite in Init() e lette dai file di configurazione Double_t fNumPointsMin; Int_t fNumHitsMinimum; Int_t fDoGraphUseShape; Double_t fErrAngle; Double_t HISS; Double_t fDoShapeSelection; Double_t fUseShapeSelectioninModules; Double_t fMethodIdentifier; Double_t fFixTmaxNumeric; Int_t fAA1done; Float_t fStat1,fStat2; Int_t fMulti1,fMulti2; ClassDef(TrackDirection2Module,0) }; #endif /* __TrackDirection2MODULE_HH_ */