PacEmc status -- Chih-hsiang Cheng 2008/07/24 o Current version is committed: revision 270 o PacEmcModel - Reads the config file to set up Emc geometry. PacCylDetector { ... ... ... ... emcBarrelBegin = 0.4695 emcBarrelEnd = 2.4574 emcBarrelNRings = 48 emcBarrelNPhis = 120 ... ... } PacConeDetector { emcFECBegin = 0.2757 emcFECEnd = 0.4690 emcFECNRings = 8 emcFECNPhis = 80, 80, 100, 100, 100, 120, 120, 120 } ** PacConeDetector is not defined yet. This config file uses it to set up forward endcap indexing. Barrel radius is determined from "radii" and "measures", i.e., the radius of measures = Emc. Geometry of Forward Endcap to be defined when PacConeDetector is defined. - Phi segmentation is uniform in both barrel and FEC. - Theta segmentation is uniform in FEC. - Theta segmemtation is not uniform in barrel because the distance varies a lot. - The segmentation in "pseudo-rapidity", eta, is roughly uniform. eta = -ln [ tan(theta/2) ] - Translation between crystal index and real (theat,phi) is done in PacEmcModel. - Use the static function PacEmcModel::getModel() to get the model. o PacEmcDigi and PacEmcCluster - To take the role of EmcDigi and EmcCluster in Babar (simplified, without calibration, data-flow info, etc) - Often-used moment calculations are imported too, and can be accessed to through PacEmcCluster. - PacEmcDigi uses PacEmcModel to translate index to real coordinates. o PacReconstructEmc - Contains a method returning a PacEmcCluster PacEmcCluster *PacReconstructEmc::makeEmcCluster(const PacSimTrack *simtrk) if simtrk intersects a detector element with measurementType()==PacMeasurement::Calor a cluster is created pelem->measurement()->createEmcCluster(*ihit,cluster); ------------- |-> a PacMeasurement o PacEmcClusterMeas - subclass of PacMeasurement - has a method to create a cluster virtual void createEmcCluster(const PacSimHit& hit, PacEmcCluster *cluster) const; Currently there is a trivial implementation for photons: Building a PacEmcCluster with one PacEmcDigi whose energy is exactly equal to incident momentum of PacSimHit. - The plan is to use this class to look up appropriate TTrees (library) to sample clusters. o Test job PacTest/testOneNeutral.cc - Run testOneNeutral ... ... Initial position (0.19,0.39,0.22) Initial momentum (1,0,0;1) [SimHit] SimHit 0: (109.999,0.39,0.22) effect 8 dmom 0.999882 element PacCylDetElem Create a new EMC model The EMC Model : Barrel radius is 110 cm Forward endcap begins at 0.2757 rad. Forward endcap ends at 0.469 rad. Barrel begins at 0.4695 rad. Barrel ends at 2.4574 rad. Forward endcap has 8 rings. which have 80 80 100 100 100 120 120 120 crystals. Barrel has 48 rings. each has 120 crystals. There are total of 820 crystals in the forward endcap. There are total of 5760 crystals in the barrel. 0xb704cdc0 0xb704cdc0 Found PacMeasurement::Calor hit position (109.999,0.39,0.22) 5020 35 0 PacEmcClusterMeas::createEmcCluster A PacEmcCluster: energy = 1 rawEnergy = 1 position = (109.942,2.87892,2.13706) (theta, phi)= 1.55137 , 0.0261799 nDigis = 1 PacEmcDigi: (35, 0) = (1.55137,0.0261799) @ (109.942,2.87892,2.13706) , Energy = 1 o Root class for storing cluster samples in the library class TEmcClusterLocal : public TObject { public: TEmcClusterLocal(); virtual ~TEmcClusterLocal(); void clear(); unsigned ndigis() { return _vphi.size(); } void setDigi(int theta, int phi, double energy) ; bool getDigi(unsigned n, int &theta, int &phi, double &energy); private: std::vector< int > _vphi; std::vector< int > _vtheta; std::vector< double > _venergy; ClassDef(TEmcClusterLocal,1) }; - Simple jobs confirm that we can store TEmcClusterLocal as events in a TTree and read it back.