Ejemplo n.º 1
0
void testClosestCells() 
{
   HcalHardcodeGeometryLoader l;
   HcalHardcodeGeometryLoader::ReturnType g = l .load();
   // make sure each cel is its own closest cell
   HcalDetId barrelDet(HcalBarrel, 1, 1, 1);
   HcalDetId barrelDet2(HcalBarrel, 16, 50, 1);
   HcalDetId endcapDet1(HcalEndcap, -17, 72, 1);
   HcalDetId endcapDet2(HcalEndcap, 29, 35, 1);
   HcalDetId forwardDet1(HcalForward, 30, 71, 1);
   HcalDetId forwardDet3(HcalForward, -40, 71, 1);

   testClosestCell( barrelDet  , g );
   testClosestCell( barrelDet2 , g );
   testClosestCell( endcapDet1 , g );
   testClosestCell( endcapDet2 , g );
   testClosestCell( forwardDet1, g );
   testClosestCell( forwardDet3, g );

   const std::vector<DetId>& ids=g->getValidDetIds(DetId::Hcal,HcalBarrel);
   for (std::vector<DetId>::const_iterator i=ids.begin(); i!=ids.end(); i++) 
   {
      testClosestCell( HcalDetId(*i), g );
   }
}
Ejemplo n.º 2
0
void
testClosestCells( HcalTopology& topology )
{
    edm::FileInPath fp("Geometry/HcalTowerAlgo/test/runHcalGeometryAnalyzer_cfg.py");
    std::string fname  = fp.fullPath();
    std::shared_ptr<edm::ParameterSet> pS = edm::readConfig(fname);
    //  std::cout << pS->dump() << std::endl;

    edm::ParameterSet const& pModule =
        pS->getParameter<edm::ParameterSet>("HcalHardcodeGeometryEP@");
    HcalFlexiHardcodeGeometryLoader loader(pModule);

    CaloSubdetectorGeometry* g = loader.load( topology );

    // make sure each cel is its own closest cell
    HcalDetId barrelDet(HcalBarrel, 1, 1, 1);
    HcalDetId barrelDet2(HcalBarrel, 16, 50, 1);
    HcalDetId endcapDet1(HcalEndcap, -17, 72, 1);
    HcalDetId endcapDet2(HcalEndcap, 29, 35, 1);
    HcalDetId forwardDet1(HcalForward, 30, 71, 1);
    HcalDetId forwardDet3(HcalForward, -40, 71, 1);

    testClosestCell( barrelDet  , g );
    testClosestCell( barrelDet2 , g );
    testClosestCell( endcapDet1 , g );
    testClosestCell( endcapDet2 , g );
    testClosestCell( forwardDet1, g );
    testClosestCell( forwardDet3, g );

    const std::vector<DetId>& ids=g->getValidDetIds(DetId::Hcal,HcalBarrel);
    for (std::vector<DetId>::const_iterator i=ids.begin(); i!=ids.end(); i++) {
        testClosestCell( HcalDetId(*i), g );
    }
}
Ejemplo n.º 3
0
void testClosestCells() 
{
   // FIXME: for SLHC
   HcalTopologyMode::Mode mode = HcalTopologyMode::LHC;
   int maxDepthHB = 2;
   int maxDepthHE = 3;
  
   HcalTopology topology(mode, maxDepthHB, maxDepthHE);
   HcalHardcodeGeometryLoader l(topology);
   HcalHardcodeGeometryLoader::ReturnType g = l .load();
   // make sure each cel is its own closest cell
   HcalDetId barrelDet(HcalBarrel, 1, 1, 1);
   HcalDetId barrelDet2(HcalBarrel, 16, 50, 1);
   HcalDetId endcapDet1(HcalEndcap, -17, 72, 1);
   HcalDetId endcapDet2(HcalEndcap, 29, 35, 1);
   HcalDetId forwardDet1(HcalForward, 30, 71, 1);
   HcalDetId forwardDet3(HcalForward, -40, 71, 1);

   testClosestCell( barrelDet  , g );
   testClosestCell( barrelDet2 , g );
   testClosestCell( endcapDet1 , g );
   testClosestCell( endcapDet2 , g );
   testClosestCell( forwardDet1, g );
   testClosestCell( forwardDet3, g );

   const std::vector<DetId>& ids=g->getValidDetIds(DetId::Hcal,HcalBarrel);
   for (std::vector<DetId>::const_iterator i=ids.begin(); i!=ids.end(); i++) 
   {
      testClosestCell( HcalDetId(*i), g );
   }
}