-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adding phase2 IT rechit validation module
- Loading branch information
Showing
6 changed files
with
691 additions
and
5 deletions.
There are no files selected for viewing
71 changes: 71 additions & 0 deletions
71
Validation/SiTrackerPhase2V/interface/Phase2ValidationUtil.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
#ifndef _Validation_SiTrackerPhase2V_Phase2TrackierValidationUtil_h | ||
#define _Validation_SiTrackerPhase2V_Phase2TrackierValidationUtil_h | ||
#include "SimDataFormats/TrackingHit/interface/PSimHit.h" | ||
#include "SimDataFormats/Track/interface/SimTrack.h" | ||
#include "DataFormats/TrackerCommon/interface/TrackerTopology.h" | ||
#include<string> | ||
#include<sstream> | ||
|
||
namespace Phase2TkUtil { | ||
|
||
bool isPrimary(const SimTrack& simTrk, const PSimHit* simHit){ | ||
bool retval = false; | ||
unsigned int trkId = simTrk.trackId(); | ||
if (trkId != simHit->trackId()) | ||
return retval; | ||
int vtxIndex = simTrk.vertIndex(); | ||
int ptype = simHit->processType(); | ||
if ((vtxIndex == 0) && (ptype == 0)) | ||
return true; | ||
return false; | ||
} | ||
|
||
std::string getITHistoId(uint32_t det_id, const TrackerTopology* tTopo) { | ||
std::string Disc; | ||
std::ostringstream fname1; | ||
int layer = tTopo->getITPixelLayerNumber(det_id); | ||
|
||
if(layer < 0) | ||
return ""; | ||
if (layer < 100) { | ||
fname1 << "Barrel/"; | ||
fname1 << "Layer" << layer; | ||
fname1 << ""; | ||
} else { | ||
int side = tTopo->pxfSide(det_id); | ||
fname1 << "EndCap_Side" << side << "/"; | ||
int disc = tTopo->pxfDisk(det_id); | ||
Disc = (disc < 9) ? "EPix" : "FPix";; | ||
fname1 << Disc << "/"; | ||
int ring = tTopo->pxfBlade(det_id); | ||
fname1 << "Ring" << ring; | ||
} | ||
return fname1.str(); | ||
} | ||
|
||
std::string getOTHistoId(uint32_t det_id, const TrackerTopology* tTopo) { | ||
std::string Disc; | ||
std::ostringstream fname1; | ||
int layer = tTopo->getOTLayerNumber(det_id); | ||
|
||
if(layer < 0) | ||
return ""; | ||
if (layer < 100) { | ||
fname1 << "Barrel/"; | ||
fname1 << "Layer" << layer; | ||
fname1 << ""; | ||
} else { | ||
int side = layer / 100; | ||
fname1 << "EndCap_Side" << side << "/"; | ||
int disc = layer - side * 100; | ||
Disc = (disc < 3) ? "TEDD_1" : "TEDD_2"; | ||
fname1 << Disc << "/"; | ||
int ring = tTopo->tidRing(det_id); | ||
fname1 << "Ring" << ring; | ||
} | ||
return fname1.str(); | ||
} | ||
|
||
} | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,26 @@ | ||
|
||
<use name="FWCore/Framework"/> | ||
<use name="FWCore/ParameterSet"/> | ||
<use name="SimDataFormats/TrackerDigiSimLink"/> | ||
<use name="DataFormats/SiPixelDigi"/> | ||
<use name="FWCore/ServiceRegistry"/> | ||
<use name="FWCore/Utilities"/> | ||
<use name="DataFormats/DetId"/> | ||
<use name="DataFormats/Common"/> | ||
<use name="DataFormats/TrackerCommon"/> | ||
<use name="DataFormats/Phase2TrackerCluster"/> | ||
<use name="DataFormats/TrackerRecHit2D"/> | ||
<use name="DataFormats/GeometrySurface"/> | ||
<use name="DataFormats/GeometryVector"/> | ||
<use name="DataFormats/SiPixelDigi"/> | ||
<use name="SimDataFormats/Track"/> | ||
<use name="SimDataFormats/TrackingHit"/> | ||
<use name="SimDataFormats/Vertex"/> | ||
<use name="SimDataFormats/TrackerDigiSimLink"/> | ||
<use name="SimTracker/TrackerHitAssociation"/> | ||
<use name="Geometry/Records"/> | ||
<use name="Geometry/CommonDetUnit"/> | ||
<use name="Geometry/TrackerGeometryBuilder"/> | ||
<use name="Geometry/CommonDetUnit"/> | ||
<use name="DQMServices/Core"/> | ||
<use name="DataFormats/Common"/> | ||
<use name="SimDataFormats/Track"/> | ||
<use name="boost_system"/> | ||
<use name="rootcling"/> | ||
<flags EDM_PLUGIN="1"/> | ||
<flags EDM_PLUGIN="1"/> |
Oops, something went wrong.