50 if( !track_h.isValid() ) {
51 LogInfo(
"OutputInfo") <<
" failed to retrieve track collection";
52 LogInfo(
"OutputInfo") <<
" TrackMaker cannot continue...!";
62 if( !theMagField.isValid() ) {
63 LogInfo(
"OutputInfo") <<
" failed to retrieve the magnetic field";
64 LogInfo(
"OutputInfo") <<
" TrackMaker cannot continue...!";
81 unsigned int iTIndex=-1;
96 hww.
trks_d0phiCov() .push_back( -
i->covariance(TrackBase::i_phi, TrackBase::i_dxy) );
102 int tpCharge (
i->charge() );
106 const float zdist = 314.;
107 const float radius = 130.;
108 const float corner = 1.479;
116 if(
i->eta() < -corner ) {
117 tsos = myAP.propagate( fts, *lendcap);
119 else if( fabs(
i->eta()) < corner ) {
120 tsos = myAP.propagate( fts, *barrel);
122 else if(
i->eta() > corner ) {
123 tsos = myAP.propagate( fts, *rendcap);
129 if(
i->extra().isAvailable()) {
130 bool valid_hit =
false;
131 uint32_t hit_pattern;
133 bool pixel_hit =
false;
134 bool strip_hit =
false;
142 if(i_layer > 1)
break;
143 int k = ihit-
i->recHitsBegin();
148 if(!valid_hit)
continue;
151 if (pixel_hit_cast ==
NULL){
152 LogInfo(
"OutputInfo") <<
" pixel_hit_cast is NULL, TrackMaker quitting";
161 const SiStripRecHit1D *strip_hit_cast =
dynamic_cast<const SiStripRecHit1D*
>(&(**ihit));
162 const SiStripRecHit2D *strip2d_hit_cast =
dynamic_cast<const SiStripRecHit2D*
>(&(**ihit));
164 if(strip_hit_cast ==
NULL) {
165 if(strip2d_hit_cast ==
NULL) {
166 LogInfo(
"OutputInfo") <<
" strip2d_hit_cast is NULL, TrackMaker quitting";
169 cluster = strip2d_hit_cast->cluster();
172 cluster = strip_hit_cast->cluster();
174 int cluster_size = (int)cluster->amplitudes().size();
175 int cluster_charge = 0;
176 double cluster_weight_size = 0.0;
177 int max_strip_i = std::max_element(cluster->amplitudes().begin(),cluster->amplitudes().end())-cluster->amplitudes().begin();
178 for(
int istrip = 0; istrip < cluster_size; istrip++){
179 cluster_charge += (int)cluster->amplitudes().at(istrip);
180 cluster_weight_size += (istrip-max_strip_i)*(istrip-max_strip_i)*(cluster->amplitudes().at(istrip));
182 cluster_weight_size =
sqrt(cluster_weight_size/cluster_charge);
190 hww.
trks_nlayers() .push_back(
i->hitPattern().trackerLayersWithMeasurement() );
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
TkRotation< Scalar > RotationType
std::vector< float > & trks_phiErr()
T getParameter(std::string const &) const
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
std::vector< int > & trks_valid_pixelhits()
void Load_trks_d0phiCov()
bool getByToken(EDGetToken token, Handle< PROD > &result) const
TrackMaker(const edm::ParameterSet &, edm::ConsumesCollector)
std::vector< LorentzVector > & trks_vertex_p4()
std::vector< LorentzVector > & trks_trk_p4()
void Load_trks_qualityMask()
std::vector< float > & trks_d0()
Point3DBase< Scalar, GlobalTag > PositionType
std::vector< float > & trks_chi2()
std::vector< float > & trks_z0Err()
std::vector< float > & trks_z0()
static PlanePointer build(Args &&...args)
static bool pixelHitFilter(uint32_t pattern)
edm::EDGetTokenT< edm::View< reco::Track > > TrackCollection_
std::vector< float > & trks_ndof()
static bool validHitFilter(uint32_t pattern)
std::vector< int > & trks_qualityMask()
void Load_trks_vertex_p4()
std::vector< float > & trks_d0phiCov()
std::vector< float > & trks_etaErr()
Pixel cluster – collection of neighboring pixels above threshold.
void Load_trks_valid_pixelhits()
static bool stripHitFilter(uint32_t pattern)
std::vector< float > & trks_d0Err()
int numberOfValidPixelHits() const
void SetVars(HWW &, const edm::Event &, const edm::EventSetup &)
std::vector< int > & trks_nlayers()
ROOT::Math::LorentzVector< ROOT::Math::PxPyPzE4D< float > > XYZTLorentzVectorF
Lorentz vector with cylindrical internal representation using pseudorapidity.
uint32_t getHitPattern(int position) const
std::vector< int > & trks_charge()
tuple AnalyticalPropagator
math::PtEtaPhiELorentzVectorF LorentzVector