CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Attributes
SeedGeneratorForCRack Class Reference

#include <SeedGeneratorForCRack.h>

Public Types

typedef TrajectoryStateOnSurface TSOS
 

Public Member Functions

void init (const SiStripRecHit2DCollection &collstereo, const SiStripRecHit2DCollection &collrphi, const SiStripMatchedRecHit2DCollection &collmatched, const edm::EventSetup &c)
 
void run (TrajectorySeedCollection &, const edm::EventSetup &c)
 
 SeedGeneratorForCRack (const edm::ParameterSet &conf)
 
void seeds (TrajectorySeedCollection &output, const edm::EventSetup &c, const TrackingRegion &region)
 
virtual ~SeedGeneratorForCRack ()
 

Private Attributes

std::string builderName
 
edm::ParameterSet conf_
 
std::string geometry
 
OrderedHitPairs HitPairs
 
edm::ESHandle< MagneticFieldmagfield
 
float multipleScatteringFactor
 
GlobalTrackingRegion region
 
double seedMomentum
 
float seedpt
 
CosmicHitPairGeneratorthePairGenerator
 
PropagatorWithMaterialthePropagatorAl
 
PropagatorWithMaterialthePropagatorOp
 
KFUpdatortheUpdator
 
edm::ESHandle< TrackerGeometrytracker
 
const TransientTrackingRecHitBuilderTTTRHBuilder
 

Detailed Description

Definition at line 21 of file SeedGeneratorForCRack.h.

Member Typedef Documentation

◆ TSOS

Definition at line 23 of file SeedGeneratorForCRack.h.

Constructor & Destructor Documentation

◆ SeedGeneratorForCRack()

SeedGeneratorForCRack::SeedGeneratorForCRack ( const edm::ParameterSet conf)

Definition at line 29 of file SeedGeneratorForCRack.cc.

30  : conf_(conf),
31  region(conf.getParameter<double>("ptMin"),
32  conf.getParameter<double>("originRadius"),
33  conf.getParameter<double>("originHalfLength"),
34  conf.getParameter<double>("originZPosition")) {
35  seedpt = conf_.getParameter<double>("SeedPt");
36  builderName = conf_.getParameter<std::string>("TTRHBuilder");
37  geometry = conf_.getUntrackedParameter<std::string>("GeometricStructure", "STANDARD");
38  multipleScatteringFactor = conf_.getUntrackedParameter<double>("multipleScatteringFactor", 1.0);
39  seedMomentum = conf_.getUntrackedParameter<double>("SeedMomentum", 1);
40 }

References builderName, conf_, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), multipleScatteringFactor, seedMomentum, seedpt, and AlCaHLTBitMon_QueryRunRegistry::string.

◆ ~SeedGeneratorForCRack()

virtual SeedGeneratorForCRack::~SeedGeneratorForCRack ( )
inlinevirtual

Definition at line 25 of file SeedGeneratorForCRack.h.

25 {};

Member Function Documentation

◆ init()

void SeedGeneratorForCRack::init ( const SiStripRecHit2DCollection collstereo,
const SiStripRecHit2DCollection collrphi,
const SiStripMatchedRecHit2DCollection collmatched,
const edm::EventSetup c 
)

Definition at line 5 of file SeedGeneratorForCRack.cc.

8  {
10  iSetup.get<TrackerDigiGeometryRecord>().get(tracker);
13  theUpdator = new KFUpdator();
14 
15  // get the transient builder
16 
18 
19  iSetup.get<TransientRecHitRecord>().get(builderName, theBuilder);
20  TTTRHBuilder = theBuilder.product();
21  CosmicLayerPairs cosmiclayers(geometry);
22  cosmiclayers.init(collstereo, collrphi, collmatched, iSetup);
23  thePairGenerator = new CosmicHitPairGenerator(cosmiclayers, iSetup);
24  HitPairs.clear();
26  LogDebug("CosmicSeedFinder") << "Initialized with " << HitPairs.size() << " hit pairs" << std::endl;
27 }

