//-----------------------------------------------------------------------
AliFlowEvent::AliFlowEvent():
- AliFlowEventSimple(), fApplyRecentering(kFALSE), fCachedRun(-1), fCurrentCentrality(-1)
+ AliFlowEventSimple(), fApplyRecentering(-1), fCachedRun(-1), fCurrentCentrality(-1)
{
// constructor
for(Int_t i(0); i < 9; i++) {
//-----------------------------------------------------------------------
AliFlowEvent::AliFlowEvent(Int_t n):
- AliFlowEventSimple(n), fApplyRecentering(kFALSE), fCachedRun(-1), fCurrentCentrality(-1)
+ AliFlowEventSimple(n), fApplyRecentering(-1), fCachedRun(-1), fCurrentCentrality(-1)
{
// constructor
for(Int_t i(0); i < 9; i++) {
AliFlowEvent::AliFlowEvent( const AliMCEvent* anInput,
const AliCFManager* rpCFManager,
const AliCFManager* poiCFManager):
- AliFlowEventSimple(20), fApplyRecentering(kFALSE), fCachedRun(-1), fCurrentCentrality(-1)
+ AliFlowEventSimple(20), fApplyRecentering(-1), fCachedRun(-1), fCurrentCentrality(-1)
{
// constructor
for(Int_t i(0); i < 9; i++) {
AliFlowEvent::AliFlowEvent( const AliESDEvent* anInput,
const AliCFManager* rpCFManager,
const AliCFManager* poiCFManager ):
- AliFlowEventSimple(20), fApplyRecentering(kFALSE), fCachedRun(-1), fCurrentCentrality(-1)
+ AliFlowEventSimple(20), fApplyRecentering(-1), fCachedRun(-1), fCurrentCentrality(-1)
{
// constructor
for(Int_t i(0); i < 9; i++) {
AliFlowEvent::AliFlowEvent( const AliAODEvent* anInput,
const AliCFManager* rpCFManager,
const AliCFManager* poiCFManager):
- AliFlowEventSimple(20), fApplyRecentering(kFALSE), fCachedRun(-1), fCurrentCentrality(-1)
+ AliFlowEventSimple(20), fApplyRecentering(-1), fCachedRun(-1), fCurrentCentrality(-1)
{
// constructor
for(Int_t i(0); i < 9; i++) {
KineSource anOption,
const AliCFManager* rpCFManager,
const AliCFManager* poiCFManager ):
- AliFlowEventSimple(20), fApplyRecentering(kFALSE), fCachedRun(-1), fCurrentCentrality(-1)
+ AliFlowEventSimple(20), fApplyRecentering(-1), fCachedRun(-1), fCurrentCentrality(-1)
{
// constructor
for(Int_t i(0); i < 9; i++) {
AliFlowEvent::AliFlowEvent( const AliESDEvent* anInput,
const AliMultiplicity* anInputTracklets,
const AliCFManager* poiCFManager ):
- AliFlowEventSimple(20), fApplyRecentering(kFALSE), fCachedRun(-1), fCurrentCentrality(-1)
+ AliFlowEventSimple(20), fApplyRecentering(-1), fCachedRun(-1), fCurrentCentrality(-1)
{
// constructor
for(Int_t i(0); i < 9; i++) {
AliFlowEvent::AliFlowEvent( const AliESDEvent* esd,
const AliCFManager* poiCFManager,
Bool_t hybrid):
- AliFlowEventSimple(20), fApplyRecentering(kFALSE), fCachedRun(-1), fCurrentCentrality(-1)
+ AliFlowEventSimple(20), fApplyRecentering(-1), fCachedRun(-1), fCurrentCentrality(-1)
{
// constructor
for(Int_t i(0); i < 9; i++) {
AliFlowEvent::AliFlowEvent( const AliESDEvent* anInput,
const TH2F* anInputFMDhist,
const AliCFManager* poiCFManager ):
- AliFlowEventSimple(20), fApplyRecentering(kFALSE), fCachedRun(-1), fCurrentCentrality(-1)
+ AliFlowEventSimple(20), fApplyRecentering(-1), fCachedRun(-1), fCurrentCentrality(-1)
{
// constructor
for(Int_t i(0); i < 9; i++) {
SetVZEROCalibrationForTrackCuts(rpCuts);
// for now, recentering is only applied if the user specifically asks for it
// by setting the flag to kTRUE in the ali flow track cuts
- fApplyRecentering = rpCuts->GetApplyRecentering();
+ if(!rpCuts->GetApplyRecentering()) {
+ // if the user does not want to recenter, switch the flag
+ fApplyRecentering = -1;
+ }
// note: this flag is used in the overloaded implementation of Get2Qsub()
// and tells the function to use as Qsub vectors the recentered Q-vectors
- // from the VZERO aodb file
+ // from the VZERO oadb file or from the event header
}
if (sourcePOI ==AliFlowTrackCuts::kV0 || sourcePOI == AliFlowTrackCuts::kVZERO) {
// probably no-one will choose vzero tracks as poi's ...
// get q vectors for the subevents. if no recentering is necessary, get the guy from the flow event simple
AliFlowEventSimple::Get2Qsub(Qarray, n, weightsList, usePhiWeights, usePtWeights, useEtaWeights);
// else get the recentering from the cached info
- if (fApplyRecentering) // set by Fill()
+ if (fApplyRecentering == 2010) // 10h style recentering
{
// first retrieve the q-vectors from the AliFlowEventSimple:: routine
AliFlowVector vA = Qarray[0];
// update the vector
vA.Set(QxcCor, QycCor);
vB.Set(QxaCor, QyaCor);
+ } else if (fApplyRecentering == 2011) { // 11h style recentering
+ // in this case, the q-vectors are repaced by the ones from
+ // the event header
+
+ // first retrieve the q-vectors from the AliFlowEventSimple:: routine
+ AliFlowVector vA = Qarray[0];
+ AliFlowVector vB = Qarray[1];
+
+ Double_t QxaCor = 0.;
+ Double_t QyaCor = 0.;
+ Double_t QxcCor = 0.;
+ Double_t QycCor = 0.;
+
+ // copy the new q-vectors from the cache
+ if(n == 2) {
+ QxaCor = fMeanQ[0][1][0];
+ QyaCor = fMeanQ[0][1][1];
+ QxcCor = fMeanQ[0][0][0];
+ QycCor = fMeanQ[0][0][1];
+ } else if (n == 3) {
+ QxaCor = fMeanQv3[0][1][0];
+ QyaCor = fMeanQv3[0][1][1];
+ QxcCor = fMeanQv3[0][0][0];
+ QycCor = fMeanQv3[0][0][1];
+ }
+ // set the new q-vectors (which in this case means REPLACING)
+ vA.Set(QxcCor, QycCor);
+ vB.Set(QxaCor, QyaCor);
}
}
//_____________________________________________________________________________
Int_t run(cuts->GetEvent()->GetRunNumber());
// printf ( " > run number is %i \n", run);
if(fCachedRun == run) {
-// printf(" run number didn't change, using cached values \n");
+ // the runnumber did not change, no need to open the database again
+ // in case of 11h style recentering, update the q-sub vectors
+ if(fApplyRecentering == 2011) SetVZEROCalibrationForTrackCuts2011(cuts);
return;
}
// set the chached run number
printf("OADB object hMultV0BefCorr is not available in the file\n");
return;
}
-
if(!(cont->GetObject(run))){
+ // if the multiplicity correction cannot be found for the specified run,
+ // loop over the 11h runs to see if it's 11h data
+ Int_t runs11h[] = {170593, 170572, 170556, 170552, 170546, 170390, 170389, 170388, 170387, 170315, 170313, 170312, 170311, 170309, 170308, 170306, 170270, 170269, 170268, 170267, 170264, 170230, 170228, 170208, 170207, 170205, 170204, 170203, 170195, 170193, 170163, 170162, 170159, 170155, 170152, 170091, 170089, 170088, 170085, 170084, 170083, 170081, 170040, 170038, 170036, 170027, 169981, 169975, 169969, 169965, 169961, 169956, 169926, 169924, 169923, 169922, 169919, 169918, 169914, 169859, 169858, 169855, 169846, 169838, 169837, 169835, 169683, 169628, 169591, 169590, 169588, 169587, 169586, 169584, 169557, 169555, 169554, 169553, 169550, 169515, 169512, 169506, 169504, 169498, 169475, 169420, 169419, 169418, 169417, 169415, 169411, 169238, 169236, 169167, 169160, 169156, 169148, 169145, 169144, 169143, 169138, 169099, 169094, 169091, 169045, 169044, 169040, 169035, 168992, 168988, 168984, 168826, 168777, 168514, 168512, 168511, 168467, 168464, 168461, 168460, 168458, 168362, 168361, 168356, 168342, 168341, 168325, 168322, 168318, 168311, 168310, 168213, 168212, 168208, 168207, 168206, 168205, 168204, 168203, 168181, 168177, 168175, 168173, 168172, 168171, 168115, 168108, 168107, 168105, 168104, 168103, 168076, 168069, 168068, 168066, 167988, 167987, 167986, 167985, 167921, 167920, 167915, 167909, 167903, 167902, 167818, 167814, 167813, 167808, 167807, 167806, 167713, 167712, 167711, 167706, 167693};
+ for(Int_t r(0); r < 176; r++) {
+ if(run == runs11h[r]) {
+ printf(" > run has been identified as 11h < \n");
+ if(cuts->GetV0gainEqualizationPerRing()) {
+ // enable or disable rings through the weights, weight 1. is enabled, 0. is disabled
+ // start with the vzero c rings (segments 0 through 31)
+ (cuts->GetUseVZERORing(0)) ? cuts->SetV0Cpol(0, 1.) : cuts->SetV0Cpol(0, 0.);
+ (cuts->GetUseVZERORing(1)) ? cuts->SetV0Cpol(1, 1.) : cuts->SetV0Cpol(1, 0.);
+ (cuts->GetUseVZERORing(2)) ? cuts->SetV0Cpol(2, 1.) : cuts->SetV0Cpol(2, 0.);
+ (cuts->GetUseVZERORing(3)) ? cuts->SetV0Cpol(3, 1.) : cuts->SetV0Cpol(3, 0.);
+ // same for vzero a
+ (cuts->GetUseVZERORing(4)) ? cuts->SetV0Apol(0, 1.) : cuts->SetV0Apol(0, 0.);
+ (cuts->GetUseVZERORing(5)) ? cuts->SetV0Apol(1, 1.) : cuts->SetV0Apol(1, 0.);
+ (cuts->GetUseVZERORing(6)) ? cuts->SetV0Apol(2, 1.) : cuts->SetV0Apol(2, 0.);
+ (cuts->GetUseVZERORing(7)) ? cuts->SetV0Apol(3, 1.) : cuts->SetV0Apol(3, 0.);
+ } else {
+ // else enable all rings
+ for(Int_t i(0); i < 4; i++) cuts->SetV0Cpol(i, 1.);
+ for(Int_t i(0); i < 4; i++) cuts->SetV0Apol(i, 1.);
+ }
+ // pass a NULL pointer to the track cuts object
+ // the NULL pointer will identify 11h runs
+ cuts->SetV0gainEqualisation(NULL);
+ // this will identify the recentering style that is required. flight might be changed if recenetering is disabled
+ fApplyRecentering = 2011;
+ SetVZEROCalibrationForTrackCuts2011(cuts);
+ return; // the rest of the steps are not necessary
+ }
+ }
+ // the run has not been identified as lhc11h data, so we assume a template calibration
printf("OADB object hMultV0BefCorr is not available for run %i (used run 137366)\n",run);
run = 137366;
}
+ printf(" > run has been identified as 10h < \n");
// step 1) get the proper multiplicity weights from the vzero signal
TProfile* fMultV0 = ((TH2F *) cont->GetObject(run))->ProfileX();
}
}
}
+ // set the recentering style (might be switched back to -1 if recentering is disabeled)
+ fApplyRecentering = 2010;
}
//_____________________________________________________________________________
+void AliFlowEvent::SetVZEROCalibrationForTrackCuts2011(AliFlowTrackCuts* cuts)
+{
+ // load the vzero q-sub vectors
+ if(!cuts->GetEvent() || !cuts->GetEvent()->GetEventplane()) return; // coverity
+ Double_t qxEPa = 0, qyEPa = 0;
+ Double_t qxEPc = 0, qyEPc = 0;
+ Double_t qxEPa3 = 0, qyEPa3 = 0;
+ Double_t qxEPc3 = 0, qyEPc3 = 0;
+
+ // get the q-vectors from the header
+ cuts->GetEvent()->GetEventplane()->CalculateVZEROEventPlane(cuts->GetEvent(), 8, 2, qxEPa, qyEPa);
+ cuts->GetEvent()->GetEventplane()->CalculateVZEROEventPlane(cuts->GetEvent(), 9, 2, qxEPc, qyEPc);
+ cuts->GetEvent()->GetEventplane()->CalculateVZEROEventPlane(cuts->GetEvent(), 8, 3, qxEPa3, qyEPa3);
+ cuts->GetEvent()->GetEventplane()->CalculateVZEROEventPlane(cuts->GetEvent(), 9, 3, qxEPc3, qyEPc3);
+
+ // store the values temporarily. this may seem
+ // inelegant, but we don't want to include
+ // aliflowtrackcuts or alivevnet in get2qsub
+
+ // qx and qy for vzero a, second harmonc
+ fMeanQ[0][1][0] = qxEPa;
+ fMeanQ[0][1][1] = qyEPa;
+ // qx and qx for vzero c, second harmonic
+ fMeanQ[0][0][0] = qxEPc;
+ fMeanQ[0][0][1] = qyEPc;
+ // qx and qy for vzero a, third harmonic
+ fMeanQv3[0][1][0] = qxEPa3;
+ fMeanQv3[0][1][1] = qyEPa3;
+ // qx and qy for vzero c, third harmonic
+ fMeanQv3[0][0][0] = qxEPc3;
+ fMeanQv3[0][0][1] = qyEPc3;
+}
+//_____________________________________________________________________________
//-----------------------------------------------------------------------
AliFlowTrackCuts* AliFlowTrackCuts::GetStandardVZEROOnlyTrackCuts()
+{
+ //returns the lhc10h vzero track cuts, this function
+ //is left here for backward compatibility
+ //if a run is recognized as 11h, the calibration method will
+ //switch to 11h calbiration, which means that the cut
+ //object is updated but not replaced.
+ //calibratin is only available for PbPb runs
+ return GetStandardVZEROOnlyTrackCuts2010();
+}
+//-----------------------------------------------------------------------
+AliFlowTrackCuts* AliFlowTrackCuts::GetStandardVZEROOnlyTrackCuts2010()
{
//get standard V0 cuts
- AliFlowTrackCuts* cuts = new AliFlowTrackCuts("standard vzero flow cuts");
+ AliFlowTrackCuts* cuts = new AliFlowTrackCuts("standard vzero flow cuts 2010");
cuts->SetParamType(kV0);
cuts->SetEtaRange( -10, +10 );
cuts->SetPhiMin( 0 );
cuts->SetPhiMax( TMath::TwoPi() );
// options for the reweighting
cuts->SetV0gainEqualizationPerRing(kFALSE);
- cuts->SetApplyRecentering(kFALSE);
+ cuts->SetApplyRecentering(kTRUE);
// to exclude a ring , do e.g.
-// cuts->SetUseVZERORing(7, kFALSE);
+ // cuts->SetUseVZERORing(7, kFALSE);
+ return cuts;
+}
+//-----------------------------------------------------------------------
+AliFlowTrackCuts* AliFlowTrackCuts::GetStandardVZEROOnlyTrackCuts2011()
+{
+ //get standard V0 cuts for 2011 data
+ //in this case, the vzero segments will be weighted by
+ //VZEROEqMultiplicity,
+ //if recentering is enableded, the sub-q vectors
+ //will be taken from the event header, so make sure to run
+ //the VZERO event plane selection task before this task !
+ //recentering replaces the already evaluated q-vectors, so
+ //when chosen, additional settings (e.g. excluding rings)
+ //have no effect. recentering is true by default
+ //
+ //NOTE user is responsible for running the vzero event plane
+ //selection task in advance, e.g. add to your launcher macro
+ //
+ // gROOT->LoadMacro("$ALICE_ROOT/ANALYSIS/macros/AddTaskVZEROEPSelection.C");
+ // AddTaskVZEROEPSelection();
+ //
+ AliFlowTrackCuts* cuts = new AliFlowTrackCuts("standard vzero flow cuts 2011");
+ cuts->SetParamType(kV0);
+ cuts->SetEtaRange( -10, +10 );
+ cuts->SetPhiMin( 0 );
+ cuts->SetPhiMax( TMath::TwoPi() );
+ cuts->SetApplyRecentering(kTRUE);
return cuts;
}
-
//-----------------------------------------------------------------------
AliFlowTrackCuts* AliFlowTrackCuts::GetStandardGlobalTrackCuts2010()
{
// 10102013 weighting vzero tiles - rbertens@cern.ch
if(!fV0gainEqualization) {
// if for some reason the equalization is not initialized (e.g. 2011 data)
- if(id<32) { // v0c side
+ // the fV0xpol[] weights are used to enable or disable vzero rings
+ if(id<32) { // v0c side
fTrackEta = -3.45+0.5*(id/8);
- fTrackWeight = fEvent->GetVZEROEqMultiplicity(id);
+ if(id < 8) fTrackWeight = fEvent->GetVZEROEqMultiplicity(id)*fV0Cpol[0];
+ else if (id < 16 ) fTrackWeight = fEvent->GetVZEROEqMultiplicity(id)*fV0Cpol[1];
+ else if (id < 24 ) fTrackWeight = fEvent->GetVZEROEqMultiplicity(id)*fV0Cpol[2];
+ else if (id < 32 ) fTrackWeight = fEvent->GetVZEROEqMultiplicity(id)*fV0Cpol[3];
} else { // v0a side
fTrackEta = +4.8-0.6*((id/8)-4);
- fTrackWeight = fEvent->GetVZEROEqMultiplicity(id);
+ if( id < 40) fTrackWeight = fEvent->GetVZEROEqMultiplicity(id)*fV0Apol[0];
+ else if ( id < 48 ) fTrackWeight = fEvent->GetVZEROEqMultiplicity(id)*fV0Apol[1];
+ else if ( id < 56 ) fTrackWeight = fEvent->GetVZEROEqMultiplicity(id)*fV0Apol[2];
+ else if ( id < 64 ) fTrackWeight = fEvent->GetVZEROEqMultiplicity(id)*fV0Apol[3];
}
} else { // the equalization is initialized
// note that disabled rings have already been excluded on calibration level in
fTrackEta = +4.8-0.6*((id/8)-4);
if( id < 40) fTrackWeight = fEvent->GetVZEROData()->GetMultiplicity(id)*fV0Apol[0]/fV0gainEqualization->GetBinContent(1+id);
else if ( id < 48 ) fTrackWeight = fEvent->GetVZEROData()->GetMultiplicity(id)*fV0Apol[1]/fV0gainEqualization->GetBinContent(1+id);
- else if ( id < 56) fTrackWeight = fEvent->GetVZEROData()->GetMultiplicity(id)*fV0Apol[2]/fV0gainEqualization->GetBinContent(1+id);
+ else if ( id < 56 ) fTrackWeight = fEvent->GetVZEROData()->GetMultiplicity(id)*fV0Apol[2]/fV0gainEqualization->GetBinContent(1+id);
else if ( id < 64 ) fTrackWeight = fEvent->GetVZEROData()->GetMultiplicity(id)*fV0Apol[3]/fV0gainEqualization->GetBinContent(1+id);
}
// printf ( " tile %i and weight %.2f \n", id, fTrackWeight);