13 std::vector<susybsm::RPCHit4D> HSCPRPCRecHits = uHSCPRPCRecHits;
15 bool outOfTime =
false;
16 bool increasing =
true;
17 bool anydifferentzero =
true;
18 bool anydifferentone =
true;
22 std::sort(HSCPRPCRecHits.begin(), HSCPRPCRecHits.end());
24 for(std::vector<susybsm::RPCHit4D>::iterator
point = HSCPRPCRecHits.begin();
point < HSCPRPCRecHits.end(); ++
point) {
25 outOfTime |= (
point->bx!=0);
26 increasing &= (
point->bx>=lastbx);
27 anydifferentzero &= (!(
point->bx==0));
28 anydifferentone &= (!(
point->bx==1));
44 float maginfirstknee = 0;
45 for(std::vector<susybsm::RPCHit4D>::iterator
point = HSCPRPCRecHits.begin();
point < HSCPRPCRecHits.end(); ++
point) {
47 maginfirstknee =
point->gp.mag();
48 }
else if((lastbx!=
point->bx)){
50 maginknee=
point->gp.mag();
58 betavalue=maginfirstknee/(25.-delay+maginfirstknee/30.)/30.;
64 if(!anydifferentzero){
65 betavalue=maginknee/(25-delay+maginknee/30.)/30.;
66 }
else if(!anydifferentone){
67 betavalue=maginknee/(50-delay+maginknee/30.)/30.;
69 betavalue1=maginknee/(25-delay+maginknee/30.)/30.;
70 float dr =(maginknee-maginfirstknee);
71 betavalue2 = dr/(25.-delay+dr/30.);
73 betavalue = (betavalue1 + betavalue2)*0.5;
82 for(std::vector<susybsm::RPCHit4D>::iterator
point = HSCPRPCRecHits.begin();
point < HSCPRPCRecHits.end(); ++
point) {
84 maginfirstknee =
point->gp.mag();
85 }
else if((lastbx!=
point->bx)){
89 float maginsecondknee=
point->gp.mag();
90 betavalue1=maginknee/(25-delay+maginknee/30.)/30.;
91 float dr =(maginknee-maginsecondknee);
92 betavalue2 = dr/(25.+dr/30.);
98 betavalue = (betavalue1 + betavalue2)*0.5;
108 if(HSCPRPCRecHits.empty()){
125 std::vector<RPCHit4D>
hits;
131 start = candidate.
muonRef()->combinedMuon()->recHitsBegin();
132 stop = candidate.
muonRef()->combinedMuon()->recHitsEnd();
134 start = candidate.
muonRef()->standAloneMuon()->recHitsBegin();
135 stop = candidate.
muonRef()->standAloneMuon()->recHitsEnd();
149 if ( (*recHit)->geographicalId().det() !=
DetId::Muon )
continue;
150 if (!(*recHit)->isValid())
continue;
154 typedef std::pair<RPCRecHitCollection::const_iterator, RPCRecHitCollection::const_iterator> rangeRecHits;
155 rangeRecHits recHitCollection = rpcHits->get(rollId);
160 for(recHitC = recHitCollection.first; recHitC != recHitCollection.second ; recHitC++) {
161 clusterS=(*recHitC).clusterSize();
167 if(clusterS>4)
continue;
169 LocalPoint recHitPos=(*recHit)->localPosition();
170 const RPCRoll* rollasociated = rpcGeo->
roll(rollId);
175 ThisHit.
gp = RPCSurface.toGlobal(recHitPos);
176 ThisHit.
id = (
RPCDetId)(*recHit)->geographicalId().rawId();
177 hits.push_back(ThisHit);
182 bool increasing =
true;
183 bool outOfTime =
false;
184 for(std::vector<RPCHit4D>::iterator
point = hits.begin();
point < hits.end(); ++
point) {
185 outOfTime |= (
point->bx!=0);
186 increasing &= (
point->bx>=lastbx);
T getParameter(std::string const &) const
bool isNonnull() const
Checks for non-null.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
void addInfoToCandidate(susybsm::HSCParticle &candidate, const edm::Event &iEvent, const edm::EventSetup &iSetup)
const Plane & surface() const
The nominal surface of the GeomDet.
C::const_iterator const_iterator
constant access iterator type
BetaCalculatorRPC(const edm::ParameterSet &iConfig, edm::ConsumesCollector &&iC)
reco::MuonRef muonRef() const
void setRpc(const RPCBetaMeasurement &data)
void algo(const std::vector< susybsm::RPCHit4D > &HSCPRPCRecHits)
*vegas h *****************************************************used in the default bin number in original ***version of VEGAS is ***a higher bin number might help to derive a more precise ***grade subtle point
const RPCRoll * roll(RPCDetId id) const
Return a roll given its id.