References alongMomentum, builderName, edm::EventSetup::get(), get, CosmicHitPairGenerator::hitPairs(), HitPairs, CosmicLayerPairs::init(), LogDebug, magfield, oppositeToMomentum, edm::ESHandle< T >::product(), region, OrderedHitPairs::size(), thePairGenerator, thePropagatorAl, thePropagatorOp, theUpdator, tracker, and TTTRHBuilder.

Referenced by CRackSeedGenerator::produce().

◆ run()

void SeedGeneratorForCRack::run ( TrajectorySeedCollection output,
const edm::EventSetup c 
)

Definition at line 42 of file SeedGeneratorForCRack.cc.

42  {
43  seeds(output, iSetup, region);
44  delete thePairGenerator;
45  delete thePropagatorAl;
46  delete thePropagatorOp;
47  delete theUpdator;
48 }

References convertSQLitetoXML_cfg::output, region, seeds(), thePairGenerator, thePropagatorAl, thePropagatorOp, and theUpdator.

Referenced by CRackSeedGenerator::produce().

◆ seeds()

void SeedGeneratorForCRack::seeds ( TrajectorySeedCollection output,
const edm::EventSetup c,
const TrackingRegion region 
)

Definition at line 50 of file SeedGeneratorForCRack.cc.

52  {
53  for (unsigned int is = 0; is < HitPairs.size(); is++) {
54  GlobalPoint inner = tracker->idToDet((*(HitPairs[is].inner())).geographicalId())
55  ->surface()
56  .toGlobal((*(HitPairs[is].inner())).localPosition());
57  GlobalPoint outer = tracker->idToDet((*(HitPairs[is].outer())).geographicalId())
58  ->surface()
59  .toGlobal((*(HitPairs[is].outer())).localPosition());
60 
61  LogDebug("CosmicSeedFinder") << "inner point of the seed " << inner << " outer point of the seed " << outer;
62  SeedingHitSet::ConstRecHitPointer inrhit = HitPairs[is].inner();
63  SeedingHitSet::ConstRecHitPointer outrhit = HitPairs[is].outer();
64 
66  hits.push_back(HitPairs[is].outer()->hit()->clone());
67 
68  for (int i = 0; i < 2; i++) {
69  //FIRST STATE IS CALCULATED CONSIDERING THAT THE CHARGE CAN BE POSITIVE OR NEGATIVE
70  int predsign = (2 * i) - 1;
71  if ((outer.y() - inner.y()) > 0) {
72  GlobalVector momentum = GlobalVector(inner - outer);
73  momentum = momentum.unit() * seedMomentum;
74  GlobalTrajectoryParameters Gtp(inner, momentum, predsign, &(*magfield));
75  AlgebraicSymMatrix55 errMatrix = ROOT::Math::SMatrixIdentity();
76  TSOS innerState = TSOS(Gtp,
77  CurvilinearTrajectoryError(errMatrix),
78  tracker->idToDet((HitPairs[is].inner()->hit())->geographicalId())->surface());
79  const TSOS innerUpdated = theUpdator->update(innerState, *inrhit);
80  //Cosmic Seed update inner...
81  LogDebug("CosmicSeedFinder") << " FirstTSOS " << innerUpdated;
82 
83  //First propagation
84  const TSOS outerState = thePropagatorOp->propagate(
85  innerUpdated, tracker->idToDet((*(HitPairs[is].outer())).geographicalId())->surface());
86  if (outerState.isValid()) {
87  LogDebug("CosmicSeedFinder") << "outerState " << outerState;
88  TSOS outerUpdated = theUpdator->update(outerState, *outrhit);
89  //fudge factor for multiple scattering
91  if (outerUpdated.isValid()) {
92  LogDebug("CosmicSeedFinder") << "outerUpdated " << outerUpdated;
93 
95  outerUpdated, (*(HitPairs[is].outer())).geographicalId().rawId());
96  output.push_back(TrajectorySeed(PTraj, hits, alongMomentum));
97 
98  } else
99  edm::LogWarning("CosmicSeedFinder") << " SeedForCosmics first update failed ";
100  } else
101  edm::LogWarning("CosmicSeedFinder") << " SeedForCosmics first propagation failed ";
102 
103  } else {
104  GlobalVector momentum = GlobalVector(outer - inner);
105  momentum = momentum.unit() * seedMomentum;
106  GlobalTrajectoryParameters Gtp(inner, momentum, predsign, &(*magfield));
107  AlgebraicSymMatrix55 errMatrix = ROOT::Math::SMatrixIdentity();
108  TSOS innerState = TSOS(Gtp,
109  CurvilinearTrajectoryError(errMatrix),
110  tracker->idToDet((HitPairs[is].inner()->hit())->geographicalId())->surface());
111  const TSOS innerUpdated = theUpdator->update(innerState, *inrhit);
112  LogDebug("CosmicSeedFinder") << " FirstTSOS " << innerState;
113 
114  //First propagation
115  const TSOS outerState = thePropagatorOp->propagate(
116  innerUpdated, tracker->idToDet((*(HitPairs[is].outer())).geographicalId())->surface());
117  if (outerState.isValid()) {
118  LogDebug("CosmicSeedFinder") << "outerState " << outerState;
119  TSOS outerUpdated = theUpdator->update(outerState, *outrhit);
120  //fudge factor for multiple scattering
122  if (outerUpdated.isValid()) {
123  LogDebug("CosmicSeedFinder") << "outerUpdated " << outerUpdated;
125  outerUpdated, (*(HitPairs[is].outer())).geographicalId().rawId());
126  output.push_back(TrajectorySeed(PTraj, hits, oppositeToMomentum));
127 
128  } else
129  edm::LogWarning("CosmicSeedFinder") << " SeedForCosmics first update failed ";
130  } else
131  edm::LogWarning("CosmicSeedFinder") << " SeedForCosmics first propagation failed ";
132  }
133  }
134  }
135 }

