Skip to content

Commit

Permalink
Part 1 of MTD Tracking Integration: Topologies and Geometries
Browse files Browse the repository at this point in the history
  • Loading branch information
lgray committed Aug 29, 2018
1 parent c9347fe commit b2af0d9
Show file tree
Hide file tree
Showing 211 changed files with 12,790 additions and 559 deletions.
@@ -0,0 +1,8 @@
#ifndef MTDALIGNMENTERROREXTENDEDRCD_H
#define MTDALIGNMENTERROREXTENDEDRCD_H

#include "FWCore/Framework/interface/EventSetupRecordImplementation.h"

class MTDAlignmentErrorExtendedRcd : public edm::eventsetup::EventSetupRecordImplementation<MTDAlignmentErrorExtendedRcd> {};

#endif
9 changes: 9 additions & 0 deletions CondFormats/AlignmentRecord/interface/MTDAlignmentErrorRcd.h
@@ -0,0 +1,9 @@
#ifndef MTDALIGNMENTERRORRCD_H
#define MTDALIGNMENTERRORRCD_H

#include "FWCore/Framework/interface/EventSetupRecordImplementation.h"

class MTDAlignmentErrorRcd : public edm::eventsetup::EventSetupRecordImplementation<MTDAlignmentErrorRcd> {};

#endif

9 changes: 9 additions & 0 deletions CondFormats/AlignmentRecord/interface/MTDAlignmentRcd.h
@@ -0,0 +1,9 @@
#ifndef MTDALIGNMENTRCD_H
#define MTDALIGNMENTRCD_H

#include "FWCore/Framework/interface/EventSetupRecordImplementation.h"

class MTDAlignmentRcd : public edm::eventsetup::EventSetupRecordImplementation<MTDAlignmentRcd> {};

#endif

@@ -0,0 +1,8 @@
#ifndef MTDSURFACEDEFORMATIONRCD_H
#define MTDSURFACEDEFORMATIONRCD_H

#include "FWCore/Framework/interface/EventSetupRecordImplementation.h"

class MTDSurfaceDeformationRcd : public edm::eventsetup::EventSetupRecordImplementation<MTDSurfaceDeformationRcd> {};

#endif
@@ -0,0 +1,3 @@
#include "CondFormats/AlignmentRecord/interface/MTDAlignmentErrorExtendedRcd.h"
#include "FWCore/Framework/interface/eventsetuprecord_registration_macro.h"
EVENTSETUP_RECORD_REG(MTDAlignmentErrorExtendedRcd);
12 changes: 12 additions & 0 deletions CondFormats/AlignmentRecord/src/MTDAlignmentErrorRcd.cc
@@ -0,0 +1,12 @@
// -*- C++ -*-
//
// Package: MTDGeometry
// Class : MTDAlignmentErrorRecord
//
// Implementation:
// <Notes on implementation>
//

#include "CondFormats/AlignmentRecord/interface/MTDAlignmentErrorRcd.h"
#include "FWCore/Framework/interface/eventsetuprecord_registration_macro.h"
EVENTSETUP_RECORD_REG(MTDAlignmentErrorRcd);
12 changes: 12 additions & 0 deletions CondFormats/AlignmentRecord/src/MTDAlignmentRcd.cc
@@ -0,0 +1,12 @@
// -*- C++ -*-
//
// Package: MTDGeometry
// Class : MTDAlignmentRecord
//
// Implementation:
// <Notes on implementation>
//

#include "CondFormats/AlignmentRecord/interface/MTDAlignmentRcd.h"
#include "FWCore/Framework/interface/eventsetuprecord_registration_macro.h"
EVENTSETUP_RECORD_REG(MTDAlignmentRcd);
12 changes: 12 additions & 0 deletions CondFormats/AlignmentRecord/src/MTDSurfaceDeformationRcd.cc
@@ -0,0 +1,12 @@
// -*- C++ -*-
//
// Package: MTDGeometry
// Class : MTDSurfaceDeformationRecord
//
// Implementation:
// <Notes on implementation>
//

#include "CondFormats/AlignmentRecord/interface/MTDSurfaceDeformationRcd.h"
#include "FWCore/Framework/interface/eventsetuprecord_registration_macro.h"
EVENTSETUP_RECORD_REG(MTDSurfaceDeformationRcd);
57 changes: 57 additions & 0 deletions CondFormats/GeometryObjects/interface/PGeometricTimingDet.h
@@ -0,0 +1,57 @@
#ifndef CondFormats_PGeometricTimingDet_h
#define CondFormats_PGeometricTimingDet_h

