48 const std::set<unsigned> RelevantProcesses = {0};
58 void endJob()
override;
70 const vector<TH2F*>&
histo)
const;
77 const vector<TH2F*>&
histo)
const;
82 pair<unsigned int, float>&
key,
83 unsigned int&
ss)
const;
109 using Lock = std::unique_lock<std::mutex>;
121 for (
int subdet = 0; subdet <= 1; subdet++) {
122 for (
int ex = 0; ex <=
exMax; ex++)
123 for (
int ey = 0; ey <=
eyMax; ey++) {
124 sprintf(histName,
"hspc_%d_%d_%d", subdet, ex, ey);
125 hspc.push_back(
new TH2F(histName,
127 10 * 2 * (
exMax + 2),
130 10 * 2 * (
eyMax + 2),
134 sprintf(histName,
"hrpc_%d_%d_%d", subdet, ex, ey);
135 hrpc.push_back(
new TH2F(histName,
137 10 * 2 * (
exMax + 2),
140 10 * 2 * (
eyMax + 2),
145 theMutex = std::make_unique<std::mutex[]>(hspc.size());
158 clusterShapeCache_token(
160 trackerHitAssociatorConfig_(
pset, consumesCollector()) {
161 file =
new TFile(
"clusterShape.root",
"RECREATE");
190 bool isOutgoing =
std::abs(ldir.
z()) > 0.01
f && (lvec.
z() * ldir.
z() > 0);
193 const bool isRelevant = RelevantProcesses.count(
simHit.processType());
200 bool isFast = (
simHit.momentumAtEntry().perp2() > ptCut2);
203 return (isOutgoing && isRelevant &&
isFast);
211 const vector<TH2F*>&
histo)
const {
214 pair<float, float> pred;
217 if (meas.
size() == 1)
223 int id =
recHit.geographicalId();
224 std::cout <<
id <<
" bigpred " << meas.
front().first <<
'/' << meas.
front().second <<
' ' << pred.first <<
'/' 225 << pred.second <<
' ' << ldir <<
' ' << ldir.
mag() << std::endl;
229 histo[
i]->Fill(pred.first, pred.second);
238 const vector<TH2F*>&
histo)
const {
247 pair<unsigned int, float>&
key,
248 unsigned int&
ss)
const {
252 for (
auto const& sh :
simHits) {
275 std::map<pair<unsigned int, float>, Elem> simHitMap;
278 pair<unsigned int, float>
key;
287 if (simHitMap.count(
key) == 0) {
289 }
else if (
recHit.cluster()->size() > simHitMap[
key].rhit->cluster()->size())
292 for (
auto const& elem : simHitMap) {
302 if (elem.second.size == 1)
346 if (
track.numberOfValidHits() < 8)
348 auto const& trajParams =
track.extra()->trajParams();
350 auto hb =
track.recHitsBegin();
351 for (
unsigned int h = 0;
h <
track.recHitsSize();
h++) {
355 auto id =
recHit->geographicalId();
356 if (
noBPIX1 && tkTpl.pxbLayer(
id) == 1)
360 auto subdetid = (
id.subdetId());
363 auto const& ltp = trajParams[
h];
364 auto ldir = ltp.momentum() / ltp.momentum().mag();
370 if (pixelRecHit !=
nullptr)
380 LogTrace(
"MinBiasTracking") <<
" [ClusterShape] analyze simHits, recHits";
385 LogTrace(
"MinBiasTracking") <<
" [ClusterShape] analyze recHits on recTracks";
unsigned int pxbLayer(const DetId &id) const
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
std::vector< data_type > DataContainer
LocalPoint toLocal(const GlobalPoint &gp) const
Conversion to the R.F. of the GeomDet.
T const * product() const
Global3DPoint GlobalPoint
std::vector< Track > TrackCollection
collection of Tracks
data_type const * data(size_t cell) const
example_stream void analyze(const edm::Event &, const edm::EventSetup &) override
std::vector< PSimHit > associateHit(const TrackingRecHit &thit) const
Abs< T >::type abs(const T &t)
key
prepare the HTCondor submission files and eventually submit them
#define DEFINE_FWK_MODULE(type)
bool isFast(TrackingRecHit const &hit)
bool getSizes(const SiPixelRecHit &recHit, const LocalVector &ldir, const SiPixelClusterShapeCache &clusterShapeCache, int &part, ClusterData::ArrayType &meas, std::pair< float, float > &predr, PixelData const *pd=nullptr) const
const Surface::PositionType & position() const
The position (origin of the R.F.)
bool isPixel(HitType hitType)
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
constexpr size_type size() const noexcept