References alongMomentum, clone(), HitPairs, hfClusterShapes_cfi::hits, mps_fire::i, TrackerGeometry::idToDet(), SurfaceOrientation::inner, TrajectoryStateOnSurface::isValid(), LogDebug, magfield, multipleScatteringFactor, oppositeToMomentum, SurfaceOrientation::outer, convertSQLitetoXML_cfg::output, trajectoryStateTransform::persistentState(), PropagatorWithMaterial::propagate(), TrajectoryStateOnSurface::rescaleError(), seedMomentum, OrderedHitPairs::size(), GeomDet::surface(), thePropagatorOp, theUpdator, Surface::toGlobal(), tracker, Vector3DBase< T, FrameTag >::unit(), and KFUpdator::update().

Referenced by run().

Member Data Documentation

◆ builderName

std::string SeedGeneratorForCRack::builderName
private

Definition at line 45 of file SeedGeneratorForCRack.h.

Referenced by init(), and SeedGeneratorForCRack().

◆ conf_

edm::ParameterSet SeedGeneratorForCRack::conf_
private

Definition at line 35 of file SeedGeneratorForCRack.h.

Referenced by SeedGeneratorForCRack().

◆ geometry

std::string SeedGeneratorForCRack::geometry
private

Definition at line 46 of file SeedGeneratorForCRack.h.

◆ HitPairs

OrderedHitPairs SeedGeneratorForCRack::HitPairs
private

Definition at line 48 of file SeedGeneratorForCRack.h.

Referenced by init(), and seeds().

◆ magfield

edm::ESHandle<MagneticField> SeedGeneratorForCRack::magfield
private

Definition at line 38 of file SeedGeneratorForCRack.h.

Referenced by init(), and seeds().

◆ multipleScatteringFactor

float SeedGeneratorForCRack::multipleScatteringFactor
private

Definition at line 49 of file SeedGeneratorForCRack.h.

Referenced by SeedGeneratorForCRack(), and seeds().

◆ region

GlobalTrackingRegion SeedGeneratorForCRack::region
private