#include "CondFormats/Serialization/interface/Serializable.h"

#include <vector>
#include <string>

class PGeometricTimingDet{

public:
PGeometricTimingDet() { };
~PGeometricTimingDet() { };

struct Item{
std::string name_; // save only the name, not the namespace.
std::string ns_; // save only the name, not the namespace.

double x_;
double y_;
double z_;
double phi_;
double rho_;
// fill as you will but intent is rotation matrix A where first number is row and second number is column
double a11_, a12_, a13_, a21_, a22_, a23_, a31_, a32_, a33_;
double params_0,params_1,params_2,params_3,params_4,params_5,params_6,params_7,params_8,params_9,params_10;
double radLength_;
double xi_;
double pixROCRows_;
double pixROCCols_;
double pixROCx_;
double pixROCy_;
double siliconAPVNum_;

int level_; // goes like 1, 2, 3, 4, 4, 4, 3, 4, 4, 3, 4, 4, 4, 1, 2, 3, etc.
int shape_;
// nav_type _ddd; DO NOT SAVE!
// DDName _ddname; DO NOT SAVE!
int type_;

int numnt_;
int nt0_, nt1_, nt2_, nt3_, nt4_, nt5_, nt6_, nt7_, nt8_, nt9_, nt10_;

int geographicalID_; // to be converted to DetId
bool stereo_;

COND_SERIALIZABLE;
};

std::vector<Item> pgeomdets_;


COND_SERIALIZABLE;
};

#endif

35 changes: 35 additions & 0 deletions CondFormats/GeometryObjects/interface/PGeometricTimingDetExtra.h
@@ -0,0 +1,35 @@
#ifndef CondFormats_PGeometricTimingDetExtra_h
#define CondFormats_PGeometricTimingDetExtra_h

#include "CondFormats/Serialization/interface/Serializable.h"

#include <vector>
#include <string>

class PGeometricTimingDetExtra{

public:
PGeometricTimingDetExtra() { };
~PGeometricTimingDetExtra() { };

struct Item{
int geographicalId_; // to be converted to DetId
// std::vector< DDExpandedNode > parents_; DO NOT SAVE!
//GeoHistory _parents;
double volume_;
double density_;
double weight_;
int copy_;
std::string material_;

COND_SERIALIZABLE;
};

std::vector<Item> pgdes_;


COND_SERIALIZABLE;
};

#endif

26 changes: 26 additions & 0 deletions CondFormats/GeometryObjects/interface/PMTDParameters.h
@@ -0,0 +1,26 @@
#ifndef CondFormats_GeometryObjects_PMTDParameters_h
#define CondFormats_GeometryObjects_PMTDParameters_h

#include "CondFormats/Serialization/interface/Serializable.h"

class PMTDParameters
{
public:
PMTDParameters( void ) { }
~PMTDParameters( void ) { }

struct Item
{
int id_;
std::vector<int> vpars_;

COND_SERIALIZABLE;
};

std::vector<Item> vitems_;
std::vector<int> vpars_;

COND_SERIALIZABLE;
};

#endif
@@ -0,0 +1,5 @@
#include "CondFormats/GeometryObjects/interface/PGeometricTimingDet.h"
#include "FWCore/Utilities/interface/typelookup.h"

TYPELOOKUP_DATA_REG(PGeometricTimingDet);

@@ -0,0 +1,5 @@
#include "CondFormats/GeometryObjects/interface/PGeometricTimingDetExtra.h"
#include "FWCore/Utilities/interface/typelookup.h"

TYPELOOKUP_DATA_REG(PGeometricTimingDetExtra);

@@ -0,0 +1,4 @@
#include "CondFormats/GeometryObjects/interface/PMTDParameters.h"
#include "FWCore/Utilities/interface/typelookup.h"

