--- PamelaLevel2/inc/PamLevel2.h 2007/10/26 09:08:50 1.29 +++ PamelaLevel2/inc/PamLevel2.h 2007/11/05 13:10:13 1.30 @@ -48,6 +48,166 @@ using namespace std; + +///////////////////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////////////////// +/** + * \brief Class to describe GP output (to be moved to PamelaDigitizer) + * + */ + +class GPamela : public TObject { + + private: + + public: + + // Declaration of leave types + Int_t Irun; + Int_t Ievnt; + Int_t Ipa; + Float_t X0; + Float_t Y0; + Float_t Z0; + Float_t Theta; + Float_t Phi; + Float_t P0; + Int_t Nthtof; + UChar_t Ipltof[100]; //[Nthtof] + UChar_t Ipaddle[100]; //[Nthtof] + UChar_t Ipartof[100]; //[Nthtof] + Float_t Xintof[100]; //[Nthtof] + Float_t Yintof[100]; //[Nthtof] + Float_t Zintof[100]; //[Nthtof] + Float_t Xouttof[100]; //[Nthtof] + Float_t Youttof[100]; //[Nthtof] + Float_t Zouttof[100]; //[Nthtof] + Float_t Ereltof[100]; //[Nthtof] + Float_t Timetof[100]; //[Nthtof] + Float_t Pathtof[100]; //[Nthtof] + Float_t P0tof[100]; //[Nthtof] + Int_t Nthcat; + UChar_t Iparcat[50]; //[Nthcat] + UChar_t Icat[50]; //[Nthcat] + Float_t Xincat[50]; //[Nthcat] + Float_t Yincat[50]; //[Nthcat] + Float_t Zincat[50]; //[Nthcat] + Float_t Xoutcat[50]; //[Nthcat] + Float_t Youtcat[50]; //[Nthcat] + Float_t Zoutcat[50]; //[Nthcat] + Float_t Erelcat[50]; //[Nthcat] + Float_t Timecat[50]; //[Nthcat] + Float_t Pathcat[50]; //[Nthcat] + Float_t P0cat[50]; //[Nthcat] + Int_t Nthcas; + UChar_t Iparcas[50]; //[Nthcas] + UChar_t Icas[50]; //[Nthcas] + Float_t Xincas[50]; //[Nthcas] + Float_t Yincas[50]; //[Nthcas] + Float_t Zincas[50]; //[Nthcas] + Float_t Xoutcas[50]; //[Nthcas] + Float_t Youtcas[50]; //[Nthcas] + Float_t Zoutcas[50]; //[Nthcas] + Float_t Erelcas[50]; //[Nthcas] + Float_t Timecas[50]; //[Nthcas] + Float_t Pathcas[50]; //[Nthcas] + Float_t P0cas[50]; //[Nthcas] + Int_t Nthspe; + UChar_t Iparspe[100]; //[Nthspe] + UChar_t Itrpb[100]; //[Nthspe] + UChar_t Itrsl[100]; //[Nthspe] + UChar_t Itspa[100]; //[Nthspe] + Float_t Xinspe[100]; //[Nthspe] + Float_t Yinspe[100]; //[Nthspe] + Float_t Zinspe[100]; //[Nthspe] + Float_t Xoutspe[100]; //[Nthspe] + Float_t Youtspe[100]; //[Nthspe] + Float_t Zoutspe[100]; //[Nthspe] + Float_t Xavspe[100]; //[Nthspe] + Float_t Yavspe[100]; //[Nthspe] + Float_t Zavspe[100]; //[Nthspe] + Float_t Erelspe[100]; //[Nthspe] + Float_t Pathspe[100]; //[Nthspe] + Float_t P0spe[100]; //[Nthspe] + UChar_t Nxmult[100]; //[Nthspe] + UChar_t Nymult[100]; //[Nthspe] + Int_t Nstrpx; + UChar_t Npstripx[1000]; //[Nstrpx] + UChar_t Ntstripx[1000]; //[Nstrpx] + UShort_t Istripx[1000]; //[Nstrpx] + //UInt_t Istripx[1000]; //[Nstrpx] + Float_t Qstripx[1000]; //[Nstrpx] + Float_t Xstripx[1000]; //[Nstrpx] + Int_t Nstrpy; + UChar_t Npstripy[1000]; //[Nstrpy] + UChar_t Ntstripy[1000]; //[Nstrpy] + UShort_t Istripy[1000]; //[Nstrpy] + //UInt_t Istripy[1000]; //[Nstrpy] + Float_t Qstripy[1000]; //[Nstrpy] + Float_t Ystripy[1000]; //[Nstrpy] + Int_t Nthcali; + UChar_t Icaplane[4224]; //[Nthcali] + UChar_t Icastrip[4224]; //[Nthcali] + Int_t Icamod[4224]; //[Nthcali] + Float_t Enestrip[4224]; //[Nthcali] + Int_t Nthcal; + UChar_t Icapl[1000]; //[Nthcal] + UChar_t Icasi[1000]; //[Nthcal] + UChar_t Icast[1000]; //[Nthcal] + Float_t Xincal[1000]; //[Nthcal] + Float_t Yincal[1000]; //[Nthcal] + Float_t Zincal[1000]; //[Nthcal] + Float_t Erelcal[1000]; //[Nthcal] + Int_t Nthnd; + UChar_t Itubend[200]; //[Nthnd] + UChar_t Iparnd[200]; //[Nthnd] + Float_t Xinnd[200]; //[Nthnd] + Float_t Yinnd[200]; //[Nthnd] + Float_t Zinnd[200]; //[Nthnd] + Float_t Xoutnd[200]; //[Nthnd] + Float_t Youtnd[200]; //[Nthnd] + Float_t Zoutnd[200]; //[Nthnd] + Float_t Erelnd[200]; //[Nthnd] + Float_t Timend[200]; //[Nthnd] + Float_t Pathnd[200]; //[Nthnd] + Float_t P0nd[200]; //[Nthnd] + Int_t Nthcard; + UChar_t Iparcard[100]; //[Nthcard] + UChar_t Icard[100]; //[Nthcard] + Float_t Xincard[100]; //[Nthcard] + Float_t Yincard[100]; //[Nthcard] + Float_t Zincard[100]; //[Nthcard] + Float_t Xoutcard[100]; //[Nthcard] + Float_t Youtcard[100]; //[Nthcard] + Float_t Zoutcard[100]; //[Nthcard] + Float_t Erelcard[100]; //[Nthcard] + Float_t Timecard[100]; //[Nthcard] + Float_t Pathcard[100]; //[Nthcard] + Float_t P0card[100]; //[Nthcard] + + GPamela(){ Clear(); }; +// ~GPamela(){ Delete(); }; + ~GPamela(){ Clear(); }; + + void Clear(); + void Delete(); + void SetBranchAddress( TChain* ); + void SetBranchAddress( TTree* t){ SetBranchAddress( (TChain*)t );}; + + GPamela* GetGPamela(){return this;}; + + ClassDef(GPamela,1); + +}; +///////////////////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////////////////// + + + /** * \brief Class to describe particle tracks in the apparatus, including tracker and track-related variables from other detectors (calorimeter and TOF). * @@ -156,7 +316,7 @@ TTree* pam_tree_clone[NCLONES]; // -------------------------------------------- - // variables to store Level0 info (if required) + // variables to store Level1-2 info // -------------------------------------------- TrkLevel1* trk1_obj; TrkLevel2* trk2_obj; @@ -172,6 +332,11 @@ GL_RUN* run_obj; SoftInfo* soft_obj; // Emiliano + // -------------------------------------------- + // variables to handle GP + // -------------------------------------------- + GPamela* gp_obj; + // ----------------------------------- // variables to sort the track // ----------------------------------- @@ -181,9 +346,9 @@ TString howtosort; Float_t sortthr; - // ----- - // flags - // ----- + // -------------------------------------- + // flags to load level0-1-2 trees/braches + // -------------------------------------- Bool_t CAL2; //level2 branch Bool_t CAL1; //level1 branch Bool_t CAL0; //yoda @@ -202,12 +367,14 @@ Bool_t AC; Bool_t ORB; - Bool_t RUN; - - Bool_t ISGP; //GP simulation - + Bool_t GP; //GP simulation tree - Int_t SELLI; //trees of selected events (there is a selection list) + // ----------- + // other flags + // ----------- + Bool_t RUN; // RunInfo tree + Bool_t ISGP; // GP simulation (...sort of patch, to skip OBT check, since OrbitalInfo is sometime missing) + Int_t SELLI; // tree of selected events (there is a selection list) void Initialize(); @@ -304,6 +471,7 @@ OrbitalInfo *GetOrbitalInfo(){ return orb_obj; }; GL_RUN *GetRunInfo() { return run_obj; }; SoftInfo *GetSoftInfo() { return soft_obj; }; // Emiliano + GPamela *GetGPamela() { return gp_obj; }; // ============================================== // methods to retrieve subdetectors stored tracks