Definition at line 36 of file SeedGeneratorForCRack.h.

Referenced by init(), and run().

◆ seedMomentum

double SeedGeneratorForCRack::seedMomentum
private

Definition at line 50 of file SeedGeneratorForCRack.h.

Referenced by SeedGeneratorForCRack(), and seeds().

◆ seedpt

float SeedGeneratorForCRack::seedpt
private

Definition at line 47 of file SeedGeneratorForCRack.h.

Referenced by SeedGeneratorForCRack().

◆ thePairGenerator

CosmicHitPairGenerator* SeedGeneratorForCRack::thePairGenerator
private

Definition at line 37 of file SeedGeneratorForCRack.h.

Referenced by init(), and run().

◆ thePropagatorAl

PropagatorWithMaterial* SeedGeneratorForCRack::thePropagatorAl
private

Definition at line 42 of file SeedGeneratorForCRack.h.

Referenced by init(), and run().

◆ thePropagatorOp

PropagatorWithMaterial* SeedGeneratorForCRack::thePropagatorOp
private

Definition at line 43 of file SeedGeneratorForCRack.h.

Referenced by init(), run(), and seeds().

◆ theUpdator

KFUpdator* SeedGeneratorForCRack::theUpdator
private

Definition at line 41 of file SeedGeneratorForCRack.h.

Referenced by init(), run(), and seeds().

◆ tracker

edm::ESHandle<TrackerGeometry> SeedGeneratorForCRack::tracker
private

Definition at line 39 of file SeedGeneratorForCRack.h.

Referenced by init(), and seeds().

◆ TTTRHBuilder

const TransientTrackingRecHitBuilder* SeedGeneratorForCRack::TTTRHBuilder
private

Definition at line 44 of file SeedGeneratorForCRack.h.

Referenced by init().