TYPELOOKUP_DATA_REG(PMTDParameters);
3 changes: 3 additions & 0 deletions CondFormats/GeometryObjects/src/classes.h
@@ -1,9 +1,12 @@
#include "CondFormats/GeometryObjects/interface/PGeometricDet.h"
#include "CondFormats/GeometryObjects/interface/PGeometricDetExtra.h"
#include "CondFormats/GeometryObjects/interface/PGeometricTimingDet.h"
#include "CondFormats/GeometryObjects/interface/PGeometricTimingDetExtra.h"
#include "CondFormats/GeometryObjects/interface/PCaloGeometry.h"
#include "CondFormats/GeometryObjects/interface/RecoIdealGeometry.h"
#include "CondFormats/GeometryObjects/interface/CSCRecoDigiParameters.h"
#include "CondFormats/GeometryObjects/interface/PTrackerParameters.h"
#include "CondFormats/GeometryObjects/interface/PMTDParameters.h"
#include "CondFormats/GeometryObjects/interface/HcalParameters.h"
#include "CondFormats/GeometryObjects/interface/PHGCalParameters.h"

20 changes: 20 additions & 0 deletions CondFormats/GeometryObjects/src/classes_def.xml
Expand Up @@ -10,6 +10,19 @@
</class>
<class name="PGeometricDetExtra::Item"/>
<class name="std::vector<PGeometricDetExtra::Item>"/>

<class name="PGeometricTimingDet" class_version="0">
<field name="pgeomdets_" mapping="blob"/>
</class>
<class name="PGeometricTimingDet::Item"/>
<class name="std::vector<PGeometricTimingDet::Item>"/>

<class name="PGeometricTimingDetExtra" class_version="0">
<field name="pgdes_" mapping="blob"/>
</class>
<class name="PGeometricTimingDetExtra::Item"/>
<class name="std::vector<PGeometricTimingDetExtra::Item>"/>


<class name="PCaloGeometry" class_version="0">
<field name="m_translation" mapping="blob"/>
Expand Down Expand Up @@ -42,6 +55,13 @@
<class name="PTrackerParameters::Item"/>
<class name="std::vector<PTrackerParameters::Item>"/>

<class name="PMTDParameters" class_version="0">
<field name="vitems" mapping="blob"/>
<field name="vpars" mapping="blob"/>
</class>
<class name="PMTDParameters::Item"/>
<class name="std::vector<PMTDParameters::Item>"/>

<class name="HcalParameters" class_version="0">
<field name="rHB" mapping="blob"/>
<field name="drHB" mapping="blob"/>
Expand Down
Expand Up @@ -49,5 +49,11 @@
from Geometry.ForwardGeometry.ForwardGeometry_cfi import *

# timing

from RecoMTD.DetLayers.mtdDetLayerGeometry_cfi import *
from Geometry.MTDGeometryBuilder.mtdParameters_cfi import *
from Geometry.MTDNumberingBuilder.mtdNumberingGeometry_cfi import *
from Geometry.MTDNumberingBuilder.mtdTopology_cfi import *
from Geometry.MTDGeometryBuilder.mtdGeometry_cfi import *
from Geometry.MTDGeometryBuilder.idealForDigiMTDGeometry_cff import *
mtdGeometry.applyAlignment = cms.bool(False)

Expand Up @@ -10,4 +10,4 @@
from Geometry.HcalCommonData.hcalDDDSimConstants_cfi import *
from Geometry.HGCalCommonData.hgcalV6ParametersInitialization_cfi import *
from Geometry.HGCalCommonData.hgcalV6NumberingInitialization_cfi import *

from Geometry.MTDNumberingBuilder.mtdNumberingGeometry_cfi import *
Expand Up @@ -49,5 +49,11 @@
from Geometry.ForwardGeometry.ForwardGeometry_cfi import *

# timing

from RecoMTD.DetLayers.mtdDetLayerGeometry_cfi import *
from Geometry.MTDGeometryBuilder.mtdParameters_cfi import *
from Geometry.MTDNumberingBuilder.mtdNumberingGeometry_cfi import *
from Geometry.MTDNumberingBuilder.mtdTopology_cfi import *
from Geometry.MTDGeometryBuilder.mtdGeometry_cfi import *
from Geometry.MTDGeometryBuilder.idealForDigiMTDGeometry_cff import *
mtdGeometry.applyAlignment = cms.bool(False)

Expand Up @@ -10,4 +10,4 @@
from Geometry.HcalCommonData.hcalDDDSimConstants_cfi import *
from Geometry.HGCalCommonData.hgcalV6ParametersInitialization_cfi import *
from Geometry.HGCalCommonData.hgcalV6NumberingInitialization_cfi import *

