//////////////////////////////////////////////////////////
// This class has been automatically generated on
// Tue Apr 21 13:01:22 2020 by ROOT version 6.12/06
// from TTree DetectedPhotons/Photons detected at the detector strip.
// found on file: outFile_1.root
//////////////////////////////////////////////////////////

#ifndef myanalysis_h
#define myanalysis_h

#include <TROOT.h>
#include <TChain.h>
#include <TFile.h>
#include <vector>

//#ifdef __MAKECINT__
//#pragma link C++ class vector<float>+;
//#pragma link C++ class vector<int>+;
//#endif

// Header file for the classes stored in the TTree if any.

class myanalysis {
public :
   TTree          *fChain;   //!pointer to the analyzed TTree or TChain
   Int_t           fCurrent; //!current Tree number in a TChain

// Fixed size dimensions of array or collections stored in the TTree if any.

   // Declaration of leaf types
   Float_t   runID;		        
   Float_t   eventID;		        
   Float_t   detNumb;		        
   Float_t   xPixel;		        
   Float_t   yPixel;		        
   Float_t   energy;		        
   Float_t   wavelength;		        
   Float_t   localtime;		        
   Float_t   abstime;		        
   Float_t   length;		        
   Float_t   x;			        
   Float_t   y;			        
   Float_t   z;			        
   Float_t   px;			        
   Float_t   py;			        
   Float_t   pz;			        
   Float_t   vertexX;		        
   Float_t   vertexY;		        
   Float_t   vertexZ;		        
   Float_t   vertexPx;		        
   Float_t   vertexPy;		        
   Float_t   vertexPz;		        
   Float_t   gpsPosX;		        
   Float_t   gpsPosY;		        
   Float_t   gpsPosZ;		        
   Float_t   gpsDirX;		        
   Float_t   gpsDirY;		        
   Float_t   gpsDirZ;		        
   Int_t     runId;		        
   Int_t     eventId;		        
   Int_t     trackId;		        
   Int_t     creatorProcess;	        
   Int_t     parentId;		        
   Int_t     reflMirr;		        
   Int_t     reflSurf;		        
   Int_t     reflTotalCladClad;	        
   Int_t     reflTotalCoreClad;	        
   Int_t     reflFresnelCladClad;	        
   Int_t     reflFresnelCoreClad;	        
   Int_t     refracCladClad;	        
   Int_t     refracCoreClad;	        
   Int_t     rayleighScatterings;	        
   Float_t   lengthInCore;	        
   Float_t   lengthInInnerCladding;       
   Float_t   lengthInOuterCladding;       
   Int_t     detectorCopy;	        
   Int_t     subdetectorCopy;             

   // List of branches
   TBranch        *b_runID;   //!
   TBranch        *b_eventID;   //!
   TBranch        *b_detNumb;   //!
   TBranch        *b_xPixel;   //!
   TBranch        *b_yPixel;   //!
   TBranch        *b_energy;   //!
   TBranch        *b_wavelength;   //!
   TBranch        *b_localtime;   //!
   TBranch        *b_abstime;   //!
   TBranch        *b_length;   //!
   TBranch        *b_x;   //!
   TBranch        *b_y;   //!
   TBranch        *b_z;   //!
   TBranch        *b_px;   //!
   TBranch        *b_py;   //!
   TBranch        *b_pz;   //!
   TBranch        *b_vertexX;   //!
   TBranch        *b_vertexY;   //!
   TBranch        *b_vertexZ;   //!
   TBranch        *b_vertexPx;   //!
   TBranch        *b_vertexPy;   //!
   TBranch        *b_vertexPz;   //!
   TBranch        *b_gpsPosX;   //!
   TBranch        *b_gpsPosY;   //!
   TBranch        *b_gpsPosZ;   //!
   TBranch        *b_runId;   //!
   TBranch        *b_eventId;   //!
   TBranch        *b_trackId;   //!
   TBranch        *b_creatorProcess;   //!
   TBranch        *b_parentId;   //!
   TBranch        *b_reflMirr;   //!
   TBranch        *b_reflSurf;   //!
   TBranch        *b_reflTotalCladClad;   //!
   TBranch        *b_reflTotalCoreClad;   //!
   TBranch        *b_reflFresnelCladClad;   //!
   TBranch        *b_reflFresnelCoreClad;   //!
   TBranch        *b_refracCladClad;   //!
   TBranch        *b_refracCoreClad;   //!
   TBranch        *b_rayleighScatterings;   //!
   TBranch        *b_lengthInCore;   //!
   TBranch        *b_lengthInInnerCladding;   //!
   TBranch        *b_lengthInOuterCladding;   //!
   TBranch        *b_detectorCopy;   //!
   TBranch        *b_subdetectorCopy;   //!