Vector3DBase
Definition: Vector3DBase.h:8
TrackerGeometry::idToDet
const TrackerGeomDet * idToDet(DetId) const override
Definition: TrackerGeometry.cc:193
edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
KFUpdator::update
TrajectoryStateOnSurface update(const TrajectoryStateOnSurface &, const TrackingRecHit &) const override
Definition: KFUpdator.cc:177
mps_fire.i
i
Definition: mps_fire.py:355
hfClusterShapes_cfi.hits
hits
Definition: hfClusterShapes_cfi.py:5
PropagatorWithMaterial::propagate
TrajectoryStateOnSurface propagate(STA const &state, SUR const &surface) const
Definition: Propagator.h:50
convertSQLitetoXML_cfg.output
output
Definition: convertSQLitetoXML_cfg.py:32
trajectoryStateTransform::persistentState
PTrajectoryStateOnDet persistentState(const TrajectoryStateOnSurface &ts, unsigned int detid)
Definition: TrajectoryStateTransform.cc:14
geometry
Definition: geometry.py:1
SeedingHitSet::ConstRecHitPointer
BaseTrackerRecHit const * ConstRecHitPointer
Definition: SeedingHitSet.h:10
TransientRecHitRecord
Definition: TransientRecHitRecord.h:14
oppositeToMomentum
Definition: PropagationDirection.h:4
SeedGeneratorForCRack::thePropagatorAl
PropagatorWithMaterial * thePropagatorAl
Definition: SeedGeneratorForCRack.h:42
SeedGeneratorForCRack::seedpt
float seedpt
Definition: SeedGeneratorForCRack.h:47
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
GlobalVector
Global3DVector GlobalVector
Definition: GlobalVector.h:10
SeedGeneratorForCRack::thePairGenerator
CosmicHitPairGenerator * thePairGenerator
Definition: SeedGeneratorForCRack.h:37
SeedGeneratorForCRack::tracker
edm::ESHandle< TrackerGeometry > tracker
Definition: SeedGeneratorForCRack.h:39
IdealMagneticFieldRecord
Definition: IdealMagneticFieldRecord.h:11
SeedGeneratorForCRack::seedMomentum
double seedMomentum
Definition: SeedGeneratorForCRack.h:50
GeomDet::surface
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:37
TrajectoryStateOnSurface
Definition: TrajectoryStateOnSurface.h:16
PropagatorWithMaterial
Definition: PropagatorWithMaterial.h:25
SeedGeneratorForCRack::multipleScatteringFactor
float multipleScatteringFactor
Definition: SeedGeneratorForCRack.h:49
Vector3DBase::unit
Vector3DBase unit() const
Definition: Vector3DBase.h:54
CurvilinearTrajectoryError
Definition: CurvilinearTrajectoryError.h:27
clone
TEveGeoShape * clone(const TEveElement *element, TEveElement *parent)
Definition: eve_macros.cc:135
SeedGeneratorForCRack::conf_
edm::ParameterSet conf_
Definition: SeedGeneratorForCRack.h:35
SurfaceOrientation::inner
Definition: Surface.h:19
TrackerDigiGeometryRecord
Definition: TrackerDigiGeometryRecord.h:15
Surface::toGlobal
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
Definition: Surface.h:79
edm::ESHandle< TransientTrackingRecHitBuilder >
GlobalTrajectoryParameters
Definition: GlobalTrajectoryParameters.h:15
Point3DBase< float, GlobalTag >
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::LogWarning
Definition: MessageLogger.h:141
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:670
SeedGeneratorForCRack::theUpdator
KFUpdator * theUpdator
Definition: SeedGeneratorForCRack.h:41
SeedGeneratorForCRack::HitPairs
OrderedHitPairs HitPairs
Definition: SeedGeneratorForCRack.h:48
SeedGeneratorForCRack::magfield
edm::ESHandle< MagneticField > magfield
Definition: SeedGeneratorForCRack.h:38
CosmicLayerPairs
Definition: CosmicLayerPairs.h:19
get
#define get
TrajectoryStateOnSurface::rescaleError
void rescaleError(double factor)
Definition: TrajectoryStateOnSurface.h:82
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
CosmicHitPairGenerator
Definition: CosmicHitPairGenerator.h:17
SeedGeneratorForCRack::TTTRHBuilder
const TransientTrackingRecHitBuilder * TTTRHBuilder
Definition: SeedGeneratorForCRack.h:44
TrajectorySeed
Definition: TrajectorySeed.h:17
OrderedHitPairs::size
unsigned int size() const override
Definition: OrderedHitPairs.h:12
PTrajectoryStateOnDet
Definition: PTrajectoryStateOnDet.h:10
SurfaceOrientation::outer
Definition: Surface.h:19
SeedGeneratorForCRack::builderName
std::string builderName
Definition: SeedGeneratorForCRack.h:45
SeedGeneratorForCRack::region
GlobalTrackingRegion region
Definition: SeedGeneratorForCRack.h:36
AlgebraicSymMatrix55
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
Definition: AlgebraicROOTObjects.h:23
alongMomentum
Definition: PropagationDirection.h:4
CosmicHitPairGenerator::hitPairs
void hitPairs(const TrackingRegion &reg, OrderedHitPairs &prs, const edm::EventSetup &iSetup)
form base class
Definition: CosmicHitPairGenerator.cc:25
KFUpdator
Definition: KFUpdator.h:32
TrajectoryStateOnSurface::isValid
bool isValid() const
Definition: TrajectoryStateOnSurface.h:54
hit
Definition: SiStripHitEffFromCalibTree.cc:88
SeedGeneratorForCRack::thePropagatorOp
PropagatorWithMaterial * thePropagatorOp
Definition: SeedGeneratorForCRack.h:43
edm::OwnVector< TrackingRecHit >
SeedGeneratorForCRack::TSOS
TrajectoryStateOnSurface TSOS
Definition: SeedGeneratorForCRack.h:23
SeedGeneratorForCRack::seeds
void seeds(TrajectorySeedCollection &output, const edm::EventSetup &c, const TrackingRegion &region)
Definition: SeedGeneratorForCRack.cc:50