102 createEntryForDoubleSidedModule_(config.getParameter<bool>(
"createEntryForDoubleSidedModule")),
122 const auto& ns = alignableTracker.trackerNameSpace();
124 edm::LogInfo(
"TrackerTreeGenerator") <<
"@SUB=TrackerTreeGenerator::analyze"
125 <<
"There are " << tkGeom->
detIds().size() <<
" dets and "
126 << tkGeom->
detUnitIds().size() <<
" detUnits in the Geometry Record";
129 edm::LogInfo(
"TrackerTreeGenerator") <<
"@SUB=TrackerTreeGenerator::analyze"
130 <<
"Create entry for each module AND one entry for virtual "
131 <<
"double-sided module in addition";
133 edm::LogInfo(
"TrackerTreeGenerator") <<
"@SUB=TrackerTreeGenerator::analyze"
134 <<
"Create one entry for each physical module, do NOT create additional "
135 <<
"entry for virtual double-sided module";
138 for (
const auto& detId : tkGeom->
detIds()) {
143 const auto rawId = detId.
rawId();
144 tkTreeVar.
rawId = rawId;
145 tkTreeVar.
subdetId = detId.subdetId();
150 tkTreeVar.
half = ns.tpb().halfBarrelNumber(rawId);
157 tkTreeVar.
half = ns.tpe().halfCylinderNumber(rawId);
165 tkTreeVar.
half = ns.tib().halfShellNumber(rawId);
205 LocalPoint lPModule(0., 0., 0.), lUDirection(1., 0., 0.), lVDirection(0., 1., 0.), lWDirection(0., 0., 1.);
207 gVDirection = surface.
toGlobal(lVDirection), gWDirection = surface.
toGlobal(lWDirection);
208 double dR(999.), dPhi(999.), dZ(999.);
213 dR = gWDirection.perp() - gPModule.
perp();
215 dZ = gVDirection.z() - gPModule.
z();
221 dR = gUDirection.perp() - gPModule.
perp();
223 dZ = gWDirection.z() - gPModule.
z();
230 dR = gVDirection.perp() - gPModule.
perp();
232 dZ = gWDirection.z() - gPModule.
z();
241 tkTreeVar.
posX = gPModule.
x();
242 tkTreeVar.
posY = gPModule.
y();
243 tkTreeVar.
posZ = gPModule.
z();
245 if (
auto stripGeomDetUnit = dynamic_cast<const StripGeomDetUnit*>(&geomDet)) {
251 auto& topol =
dynamic_cast<const StripTopology&
>(stripGeomDetUnit->specificTopology());
252 tkTreeVar.
nStrips = topol.nstrips();
271 UInt_t rawId(999), subdetId(999),
layer(999), side(999), half(999), rod(999),
ring(999), petal(999), blade(999),
273 Bool_t isDoubleSide(
false), isRPhi(
false), isStereo(
false);
274 Int_t uDirection(999), vDirection(999), wDirection(999);
275 Float_t posR(999.
F), posPhi(999.
F), posEta(999.
F), posX(999.
F), posY(999.
F), posZ(999.
F);
279 auto trackerTree{treeDir.
make<TTree>(
"TrackerTree",
"IDs of all modules (ideal geometry)")};
280 trackerTree->Branch(
"RawId", &rawId,
"RawId/i");
281 trackerTree->Branch(
"SubdetId", &subdetId,
"SubdetId/i");
282 trackerTree->Branch(
"Layer", &
layer,
"Layer/i");
283 trackerTree->Branch(
"Side", &side,
"Side/i");
284 trackerTree->Branch(
"Half", &half,
"Half/i");
285 trackerTree->Branch(
"Rod", &rod,
"Rod/i");
286 trackerTree->Branch(
"Ring", &
ring,
"Ring/i");
287 trackerTree->Branch(
"Petal", &petal,
"Petal/i");
288 trackerTree->Branch(
"Blade", &blade,
"Blade/i");
289 trackerTree->Branch(
"Panel", &panel,
"Panel/i");
290 trackerTree->Branch(
"OuterInner", &outerInner,
"OuterInner/i");
291 trackerTree->Branch(
"Module", &
module,
"Module/i");
292 trackerTree->Branch(
"NStrips", &nStrips,
"NStrips/i");
293 trackerTree->Branch(
"IsDoubleSide", &isDoubleSide,
"IsDoubleSide/O");
294 trackerTree->Branch(
"IsRPhi", &isRPhi,
"IsRPhi/O");
295 trackerTree->Branch(
"IsStereo", &isStereo,
"IsStereo/O");
296 trackerTree->Branch(
"UDirection", &uDirection,
"UDirection/I");
297 trackerTree->Branch(
"VDirection", &vDirection,
"VDirection/I");
298 trackerTree->Branch(
"WDirection", &wDirection,
"WDirection/I");
299 trackerTree->Branch(
"PosR", &posR,
"PosR/F");
300 trackerTree->Branch(
"PosPhi", &posPhi,
"PosPhi/F");
301 trackerTree->Branch(
"PosEta", &posEta,
"PosEta/F");
302 trackerTree->Branch(
"PosX", &posX,
"PosX/F");
303 trackerTree->Branch(
"PosY", &posY,
"PosY/F");
304 trackerTree->Branch(
"PosZ", &posZ,
"PosZ/F");
308 subdetId = iTree.subdetId;
317 outerInner = iTree.outerInner;
319 nStrips = iTree.nStrips;
320 isDoubleSide = iTree.isDoubleSide;
321 isRPhi = iTree.isRPhi;
322 isStereo = iTree.isStereo;
323 uDirection = iTree.uDirection;
324 vDirection = iTree.vDirection;
325 wDirection = iTree.wDirection;
327 posPhi = iTree.posPhi;
328 posEta = iTree.posEta;
335 edm::LogInfo(
"TrackerTreeGenerator") <<
"@SUB=TrackerTreeGenerator::endJob"
336 <<
"TrackerTree contains " << vTkTreeVar_.size() <<
" entries overall";
static const std::string kSharedResource
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
static constexpr auto TEC
bool tecIsDoubleSide(const DetId &id) const
bool tobIsDoubleSide(const DetId &id) const
const edm::ESGetToken< GeometricDet, IdealGeometryRecord > geomDetToken_
bool tibIsDoubleSide(const DetId &id) const
unsigned int tibLayer(const DetId &id) const
unsigned int tidRing(const DetId &id) const
TrackerTreeGenerator(const edm::ParameterSet &)
~TrackerTreeGenerator() override=default
bool tobIsStereo(const DetId &id) const
std::vector< unsigned int > tidModuleInfo(const DetId &id) const
const DetIdContainer & detIds() const override
Returm a vector of all GeomDet DetIds (including those of GeomDetUnits)
#define DEFINE_FWK_MODULE(type)
unsigned int pxfDisk(const DetId &id) const
TrackerGeometry * build(const GeometricDet *gd, const PTrackerAdditionalParametersPerDet *ptitp, const PTrackerParameters &ptp, const TrackerTopology *tTopo)
unsigned int tecRing(const DetId &id) const
ring id
unsigned int pxbLadder(const DetId &id) const
unsigned int tidWheel(const DetId &id) const
unsigned int pxbModule(const DetId &id) const
const edm::ESGetToken< PTrackerAdditionalParametersPerDet, PTrackerAdditionalParametersPerDetRcd > ptitpToken_
std::vector< unsigned int > tibStringInfo(const DetId &id) const
bool tobIsRPhi(const DetId &id) const
edm::ParameterSet config_
tuple nStrips
1.2 is to make the matching window safely the two nearest strips 0.35 is the size of an ME0 chamber i...
const Plane & surface() const
The nominal surface of the GeomDet.
void analyze(const edm::Event &, const edm::EventSetup &) override
bool tidIsStereo(const DetId &id) const
constexpr std::array< uint8_t, layerIndexSize > layer
bool getData(T &iHolder) const
bool tecIsStereo(const DetId &id) const
std::vector< unsigned int > tecPetalInfo(const DetId &id) const
bool tibIsRPhi(const DetId &id) const
unsigned int tidSide(const DetId &id) const
std::vector< unsigned int > tobRodInfo(const DetId &id) const
const edm::ESGetToken< PTrackerParameters, PTrackerParametersRcd > ptpToken_
T * make(const Args &...args) const
make new ROOT object
static constexpr auto TOB
bool tecIsRPhi(const DetId &id) const
const TrackerGeomDet * idToDet(DetId) const override
unsigned int tibModule(const DetId &id) const
unsigned int pxfModule(const DetId &id) const
unsigned int pxbLayer(const DetId &id) const
unsigned int tecModule(const DetId &id) const
Log< level::Info, false > LogInfo
bool tidIsRPhi(const DetId &id) const
static constexpr auto TIB
TFileDirectory mkdir(const std::string &dir, const std::string &descr="")
create a new subdirectory
bool tibIsStereo(const DetId &id) const
bool tidIsDoubleSide(const DetId &id) const
unsigned int tobModule(const DetId &id) const
tuple config
parse the configuration file
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > topoToken_
const bool createEntryForDoubleSidedModule_
std::vector< TrackerTreeVariables > vTkTreeVar_
unsigned int pxfSide(const DetId &id) const
static uInt32 F(BLOWFISH_CTX *ctx, uInt32 x)
unsigned int tecWheel(const DetId &id) const
static constexpr auto TID
const DetIdContainer & detUnitIds() const override
Returm a vector of all GeomDetUnit DetIds.
unsigned int pxfPanel(const DetId &id) const
unsigned int pxfBlade(const DetId &id) const
unsigned int tobLayer(const DetId &id) const
unsigned int tecSide(const DetId &id) const