Print

Print


Commit in slicPandora on MAIN
include/DetectorGeometry.h+4-11.11 -> 1.12
src/DetectorGeometry.cpp+111.12 -> 1.13
   /SimCalorimeterHitProcessor.cpp+211.11 -> 1.12
+36-1
3 modified files
add additional input parameters: mipCut, mipSigma and timeCut

slicPandora/include
DetectorGeometry.h 1.11 -> 1.12
diff -u -r1.11 -r1.12
--- DetectorGeometry.h	19 May 2010 22:25:41 -0000	1.11
+++ DetectorGeometry.h	7 Jun 2010 22:43:21 -0000	1.12
@@ -1,4 +1,4 @@
-// $Id: DetectorGeometry.h,v 1.11 2010/05/19 22:25:41 jeremy Exp $
+// $Id: DetectorGeometry.h,v 1.12 2010/06/07 22:43:21 jeremy Exp $
 
 #ifndef DetectorGeometry_h
 #define DetectorGeometry_h 1
@@ -36,6 +36,9 @@
         pandora::InputFloat m_cellSizeU;
         pandora::InputFloat m_cellSizeV;
         pandora::InputFloat m_mipEnergy;
+        pandora::InputFloat m_mipSigma;
+        pandora::InputFloat m_mipCut;
+        pandora::InputFloat m_timeCut;
         std::string m_collection;
         IDDecoder* m_decoder;
         ExtraLayerParametersList m_extraLayerParams;

slicPandora/src
DetectorGeometry.cpp 1.12 -> 1.13
diff -u -r1.12 -r1.13
--- DetectorGeometry.cpp	19 May 2010 22:25:41 -0000	1.12
+++ DetectorGeometry.cpp	7 Jun 2010 22:43:22 -0000	1.13
@@ -71,6 +71,9 @@
         int outerSym = 0;
         int nlayers = 0;
         float mipEnergy = 0;
+        float mipSigma = 0;
+        float timeCut = 0;
+        float mipCut = 0;
 
         // Read in parameters.
         calElem->QueryFloatAttribute("innerR", &innerR );        
@@ -82,6 +85,9 @@
         calElem->QueryFloatAttribute("outerPhi", &outerPhi );
         calElem->QueryIntAttribute("outerSymmetryOrder", &outerSym );
         calElem->QueryFloatAttribute("mipEnergy", &mipEnergy );
+        calElem->QueryFloatAttribute("mipCut", &mipCut );
+        calElem->QueryFloatAttribute("mipSigma", &mipSigma );
+        calElem->QueryFloatAttribute("timeCut", &timeCut );
 
         // Set subdetector parameters.
         subdet->m_innerRCoordinate = innerR;
@@ -149,6 +155,9 @@
         calElem->QueryFloatAttribute("cellSizeV", &cellSizeV);
         extras.m_cellSizeU = cellSizeU;
         extras.m_cellSizeV = cellSizeV;
+        extras.m_mipSigma = mipSigma;
+        extras.m_mipCut = mipCut;
+        extras.m_timeCut = timeCut;
 
         // Set the collection name on extras.
         extras.m_collection = calElem->Attribute("collection");
@@ -189,6 +198,8 @@
         extras.m_inputDetectorRegion = getDetectorRegion(subdetType);
         extras.m_mipEnergy = mipEnergy;
 
+        
+
         if (innerSym != outerSym)
         {
             std::cerr << "Inner and outer symmetry are different.  Don't know how to handle this case!" << std::endl;

slicPandora/src
SimCalorimeterHitProcessor.cpp 1.11 -> 1.12
diff -u -r1.11 -r1.12
--- SimCalorimeterHitProcessor.cpp	5 May 2010 23:27:08 -0000	1.11
+++ SimCalorimeterHitProcessor.cpp	7 Jun 2010 22:43:22 -0000	1.12
@@ -60,6 +60,10 @@
         PandoraApi::GeometryParameters::SubDetectorParameters* subdet = geom->getSubDetectorFromType((*iter));
         const DetectorGeometry::ExtraSubDetectorParameters& xsubdet = subdetExtras->at((*iter));
 
+        float mipSigma = xsubdet.m_mipSigma.Get();
+        float mipCut = xsubdet.m_mipCut.Get();
+        float timeCut = xsubdet.m_timeCut.Get();
+
         PandoraApi::GeometryParameters::LayerParametersList* layerList = &(subdet->m_layerParametersList);
 
         const std::string& collectionName = xsubdet.m_collection;
@@ -83,6 +87,23 @@
             // Get the SimCalorimeterHit to be converted.
             SimCalorimeterHit* simCalHit = dynamic_cast<SimCalorimeterHit*> (simCalHits->getElementAt(i));
 
+            float timeCont = simCalHit->getTimeCont(0);
+            float rawEnergy = simCalHit->getEnergy();
+
+            // Cut on late times.
+            if (timeCont > timeCut)
+            {
+                std::cout << "cut on time: " << timeCont << std::endl;
+                continue;
+            }
+
+            // Cut on energies that are below the energy cut.
+            if (rawEnergy < mipCut)
+            {
+                std::cout << "cut on energy: " << rawEnergy << std::endl;
+                continue;
+            }
+
             // Create a new, empty CalorimeterHit.
             CalorimeterHitImpl* calHit = new CalorimeterHitImpl;
 
CVSspam 0.2.8