ROOT logo
/**
 * @file   ForwardAODConfig.C
 * @author Christian Holm Christensen <cholm@dalsgaard.hehi.nbi.dk>
 * @date   Wed Mar 23 13:56:02 2011
 * 
 * @brief  
 * 
 * @ingroup pwglf_forward_scripts_tasks
 * 
 */
/**
 * Configuration script for forward multiplicity task.  
 *
 * You can copy this to your working directory or to some other
 * directory up-front in your ROOT macro path, and edit it to suit your
 * needs.
 * 
 * @param task  Task to configure 
 *
 * @ingroup pwglf_forward_aod
 */
void
ForwardAODConfig(AliForwardMultiplicityBase* task)
{
  if (!task) return;

  Info("ForwardAODConfig", "Setting up task %s (%p)", task->GetName(), task);

  // --- General parameters ------------------------------------------
  // Whether to enable low flux specific code 
  task->SetEnableLowFlux(kFALSE);

  // --- Check for MC ------------------------------------------------
  // Would like to use dynamic cast but CINT interprets that as a 
  // static cast - sigh!
  Bool_t         mc = (task->IsA()==AliForwardMCMultiplicityTask::Class());

  // --- Cuts --------------------------------------------------------
  // Note, the absolute lowest signal to consider - ever -
  // irrespective of MC or real data, is 0.15.  Signals below this
  // will contain remenants of the pedestal (yes, the width of the
  // pedestal is small, but there are many _many_ channels with only
  // pedestal value in them, so the absolute number of high-value
  // pedestal signals is large - despite the low probablity).
  AliFMDMultCuts cSharingLow(AliFMDMultCuts::kFixed,0.15);
  AliFMDMultCuts cSharingHigh(AliFMDMultCuts::kLandauSigmaWidth,1);
  AliFMDMultCuts cDensity(AliFMDMultCuts::kLandauSigmaWidth,1);
  
  // --- Event inspector ---------------------------------------------
  // Set the number of SPD tracklets for which we consider the event a
  // low flux event
  task->GetEventInspector().SetLowFluxCut(1000); 
  // Set the maximum error on v_z [cm]
  task->GetEventInspector().SetMaxVzErr(0.2);
  // Least number of constributors to 2nd pile-up vertex -was 3
  task->GetEventInspector().SetMinPileupContributors(5);
  // Least distance from primary to 2nd pile-up vertex (cm)
  task->GetEventInspector().SetMinPileupDistance(.8);
  // V0-AND triggered events flagged as NSD 
  task->GetEventInspector().SetUseV0AndForNSD(false);
  // Set the kind of vertex to look for.  Can be one of 
  //  
  //   - kNormal:    SPD vertex 
  //   - kpA2012:    Selection tuned for 2012 pA data 
  //   - kpA2013:    Selection tuned for 2013 pA data 
  //   - kPWGUD:     Selection used by 'first physics' 
  //   - kDisplaced: Satellite collisions, with kNormal fall-back 
  // 
  task->GetEventInspector().SetVertexMethod(AliFMDEventInspector::kNormal);
  // Which centrality estimator to use 
  task->GetEventInspector().SetCentralityMethod("V0M");
  // How to tag events as pile-up.  Bit pattern of 
  //
  //   - 0x1:      SPD multi-vertex 
  //   - 0x2:      Track multi-vertex 
  //   - 0x4:      Out-of-bunch
  // 
  task->GetEventInspector().SetPileupFlags(0x7);

  // --- ESD fixer ---------------------------------------------------
  // Sets the noise factor that was used during reconstruction.  If
  // this is set to 4 or more, then this correction will be disabled.
  task->GetESDFixer().SetRecoNoiseFactor(1);
  // IF the noise correction is bigger than this, flag strip as dead 
  task->GetESDFixer().SetMaxNoiseCorrection(0.05);
  // Sets whether to recalculate eta 
  task->GetESDFixer().SetRecalculateEta(false);
  // If true, consider AliESDFMD::kInvalidMult as a zero signal.  This
  // has the unfortunate side effect, that we cannot use the
  // on-the-fly calculation of the phi acceptance.  
  // 
  // *IMPORTANT*
  // 
  // Before revision 43711 of AliFMDReconstructor, all strips with no
  // signal where set to kInvalidMult.  From revision 43711 (Release
  // 4-19-Rev-09) empty strips that are not marked as bad have a
  // signal of 0 (zero).  That means, that for any reconstruction done
  // with releases prior to 4-19-Rev-09 this flag _must_ be defined as
  // true. 
  // 
  // The unfortunate side effect mentioned above is especially cruel
  // in this case, since we would benefit a lot from this setting for
  // that data.  However, one can add dead strips here using
  // AliFMDSharingFilter::AddDeadStrip or
  // AliFMDSharingFilter::AddDeadRegion to remedy the situation, since
  // strips added explicitly here are always ignored.  In the future,
  // the acceptance maker script should generate the list
  // automaticallu.
  //
  // LHC10c-900Gev is effected up-to and including pass3 
  // LHC10c-7TeV is effected up-to and including pass2
  // LHC10c-CPass0 should be OK, but has limited statistics 
  // LHC10c_11a_FMD should be OK, but has few runs  
  task->GetESDFixer().SetInvalidIsEmpty(false);
  // Dead region in FMD2i
  task->GetESDFixer().AddDeadRegion(2, 'I', 16, 17, 256, 511);  
  // One can add extra dead strips from a script like 
  // 
  //   void deadstrips(AliFMDSharingFilter* filter)
  //   {
  //     filter->AddDead(...);
  //     // ... and so on 
  //   }
  //
  // and then do here 
  // 
  // task->GetESDFixer().AddDead("deadstrips.C");

  // --- Sharing filter ----------------------------------------------
  // If the following is set to true, then the merging of shared
  // signals is disabled completely
  // task->GetSharingFilter().SetMergingDisabled(false);
  // Enable use of angle corrected signals in the algorithm 
  task->GetSharingFilter().SetUseAngleCorrectedSignals(true);
  // Ignore the ESD information when angle correcting.
  // 
  // *IMPORTANT* 
  // 
  // This is to counter a known issue with AliESDFMD with ClassDef 
  // version < 4, where the angle correction flag is incorrectly set.
  // A fix is coming to AliESDFMD to handle it directly in the class. 
  // Only set the flag below to true if you know it to be necessary for
  // your data set.
  task->GetSharingFilter().SetIgnoreESDWhenAngleCorrecting(false);
  // Disable use of angle corrected signals in the algorithm 
  task->GetSharingFilter().SetZeroSharedHitsBelowThreshold(false);
  // Whether to use simple merging algorithm
  task->GetSharingFilter().SetUseSimpleSharing(true);
  // Whether to allow for 3 strip hits - deprecated
  task->GetSharingFilter().SetAllow3Strips(false);
  // Set upper sharing cut 
  task->GetSharingFilter().SetHCuts(cSharingHigh);
  // Enable use of angle corrected signals in the algorithm 
  task->GetSharingFilter().SetLCuts(cSharingLow);
   
  // --- Density calculator ------------------------------------------
  // Set the maximum number of particle to try to reconstruct 
  task->GetDensityCalculator().SetMaxParticles(10);
  // Wet whether to use poisson statistics to estimate N_ch
  task->GetDensityCalculator().SetUsePoisson(true);
  // Set whether or not to include sigma in cut
  task->GetDensityCalculator().SetCuts(cDensity);
  // Set lumping (nEta,nPhi)
  task->GetDensityCalculator().SetLumping(32,4);
  // Recalculate phi taking (x,y) offset of IP into account 
  task->GetDensityCalculator().SetRecalculatePhi(true);
  // Least acceptable quality of ELoss fits
  task->GetDensityCalculator().SetMinQuality(8);
  // Set the maximum ratio of outlier bins to the total number of bins
  // task->GetDensityCalculator().SetMaxOutliers(.10);
  task->GetDensityCalculator().SetMaxOutliers(1.0);//Disable filter
  // Set the maximum relative diviation between N_ch from Eloss and Poisson
  task->GetDensityCalculator().SetOutlierCut(0.5);
  // Set whether or not to use the phi acceptance
  //   AliFMDDensityCalculator::kPhiNoCorrect
  //   AliFMDDensityCalculator::kPhiCorrectNch
  //   AliFMDDensityCalculator::kPhiCorrectELoss
  task->GetDensityCalculator()
    .SetUsePhiAcceptance(AliFMDDensityCalculator::kPhiCorrectNch);

  // --- Corrector ---------------------------------------------------
  // Whether to use the secondary map correction.  By default we turn
  // off secondary correction for normal data, and on for simulated
  // data.
  task->GetCorrections().SetUseSecondaryMap(mc);
  // Whether to use the vertex bias correction (deprecated)
  task->GetCorrections().SetUseVertexBias(false);
  // Whether to use the acceptance correction from dead-strips (deprecated)
  task->GetCorrections().SetUseAcceptance(false);
  // Whether to use the merging efficiency correction  (deprecated)
  task->GetCorrections().SetUseMergingEfficiency(false);

  // --- Histogram Collector -----------------------------------------
  // Set the number of extra bins (beyond the secondary map border) 
  task->GetHistCollector().SetNCutBins(2);
  // Set the correction cut, that is, when bins in the secondary map 
  // is smaller than this, they are considered empty 
  task->GetHistCollector().SetCorrectionCut(0.5);
  // How to calculate the value of overlapping bins. 
  // Possible values are 
  //    kStraightMean 
  //    kStraightMeanNoZero 
  //    kWeightedMean 
  //    kLeastError 
  //    kSum
  //    kPreferInner
  //    kPreferOuter
  task->GetHistCollector().SetMergeMethod(AliFMDHistCollector::kStraightMean);
  // How to find the fiducial area of the secondary maps 
  // Possible values are 
  //   kByCut    Only bins larger that cut are trusted 
  //   kDistance Only bins that are more than half the size of it neighbors
  task->GetHistCollector().SetFiducialMethod(AliFMDHistCollector::kByCut);
  // Additional diagnostics output - off by default
  // 
  // If this option is enabled, then the summed per-vertex, per-ring
  // d2N/detadphi histograms will be stored in the output, as well as
  // copies of the secondary maps
  task->GetHistCollector().SetMakeBGHitMaps(false);
  //
  // If this option is enabled, then a 3D histogram will be made for
  // each ring, summing dN/deta for each centrality bin.
  task->GetHistCollector().SetMakeCentralitySums(false);

  // --- Eventplane Finder -------------------------------------------
  task->GetEventPlaneFinder().SetUsePhiWeights(false);

  // --- Ring AOD output ---------------------------------------------
  // If set to true, then 5 additional branches will be created on the
  // output AOD - one for each FMD ring.  The branches each contain a
  // TH2D object of the (primary) charged particle multiplicity per
  // (eta,phi)-bin in that event 
  task->SetStorePerRing(false);

  // --- Set limits on fits the energy -------------------------------
  // DO NOT CHANGE THESE UNLESS YOU KNOW WHAT YOU ARE DOING
  // Maximum relative error on parameters 
  // AliFMDCorrELossFit::ELossFit::fgMaxRelError = .12;
  // Least weight to use 
  // AliFMDCorrELossFit::ELossFit::fgLeastWeight = 1e-5;
  // Maximum value of reduced chi^2 
  // AliFMDCorrELossFit::ELossFit::fgMaxChi2nu   = 10;

  // --- Debug -------------------------------------------------------
  // Set the overall debug level (1: some output, 3: a lot of output)
  // task->SetDebug(0);
  // Set the debug level of a single algorithm 
  // task->GetSharingFilter().SetDebug(3);
}
//
// EOF
//
 ForwardAODConfig.C:1
 ForwardAODConfig.C:2
 ForwardAODConfig.C:3
 ForwardAODConfig.C:4
 ForwardAODConfig.C:5
 ForwardAODConfig.C:6
 ForwardAODConfig.C:7
 ForwardAODConfig.C:8
 ForwardAODConfig.C:9
 ForwardAODConfig.C:10
 ForwardAODConfig.C:11
 ForwardAODConfig.C:12
 ForwardAODConfig.C:13
 ForwardAODConfig.C:14
 ForwardAODConfig.C:15
 ForwardAODConfig.C:16
 ForwardAODConfig.C:17
 ForwardAODConfig.C:18
 ForwardAODConfig.C:19
 ForwardAODConfig.C:20
 ForwardAODConfig.C:21
 ForwardAODConfig.C:22
 ForwardAODConfig.C:23
 ForwardAODConfig.C:24
 ForwardAODConfig.C:25
 ForwardAODConfig.C:26
 ForwardAODConfig.C:27
 ForwardAODConfig.C:28
 ForwardAODConfig.C:29
 ForwardAODConfig.C:30
 ForwardAODConfig.C:31
 ForwardAODConfig.C:32
 ForwardAODConfig.C:33
 ForwardAODConfig.C:34
 ForwardAODConfig.C:35
 ForwardAODConfig.C:36
 ForwardAODConfig.C:37
 ForwardAODConfig.C:38
 ForwardAODConfig.C:39
 ForwardAODConfig.C:40
 ForwardAODConfig.C:41
 ForwardAODConfig.C:42
 ForwardAODConfig.C:43
 ForwardAODConfig.C:44
 ForwardAODConfig.C:45
 ForwardAODConfig.C:46
 ForwardAODConfig.C:47
 ForwardAODConfig.C:48
 ForwardAODConfig.C:49
 ForwardAODConfig.C:50
 ForwardAODConfig.C:51
 ForwardAODConfig.C:52
 ForwardAODConfig.C:53
 ForwardAODConfig.C:54
 ForwardAODConfig.C:55
 ForwardAODConfig.C:56
 ForwardAODConfig.C:57
 ForwardAODConfig.C:58
 ForwardAODConfig.C:59
 ForwardAODConfig.C:60
 ForwardAODConfig.C:61
 ForwardAODConfig.C:62
 ForwardAODConfig.C:63
 ForwardAODConfig.C:64
 ForwardAODConfig.C:65
 ForwardAODConfig.C:66
 ForwardAODConfig.C:67
 ForwardAODConfig.C:68
 ForwardAODConfig.C:69
 ForwardAODConfig.C:70
 ForwardAODConfig.C:71
 ForwardAODConfig.C:72
 ForwardAODConfig.C:73
 ForwardAODConfig.C:74
 ForwardAODConfig.C:75
 ForwardAODConfig.C:76
 ForwardAODConfig.C:77
 ForwardAODConfig.C:78
 ForwardAODConfig.C:79
 ForwardAODConfig.C:80
 ForwardAODConfig.C:81
 ForwardAODConfig.C:82
 ForwardAODConfig.C:83
 ForwardAODConfig.C:84
 ForwardAODConfig.C:85
 ForwardAODConfig.C:86
 ForwardAODConfig.C:87
 ForwardAODConfig.C:88
 ForwardAODConfig.C:89
 ForwardAODConfig.C:90
 ForwardAODConfig.C:91
 ForwardAODConfig.C:92
 ForwardAODConfig.C:93
 ForwardAODConfig.C:94
 ForwardAODConfig.C:95
 ForwardAODConfig.C:96
 ForwardAODConfig.C:97
 ForwardAODConfig.C:98
 ForwardAODConfig.C:99
 ForwardAODConfig.C:100
 ForwardAODConfig.C:101
 ForwardAODConfig.C:102
 ForwardAODConfig.C:103
 ForwardAODConfig.C:104
 ForwardAODConfig.C:105
 ForwardAODConfig.C:106
 ForwardAODConfig.C:107
 ForwardAODConfig.C:108
 ForwardAODConfig.C:109
 ForwardAODConfig.C:110
 ForwardAODConfig.C:111
 ForwardAODConfig.C:112
 ForwardAODConfig.C:113
 ForwardAODConfig.C:114
 ForwardAODConfig.C:115
 ForwardAODConfig.C:116
 ForwardAODConfig.C:117
 ForwardAODConfig.C:118
 ForwardAODConfig.C:119
 ForwardAODConfig.C:120
 ForwardAODConfig.C:121
 ForwardAODConfig.C:122
 ForwardAODConfig.C:123
 ForwardAODConfig.C:124
 ForwardAODConfig.C:125
 ForwardAODConfig.C:126
 ForwardAODConfig.C:127
 ForwardAODConfig.C:128
 ForwardAODConfig.C:129
 ForwardAODConfig.C:130
 ForwardAODConfig.C:131
 ForwardAODConfig.C:132
 ForwardAODConfig.C:133
 ForwardAODConfig.C:134
 ForwardAODConfig.C:135
 ForwardAODConfig.C:136
 ForwardAODConfig.C:137
 ForwardAODConfig.C:138
 ForwardAODConfig.C:139
 ForwardAODConfig.C:140
 ForwardAODConfig.C:141
 ForwardAODConfig.C:142
 ForwardAODConfig.C:143
 ForwardAODConfig.C:144
 ForwardAODConfig.C:145
 ForwardAODConfig.C:146
 ForwardAODConfig.C:147
 ForwardAODConfig.C:148
 ForwardAODConfig.C:149
 ForwardAODConfig.C:150
 ForwardAODConfig.C:151
 ForwardAODConfig.C:152
 ForwardAODConfig.C:153
 ForwardAODConfig.C:154
 ForwardAODConfig.C:155
 ForwardAODConfig.C:156
 ForwardAODConfig.C:157
 ForwardAODConfig.C:158
 ForwardAODConfig.C:159
 ForwardAODConfig.C:160
 ForwardAODConfig.C:161
 ForwardAODConfig.C:162
 ForwardAODConfig.C:163
 ForwardAODConfig.C:164
 ForwardAODConfig.C:165
 ForwardAODConfig.C:166
 ForwardAODConfig.C:167
 ForwardAODConfig.C:168
 ForwardAODConfig.C:169
 ForwardAODConfig.C:170
 ForwardAODConfig.C:171
 ForwardAODConfig.C:172
 ForwardAODConfig.C:173
 ForwardAODConfig.C:174
 ForwardAODConfig.C:175
 ForwardAODConfig.C:176
 ForwardAODConfig.C:177
 ForwardAODConfig.C:178
 ForwardAODConfig.C:179
 ForwardAODConfig.C:180
 ForwardAODConfig.C:181
 ForwardAODConfig.C:182
 ForwardAODConfig.C:183
 ForwardAODConfig.C:184
 ForwardAODConfig.C:185
 ForwardAODConfig.C:186
 ForwardAODConfig.C:187
 ForwardAODConfig.C:188
 ForwardAODConfig.C:189
 ForwardAODConfig.C:190
 ForwardAODConfig.C:191
 ForwardAODConfig.C:192
 ForwardAODConfig.C:193
 ForwardAODConfig.C:194
 ForwardAODConfig.C:195
 ForwardAODConfig.C:196
 ForwardAODConfig.C:197
 ForwardAODConfig.C:198
 ForwardAODConfig.C:199
 ForwardAODConfig.C:200
 ForwardAODConfig.C:201
 ForwardAODConfig.C:202
 ForwardAODConfig.C:203
 ForwardAODConfig.C:204
 ForwardAODConfig.C:205
 ForwardAODConfig.C:206
 ForwardAODConfig.C:207
 ForwardAODConfig.C:208
 ForwardAODConfig.C:209
 ForwardAODConfig.C:210
 ForwardAODConfig.C:211
 ForwardAODConfig.C:212
 ForwardAODConfig.C:213
 ForwardAODConfig.C:214
 ForwardAODConfig.C:215
 ForwardAODConfig.C:216
 ForwardAODConfig.C:217
 ForwardAODConfig.C:218
 ForwardAODConfig.C:219
 ForwardAODConfig.C:220
 ForwardAODConfig.C:221
 ForwardAODConfig.C:222
 ForwardAODConfig.C:223
 ForwardAODConfig.C:224
 ForwardAODConfig.C:225
 ForwardAODConfig.C:226
 ForwardAODConfig.C:227
 ForwardAODConfig.C:228
 ForwardAODConfig.C:229
 ForwardAODConfig.C:230
 ForwardAODConfig.C:231
 ForwardAODConfig.C:232
 ForwardAODConfig.C:233
 ForwardAODConfig.C:234
 ForwardAODConfig.C:235
 ForwardAODConfig.C:236
 ForwardAODConfig.C:237
 ForwardAODConfig.C:238
 ForwardAODConfig.C:239
 ForwardAODConfig.C:240
 ForwardAODConfig.C:241
 ForwardAODConfig.C:242
 ForwardAODConfig.C:243
 ForwardAODConfig.C:244
 ForwardAODConfig.C:245
 ForwardAODConfig.C:246
 ForwardAODConfig.C:247
 ForwardAODConfig.C:248
 ForwardAODConfig.C:249
 ForwardAODConfig.C:250
 ForwardAODConfig.C:251
 ForwardAODConfig.C:252
 ForwardAODConfig.C:253