40 likes | 105 Views
Changes to l3tCalUnpTool: L3TCalPos. All Position and Et information has been removed from the L3TCalUnp class, and moved to a new class called L3TCalPos . L3TCalPos must be used in conjunction with the L3 calorimeter unpacker.
E N D
Changes to l3tCalUnpTool: L3TCalPos • All Position and Et information has been removed from the L3TCalUnp class, and moved to a new class called L3TCalPos. L3TCalPosmust be used in conjunction with the L3 calorimeter unpacker. • L3TCalPos caches position information for multiple ( ~10 ) simultaneous vertices to minimize access times. • L3TCalUnp manages the contents of the L3TCalPos cache at the end of every event, reducing the size of the cache if it gets too large by removing the least used vertices. As a result, instances of L3TCalPos can not be held across events, but must be instantiated anew for each event. This is not a serious overhead, as the front end of the class has a small footprint. • Any method that uses the L3TCalPos class must be called after the cal unpacker L3TCalUnp::DoThisTool
L3TCalPos: Example Usage In your DoThisTool() method: L3TCalPos cpos; cpos.SetVertex(0., 0.2, -2.1); // Alternatively, these two steps can be combined in one L3TCalPos cpos2(0., 0.2, -2.1); // Get the Cartesian position of a cell float x,y,z; float *pcell = &L3TCalUnp::CalUnpData[2][23][19]; cpos.Position(pcell,x,y,z); // Get the energy weighted position float wx, wy, wz; cpos.WeightedPosition(pcell,wx,wy,wz) // Get the theta float theta = cpos.Theta(pcell); // Sort all towers in L3TCalUnp::CalUnpEt by Et. l3vector sorted_towers = cpos.SortByEt();
L3TCalPos: Useful methods L3TCalPos(); // uses origin as vertex L3TCalPos(float x, float y, float z); // set vertex to (x,y,z) void SetVertex(float x, float y, float z); // Set vertex void Vertex(float &x, float &y, float &z) const; // Get vertex // Cartesian position of cell or tower(vector sum of cells) void Position(const float *, float &x, float &y, float &z) const; // Energy weighted position of cell or tower void WeightedPosition(const float *, float &x, float &y, float &z) const; float Et(const float*) const; // Transverse energy float Theta(const float*) const; float Eta(const float*) const; float Phi(const float*) const; float R(const float*) const; l3vector<float*>& SortByEt(); // Sort towers by Et void SortCellsByEt(l3vector<float*>&); // Sort cells by Et // Print out info about stored vertices and cache static void Info();
Tentative Release Schedule • 02/08/2001: Announcement - l3tCalPos v00-04-00 • 02/19/2001: Included in build t01.34.00