fNMultBins = nMultBins;
fNZvtxBins = nZvtxBins;
- for (int iM=0; iM<nMultBins; iM++) {
+ for (Int_t iM=0; iM<nMultBins; iM++) {
std::vector<EventPool*> evp;
- for (int iZ=0; iZ<nZvtxBins; iZ++) {
+ for (Int_t iZ=0; iZ<nZvtxBins; iZ++) {
evp.push_back(new EventPool(depth,
multbin[iM], multbin[iM+1],
zvtxbin[iZ], zvtxbin[iZ+1] ));
fEvPool.push_back(evp);
}
- for (int iM=0; iM<nMultBins; iM++) {
- for (int iZ=0; iZ<nZvtxBins; iZ++) {
+ for (Int_t iM=0; iM<nMultBins; iM++) {
+ for (Int_t iZ=0; iZ<nZvtxBins; iZ++) {
fEvPool.at(iM).at(iZ)->SetMultBinIndex(iM);
fEvPool.at(iM).at(iZ)->SetZvtxBinIndex(iZ);
}
bool print_this = false;
if (print_this) {
cout << "fEvPool outer size: " << fEvPool.size() << endl;
- for (int iM=0; iM<nMultBins; iM++) {
- for (int iZ=0; iZ<nZvtxBins; iZ++) {
+ for (Int_t iM=0; iM<nMultBins; iM++) {
+ for (Int_t iZ=0; iZ<nZvtxBins; iZ++) {
if(fEvPool.at(iM).at(iZ)) {
cout << "multiplicity bin: " << iM;
cout << ", z-vertex bin: " << iZ;
return 0;
}
-EventPool* AutoCorr::GetEventPool(int iMult, int iZvtx) const
+EventPool* AutoCorr::GetEventPool(Int_t iMult, Int_t iZvtx) const
{
if (iMult < 0 || iMult >= fNMultBins) return 0x0;
if (iZvtx < 0 || iZvtx >= fNZvtxBins) return 0x0;
return fEvPool.at(iMult).at(iZvtx);
}
-Int_t AutoCorr::UpdatePools(int iEvent, MyHeader* ev, TClonesArray* trk)
+Int_t AutoCorr::UpdatePools(Int_t iEvent, const MyHeader* ev, TClonesArray* trk)
{
- for (int iM=0; iM<fNMultBins; iM++) {
- for (int iZ=0; iZ<fNZvtxBins; iZ++) {
+ for (Int_t iM=0; iM<fNMultBins; iM++) {
+ for (Int_t iZ=0; iZ<fNZvtxBins; iZ++) {
fEvPool.at(iM).at(iZ)->UpdatePool(iEvent, ev, trk);
}
}
}
Bool_t AutoCorr::IsEventOk(const MyHeader &ev, Int_t minVc,
- Int_t maxNTracklets, Double_t zMin, Double_t zMax) const
+ Int_t maxNTracklets, Double_t zMin, Double_t zMax,
+ Int_t trbit) const
{
Bool_t VcOk = ev.fVc >= minVc;
Bool_t NTrackletsOK = ev.fNTracklets <= maxNTracklets;
Bool_t zOk = InBounds(ev.fVz, zMin, zMax);
- return (!ev.fIsPileupSPD && VcOk && NTrackletsOK && zOk);
+ Bool_t trOk = 1;
+ if (trbit)
+ trOk = (ev.fTrClassMask>>trbit&1);
+ return (!ev.fIsPileupSPD && VcOk && NTrackletsOK && zOk && trOk);
}
Bool_t AutoCorr::IsTrackOk(const MyPart &t, Double_t etaMin, Double_t etaMax) const
AutoCorr(){;}
~AutoCorr(){;}
-
Double_t DeltaPhi(const MyPart &t1, const MyPart &t2,
Double_t rangeMin = -TMath::Pi()/2,
Double_t rangeMax = 3*TMath::Pi()/2) const;
Double_t InvMass(const MyPart &p1, const MyPart &p2) const;
Bool_t IsEventOk(const MyHeader &ev, Int_t minVc,
Int_t maxNTracklets, Double_t zMin,
- Double_t zMax) const;
+ Double_t zMax, Int_t trmask = -1) const;
Bool_t InBounds(Double_t val, Double_t min, Double_t max) const;
Bool_t InBounds(Int_t val, Int_t min, Int_t max) const;
Int_t InitEventPools(Int_t depth,
Int_t nmultbins, Double_t multbins[],
Int_t nzvtxbins, Double_t zvtxbins[]);
- Int_t UpdatePools(int iEvent, MyHeader* ev, TClonesArray* trk);
+ Int_t UpdatePools(Int_t iEvent, const MyHeader *ev, TClonesArray *trk);
protected:
Int_t fNMultBins; // mult bins