   myanalysis(TTree *tree=0);
   virtual ~myanalysis();
   virtual Int_t    Cut(Long64_t entry);
   virtual Int_t    GetEntry(Long64_t entry);
   virtual Long64_t LoadTree(Long64_t entry);
   virtual void     Init(TTree *tree);
   virtual void     Loop();
   virtual Bool_t   Notify();
   virtual void     Show(Long64_t entry = -1);

   
   std::vector<float>         runID_vec;
   std::vector<float>         eventID_vec;
   std::vector<float>         detNumb_vec;
   std::vector<float>         xPixel_vec;
   std::vector<float>         yPixel_vec;
   std::vector<float>         energy_vec;
   std::vector<float>         wavelength_vec;
   std::vector<float>         localtime_vec;
   std::vector<float>         abstime_vec;
   std::vector<float>         length_vec;
   std::vector<float>         x_vec;
   std::vector<float>         y_vec;
   std::vector<float>         z_vec;
   std::vector<float>         px_vec;
   std::vector<float>         py_vec;
   std::vector<float>         pz_vec;
   std::vector<float>         vertexX_vec;
   std::vector<float>         vertexY_vec;
   std::vector<float>         vertexZ_vec;
   std::vector<float>         vertexPx_vec;
   std::vector<float>         vertexPy_vec;
   std::vector<float>         vertexPz_vec;
   std::vector<float>         gpsPosX_vec;
   std::vector<float>         gpsPosY_vec;
   std::vector<float>         gpsPosZ_vec;
   std::vector<float>         gpsDirX_vec;
   std::vector<float>         gpsDirY_vec;
   std::vector<float>         gpsDirZ_vec;
   std::vector<int>           runId_vec;
   std::vector<int>           eventId_vec;
   std::vector<int>           trackId_vec;
   std::vector<int>           creatorProcess_vec;
   std::vector<int>           parentId_vec;
   std::vector<int>           reflMirr_vec;
   std::vector<int>           reflSurf_vec;
   std::vector<int>           reflTotalCladClad_vec;
   std::vector<int>           reflTotalCoreClad_vec;
   std::vector<int>           reflFresnelCladClad_vec;
   std::vector<int>           reflFresnelCoreClad_vec;
   std::vector<int>           refracCladClad_vec;
   std::vector<int>           refracCoreClad_vec;
   std::vector<int>           rayleighScatterings_vec;
   std::vector<float>         lengthInCore_vec;
   std::vector<float>         lengthInInnerCladding_vec;
   std::vector<float>         lengthInOuterCladding_vec;
   std::vector<int>           detectorCopy_vec;
   std::vector<int>           subdetectorCopy_vec;
   
};

#endif

#ifdef myanalysis_cxx
myanalysis::myanalysis(TTree *tree) : fChain(0) 
{
// if parameter tree is not specified (or zero), connect the file
// used to generate this class and read the Tree.
   if (tree == 0) {
      TFile *f = (TFile*)gROOT->GetListOfFiles()->FindObject("outFile_1.root");
      if (!f || !f->IsOpen()) {
         f = new TFile("outFile_1.root");
      }
      f->GetObject("DetectedPhotons",tree);

   }
   Init(tree);
}

myanalysis::~myanalysis()
{
   if (!fChain) return;
   delete fChain->GetCurrentFile();
}

Int_t myanalysis::GetEntry(Long64_t entry)
{
// Read contents of entry.
   if (!fChain) return 0;
   return fChain->GetEntry(entry);
}
Long64_t myanalysis::LoadTree(Long64_t entry)
{
// Set the environment to read one entry
   if (!fChain) return -5;
   Long64_t centry = fChain->LoadTree(entry);
   if (centry < 0) return centry;
   if (fChain->GetTreeNumber() != fCurrent) {
      fCurrent = fChain->GetTreeNumber();
      Notify();
   }
   return centry;
}

