Skip to content

Commit

Permalink
* Move HGCalParameters class to common HGCal directory
Browse files Browse the repository at this point in the history
* Add a schema for HGCalParameters as PHGCalParameters
* Add serialization test for a new schema PHGCalParameters
* Fix conflicts
  • Loading branch information
ianna committed Jan 4, 2016
1 parent 9933046 commit 95fcf83
Show file tree
Hide file tree
Showing 15 changed files with 130 additions and 54 deletions.
1 change: 0 additions & 1 deletion CondFormats/GeometryObjects/BuildFile.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
<use name="DataFormats/DetId"/>
<use name="CondFormats/Serialization"/>
<use name="boost_serialization"/>
<use name="clhep"/>

<export>
<lib name="1"/>
Expand Down
74 changes: 74 additions & 0 deletions CondFormats/GeometryObjects/interface/PHGCalParameters.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
#ifndef CondFormats_GeometryObjects_PHGCalParameters_h
#define CondFormats_GeometryObjects_PHGCalParameters_h

#include "CondFormats/Serialization/interface/Serializable.h"
#include <string>
#include <vector>

class PHGCalParameters {

public:

PHGCalParameters( void ) {}
~PHGCalParameters( void ) {}

std::string name_;
std::vector<double> cellSize_;
std::vector<double> moduleBlS_;
std::vector<double> moduleTlS_;
std::vector<double> moduleHS_;
std::vector<double> moduleDzS_;
std::vector<double> moduleAlphaS_;
std::vector<double> moduleCellS_;
std::vector<double> moduleBlR_;
std::vector<double> moduleTlR_;
std::vector<double> moduleHR_;
std::vector<double> moduleDzR_;
std::vector<double> moduleAlphaR_;
std::vector<double> moduleCellR_;
std::vector<double> trformTranX_;
std::vector<double> trformTranY_;
std::vector<double> trformTranZ_;
std::vector<double> trformRotXX_;
std::vector<double> trformRotYX_;
std::vector<double> trformRotZX_;
std::vector<double> trformRotXY_;
std::vector<double> trformRotYY_;
std::vector<double> trformRotZY_;
std::vector<double> trformRotXZ_;
std::vector<double> trformRotYZ_;
std::vector<double> trformRotZZ_;
std::vector<double> zLayerHex_;
std::vector<double> rMinLayHex_;
std::vector<double> rMaxLayHex_;
std::vector<double> waferPosX_;
std::vector<double> waferPosY_;
std::vector<double> cellFineX_;
std::vector<double> cellFineY_;
std::vector<double> cellCoarseX_;
std::vector<double> cellCoarseY_;
std::vector<double> boundR_;
std::vector<int> moduleLayS_;
std::vector<int> moduleLayR_;
std::vector<int> layer_;
std::vector<int> layerIndex_;
std::vector<int> layerGroup_;
std::vector<int> cellFactor_;
std::vector<int> depth_;
std::vector<int> depthIndex_;
std::vector<int> depthLayerF_;
std::vector<int> waferCopy_;
std::vector<int> waferTypeL_;
std::vector<int> waferTypeT_;
std::vector<int> layerGroupM_;
std::vector<int> layerGroupO_;
std::vector<uint32_t> trformIndex_;
double waferR_;
int nCells_;
int nSectors_;
int mode_;

COND_SERIALIZABLE;
};

#endif
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "CondFormats/GeometryObjects/interface/HGCalParameters.h"
#include "CondFormats/GeometryObjects/interface/PHGCalParameters.h"
#include "FWCore/Utilities/interface/typelookup.h"

TYPELOOKUP_DATA_REG(HGCalParameters);
TYPELOOKUP_DATA_REG(PHGCalParameters);
2 changes: 1 addition & 1 deletion CondFormats/GeometryObjects/src/classes.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
#include "CondFormats/GeometryObjects/interface/CSCRecoDigiParameters.h"
#include "CondFormats/GeometryObjects/interface/PTrackerParameters.h"
#include "CondFormats/GeometryObjects/interface/HcalParameters.h"
#include "CondFormats/GeometryObjects/interface/HGCalParameters.h"
#include "CondFormats/GeometryObjects/interface/PHGCalParameters.h"

