Skip to content

Commit

Permalink
adding phase2 IT rechit validation module
Browse files Browse the repository at this point in the history
  • Loading branch information
sroychow committed Oct 1, 2020
1 parent 5fce31f commit f81d1c9
Show file tree
Hide file tree
Showing 6 changed files with 691 additions and 5 deletions.
71 changes: 71 additions & 0 deletions Validation/SiTrackerPhase2V/interface/Phase2ValidationUtil.h
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
22 changes: 17 additions & 5 deletions Validation/SiTrackerPhase2V/plugins/BuildFile.xml
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"/>
Loading

0 comments on commit f81d1c9

Please sign in to comment.