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;
141 if(i_layer > 1)
break;
142 int k = ihit-
i->recHitsBegin();
147 if(!valid_hit)
continue;
150 if (pixel_hit_cast ==
NULL){
151 LogInfo(
"OutputInfo") <<
" pixel_hit_cast is NULL, TrackMaker quitting";
159 const SiStripRecHit1D *strip_hit_cast =
dynamic_cast<const SiStripRecHit1D*
>(&(**ihit));
160 const SiStripRecHit2D *strip2d_hit_cast =
dynamic_cast<const SiStripRecHit2D*
>(&(**ihit));
162 if(strip_hit_cast ==
NULL) {
163 if(strip2d_hit_cast ==
NULL) {
164 LogInfo(
"OutputInfo") <<
" strip2d_hit_cast is NULL, TrackMaker quitting";
167 cluster = strip2d_hit_cast->cluster();
170 cluster = strip_hit_cast->cluster();
172 int cluster_size = (int)cluster->amplitudes().size();
173 int cluster_charge = 0;
174 double cluster_weight_size = 0.0;
175 int max_strip_i = std::max_element(cluster->amplitudes().begin(),cluster->amplitudes().end())-cluster->amplitudes().begin();
176 for(
int istrip = 0; istrip < cluster_size; istrip++){
177 cluster_charge += (int)cluster->amplitudes().at(istrip);
178 cluster_weight_size += (istrip-max_strip_i)*(istrip-max_strip_i)*(cluster->amplitudes().at(istrip));
180 cluster_weight_size =
sqrt(cluster_weight_size/cluster_charge);
188 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
static bool pixelHitFilter(uint16_t pattern)
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()
static bool validHitFilter(uint16_t pattern)
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 stripHitFilter(uint16_t pattern)
edm::EDGetTokenT< edm::View< reco::Track > > TrackCollection_
std::vector< float > & trks_ndof()
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.
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
void Load_trks_valid_pixelhits()
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.
uint16_t getHitPattern(HitCategory category, int position) const
std::vector< int > & trks_charge()
tuple AnalyticalPropagator
math::PtEtaPhiELorentzVectorF LorentzVector