13 from ROOT
import Belle2
21 """Module to save crystal information to dataframes"""
67 for idx
in range(8736):
79 self.
list_poslist_pos.append(np.array([x, y, z, phi, theta, phiid, thetaid]))
81 nn1 = np.array(self.
obj_neighbours1obj_neighbours1.getNeighbours(idx + 1))
82 nn1c = np.array(self.
obj_neighbours1Cobj_neighbours1C.getNeighbours(idx + 1))
97 nn2 = np.array(self.
obj_neighbours2obj_neighbours2.getNeighbours(idx + 1))
98 nn2c = np.array(self.
obj_neighbours2Cobj_neighbours2C.getNeighbours(idx + 1))
115 dfcoord = pd.DataFrame(data=self.
list_poslist_pos)
116 dfcoord.to_csv(
'crystals_coordinates.csv', index=
True, header=
False)
120 dfneighbours1.to_csv(
'crystals_neighbours1.csv', index=
True, header=
False)
122 dfneighbours1c.to_csv(
'crystals_neighbours1c.csv', index=
True, header=
False)
126 dfnneighbours1.to_csv(
'crystals_nneighbours1.csv', index=
True, header=
False)
128 dfnneighbours1c.to_csv(
'crystals_nneighbours1.csv', index=
True, header=
False)
132 dfneighbours2.to_csv(
'crystals_neighbours2.csv', index=
True, header=
False)
134 dfneighbours2c.to_csv(
'crystals_neighbours2c.csv', index=
True, header=
False)
138 dfnneighbours2.to_csv(
'crystals_nneighbours2.csv', index=
True, header=
False)
140 dfnneighbours2c.to_csv(
'crystals_nneighbours2c.csv', index=
True, header=
False)
144 dfneighbours1legacy.to_csv(
'crystals_neighbours1legacy.csv', index=
True, header=
False)
146 dfneighbours1clegacy.to_csv(
'crystals_neighbours1clegacy.csv', index=
True, header=
False)
150 dfnneighbours1legacy.to_csv(
'crystals_nneighbours1legacy.csv', index=
True, header=
False)
152 dfnneighbours1clegacy.to_csv(
'crystals_nneighbours1clegacy.csv', index=
True, header=
False)
156 dfneighbours2legacy.to_csv(
'crystals_neighbours2legacy.csv', index=
True, header=
False)
158 dfneighbours2clegacy.to_csv(
'crystals_neighbours2clegacy.csv', index=
True, header=
False)
162 dfnneighbours2legacy.to_csv(
'crystals_nneighbours2legacy.csv', index=
True, header=
False)
164 dfnneighbours2clegacy.to_csv(
'crystals_nneighbours2clegacy.csv', index=
True, header=
False)
171 main_path = basf2.create_path()
173 main_path.add_module(
'EventInfoSetter', expList=[1003])
174 main_path.add_module(
'Gearbox')
175 main_path.add_module(
'Geometry')
176 printCrystals = printCrystals()
177 main_path.add_module(printCrystals)
179 basf2.process(main_path)
180 print(basf2.statistics)
static ECLGeometryPar * Instance()
Static method to get a reference to the ECLGeometryPar instance.
Class to get the neighbours for a given cell id.