slicPandora/src
diff -u -r1.17 -r1.18
--- CalorimeterHitProcessor.cpp 29 Nov 2010 10:29:48 -0000 1.17
+++ CalorimeterHitProcessor.cpp 1 Feb 2011 23:23:48 -0000 1.18
@@ -1,11 +1,13 @@
-// $Id: CalorimeterHitProcessor.cpp,v 1.17 2010/11/29 10:29:48 speckmay Exp $
+// $Id: CalorimeterHitProcessor.cpp,v 1.18 2011/02/01 23:23:48 jeremy Exp $
// variable names change from cdr to trunk version. use the new names, and keep the transformation of the names in defines
-#define m_nCellRadiationLengths m_nRadiationLengths
-#define m_nCellInteractionLengths m_nInteractionLengths
-#define m_cellNormalVector m_normalVector
+//#define m_nCellRadiationLengths m_nRadiationLengths
+//#define m_nCellInteractionLengths m_nInteractionLengths
+//#define m_cellNormalVector m_normalVector
//#define POST_CDR_VERSION 1
+//#define CALO_PARAMS_DEBUG 1
+
#include "CalorimeterHitProcessor.h"
// lcio
@@ -148,9 +150,9 @@
// Position in mm.
params.m_positionVector = pandora::CartesianVector(pos[0], pos[1], pos[2]);
- #ifdef POST_CDR_VERSION
+//#ifdef POST_CDR_VERSION
params.m_expectedDirection = pandora::CartesianVector(pos[0], pos[1], pos[2]).GetUnitVector();
- #endif
+// #endif
// Digital calorimeter setting.
params.m_isDigital = xsubdet->m_isDigital;
@@ -237,9 +239,9 @@
GetPathLengths(hit, radLengthsFromIp, intLengthsFromIp);
params.m_nInteractionLengthsFromIp = intLengthsFromIp;
- #ifdef POST_CDR_VERSION
+// #ifdef POST_CDR_VERSION
params.m_nRadiationLengthsFromIp = radLengthsFromIp;
- #endif
+// #endif
// Return completed calorimeter parameters.
return params;
slicPandora/src
diff -u -r1.22 -r1.23
--- DetectorGeometry.cpp 1 Feb 2011 02:12:35 -0000 1.22
+++ DetectorGeometry.cpp 1 Feb 2011 23:23:48 -0000 1.23
@@ -48,6 +48,7 @@
{
// Get the type of calorimeter.
const char* subdetType = calElem->Attribute("type");
+ std::string subdetTypeStr(subdetType);
// Pick the right subdetector object to populate.
PandoraApi::GeometryParameters::SubDetectorParameters* subdet =
@@ -76,6 +77,13 @@
float timeCut = 0;
float mipCut = 0;
+ // If inner and outer Z are both negative, then flip them. --JM
+ if (innerZ < 0 && outerZ < 0)
+ {
+ innerZ = -innerZ;
+ outerZ = -outerZ;
+ }
+
// Read in parameters.
calElem->QueryFloatAttribute("innerR", &innerR );
calElem->QueryFloatAttribute("innerZ", &innerZ );
@@ -99,18 +107,21 @@
subdet->m_outerZCoordinate = outerZ;
subdet->m_outerPhiCoordinate = outerPhi;
subdet->m_outerSymmetryOrder = outerSym;
+
+ // By default, all components should be mirrored in Z according to John Marshall.
+ subdet->m_isMirroredInZ = true;
- // very ugly hack to fix pandora for Christian to test
- // this is needed because of different Geometry assumptions
- // 31.01.2011 MS to be fixed
- #ifdef EXTREMELY_UGLY_HACK
- if (innerZ<0.0)
- {
- subdet->m_innerZCoordinate=0;
- }
- #endif
+ // very ugly hack to fix pandora for Christian to test
+ // this is needed because of different Geometry assumptions
+ // 31.01.2011 MS to be fixed
+//#ifdef EXTREMELY_UGLY_HACK
+// if (innerZ<0.0)
+// {
+// subdet->m_innerZCoordinate=0;
+// }
+// #endif
- // Inner and outer symmetry are different.
+ // Inner and outer symmetry are different.
if (innerSym != outerSym)
{
std::cerr << "Inner and outer symmetry are different. Don't know how to handle this case!" << std::endl;
@@ -216,6 +227,19 @@
// Set extra subdetector parameters.
extras.m_inputHitType = getHitType(subdetType);
extras.m_inputDetectorRegion = getDetectorRegion(subdetType);
+
+ // Barrels are mirrored in Z so the innerZ should be set to zero.
+ // FIXME Repeats calType comparison because InputDetectorRegion does not have the "==" operator defined.
+ //if (extras.m_inputDetectorRegion == pandora::BARREL)
+ //std::cout << "subdetType: <" << subdetTypeStr << ">" << std::endl;
+ //std::cout << "is EM_BARREL : " << subdetTypeStr == "EM_BARREL" << std::endl;
+
+ if (subdetTypeStr == "EM_BARREL" || subdetTypeStr == "HAD_BARREL" || subdetTypeStr == "MUON_BARREL")
+ {
+ //std::cout << "setting innerZ to 0" << std::endl;
+ subdet->m_innerZCoordinate = 0;
+ }
+
extras.m_mipEnergy = mipEnergy;
// Calculate the subdetector normal vectors for a barrel region.
@@ -238,10 +262,6 @@
}
}
- // John says has to be true for both ...
- subdet->m_isMirroredInZ=true;
-
-
// Setting for digital or analog calorimeter.
std::string isDigital = "false";
calElem->QueryValueAttribute("digital", &isDigital);
@@ -255,7 +275,6 @@
}
// Insert the extra subdetector information into the data map.
- std::string subdetTypeStr(subdetType);
subdetExtras[subdetTypeStr] = extras;
// Dump subdetector parameters to screen.
@@ -264,6 +283,10 @@
#endif
}
+ // Assume ECal barrel is innermost detector.
+ //geom.m_inDetBarrelParameters = geom.m_eCalBarrelParameters;
+ //geom.m_inDetEndCapParameters = geom.m_eCalEndCapParameters;
+
// Tracking parameters.
TiXmlElement* tracking = root->FirstChildElement("tracking");
float tinnerR, touterR, tz;
@@ -407,7 +430,7 @@
}
else if (calType == "HAD_BARREL" || calType == "HAD_ENDCAP")
{
- return pandora::HCAL;
+ return pandora::HCAL;
}
else if (calType == "MUON_BARREL" || calType == "MUON_ENDCAP")
{
slicPandora/src
diff -u -r1.21 -r1.22
--- SimpleTrackProcessor.cpp 31 Jan 2011 22:26:43 -0000 1.21
+++ SimpleTrackProcessor.cpp 1 Feb 2011 23:23:48 -0000 1.22
@@ -1,4 +1,4 @@
-// $Id: SimpleTrackProcessor.cpp,v 1.21 2011/01/31 22:26:43 stanitzk Exp $
+// $Id: SimpleTrackProcessor.cpp,v 1.22 2011/02/01 23:23:48 jeremy Exp $
//#define POST_CDR_VERSION 1
@@ -119,9 +119,9 @@
trackParameters.m_reachesCalorimeter = true;
trackParameters.m_canFormPfo = true;
trackParameters.m_canFormClusterlessPfo = false;
- #ifdef POST_CDR_VERSION
+// #ifdef POST_CDR_VERSION
trackParameters.m_isProjectedToEndCap = false; // FIXME
- #endif
+// #endif
// Setup track states from GenericObject collections, assuming that the ordering matches that in the "Tracks" collection.
setupTrackStatesFromGenericObjects(trackParameters, event, i);