from Geometry.MTDNumberingBuilder.mtdNumberingGeometry_cfi import *
16 changes: 16 additions & 0 deletions Configuration/Geometry/python/dict2023Geometry.py
Expand Up @@ -814,8 +814,16 @@
'Geometry/MTDSimData/data/CrystalTile/mtdProdCuts.xml'
],
"sim" : [
'from Geometry.MTDNumberingBuilder.mtdNumberingGeometry_cfi import *',
],
"reco" :[
'from RecoMTD.DetLayers.mtdDetLayerGeometry_cfi import *',
'from Geometry.MTDGeometryBuilder.mtdParameters_cfi import *',
'from Geometry.MTDNumberingBuilder.mtdNumberingGeometry_cfi import *',
'from Geometry.MTDNumberingBuilder.mtdTopology_cfi import *',
'from Geometry.MTDGeometryBuilder.mtdGeometry_cfi import *',
'from Geometry.MTDGeometryBuilder.idealForDigiMTDGeometry_cff import *',
'mtdGeometry.applyAlignment = cms.bool(False)'
],
"era" : "phase2_timing, phase2_timing_layer_new",
},
Expand All @@ -832,8 +840,16 @@
'Geometry/MTDSimData/data/CrystalBar/mtdProdCuts.xml'
],
"sim" : [
'from Geometry.MTDNumberingBuilder.mtdNumberingGeometry_cfi import *',
],
"reco" :[
'from RecoMTD.DetLayers.mtdDetLayerGeometry_cfi import *',
'from Geometry.MTDGeometryBuilder.mtdParameters_cfi import *',
'from Geometry.MTDNumberingBuilder.mtdNumberingGeometry_cfi import *',
'from Geometry.MTDNumberingBuilder.mtdTopology_cfi import *',
'from Geometry.MTDGeometryBuilder.mtdGeometry_cfi import *',
'from Geometry.MTDGeometryBuilder.idealForDigiMTDGeometry_cff import *',
'mtdGeometry.applyAlignment = cms.bool(False)'
],
"era" : "phase2_timing, phase2_timing_layer_new",
}
Expand Down
1 change: 1 addition & 0 deletions DataFormats/FTLRecHit/BuildFile.xml
@@ -1,6 +1,7 @@
<use name="DataFormats/CaloRecHit"/>
<use name="DataFormats/Common"/>
<use name="DataFormats/ForwardDetId"/>
<use name="DataFormats/TrackingRecHit"/>

<export>
<lib name="1"/>
Expand Down
50 changes: 50 additions & 0 deletions DataFormats/FTLRecHit/interface/FTLTrackingRecHit.h
@@ -0,0 +1,50 @@
#ifndef DataFormats_FTLRecHit_FTLTrackingRecHit_h
#define DataFormats_FTLRecHit_FTLTrackingRecHit_h

/// Basic template class for a RecHit wrapping a Ref to an object

#include <cassert>
#include "DataFormats/TrackingRecHit/interface/RecHit2DLocalPos.h"

template<typename ObjRef>
class FTLTrackingRecHit : public RecHit2DLocalPos {
public:
typedef ObjRef ref_type;
typedef typename ObjRef::value_type obj_type;

FTLTrackingRecHit() {}
FTLTrackingRecHit(DetId id, const ObjRef &objref, const LocalPoint &pos, const LocalError &err):
RecHit2DLocalPos(id),
objref_(objref),
pos_(pos), err_(err) {}

FTLTrackingRecHit<ObjRef> * clone() const override { return new FTLTrackingRecHit<ObjRef>(*this); }

LocalPoint localPosition() const override { return pos_; }
LocalError localPositionError() const override { return err_; }

const ObjRef & objRef() const { return objref_; }

float energy() const { return objref_->energy(); }

float time() const { return objref_->time(); }
float timeError() const { return objref_->timeError(); }

bool sharesInput( const TrackingRecHit* other, SharedInputType what) const override { assert(false); }
protected:
ObjRef objref_;
LocalPoint pos_;
LocalError err_;
};


// Instantiations and specializations for FTLRecHitRef and reco::CaloClusterPtr
#include "DataFormats/FTLRecHit/interface/FTLRecHitCollections.h"
#include "DataFormats/CaloRecHit/interface/CaloClusterFwd.h"
typedef FTLTrackingRecHit<FTLRecHitRef> FTLTrackingRecHitFromHit;
typedef std::vector<FTLTrackingRecHitFromHit> FTLTrackingRecHitCollection;

template<>
bool FTLTrackingRecHit<FTLRecHitRef>::sharesInput( const TrackingRecHit* other, SharedInputType what) const ;

#endif

0 comments on commit b2af0d9

Please sign in to comment.