42 changes: 20 additions & 22 deletions CondFormats/GeometryObjects/src/classes_def.xml
Original file line number Diff line number Diff line change
Expand Up @@ -88,41 +88,21 @@
</class>
<class name="HcalParameters::LayerItem"/>
<class name="std::vector<HcalParameters::LayerItem>"/>
<class name="HGCalParameters" class_version="0">
<class name="PHGCalParameters" class_version="0">
<field name="name_" mapping="blob"/>
<field name="nCells_" mapping="blob"/>
<field name="nSectors_" mapping="blob"/>
<field name="cellSize_" mapping="blob"/>
<field name="layer_" mapping="blob"/>
<field name="layerIndex_" mapping="blob"/>
<field name="layerGroup_" mapping="blob"/>
<field name="cellFactor_" mapping="blob"/>
<field name="depth_" mapping="blob"/>
<field name="depthIndex_" mapping="blob"/>
<field name="depthLayerF_" mapping="blob"/>
<field name="zLayerHex_" mapping="blob"/>
<field name="rMinLayHex_" mapping="blob"/>
<field name="rMaxLayHex_" mapping="blob"/>
<field name="waferCopy_" mapping="blob"/>
<field name="waferTypeL_" mapping="blob"/>
<field name="waferTypeT_" mapping="blob"/>
<field name="moduleLayS_" mapping="blob"/>
<field name="moduleBlS_" mapping="blob"/>
<field name="moduleTlS_" mapping="blob"/>
<field name="moduleHS_" mapping="blob"/>
<field name="moduleDzS_" mapping="blob"/>
<field name="moduleAlphaS_" mapping="blob"/>
<field name="moduleCellS_" mapping="blob"/>
<field name="moduleLayR_" mapping="blob"/>
<field name="moduleBlR_" mapping="blob"/>
<field name="moduleTlR_" mapping="blob"/>
<field name="moduleHR_" mapping="blob"/>
<field name="moduleDzR_" mapping="blob"/>
<field name="moduleAlphaR_" mapping="blob"/>
<field name="moduleCellR_" mapping="blob"/>
<field name="modules_" mapping="blob"/>
<field name="moduler_" mapping="blob"/>
<field name="trformIndex_" mapping="blob"/>
<field name="trformTranX_" mapping="blob"/>
<field name="trformTranY_" mapping="blob"/>
<field name="trformTranZ_" mapping="blob"/>
Expand All @@ -135,16 +115,34 @@
<field name="trformRotXZ_" mapping="blob"/>
<field name="trformRotYZ_" mapping="blob"/>
<field name="trformRotZZ_" mapping="blob"/>
<field name="zLayerHex_" mapping="blob"/>
<field name="rMinLayHex_" mapping="blob"/>
<field name="rMaxLayHex_" mapping="blob"/>
<field name="waferPosX_" mapping="blob"/>
<field name="waferPosY_" mapping="blob"/>
<field name="cellFineX_" mapping="blob"/>
<field name="cellFineY_" mapping="blob"/>
<field name="cellCoarseX_" mapping="blob"/>
<field name="cellCoarseY_" mapping="blob"/>
<field name="boundR_" mapping="blob"/>
<field name="moduleLayS_" mapping="blob"/>
<field name="moduleLayR_" mapping="blob"/>
<field name="layer_" mapping="blob"/>
<field name="layerIndex_" mapping="blob"/>
<field name="layerGroup_" mapping="blob"/>
<field name="cellFactor_" mapping="blob"/>
<field name="depth_" mapping="blob"/>
<field name="depthIndex_" mapping="blob"/>
<field name="depthLayerF_" mapping="blob"/>
<field name="waferCopy_" mapping="blob"/>
<field name="waferTypeL_" mapping="blob"/>
<field name="waferTypeT_" mapping="blob"/>
<field name="layerGroupM_" mapping="blob"/>
<field name="layerGroupO_" mapping="blob"/>
<field name="boundR_" mapping="blob"/>
<field name="trformIndex_" mapping="blob"/>
<field name="waferR_" mapping="blob"/>
<field name="nCells_" mapping="blob"/>
<field name="nSectors_" mapping="blob"/>
<field name="mode_" mapping="blob"/>
</class>
</lcgdict>
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ int main()
testSerialization<PTrackerParameters>();
testSerialization<PTrackerParameters::Item>();
testSerialization<HcalParameters>();
testSerialization<PHGCalParameters>();

return 0;
}
1 change: 0 additions & 1 deletion Geometry/HGCalCommonData/BuildFile.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<use name="DetectorDescription/Base"/>
<use name="DetectorDescription/Core"/>
<use name="CondFormats/GeometryObjects"/>
<export>
<lib name="1"/>
</export>
8 changes: 4 additions & 4 deletions Geometry/HGCalCommonData/interface/HGCalDDDConstants.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
*
*/

#include<string>
#include<vector>
#include<iostream>
#include "CondFormats/GeometryObjects/interface/HGCalParameters.h"
#include <string>
#include <vector>
#include <iostream>
#include "Geometry/HGCalCommonData/interface/HGCalParameters.h"
#include "DetectorDescription/Core/interface/DDsvalues.h"