void myanalysis::Init(TTree *tree)
{
   // The Init() function is called when the selector needs to initialize
   // a new tree or chain. Typically here the branch addresses and branch
   // pointers of the tree will be set.
   // It is normally not necessary to make changes to the generated
   // code, but the routine can be extended by the user if needed.
   // Init() will be called many times when running on PROOF
   // (once per file to be processed).

   // Set branch addresses and branch pointers
   if (!tree) return;
   fChain = tree;
   fCurrent = -1;
   fChain->SetMakeClass(1);

   fChain->SetBranchAddress("runID", &runID, &b_runID);
   fChain->SetBranchAddress("eventID", &eventID, &b_eventID);
   fChain->SetBranchAddress("detNumb", &detNumb, &b_detNumb);
   fChain->SetBranchAddress("xPixel", &xPixel, &b_xPixel);
   fChain->SetBranchAddress("yPixel", &yPixel, &b_yPixel);
   fChain->SetBranchAddress("energy", &energy, &b_energy);
   fChain->SetBranchAddress("wavelength", &wavelength, &b_wavelength);
   fChain->SetBranchAddress("localtime", &localtime, &b_localtime);
   fChain->SetBranchAddress("abstime", &abstime, &b_abstime);
   fChain->SetBranchAddress("length", &length, &b_length);
   fChain->SetBranchAddress("x", &x, &b_x);
   fChain->SetBranchAddress("y", &y, &b_y);
   fChain->SetBranchAddress("z", &z, &b_z);
   fChain->SetBranchAddress("px", &px, &b_px);
   fChain->SetBranchAddress("py", &py, &b_py);
   fChain->SetBranchAddress("pz", &pz, &b_pz);
   fChain->SetBranchAddress("vertexX", &vertexX, &b_vertexX);
   fChain->SetBranchAddress("vertexY", &vertexY, &b_vertexY);
   fChain->SetBranchAddress("vertexZ", &vertexZ, &b_vertexZ);
   fChain->SetBranchAddress("vertexPx", &vertexPx, &b_vertexPx);
   fChain->SetBranchAddress("vertexPy", &vertexPy, &b_vertexPy);
   fChain->SetBranchAddress("vertexPz", &vertexPz, &b_vertexPz);
   fChain->SetBranchAddress("gpsPosX", &gpsPosX, &b_gpsPosX);
   fChain->SetBranchAddress("gpsPosY", &gpsPosY, &b_gpsPosY);
   fChain->SetBranchAddress("gpsPosZ", &gpsPosZ, &b_gpsPosZ);
   fChain->SetBranchAddress("runId", &runId, &b_runId);
   fChain->SetBranchAddress("eventId", &eventId, &b_eventId);
   fChain->SetBranchAddress("trackId", &trackId, &b_trackId);
   fChain->SetBranchAddress("creatorProcess", &creatorProcess, &b_creatorProcess);
   fChain->SetBranchAddress("parentId", &parentId, &b_parentId);
   fChain->SetBranchAddress("lengthInCore", &lengthInCore, &b_lengthInCore);
   fChain->SetBranchAddress("lengthInInnerCladding", &lengthInInnerCladding, &b_lengthInInnerCladding);
   fChain->SetBranchAddress("lengthInOuterCladding", &lengthInOuterCladding, &b_lengthInOuterCladding);
   fChain->SetBranchAddress("detectorCopy", &detectorCopy, &b_detectorCopy);
   fChain->SetBranchAddress("subdetectorCopy", &subdetectorCopy, &b_subdetectorCopy);
   Notify();
}

Bool_t myanalysis::Notify()
{
   // The Notify() function is called when a new file is opened. This
   // can be either for a new TTree in a TChain or when when a new TTree
   // is started when using PROOF. It is normally not necessary to make changes
   // to the generated code, but the routine can be extended by the
   // user if needed. The return value is currently not used.

   return kTRUE;
}

void myanalysis::Show(Long64_t entry)
{
// Print contents of entry.
// If entry is not specified, print current entry
   if (!fChain) return;
   fChain->Show(entry);
}
Int_t myanalysis::Cut(Long64_t entry)
{
// This function may be called from Loop.
// returns  1 if entry is accepted.
// returns -1 otherwise.
   return 1;
}
#endif // #ifdef myanalysis_cxx
