1mm scintillating fibre tracker
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

308 lines
11 KiB

3 years ago
  1. //////////////////////////////////////////////////////////
  2. // This class has been automatically generated on
  3. // Tue Apr 21 13:01:22 2020 by ROOT version 6.12/06
  4. // from TTree DetectedPhotons/Photons detected at the detector strip.
  5. // found on file: outFile_1.root
  6. //////////////////////////////////////////////////////////
  7. #ifndef myanalysis_h
  8. #define myanalysis_h
  9. #include <TROOT.h>
  10. #include <TChain.h>
  11. #include <TFile.h>
  12. #include <vector>
  13. //#ifdef __MAKECINT__
  14. //#pragma link C++ class vector<float>+;
  15. //#pragma link C++ class vector<int>+;
  16. //#endif
  17. // Header file for the classes stored in the TTree if any.
  18. class myanalysis {
  19. public :
  20. TTree *fChain; //!pointer to the analyzed TTree or TChain
  21. Int_t fCurrent; //!current Tree number in a TChain
  22. // Fixed size dimensions of array or collections stored in the TTree if any.
  23. // Declaration of leaf types
  24. Float_t runID;
  25. Float_t eventID;
  26. Float_t detNumb;
  27. Float_t xPixel;
  28. Float_t yPixel;
  29. Float_t energy;
  30. Float_t wavelength;
  31. Float_t localtime;
  32. Float_t abstime;
  33. Float_t length;
  34. Float_t x;
  35. Float_t y;
  36. Float_t z;
  37. Float_t px;
  38. Float_t py;
  39. Float_t pz;
  40. Float_t vertexX;
  41. Float_t vertexY;
  42. Float_t vertexZ;
  43. Float_t vertexPx;
  44. Float_t vertexPy;
  45. Float_t vertexPz;
  46. Float_t gpsPosX;
  47. Float_t gpsPosY;
  48. Float_t gpsPosZ;
  49. Float_t gpsDirX;
  50. Float_t gpsDirY;
  51. Float_t gpsDirZ;
  52. Int_t runId;
  53. Int_t eventId;
  54. Int_t trackId;
  55. Int_t creatorProcess;
  56. Int_t parentId;
  57. Int_t reflMirr;
  58. Int_t reflSurf;
  59. Int_t reflTotalCladClad;
  60. Int_t reflTotalCoreClad;
  61. Int_t reflFresnelCladClad;
  62. Int_t reflFresnelCoreClad;
  63. Int_t refracCladClad;
  64. Int_t refracCoreClad;
  65. Int_t rayleighScatterings;
  66. Float_t lengthInCore;
  67. Float_t lengthInInnerCladding;
  68. Float_t lengthInOuterCladding;
  69. Int_t detectorCopy;
  70. Int_t subdetectorCopy;
  71. // List of branches
  72. TBranch *b_runID; //!
  73. TBranch *b_eventID; //!
  74. TBranch *b_detNumb; //!
  75. TBranch *b_xPixel; //!
  76. TBranch *b_yPixel; //!
  77. TBranch *b_energy; //!
  78. TBranch *b_wavelength; //!
  79. TBranch *b_localtime; //!
  80. TBranch *b_abstime; //!
  81. TBranch *b_length; //!
  82. TBranch *b_x; //!
  83. TBranch *b_y; //!
  84. TBranch *b_z; //!
  85. TBranch *b_px; //!
  86. TBranch *b_py; //!
  87. TBranch *b_pz; //!
  88. TBranch *b_vertexX; //!
  89. TBranch *b_vertexY; //!
  90. TBranch *b_vertexZ; //!
  91. TBranch *b_vertexPx; //!
  92. TBranch *b_vertexPy; //!
  93. TBranch *b_vertexPz; //!
  94. TBranch *b_gpsPosX; //!
  95. TBranch *b_gpsPosY; //!
  96. TBranch *b_gpsPosZ; //!
  97. TBranch *b_runId; //!
  98. TBranch *b_eventId; //!
  99. TBranch *b_trackId; //!
  100. TBranch *b_creatorProcess; //!
  101. TBranch *b_parentId; //!
  102. TBranch *b_reflMirr; //!
  103. TBranch *b_reflSurf; //!
  104. TBranch *b_reflTotalCladClad; //!
  105. TBranch *b_reflTotalCoreClad; //!
  106. TBranch *b_reflFresnelCladClad; //!
  107. TBranch *b_reflFresnelCoreClad; //!
  108. TBranch *b_refracCladClad; //!
  109. TBranch *b_refracCoreClad; //!
  110. TBranch *b_rayleighScatterings; //!
  111. TBranch *b_lengthInCore; //!
  112. TBranch *b_lengthInInnerCladding; //!
  113. TBranch *b_lengthInOuterCladding; //!
  114. TBranch *b_detectorCopy; //!
  115. TBranch *b_subdetectorCopy; //!
  116. myanalysis(TTree *tree=0);
  117. virtual ~myanalysis();
  118. virtual Int_t Cut(Long64_t entry);
  119. virtual Int_t GetEntry(Long64_t entry);
  120. virtual Long64_t LoadTree(Long64_t entry);
  121. virtual void Init(TTree *tree);
  122. virtual void Loop();
  123. virtual Bool_t Notify();
  124. virtual void Show(Long64_t entry = -1);
  125. std::vector<float> runID_vec;
  126. std::vector<float> eventID_vec;
  127. std::vector<float> detNumb_vec;
  128. std::vector<float> xPixel_vec;
  129. std::vector<float> yPixel_vec;
  130. std::vector<float> energy_vec;
  131. std::vector<float> wavelength_vec;
  132. std::vector<float> localtime_vec;
  133. std::vector<float> abstime_vec;
  134. std::vector<float> length_vec;
  135. std::vector<float> x_vec;
  136. std::vector<float> y_vec;
  137. std::vector<float> z_vec;
  138. std::vector<float> px_vec;
  139. std::vector<float> py_vec;
  140. std::vector<float> pz_vec;
  141. std::vector<float> vertexX_vec;
  142. std::vector<float> vertexY_vec;
  143. std::vector<float> vertexZ_vec;
  144. std::vector<float> vertexPx_vec;
  145. std::vector<float> vertexPy_vec;
  146. std::vector<float> vertexPz_vec;
  147. std::vector<float> gpsPosX_vec;
  148. std::vector<float> gpsPosY_vec;
  149. std::vector<float> gpsPosZ_vec;
  150. std::vector<float> gpsDirX_vec;
  151. std::vector<float> gpsDirY_vec;
  152. std::vector<float> gpsDirZ_vec;
  153. std::vector<int> runId_vec;
  154. std::vector<int> eventId_vec;
  155. std::vector<int> trackId_vec;
  156. std::vector<int> creatorProcess_vec;
  157. std::vector<int> parentId_vec;
  158. std::vector<int> reflMirr_vec;
  159. std::vector<int> reflSurf_vec;
  160. std::vector<int> reflTotalCladClad_vec;
  161. std::vector<int> reflTotalCoreClad_vec;
  162. std::vector<int> reflFresnelCladClad_vec;
  163. std::vector<int> reflFresnelCoreClad_vec;
  164. std::vector<int> refracCladClad_vec;
  165. std::vector<int> refracCoreClad_vec;
  166. std::vector<int> rayleighScatterings_vec;
  167. std::vector<float> lengthInCore_vec;
  168. std::vector<float> lengthInInnerCladding_vec;
  169. std::vector<float> lengthInOuterCladding_vec;
  170. std::vector<int> detectorCopy_vec;
  171. std::vector<int> subdetectorCopy_vec;
  172. };
  173. #endif
  174. #ifdef myanalysis_cxx
  175. myanalysis::myanalysis(TTree *tree) : fChain(0)
  176. {
  177. // if parameter tree is not specified (or zero), connect the file
  178. // used to generate this class and read the Tree.
  179. if (tree == 0) {
  180. TFile *f = (TFile*)gROOT->GetListOfFiles()->FindObject("outFile_1.root");
  181. if (!f || !f->IsOpen()) {
  182. f = new TFile("outFile_1.root");
  183. }
  184. f->GetObject("DetectedPhotons",tree);
  185. }
  186. Init(tree);
  187. }
  188. myanalysis::~myanalysis()
  189. {
  190. if (!fChain) return;
  191. delete fChain->GetCurrentFile();
  192. }
  193. Int_t myanalysis::GetEntry(Long64_t entry)
  194. {
  195. // Read contents of entry.
  196. if (!fChain) return 0;
  197. return fChain->GetEntry(entry);
  198. }
  199. Long64_t myanalysis::LoadTree(Long64_t entry)
  200. {
  201. // Set the environment to read one entry
  202. if (!fChain) return -5;
  203. Long64_t centry = fChain->LoadTree(entry);
  204. if (centry < 0) return centry;
  205. if (fChain->GetTreeNumber() != fCurrent) {
  206. fCurrent = fChain->GetTreeNumber();
  207. Notify();
  208. }
  209. return centry;
  210. }
  211. void myanalysis::Init(TTree *tree)
  212. {
  213. // The Init() function is called when the selector needs to initialize
  214. // a new tree or chain. Typically here the branch addresses and branch
  215. // pointers of the tree will be set.
  216. // It is normally not necessary to make changes to the generated
  217. // code, but the routine can be extended by the user if needed.
  218. // Init() will be called many times when running on PROOF
  219. // (once per file to be processed).
  220. // Set branch addresses and branch pointers
  221. if (!tree) return;
  222. fChain = tree;
  223. fCurrent = -1;
  224. fChain->SetMakeClass(1);
  225. fChain->SetBranchAddress("runID", &runID, &b_runID);
  226. fChain->SetBranchAddress("eventID", &eventID, &b_eventID);
  227. fChain->SetBranchAddress("detNumb", &detNumb, &b_detNumb);
  228. fChain->SetBranchAddress("xPixel", &xPixel, &b_xPixel);
  229. fChain->SetBranchAddress("yPixel", &yPixel, &b_yPixel);
  230. fChain->SetBranchAddress("energy", &energy, &b_energy);
  231. fChain->SetBranchAddress("wavelength", &wavelength, &b_wavelength);
  232. fChain->SetBranchAddress("localtime", &localtime, &b_localtime);
  233. fChain->SetBranchAddress("abstime", &abstime, &b_abstime);
  234. fChain->SetBranchAddress("length", &length, &b_length);
  235. fChain->SetBranchAddress("x", &x, &b_x);
  236. fChain->SetBranchAddress("y", &y, &b_y);
  237. fChain->SetBranchAddress("z", &z, &b_z);
  238. fChain->SetBranchAddress("px", &px, &b_px);
  239. fChain->SetBranchAddress("py", &py, &b_py);
  240. fChain->SetBranchAddress("pz", &pz, &b_pz);
  241. fChain->SetBranchAddress("vertexX", &vertexX, &b_vertexX);
  242. fChain->SetBranchAddress("vertexY", &vertexY, &b_vertexY);
  243. fChain->SetBranchAddress("vertexZ", &vertexZ, &b_vertexZ);
  244. fChain->SetBranchAddress("vertexPx", &vertexPx, &b_vertexPx);
  245. fChain->SetBranchAddress("vertexPy", &vertexPy, &b_vertexPy);
  246. fChain->SetBranchAddress("vertexPz", &vertexPz, &b_vertexPz);
  247. fChain->SetBranchAddress("gpsPosX", &gpsPosX, &b_gpsPosX);
  248. fChain->SetBranchAddress("gpsPosY", &gpsPosY, &b_gpsPosY);
  249. fChain->SetBranchAddress("gpsPosZ", &gpsPosZ, &b_gpsPosZ);
  250. fChain->SetBranchAddress("runId", &runId, &b_runId);
  251. fChain->SetBranchAddress("eventId", &eventId, &b_eventId);
  252. fChain->SetBranchAddress("trackId", &trackId, &b_trackId);
  253. fChain->SetBranchAddress("creatorProcess", &creatorProcess, &b_creatorProcess);
  254. fChain->SetBranchAddress("parentId", &parentId, &b_parentId);
  255. fChain->SetBranchAddress("lengthInCore", &lengthInCore, &b_lengthInCore);
  256. fChain->SetBranchAddress("lengthInInnerCladding", &lengthInInnerCladding, &b_lengthInInnerCladding);
  257. fChain->SetBranchAddress("lengthInOuterCladding", &lengthInOuterCladding, &b_lengthInOuterCladding);
  258. fChain->SetBranchAddress("detectorCopy", &detectorCopy, &b_detectorCopy);
  259. fChain->SetBranchAddress("subdetectorCopy", &subdetectorCopy, &b_subdetectorCopy);
  260. Notify();
  261. }
  262. Bool_t myanalysis::Notify()
  263. {
  264. // The Notify() function is called when a new file is opened. This
  265. // can be either for a new TTree in a TChain or when when a new TTree
  266. // is started when using PROOF. It is normally not necessary to make changes
  267. // to the generated code, but the routine can be extended by the
  268. // user if needed. The return value is currently not used.
  269. return kTRUE;
  270. }
  271. void myanalysis::Show(Long64_t entry)
  272. {
  273. // Print contents of entry.
  274. // If entry is not specified, print current entry
  275. if (!fChain) return;
  276. fChain->Show(entry);
  277. }
  278. Int_t myanalysis::Cut(Long64_t entry)
  279. {
  280. // This function may be called from Loop.
  281. // returns 1 if entry is accepted.
  282. // returns -1 otherwise.
  283. return 1;
  284. }
  285. #endif // #ifdef myanalysis_cxx