Main Page   Class Hierarchy   Compound List   File List   Compound Members  

ATLASJ_Event.h

00001 #ifndef ATLASJ_ATLFAST_ATLASJ_EVENT_H
00002 #define ATLASJ_ATLFAST_ATLASJ_EVENT_H
00003 
00004 #include <TROOT.h>
00005 #include <TChain.h>
00006 #include <TFile.h>
00007 #include <vector>
00008 #include <string>
00009 #include "util/user_param.h"
00010 
00011 class Particle;
00012 
00014 class ATLASJ_Event {
00015 
00016  private:
00017   TTree          *fChain;   
00018   Int_t           fCurrent; 
00019 
00020   //Declaration of leaves types
00021  public:
00022   Int_t           Nrun;
00023   Int_t           Ievnt;
00024   Float_t         Wt;
00025   Int_t           Np;
00026   Int_t           Istgen[100];   //[Np]
00027   Int_t           Idgen[100];   //[Np]
00028   Int_t           Iddet[100];   //[Np]
00029   Float_t         Pgen[100][4];   //[Np]
00030   Float_t         Vgen[100][3];   //[Np]
00031   UInt_t          Posdet[100];   //[Np]
00032   Int_t           Posmo[100];   //[Np]
00033   Int_t           Nmu;
00034   UInt_t          Nisomu;
00035   Int_t           Chgmu[20];   //[Nmu]
00036   Int_t           Posmu[20];   //[Nmu]
00037   Float_t         Pmu[20][3];   //[Nmu]
00038   UInt_t          Trgmu[20];   //[Nmu]
00039   UInt_t          Clusmu[20];   //[Nmu]
00040   Int_t           Nel;
00041   Int_t           Chgel[20];   //[Nel]
00042   Int_t           Posel[20];   //[Nel]
00043   Float_t         Pel[20][3];   //[Nel]
00044   Int_t           Nph;
00045   Int_t           Posph[20];   //[Nph]
00046   Float_t         Pph[20][3];   //[Nph]
00047   Int_t           Njt;
00048   Int_t           Idjt[100];   //[Njt]
00049   Int_t           Posjt[100];   //[Njt]
00050   Float_t         Pjt[100][3];   //[Njt]
00051   Float_t         Etaini[100];   //[Njt]
00052   Float_t         Phiini[100];   //[Njt]
00053   Float_t         Pmiss[2];
00054   Float_t         Pnu[2];
00055   Float_t         Circ;
00056   Float_t         Thrust;
00057   Float_t         Oblat;
00058   UChar_t         Trig[10];
00059   Int_t           Ncel;
00060   Float_t         Etacel[1000];   //[Ncel]
00061   Float_t         Phicel[1000];   //[Ncel]
00062   Float_t         Ecel[1000];   //[Ncel]
00063   Int_t           Nclus;
00064   Float_t         Etaseed[50];   //[Nclus]
00065   Float_t         Phiseed[50];   //[Nclus]
00066   Float_t         Eclus[50];   //[Nclus]
00067   Int_t           Ntrck;
00068   Int_t           Postrck[500];   //[Ntrck]
00069   Float_t         D0det[500];   //[Ntrck]
00070   Float_t         Z0det[500];   //[Ntrck]
00071   Float_t         Ptrkdet[500][3];   //[Ntrck]
00072   Float_t         Qtrkdet[500];   //[Ntrck]
00073   Float_t         D0gen[500];   //[Ntrck]
00074   Float_t         Z0gen[500];   //[Ntrck]
00075   Float_t         Ptrkgen[500][3];   //[Ntrck]
00076   Float_t         Qtrkgen[500];   //[Ntrck]
00077 
00078  private:
00079   // List of branches
00080   TBranch        *b_Nrun;   
00081   TBranch        *b_Ievnt;   
00082   TBranch        *b_Wt;   
00083   TBranch        *b_Np;   
00084   TBranch        *b_Istgen;   
00085   TBranch        *b_Idgen;   
00086   TBranch        *b_Iddet;   
00087   TBranch        *b_Pgen;   
00088   TBranch        *b_Vgen;   
00089   TBranch        *b_Posdet;   
00090   TBranch        *b_Posmo;   
00091   TBranch        *b_Nmu;   
00092   TBranch        *b_Nisomu;   
00093   TBranch        *b_Chgmu;   
00094   TBranch        *b_Posmu;   
00095   TBranch        *b_Pmu;   
00096   TBranch        *b_Trgmu;   
00097   TBranch        *b_Clusmu;   
00098   TBranch        *b_Nel;   
00099   TBranch        *b_Chgel;   
00100   TBranch        *b_Posel;   
00101   TBranch        *b_Pel;   
00102   TBranch        *b_Nph;   
00103   TBranch        *b_Posph;   
00104   TBranch        *b_Pph;   
00105   TBranch        *b_Njt;   
00106   TBranch        *b_Idjt;   
00107   TBranch        *b_Posjt;   
00108   TBranch        *b_Pjt;   
00109   TBranch        *b_Etaini;   
00110   TBranch        *b_Phiini;   
00111   TBranch        *b_Pmiss;   
00112   TBranch        *b_Pnu;   
00113   TBranch        *b_Circ;   
00114   TBranch        *b_Thrust;   
00115   TBranch        *b_Oblat;   
00116   TBranch        *b_Trig;   
00117   TBranch        *b_Ncel;   
00118   TBranch        *b_Etacel;   
00119   TBranch        *b_Phicel;   
00120   TBranch        *b_Ecel;   
00121   TBranch        *b_Nclus;   
00122   TBranch        *b_Etaseed;   
00123   TBranch        *b_Phiseed;   
00124   TBranch        *b_Eclus;   
00125   TBranch        *b_Ntrck;   
00126   TBranch        *b_Postrck;   
00127   TBranch        *b_D0det;   
00128   TBranch        *b_Z0det;   
00129   TBranch        *b_Ptrkdet;   
00130   TBranch        *b_Qtrkdet;   
00131   TBranch        *b_D0gen;   
00132   TBranch        *b_Z0gen;   
00133   TBranch        *b_Ptrkgen;   
00134   TBranch        *b_Qtrkgen;   
00135 
00136  public:
00137   ATLASJ_Event() {};
00138   ATLASJ_Event(TTree *tree);
00139   ATLASJ_Event(int argc, char** argv);
00140   virtual ~ATLASJ_Event();
00141   void   Loop();
00142 
00143  private:
00144   Int_t  Cut(Int_t entry);
00145   Int_t  GetEntry(Int_t entry);
00146   Int_t  LoadTree(Int_t entry);
00147   void   Init(TTree *tree);
00148   Bool_t Notify();
00149   void   Show(Int_t entry = -1);
00150 
00151  protected:
00152   //
00153   // User analysis
00154   //
00156   virtual void Initialization() {};
00157 
00159   virtual void Doit() {};
00160 
00162   virtual void Finalization() {};  
00163   
00165   virtual std::string GetParam(const std::string&);
00166 
00168   virtual void ActivateInfo(const std::string&);
00169 
00171   virtual void DeactivateInfo(const std::string&);
00172 
00174   virtual void ActivateInfo();
00175 
00177   virtual void DeactivateInfo();
00178 
00180   virtual void ActivateMuon();
00181 
00183   virtual void DeactivateMuon();
00184 
00186   virtual void ActivateElec();
00187 
00189   virtual void DeactivateElec();
00190 
00192   virtual void ActivateGamma();
00193 
00195   virtual void DeactivateGamma();
00196 
00198   virtual void ActivateJet();
00199 
00201   virtual void DeactivateJet();
00202 
00204   virtual void ActivateTrk();
00205 
00207   virtual void DeactivateTrk();
00208 
00210   virtual void ActivateGen();
00211 
00213   virtual void DeactivateGen();
00214 
00216   virtual void ActivateMissPt();
00217 
00219   virtual void DeactivateMissPt();
00220 
00222   virtual void ActivateCell();
00223 
00225   virtual void DeactivateCell();
00226 
00228   virtual void ActivateOther();
00229 
00231   virtual void DeactivateOther();
00232 
00234   virtual void ActivateAll();
00235 
00237   virtual void DeactivateAll();
00238 
00239  private:
00240   Int_t indexRun;
00241   Int_t indexEvent;
00242   Double_t eventWeight;
00243   Int_t isMCFlag;
00244   Int_t modeMC;
00245   Int_t debugFlag;
00246   Int_t doSkim;
00247   std::vector<Particle*> MuonList;
00248   std::vector<Particle*> ElecList;
00249   std::vector<Particle*> GammaList;
00250   std::vector<Particle*> JetList;
00251   std::vector<Particle*> TrkList;
00252   std::vector<Particle*> GenList;
00253   std::vector<Particle*> CellList;
00254   Double_t missPx, missPy;
00255 
00256   Int_t isActivateInfo;
00257   Int_t isActivateMuon;
00258   Int_t isActivateElec;
00259   Int_t isActivateGamma;
00260   Int_t isActivateJet;
00261   Int_t isActivateTrk;
00262   Int_t isActivateMissPt;
00263   Int_t isActivateGen;
00264   Int_t isActivateCell;
00265   Int_t isActivateOther;
00266 
00267  public:
00269   const std::vector<Particle*> & GetMuonList() const { return MuonList; }
00270 
00272   std::vector<Particle*> & GetMuonList() { return MuonList; }
00273 
00275   const std::vector<Particle*> & GetElecList() const { return ElecList; }
00276 
00278   std::vector<Particle*> & GetElecList() { return ElecList; }
00279 
00281   const std::vector<Particle*> & GetGammaList() const { return GammaList; }
00282 
00284   std::vector<Particle*> & GetGammaList() { return GammaList; }
00285 
00287   const std::vector<Particle*> & GetJetList() const { return JetList; }
00288 
00290   std::vector<Particle*> & GetJetList() { return JetList; }
00291 
00293   const std::vector<Particle*> & GetTrkList() const { return TrkList; }
00294 
00296   std::vector<Particle*> & GetTrkList() { return TrkList; }
00297 
00299   const std::vector<Particle*> & GetGenList() const { return GenList; }
00300 
00302   std::vector<Particle*> & GetGenList() { return GenList; }
00303 
00305   const std::vector<Particle*> & GetCellList() const { return CellList; }
00306 
00308   std::vector<Particle*> & GetCellList() { return CellList; }
00309 
00311   double GetMissPx() const { return missPx; }
00312 
00314   double GetMissPy() const { return missPy; }
00315 
00317   int GetRunNumber() const { return indexRun; }
00318 
00320   int GetEventNumber() const { return indexEvent; }
00321 
00323   double GetEventWeight() const { return eventWeight; }
00324 
00326   int IsMC() const { return isMCFlag; }
00327 
00329   int GetModeMC() const { return modeMC; }
00330 
00332   int IsDebug() const { return debugFlag; }
00333 
00335   int IsSkim() const { return doSkim; }
00336 
00337   // sets debug flag
00338   void SetDebug(int f) { debugFlag = Int_t(f); }
00339 
00341   void SetSkim(int f) { doSkim = Int_t(f); }
00342 
00343   //
00344   // Don't need to modify them
00345   //
00346   virtual void FillEvent();
00347   virtual void DeleteEvent();
00348   virtual void DeleteList(std::vector<Particle*> &list);
00349   virtual void doCmdInfo(const std::vector<std::string> &strs);
00350 
00351  private:
00352   //
00353   // These lists have the same contents of the lists in the "protected" region.
00354   // They exist in order to delete all contents. (to avoid memory leaks)
00355   //
00356   std::vector<Particle*> cloneMuonList;
00357   std::vector<Particle*> cloneElecList;
00358   std::vector<Particle*> cloneGammaList;
00359   std::vector<Particle*> cloneJetList;
00360   std::vector<Particle*> cloneTrkList;
00361   std::vector<Particle*> cloneGenList;
00362   std::vector<Particle*> cloneCellList;
00363 
00364   TChain *m_chain;
00365   unsigned m_isTreename;
00366   std::vector<std::string> m_fileList;
00367   std::string m_output;
00368   int m_skimFlag;
00369   int m_begin_evt, m_end_evt;
00370   std::vector<User_Param> m_userParamList;
00371 
00372   std::string m_prefix;
00373 };
00374 
00375 #endif // ATLASJ_ATLFAST_ATLASJ_EVENT_H

Generated on Tue Apr 13 13:25:32 2004 for ATLAS JAPAN by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002