108 <<
" # of points: " << combinedTime.
nDof() <<std::endl;
118 std::vector <double>
x,
y;
119 double invbeta=0, invbetaerr=0;
120 double vertexTime=0, vertexTimeErr=0, vertexTimeR=0, vertexTimeRErr=0;
121 double freeBeta, freeBetaErr, freeTime, freeTimeErr;
123 if (tmSeq.
dstnc.size()<=1)
return;
125 for (
unsigned int i=0;
i<tmSeq.
dstnc.size();
i++) {
127 x.push_back(tmSeq.
dstnc.at(
i)/30.);
134 for (
unsigned int i=0;
i<tmSeq.
dstnc.size();
i++) {
143 double cf = 1./(tmSeq.
dstnc.size()-1);
155 rawFit(freeBeta, freeBetaErr, freeTime, freeTimeErr, x, y);
207 double hitWeight = 1/(emErr*emErr);
212 cmbSeq.
weightInvbeta.push_back(hitDist*hitDist*hitWeight/(30.*30.));
214 cmbSeq.
dstnc.push_back(hitDist);
226 double s=0,sx=0,sy=0,
x,
y;
230 if (hitsx.size()==0)
return;
231 if (hitsx.size()==1) {
234 for (
unsigned int i = 0;
i != hitsx.size();
i++) {
244 double d = s*sxx - sx*sx;
245 b = (sxx*sy- sx*sxy)/ d;
246 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
float ecal_time
Calorimeter timing.
bool isNull() const
Checks for null.
MuonTimingFiller(const edm::ParameterSet &)
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) ...
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