107 <<
" # of points: " << combinedTime.
nDof() <<std::endl;
117 std::vector <double>
x,
y;
118 double invbeta=0, invbetaerr=0;
119 double vertexTime=0, vertexTimeErr=0, vertexTimeR=0, vertexTimeRErr=0;
120 double freeBeta, freeBetaErr, freeTime, freeTimeErr;
122 if (tmSeq.
dstnc.size()<=1)
return;
124 for (
unsigned int i=0;
i<tmSeq.
dstnc.size();
i++) {
126 x.push_back(tmSeq.
dstnc.at(
i)/30.);
133 for (
unsigned int i=0;
i<tmSeq.
dstnc.size();
i++) {
142 double cf = 1./(tmSeq.
dstnc.size()-1);
154 rawFit(freeBeta, freeBetaErr, freeTime, freeTimeErr, x, y);
206 double hitWeight = 1/(emErr*emErr);
211 cmbSeq.
weightInvbeta.push_back(hitDist*hitDist*hitWeight/(30.*30.));
213 cmbSeq.
dstnc.push_back(hitDist);
225 double s=0,sx=0,sy=0,
x,
y;
229 if (hitsx.size()==0)
return;
230 if (hitsx.size()==1) {
233 for (
unsigned int i = 0;
i != hitsx.size();
i++) {
243 double d = s*sxx - sx*sx;
244 b = (sxx*sy- sx*sxy)/ d;
245 a = (s*sxy - sx*sy) / d;
T getParameter(std::string const &) const
void addEcalTime(const reco::Muon &muon, TimeMeasurementSequence &cmbSeq)
void combineTMSequences(const reco::Muon &muon, const TimeMeasurementSequence &dtSeq, const TimeMeasurementSequence &cscSeq, TimeMeasurementSequence &cmbSeq)
std::vector< double > local_t0
MuonTimingFiller(const edm::ParameterSet &, edm::ConsumesCollector &&iC)
float ecal_time
Calorimeter timing.
void rawFit(double &a, double &da, double &b, double &db, const std::vector< double > &hitsx, const std::vector< double > &hitsy)
std::vector< double > weightInvbeta
int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
bool isNull() const
Checks for null.
void fillTimeFromMeasurements(const TimeMeasurementSequence &tmSeq, reco::MuonTimeExtra &muTime)
bool isEnergyValid() const
MuonEnergy calEnergy() const
get energy deposition information
float emMax
maximal energy of ECAL crystal in the 5x5 shape
double totalWeightInvbeta
virtual TrackRef combinedMuon() const
reference to a stand-alone muon Track
DTTimingExtractor * theDTTimingExtractor_
CSCTimingExtractor * theCSCTimingExtractor_
DetId ecal_id
DetId of the central ECAL crystal.
std::vector< double > dstnc
void fillTiming(const reco::Muon &muon, reco::MuonTimeExtra &dtTime, reco::MuonTimeExtra &cscTime, reco::MuonTimeExtra &combinedTime, edm::Event &iEvent, const edm::EventSetup &iSetup)
math::XYZPointF ecal_position
Trajectory position at the calorimeter.
std::vector< double > weightVertex
virtual TrackRef standAloneMuon() const
reference to a stand-alone muon Track