class HGCalDDDConstants {
Expand Down
7 changes: 4 additions & 3 deletions Geometry/HGCalCommonData/interface/HGCalGeomParameters.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,13 @@
*
*/

#include<string>
#include<vector>
#include<iostream>
#include <string>
#include <vector>
#include <iostream>

#include "DetectorDescription/Core/interface/DDsvalues.h"
#include "DataFormats/GeometryVector/interface/GlobalPoint.h"

class DDCompactView;
class DDFilteredView;
class HGCalParameters;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#ifndef CondFormats_GeometryObjects_HGCalParameters_h
#define CondFormats_GeometryObjects_HGCalParameters_h
#ifndef Geometry_HGCalCommonData_HGCalParameters_h
#define Geometry_HGCalCommonData_HGCalParameters_h

#include "CondFormats/Serialization/interface/Serializable.h"
#include "DataFormats/GeometryVector/interface/GlobalPoint.h"
#include<string>
#include<vector>
#include<iostream>
#include<stdint.h>
#include<CLHEP/Geometry/Transform3D.h>
#include <CLHEP/Geometry/Transform3D.h>
#include <string>
#include <vector>
#include <iostream>
#include <stdint.h>

class HGCalParameters {

Expand Down
18 changes: 9 additions & 9 deletions Geometry/HGCalCommonData/plugins/HGCalNumberingInitialization.cc
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@
#include <boost/shared_ptr.hpp>

// user include files
#include <FWCore/Framework/interface/ModuleFactory.h>
#include <FWCore/Framework/interface/ESProducer.h>
#include <FWCore/Framework/interface/ESHandle.h>
#include <FWCore/ParameterSet/interface/ParameterSet.h>
#include <FWCore/MessageLogger/interface/MessageLogger.h>

#include <CondFormats/GeometryObjects/interface/HGCalParameters.h>
#include <Geometry/HGCalCommonData/interface/HGCalDDDConstants.h>
#include <Geometry/Records/interface/IdealGeometryRecord.h>
#include "FWCore/Framework/interface/ModuleFactory.h"
#include "FWCore/Framework/interface/ESProducer.h"
#include "FWCore/Framework/interface/ESHandle.h"
#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include "FWCore/MessageLogger/interface/MessageLogger.h"

#include "Geometry/HGCalCommonData/interface/HGCalParameters.h"
#include "Geometry/HGCalCommonData/interface/HGCalDDDConstants.h"
#include "Geometry/Records/interface/IdealGeometryRecord.h"

//#define DebugLog

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include "FWCore/Framework/interface/ESTransientHandle.h"
#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include "FWCore/MessageLogger/interface/MessageLogger.h"
#include "CondFormats/GeometryObjects/interface/HGCalParameters.h"
#include "Geometry/HGCalCommonData/interface/HGCalParameters.h"
#include "DetectorDescription/Core/interface/DDCompactView.h"
#include "Geometry/Records/interface/IdealGeometryRecord.h"
#include "Geometry/HGCalCommonData/interface/HGCalParametersFromDD.h"
Expand Down
2 changes: 1 addition & 1 deletion Geometry/HGCalCommonData/src/HGCalGeomParameters.cc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include "DetectorDescription/Core/interface/DDVectorGetter.h"
#include "DetectorDescription/Core/interface/DDFilteredView.h"
#include "DetectorDescription/RegressionTest/interface/DDErrorDetection.h"
#include "CondFormats/GeometryObjects/interface/HGCalParameters.h"
#include "Geometry/HGCalCommonData/interface/HGCalParameters.h"
#include "CLHEP/Units/GlobalPhysicalConstants.h"
#include "CLHEP/Units/GlobalSystemOfUnits.h"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "CondFormats/GeometryObjects/interface/HGCalParameters.h"
#include "Geometry/HGCalCommonData/interface/HGCalParameters.h"
//#define DebugLog

HGCalParameters::HGCalParameters(const std::string& nam): name_(nam) { }
Expand Down Expand Up @@ -144,3 +144,7 @@ void HGCalParameters::scaleTrForm(double scale) {
trformTranZ_[k-1] *= scale;
}
}

#include "FWCore/Utilities/interface/typelookup.h"

TYPELOOKUP_DATA_REG(HGCalParameters);
2 changes: 1 addition & 1 deletion Geometry/HGCalCommonData/src/HGCalParametersFromDD.cc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "Geometry/HGCalCommonData/interface/HGCalParametersFromDD.h"
#include "Geometry/HGCalCommonData/interface/HGCalGeomParameters.h"
#include "Geometry/HGCalCommonData/interface/HGCalGeometryMode.h"
#include "CondFormats/GeometryObjects/interface/HGCalParameters.h"
#include "Geometry/HGCalCommonData/interface/HGCalParameters.h"
#include "DetectorDescription/Core/interface/DDCompactView.h"
#include "DetectorDescription/Core/interface/DDFilteredView.h"
#include "DetectorDescription/Core/interface/DDVectorGetter.h"
Expand Down

0 comments on commit 95fcf83

Please sign in to comment.